diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a8c4000c331..add69abf0dc 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3136,7 +3136,13 @@ class Facture extends CommonInvoice // phpcs:enable global $mysoc,$user; - include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; + // Progress should never be changed for discount lines + if (($line->info_bits & 2) == 2) + { + return; + } + + include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'); // Cap percentages to 100 if ($percent > 100) $percent = 100; @@ -3152,7 +3158,6 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = $tabprice[18]; $line->update($user); $this->update_price(1); - $this->db->commit(); } /** @@ -4409,13 +4414,13 @@ class FactureLigne extends CommonInvoiceLine // From llx_product /** * @deprecated - * @see product_ref + * @see $product_ref */ public $ref; // Product ref (deprecated) public $product_ref; // Product ref /** * @deprecated - * @see product_label + * @see $product_label */ public $libelle; // Product label (deprecated) public $product_label; // Product label diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 73aa32ece79..679989a75a0 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -767,7 +767,7 @@ class FormFile $out.= 'trans("File").': '.$file["name"]); $out.= dol_trunc($file["name"], 150); $out.= ''."\n"; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c1172587ab5..37d63efb3e3 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1231,23 +1231,6 @@ class pdf_crabe extends ModelePDFFactures //} // VAT - // Situations totals migth be wrong on huge amounts - if ($object->situation_cycle_ref && $object->situation_counter > 1) { - - $sum_pdf_tva = 0; - foreach($this->tva as $tvakey => $tvaval){ - $sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object - } - - if($sum_pdf_tva!=$object->total_tva) { // apply coef to recover the VAT object amount (the good one) - $coef_fix_tva = $object->total_tva / $sum_pdf_tva; - - foreach($this->tva as $tvakey => $tvaval) { - $this->tva[$tvakey]=$tvaval * $coef_fix_tva; - } - } - } - foreach($this->tva as $tvakey => $tvaval) { if ($tvakey != 0) // On affiche pas taux 0 diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index f3c5a10e95b..216a7744d82 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -28,6 +28,7 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text + if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string $sql .= natural_search('ef.'.$tmpkey, $crit, $mode_search); }