From de0a057b8aff3914f3888e565683611176a73d77 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Jan 2019 19:41:14 +0100 Subject: [PATCH 01/12] Fix div not closed --- htdocs/societe/checkvat/checkVatPopup.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 0c125ae3b4c..689df14f3d7 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -40,8 +40,7 @@ $conf->dol_hide_leftmenu=1; llxHeader('', $langs->trans("VATIntraCheckableOnEUSite")); -print '
'; -print '
'; +print '
'; print load_fiche_titre($langs->trans("VATIntraCheckableOnEUSite"),'','title_setup'); @@ -174,6 +173,8 @@ if ($messagetoshow) print nl2br($messagetoshow); } +print '
'; + // End of page llxFooter(); $db->close(); From 46bc078481f0a82623f133ea82f574200e1cbaf6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Jan 2019 23:10:10 +0100 Subject: [PATCH 02/12] Fix phpcs --- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 4690b64e0b5..e5fc023010b 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -44,7 +44,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** * @var string Nom du modele * @deprecated - * @see name + * @see $name */ public $nom='Jade'; @@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test whether the numbers already in force in the base do not cause conflicts + * Test whether the numbers already in force in the base do not cause conflicts * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok @@ -154,7 +154,6 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport endif; $ref_number_int = ($newref+1)-1; - $update_number_int = true; $user_author_infos = dolGetFirstLastname($fuser->firstname, $fuser->lastname); From f7bcd1ef6d01a628c711406edee7cb9bd4c0f4d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 01:35:12 +0100 Subject: [PATCH 03/12] Fix trans --- 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 03172f2c54d..cf25ab9d9ab 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4650,7 +4650,7 @@ else if ($id > 0 || ! empty($ref)) } else { - print '
' . $langs->trans('Modify') . '
'; + print '
' . $langs->trans('Modify') . '
'; } } From 4398649af6b5ff956aa3e83634fc184f5166f5c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 01:46:59 +0100 Subject: [PATCH 04/12] Add hooks to add column in list of payment modes --- htdocs/modulebuilder/template/myobject_list.php | 1 + htdocs/societe/paymentmodes.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index eeabbb11b1e..6eb76ae0360 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -446,6 +446,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; +// Action column print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n"; print ''."\n"; diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 0853b7ee571..3e72c33c142 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -832,6 +832,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''.$langs->trans('Default').''; print ''.$langs->trans('Note').''; print ''.$langs->trans('DateModification').''; + // Hook fields + $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>''); + $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print ""; print "\n"; @@ -917,6 +922,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print ''; + // Fields from hook + $parameters=array('arrayfields'=>array(), 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print ''; if ($user->rights->societe->creer) { From 31f4513a7e13f3d3c2eb4451b2ca24fcb9f8d97f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 02:46:31 +0100 Subject: [PATCH 05/12] Fix bad function --- htdocs/public/payment/paymentok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 2831da07b13..763edcce559 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -663,7 +663,7 @@ if ($ispaymentok) $result=$paiement->addPaymentToBank($user,'payment',$label, $bankaccountid, '', ''); if ($result < 0) { - $postactionmessages[] = $paiement->error.' '.joint("
\n", $paiement->errors); + $postactionmessages[] = $paiement->error.' '.join("
\n", $paiement->errors); $ispostactionok = -1; $error++; } From 273c396fb992c71e0d8619cd13ee95e6c0fa3e77 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 02:46:31 +0100 Subject: [PATCH 06/12] Fix bad function --- htdocs/public/payment/paymentok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index e48fc014749..7537d281feb 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -663,7 +663,7 @@ if ($ispaymentok) $result=$paiement->addPaymentToBank($user,'payment',$label, $bankaccountid, '', ''); if ($result < 0) { - $postactionmessages[] = $paiement->error.' '.joint("
\n", $paiement->errors); + $postactionmessages[] = $paiement->error.' '.join("
\n", $paiement->errors); $ispostactionok = -1; $error++; } From 1ebd7048fb5d802f7dc88289543c41bff776dd66 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 03:00:28 +0100 Subject: [PATCH 07/12] Add hook in list of stripe payment mode list --- htdocs/societe/paymentmodes.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 3e72c33c142..5f0cdb4d4c0 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -833,7 +833,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''.$langs->trans('Note').''; print ''.$langs->trans('DateModification').''; // Hook fields - $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>''); + $parameters=array('arrayfields'=>array(),'param'=>'','sortfield'=>'','sortorder'=>'', 'linetype'=>'stripetitle'); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -851,7 +851,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $companypaymentmodetemp = new CompanyPaymentMode($db); $sql='SELECT rowid FROM '.MAIN_DB_PREFIX."societe_rib"; - $sql.=" WHERE type in ('card', 'paypal')"; + $sql.=" WHERE type in ('card')"; $sql.=" AND fk_soc = ".$object->id; $sql.=" AND status = ".$servicestatus; @@ -923,7 +923,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); print ''; // Fields from hook - $parameters=array('arrayfields'=>array(), 'obj'=>$obj); + $parameters=array('arrayfields'=>array(), 'obj'=>$obj, 'linetype'=>'stripecard'); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -1052,6 +1052,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' //var_dump($src); print ''; print ''; + // Fields from hook + $parameters=array('arrayfields'=>array(), 'stripesource'=>$src, 'linetype'=>'stripecardremoteonly'); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column print ''; if ($user->rights->societe->creer) { From 2dea4f01f598849f8245f8928298d45095ebbbda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 16:22:36 +0100 Subject: [PATCH 08/12] Fix lang format of en_ZA --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..58dfee14958 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,7 +7,7 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy +FormatDateShortJavaInput=yyyy/MM/dd FormatDateShortJQuery=yy/mm/yy FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI From 820db4e78b3970b2059707cd817a2c6ef52cac1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 16:22:53 +0100 Subject: [PATCH 09/12] Fix lang format --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 58dfee14958..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -8,7 +8,7 @@ FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd FormatDateShortJavaInput=yyyy/MM/dd -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M From 4545c0f13ad30da02ab2b9ef2e8f9c157b03dcfc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 16:22:36 +0100 Subject: [PATCH 10/12] Fix lang format of en_ZA --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..58dfee14958 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,7 +7,7 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy +FormatDateShortJavaInput=yyyy/MM/dd FormatDateShortJQuery=yy/mm/yy FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI From 9dbf41d6b2728ccc6ed5a28328b2a234c2834af4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 16:22:53 +0100 Subject: [PATCH 11/12] Fix lang format --- htdocs/langs/en_ZA/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 58dfee14958..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -8,7 +8,7 @@ FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd FormatDateShortJavaInput=yyyy/MM/dd -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M From 9d1a02b0d7feb3f067f64cbb1a57d6e57325221a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2019 16:25:37 +0100 Subject: [PATCH 12/12] Fix language --- htdocs/langs/en_ZA/main.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_ZA/main.lang b/htdocs/langs/en_ZA/main.lang index 4c30b385ef8..1f6a0b9245d 100644 --- a/htdocs/langs/en_ZA/main.lang +++ b/htdocs/langs/en_ZA/main.lang @@ -7,8 +7,8 @@ SeparatorThousand=, FormatDateShort=%Y/%m/%d FormatDateShortInput=%Y/%m/%d FormatDateShortJava=yyy/MM/dd -FormatDateShortJavaInput=yyyy/MM/yy -FormatDateShortJQuery=yy/mm/yy +FormatDateShortJavaInput=yyyy/MM/dd +FormatDateShortJQuery=yy/mm/dd FormatDateShortJQueryInput=yy/mm/dd FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M