From 84781cabaccb95091efbbc1b788727befa711be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 21 May 2019 13:11:17 +0200 Subject: [PATCH 1/5] target _blank depend of mime target _blank is added in the previous line depending on mimtype --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c7288aa63d3..2b02ada6b47 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -761,7 +761,7 @@ class FormFile $out.= 'trans("File").': '.$file["name"]); $out.= dol_trunc($file["name"], 150); $out.= ''."\n"; From 18a6ed17cf47fe6fdd3c3588d9f00d1773170911 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Tue, 21 May 2019 14:49:23 +0200 Subject: [PATCH 2/5] FIX: extrafield list search: SQL error when field is multiselect --- htdocs/core/tpl/extrafields_list_search_sql.tpl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 8492160c185..bdaf963b4f5 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -27,6 +27,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ 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); } From 66dd7e30ae9bc2cb68bb6b929702460367e54fc9 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 22 May 2019 10:46:38 +0200 Subject: [PATCH 3/5] FIX: situation invoices: block progress percentage change for discount lines --- htdocs/compta/facture/class/facture.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 93f67a5a064..85933ef3e73 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3031,6 +3031,12 @@ class Facture extends CommonInvoice { global $mysoc,$user; + // Progress should never be changed for discounts + if(($line->info_bits & 2) == 2) + { + return; + } + include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'); // Cap percentages to 100 From 54f8c98b27cfd34a75606496fcddc34c6326b819 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 22 May 2019 11:12:02 +0200 Subject: [PATCH 4/5] FIX: remove isolated transaction commit --- htdocs/compta/facture/class/facture.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 85933ef3e73..f35281f73d6 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3053,7 +3053,6 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = $tabprice[18]; $line->update($user); $this->update_price(1); - $this->db->commit(); } /** From 49385fcab3fcc2d43127d414ee03fcb2ea5cac29 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Thu, 23 May 2019 14:36:53 +0200 Subject: [PATCH 5/5] FIX: situation invoices: bad detailed VAT in situations following the first one --- .../modules/facture/doc/pdf_crabe.modules.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 91d20d4830b..d6fbed744ee 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1211,24 +1211,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