From 481a25cb8fc3b8b9bd71a77a6c101573aa8fcbc7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Sep 2019 17:39:19 +0200 Subject: [PATCH] The hook "moreFamily" must return payment into var "totalpayment" and no more "paiement" (english replace french). --- ChangeLog | 2 +- htdocs/compta/bank/treso.php | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7efaa290bfc..60cb7dd6ecf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ Following changes may create regressions for some external modules, but were nec * The function show_theme() hase been renamed into showSkins() * Rename 'module_part' parameter into 'modulepart' into document APIs, for consistency. * The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead. -* The hook "moreFamily" must return payment into var "payment" and no more "paiement". +* The hook "moreFamily" must return payment into var "totalpayment" and no more "paiement" (english replace french). diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 29bc1db3593..ac4c9c767e8 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -213,9 +213,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $i = 0; while ($i < $num) { - $paiement = ''; $ref = ''; $refcomp = ''; + $totalpayment = ''; $obj = array_shift($tab_sqlobj); @@ -236,7 +236,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $societestatic->name = $obj->name; $refcomp=$societestatic->getNomUrl(1, '', 24); - $paiement = -1*$facturefournstatic->getSommePaiement(); // Payment already done + $totalpayment = -1*$facturefournstatic->getSommePaiement(); // Payment already done } } if ($obj->family == 'invoice') @@ -250,9 +250,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $societestatic->name = $obj->name; $refcomp=$societestatic->getNomUrl(1, '', 24); - $paiement = $facturestatic->getSommePaiement(); // Payment already done - $paiement+= $facturestatic->getSumDepositsUsed(); - $paiement+= $facturestatic->getSumCreditNotesUsed(); + $totalpayment = $facturestatic->getSommePaiement(); // Payment already done + $totalpayment+= $facturestatic->getSumDepositsUsed(); + $totalpayment+= $facturestatic->getSumCreditNotesUsed(); } if ($obj->family == 'social_contribution') { @@ -261,19 +261,19 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $socialcontribstatic->lib=$obj->type; $ref = $socialcontribstatic->getNomUrl(1, 24); - $paiement = -1*$socialcontribstatic->getSommePaiement(); // Payment already done + $totalpayment = -1*$socialcontribstatic->getSommePaiement(); // Payment already done } - $parameters = array('obj' => $obj, 'ref' => $ref, 'refcomp' => $refcomp, 'payment' => $paiement); + $parameters = array('obj' => $obj, 'ref' => $ref, 'refcomp' => $refcomp, 'totalpayment' => $totalpayment); $reshook = $hookmanager->executeHooks('moreFamily', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if(empty($reshook)){ $ref = isset($hookmanager->resArray['ref']) ? $hookmanager->resArray['ref'] : $ref; $refcomp = isset($hookmanager->resArray['refcomp']) ? $hookmanager->resArray['refcomp'] : $refcomp; - $paiement = isset($hookmanager->resArray['paiement']) ? $hookmanager->resArray['paiement'] : $paiement; + $totalpayment = isset($hookmanager->resArray['totalpayment']) ? $hookmanager->resArray['totalpayment'] : $totalpayment; } $total_ttc = $obj->total_ttc; - if ($paiement) $total_ttc = $obj->total_ttc - $paiement; + if ($totalpayment) $total_ttc = $obj->total_ttc - $totalpayment; $solde += $total_ttc; // We discard lines with a remainder to pay to 0