From 8192e9dc67abfcd572c386bac761d93889bb7d87 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Mar 2020 03:02:49 +0100 Subject: [PATCH 01/14] FIX Missing token in form --- htdocs/adherents/stats/index.php | 2 ++ htdocs/comm/propal/stats/index.php | 2 ++ htdocs/commande/stats/index.php | 2 ++ htdocs/compta/deplacement/stats/index.php | 2 ++ htdocs/compta/facture/stats/index.php | 2 ++ htdocs/expensereport/stats/index.php | 2 ++ htdocs/fichinter/stats/index.php | 2 ++ htdocs/projet/stats/index.php | 1 + htdocs/projet/tasks/stats/index.php | 1 + htdocs/salaries/stats/index.php | 2 ++ htdocs/ticket/stats/index.php | 1 - 11 files changed, 18 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index f02c012a48e..10eca32ac13 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -145,6 +145,8 @@ print '
'; // Show filter box /*print '
'; +print ''; + print ''; print ''; print '
'.$langs->trans("Filter").'
'.$langs->trans("Member").''; diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 4a2b8dea419..030db477631 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -242,7 +242,9 @@ print '
'; //{ // Show filter box print ''; + print ''; print ''; + print ''; print ''; // Company diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index e9eca9dafa9..c465cdcb8c9 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -255,7 +255,9 @@ print '
'; // Show filter box print ''; +print ''; print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // Company diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index c9c48fd9b93..cf745b784fc 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -227,7 +227,9 @@ print '
'; // Show filter box print ''; +print ''; print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // Company diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index bd749e02dee..a72b03b47a3 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -235,7 +235,9 @@ print '
'; // Show filter box print ''; +print ''; print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // Company diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index 60ab9001972..359f49f2dea 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -211,7 +211,9 @@ print '
'; // Show filter box print ''; +print ''; print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // Company diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 78f3289d638..d2efb5bb3ed 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -225,7 +225,9 @@ print '
'; //{ // Show filter box print ''; + print ''; print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // Company diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index 38fa476fcab..00747e55d0e 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -272,6 +272,7 @@ dol_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, ''); print '
'; print ''; +print ''; print '
'.$langs->trans("Filter").'
'; print ''; diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index dafd5ae0071..c758664d2c6 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -139,6 +139,7 @@ dol_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, ''); print '
'; print ''; +print ''; print '
'.$langs->trans("Filter").'
'; print ''; diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php index e96b6776664..25c5be2c79d 100644 --- a/htdocs/salaries/stats/index.php +++ b/htdocs/salaries/stats/index.php @@ -193,6 +193,8 @@ print '
'; // Show filter box print ''; +print ''; + print '
'.$langs->trans("Filter").'
'; print ''; // User diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php index 1f5f06ccc1f..cf8ed28db96 100644 --- a/htdocs/ticket/stats/index.php +++ b/htdocs/ticket/stats/index.php @@ -229,7 +229,6 @@ print '
'; print ''; print ''; - print '
'.$langs->trans("Filter").'
'; print ''; // Company From 37fce0d3eeece5032fad40731f7eedc9de48119b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Mar 2020 14:45:37 +0100 Subject: [PATCH 02/14] Fix position on merou Fix preselected value on contact --- htdocs/core/class/html.formcompany.class.php | 1 + htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 6 +++--- htdocs/core/tpl/contacts.tpl.php | 7 ++++++- htdocs/expedition/contact.php | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 10ee91ad50f..58291fb75f0 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -730,6 +730,7 @@ class FormCompany extends Form if (is_object($object) && method_exists($object, 'liste_type_contact')) { $lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1); + print ' '; - $tmp = $tmp.''; + $tmp = $tmp.''; $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); print $desc; print ''; From 075757eb3df5ec2412ef85166b1330bec4d79a27 Mon Sep 17 00:00:00 2001 From: ATM john Date: Tue, 17 Mar 2020 16:49:05 +0100 Subject: [PATCH 06/14] Fix situation value transmission --- htdocs/compta/facture/card.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index c6220f647aa..94298d14f29 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3304,14 +3304,28 @@ if ($action == 'create') } $retained_warranty = GETPOST('retained_warranty', 'int'); - $retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; + if(empty($retained_warranty)){ + if(!empty($objectsrc->retained_warranty)){ // use previous situation value + $retained_warranty = $objectsrc->retained_warranty; + }else{ + $retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; + } + } + print ''; From 1fe4e4415e07d428fa0e1e8bb2da1057c7c71722 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Wed, 18 Mar 2020 09:27:08 +0100 Subject: [PATCH 07/14] FIX: Bank movements color is not showing --- htdocs/compta/bank/bankentries_list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 297f0dd91d4..d7951233f7b 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1157,14 +1157,14 @@ if ($resql) } else { $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1; } - $backgroundcolor = 'style="background-color: '.$color.';"'; + $backgroundcolor = 'style="background: '.$color.';"'; } else { if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) { $color = '#7fdb86'; } else { $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2; } - $backgroundcolor = 'style="background-color: '.$color.';"'; + $backgroundcolor = 'style="background: '.$color.';"'; } } print ''; From 2e1554def4be9c37232c9b4fe37242b8a966d97c Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 18 Mar 2020 10:18:52 +0100 Subject: [PATCH 08/14] FIX : wrong include - replace extrafields_create.tpl.php to extrafields_add.tpl.php --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 1ed1327684c..318e6dec614 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1559,7 +1559,7 @@ else // Other attributes $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Assign a sale representative print ''; From d3aeec0a7c773fe4c8356da60c863f73177ae9ba Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 18 Mar 2020 10:30:15 +0100 Subject: [PATCH 09/14] Fix situation value transmission --- htdocs/compta/facture/card.php | 13 ++++++++++++- htdocs/compta/facture/class/facture.class.php | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 94298d14f29..dc2eb2c5308 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1699,7 +1699,18 @@ if (empty($reshook)) $object->fk_facture_source = $_POST['situations']; $object->type = Facture::TYPE_SITUATION; - if (!empty($origin) && !empty($originid)) + + $object->retained_warranty = GETPOST('retained_warranty', 'int'); + $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); + + $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit'); + if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) { + $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit); + } + $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement); +var_dump('la', $object->retained_warranty); + + if (!empty($origin) && !empty($originid)) { $object->origin = $origin; $object->origin_id = $originid; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 8c198b58a3e..c2c82424b77 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1052,6 +1052,11 @@ class Facture extends CommonInvoice $facture->situation_cycle_ref = $this->situation_cycle_ref; $facture->situation_final = $this->situation_final; + $facture->retained_warranty = $this->retained_warranty; + $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement; + $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit; + + // Loop on each line of new invoice foreach ($facture->lines as $i => $tmpline) { From 0a5f971eb514dda0f6cb1f42451a5f822f3c3d57 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 18 Mar 2020 09:32:34 +0000 Subject: [PATCH 10/14] Fixing style errors. --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index dc2eb2c5308..26ea6a28f24 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1708,7 +1708,7 @@ if (empty($reshook)) $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit); } $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement); -var_dump('la', $object->retained_warranty); + var_dump('la', $object->retained_warranty); if (!empty($origin) && !empty($originid)) { From 7b8cafb710fce5979185df60aa5811cef03a3e3a Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 18 Mar 2020 10:34:44 +0100 Subject: [PATCH 11/14] remove var_dump --- htdocs/compta/facture/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index dc2eb2c5308..e75a8d35d7c 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1708,7 +1708,6 @@ if (empty($reshook)) $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit); } $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement); -var_dump('la', $object->retained_warranty); if (!empty($origin) && !empty($originid)) { From 56e4fa1bb3c3e6131be211ff21a922afb3ce9614 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Mar 2020 14:01:11 +0100 Subject: [PATCH 12/14] Trans --- dev/translation/txpull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/translation/txpull.sh b/dev/translation/txpull.sh index 3f24bd0912d..fcccae98221 100755 --- a/dev/translation/txpull.sh +++ b/dev/translation/txpull.sh @@ -54,5 +54,5 @@ fi echo Think to launch also: echo "> dev/tools/fixaltlanguages.sh fix all" -echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with ''" +echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with '' on *.lang files" From cc93a40c4582fe9105b17b91ecedebdee4e538cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Mar 2020 14:06:15 +0100 Subject: [PATCH 13/14] Fix label of local tax --- htdocs/core/modules/modFacture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 984e28f4e31..991cd571f3e 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -216,7 +216,7 @@ class modFacture extends DolibarrModules 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT", - 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', + 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', 'none.rest'=>'Rest', 'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription", @@ -303,7 +303,7 @@ class modFacture extends DolibarrModules 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT", - 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LocalTax1', 'f.localtax2'=>'LocalTax2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', + 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', 'none.rest'=>'Rest', 'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef', From a3328c5ef3b238414cd198f1beaa58117c5a760e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Mar 2020 18:37:44 +0100 Subject: [PATCH 14/14] Fix div --- htdocs/core/tpl/contacts.tpl.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index b5df248b590..a9297d8c2e6 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -66,11 +66,12 @@ $userstatic = new User($db); ?> -
-
-
-
'."\n"; +print '
'."\n"; +print '
'."\n"; + if ($permission) { ?>
'.$langs->trans("Filter").'
'.$langs->trans('RetainedWarranty').''; print '%'; // Retained warranty payment term print '
'.$langs->trans('PaymentConditionsShortRetainedWarranty').''; $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); - $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; + if(empty($retained_warranty_fk_cond_reglement)){ + $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; + if(!empty($objectsrc->retained_warranty_fk_cond_reglement)){ // use previous situation value + $retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement; + }else{ + $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; + } + } $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1); print '