Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
0a1cba2486
11 changed files with 49 additions and 31 deletions
|
|
@ -629,7 +629,7 @@ print '<br>';
|
|||
// File extension locked in upload by default
|
||||
|
||||
print '<strong>'.$langs->trans("UploadExtensionRestriction").'</strong>: ';
|
||||
print implode(', ', explode(',', getDolGlobalString('MAIN_FILE_EXTENSION_UPLOAD_RESTRICTION')));
|
||||
print implode(', ', explode(',', getDolGlobalString('MAIN_FILE_EXTENSION_UPLOAD_RESTRICTION', implode(',', getExecutableContent()))));
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Recommended").': '.implode(', ', getExecutableContent()).')</span>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -689,9 +689,11 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$newremaintopay = $object->getRemainToPay(0);
|
||||
if ($newremaintopay == 0) {
|
||||
$object->setPaid($user);
|
||||
if ($object->status == Facture::STATUS_VALIDATED) {
|
||||
$newremaintopay = $object->getRemainToPay(0);
|
||||
if ($newremaintopay == 0) {
|
||||
$object->setPaid($user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1363,6 +1363,9 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$object->lines[$i]->ref_ext = ''; // Do not clone ref_ext
|
||||
|
||||
// Do not clone accountancy ventilation: a cloned invoice must reappear in "to dispatch" list
|
||||
$object->lines[$i]->fk_code_ventilation = 0;
|
||||
}
|
||||
|
||||
// Create clone
|
||||
|
|
|
|||
|
|
@ -1403,7 +1403,7 @@ class FormFile
|
|||
// Show title of list of existing files
|
||||
$morehtmlright = '';
|
||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); } void(0);';
|
||||
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery(".divattachnewfile input[type=\'file\']").first().click();} void(0);'; // scope file picker click to the just-shown form to avoid triggering native file dialog twice when other input[type=file] exist on the page
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $permtoeditline);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15569,8 +15569,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '', $us
|
|||
//var_dump($element_prop);
|
||||
//var_dump($element_prop['module'].' '.$ismodenabled);
|
||||
if (is_array($element_prop) && (empty($element_prop['module']) || $ismodenabled)) {
|
||||
if (
|
||||
$useCache === 1
|
||||
if ($useCache === 1 && $element_id > 0
|
||||
&& !empty($conf->cache['fetchObjectByElement'][$element_type])
|
||||
&& !empty($conf->cache['fetchObjectByElement'][$element_type][$element_id])
|
||||
&& is_object($conf->cache['fetchObjectByElement'][$element_type][$element_id])
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ print '<th class="linecoluht right nowraponall">'.$langs->trans('PriceUHT').'</t
|
|||
// Multicurrency HT / excl tax
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
|
||||
print '<th class="linecoluht_currency right" style="width: 80px">'.$langs->trans('PriceUHT');
|
||||
print ' <span class="opacitymedium">('.$langs->getCurrencySymbol($this->multicurrency_code).')<span></th>';
|
||||
print ' <span class="opacitymedium">('.$langs->getCurrencySymbol($this->multicurrency_code).')</span></th>';
|
||||
}
|
||||
|
||||
// Price TTC / incl tax
|
||||
|
|
@ -222,7 +222,7 @@ print '<th class="linecolht right">'.$langs->trans('TotalHTShort').'</th>';
|
|||
// Multicurrency
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
|
||||
print '<th class="linecoltotalht_currency right">'.$langs->trans('TotalHTShort');
|
||||
print ' <span class="opacitymedium">('.$langs->getCurrencySymbol($this->multicurrency_code).')<span></th>';
|
||||
print ' <span class="opacitymedium">('.$langs->getCurrencySymbol($this->multicurrency_code).')</span></th>';
|
||||
}
|
||||
|
||||
if ($outputalsopricetotalwithtax) {
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ if ($line->special_code == 3) {
|
|||
print $tooltiponpriceend;
|
||||
print '</td>';
|
||||
if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
|
||||
print '<td class="linecolutotalht_currency nowrap right">';
|
||||
print '<td class="linecoltotalht_currency nowrap right">';
|
||||
print $tooltiponpricemultiprice;
|
||||
print price($sign * $line->multicurrency_total_ht);
|
||||
print $tooltiponpriceendmultiprice;
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ if ($line->qty > 0) { ?>
|
|||
?>
|
||||
<td class="linecolht"></td>
|
||||
<?php if (isModEnabled("multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) { ?>
|
||||
<td class="linecolutotalht_currency"></td>
|
||||
<td class="linecoltotalht_currency"></td>
|
||||
<?php } ?>
|
||||
<?php } elseif ($line->qty < 0) {
|
||||
// Base colspan if there is no module activated to display line correctly
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2025 Noé Cendrier <noe.cendrier@altairis.fr>
|
||||
* Copyright (C) 2026 Pierre Ardoin <developpeur@lesmetiersdubatiment.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1696,30 +1697,30 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
// This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
(string) $line->desc,
|
||||
(float) $line->subprice,
|
||||
(float) $line->qty,
|
||||
$line->tva_tx,
|
||||
$line->localtax1_tx,
|
||||
$line->localtax2_tx,
|
||||
$line->fk_product,
|
||||
(float) $line->localtax1_tx,
|
||||
(float) $line->localtax2_tx,
|
||||
(int) $line->fk_product,
|
||||
0,
|
||||
$line->ref_supplier ? $line->ref_supplier : $line->ref_fourn, // $line->ref_fourn comes from field ref into table of lines. Value may be a ref that does not exists anymore, so we first try with value of product
|
||||
$line->remise_percent,
|
||||
(string) ($line->ref_supplier ? $line->ref_supplier : $line->ref_fourn), // $line->ref_fourn comes from field ref into table of lines. Value may be a ref that does not exists anymore, so we first try with value of product
|
||||
(float) $line->remise_percent,
|
||||
'HT',
|
||||
0,
|
||||
$line->product_type,
|
||||
$line->info_bits,
|
||||
(float) $line->subprice_ttc,
|
||||
(int) $line->product_type,
|
||||
(int) $line->info_bits,
|
||||
0,
|
||||
$line->date_start,
|
||||
$line->date_end,
|
||||
$line->array_options,
|
||||
$line->fk_unit,
|
||||
$line->multicurrency_subprice, // pu_ht_devise
|
||||
$line->origin, // origin
|
||||
$line->origin_id, // origin_id
|
||||
$line->rang, // rang
|
||||
$line->special_code,
|
||||
(float) $line->multicurrency_subprice, // pu_ht_devise
|
||||
(string) $line->origin, // origin
|
||||
(int) $line->origin_id, // origin_id
|
||||
(int) $line->rang, // rang
|
||||
(int) $line->special_code,
|
||||
isset($line->label) ? $line->label : ''
|
||||
);
|
||||
if ($result < 0) {
|
||||
|
|
@ -2196,12 +2197,15 @@ class CommandeFournisseur extends CommonOrder
|
|||
$total_localtax1 = $tabprice[9];
|
||||
$total_localtax2 = $tabprice[10];
|
||||
$pu = $pu_ht = $tabprice[3];
|
||||
$pu_tva = $tabprice[4];
|
||||
$pu_ttc = $tabprice[5];
|
||||
|
||||
// MultiCurrency
|
||||
$multicurrency_total_ht = $tabprice[16];
|
||||
$multicurrency_total_tva = $tabprice[17];
|
||||
$multicurrency_total_ttc = $tabprice[18];
|
||||
$pu_ht_devise = $tabprice[19];
|
||||
$multicurrency_pu_ttc = $tabprice[21];
|
||||
|
||||
$localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
|
|
@ -2231,6 +2235,8 @@ class CommandeFournisseur extends CommonOrder
|
|||
$this->line->product_type = $product_type;
|
||||
$this->line->remise_percent = $remise_percent;
|
||||
$this->line->subprice = (float) $pu_ht;
|
||||
$this->line->subprice_ttc = (float) $pu_ttc;
|
||||
|
||||
$this->line->rang = $rang;
|
||||
$this->line->info_bits = $info_bits;
|
||||
|
||||
|
|
@ -2254,6 +2260,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = (float) $pu_ht_devise;
|
||||
$this->line->multicurrency_subprice_ttc = (float) $multicurrency_pu_ttc;
|
||||
$this->line->multicurrency_total_ht = (float) $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = (float) $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = (float) $multicurrency_total_ttc;
|
||||
|
|
@ -3192,6 +3199,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$multicurrency_total_tva = $tabprice[17];
|
||||
$multicurrency_total_ttc = $tabprice[18];
|
||||
$pu_ht_devise = $tabprice[19];
|
||||
$multicurrency_pu_ttc = $tabprice[21];
|
||||
|
||||
$localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
|
|
@ -3233,6 +3241,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
$this->line->remise_percent = $remise_percent;
|
||||
$this->line->subprice = (float) $pu_ht;
|
||||
$this->line->subprice_ttc = (float) $pu_ttc;
|
||||
$this->line->info_bits = $info_bits;
|
||||
$this->line->total_ht = (float) $total_ht;
|
||||
$this->line->total_tva = (float) $total_tva;
|
||||
|
|
@ -3252,11 +3261,13 @@ class CommandeFournisseur extends CommonOrder
|
|||
$this->line->fk_multicurrency = $this->fk_multicurrency;
|
||||
$this->line->multicurrency_code = $this->multicurrency_code;
|
||||
$this->line->multicurrency_subprice = (float) $pu_ht_devise;
|
||||
$this->line->multicurrency_subprice_ttc = (float) $multicurrency_pu_ttc;
|
||||
$this->line->multicurrency_total_ht = (float) $multicurrency_total_ht;
|
||||
$this->line->multicurrency_total_tva = (float) $multicurrency_total_tva;
|
||||
$this->line->multicurrency_total_ttc = (float) $multicurrency_total_ttc;
|
||||
|
||||
$this->line->subprice = (float) $pu_ht;
|
||||
$this->line->subprice_ttc = (float) $pu_ttc;
|
||||
$this->line->price = $this->line->subprice;
|
||||
|
||||
$this->line->remise_percent = $remise_percent;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Solution Libre SAS <contact@solution-libre.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2026 Pierre Ardoin <developpeur@lesmetiersdubatiment.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -194,6 +195,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
$this->ref_fourn = $objp->ref_supplier;
|
||||
$this->ref_supplier = $objp->ref_supplier;
|
||||
$this->subprice = $objp->subprice;
|
||||
$this->subprice_ttc = $objp->subprice_ttc;
|
||||
$this->tva_tx = $objp->tva_tx;
|
||||
$this->localtax1_tx = $objp->localtax1_tx;
|
||||
$this->localtax2_tx = $objp->localtax2_tx;
|
||||
|
|
@ -252,6 +254,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
$this->extraparams = !empty($objp->extraparams) ? (array) json_decode($objp->extraparams, true) : array();
|
||||
|
||||
$this->multicurrency_subprice = $objp->multicurrency_subprice;
|
||||
$this->multicurrency_subprice_ttc = $objp->multicurrency_subprice_ttc;
|
||||
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||
|
|
@ -347,7 +350,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
$sql = 'INSERT INTO '.$this->db->prefix().$this->table_element;
|
||||
$sql .= " (fk_commande, label, description, date_start, date_end,";
|
||||
$sql .= " fk_product, product_type, special_code, rang,";
|
||||
$sql .= " qty, vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,";
|
||||
$sql .= " qty, vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, subprice_ttc, ref,";
|
||||
$sql .= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,";
|
||||
$sql .= " fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc,";
|
||||
$sql .= " fk_parent_line)";
|
||||
|
|
@ -369,7 +372,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
$sql .= " ".price2num($this->localtax2_tx).",";
|
||||
$sql .= " '".$this->db->escape($this->localtax1_type)."',";
|
||||
$sql .= " '".$this->db->escape($this->localtax2_type)."',";
|
||||
$sql .= " ".((float) $this->remise_percent).", ".price2num($this->subprice, 'MU').", '".$this->db->escape($this->ref_supplier)."',";
|
||||
$sql .= " ".((float) $this->remise_percent).", ".price2num($this->subprice, 'MU').", ".price2num($this->subprice_ttc, 'MU').", '".$this->db->escape($this->ref_supplier)."',";
|
||||
$sql .= " ".price2num($this->total_ht).",";
|
||||
$sql .= " ".price2num($this->total_tva).",";
|
||||
$sql .= " ".price2num($this->total_localtax1).",";
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ if ($id && !$user->hasRight('holiday', 'readall') && !in_array($id, $childids))
|
|||
} else {
|
||||
// Show here line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven row-with-select">';
|
||||
print '<tr data-rowid="'.$holidaystatic->id.'" class="oddeven row-with-select">';
|
||||
// Action column
|
||||
if ($conf->main_checkbox_left_column) {
|
||||
print '<td class="nowrap center">';
|
||||
|
|
|
|||
Loading…
Reference in a new issue