From 8f1fba6775bdf421a7c37f5c5c69ce9eaae459ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traulle=CC=81?= Date: Fri, 30 Aug 2019 23:56:52 +0200 Subject: [PATCH 1/3] Fix #11682 Missing origin object ref and thirdparty ref in future bank entries --- htdocs/compta/bank/treso.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 5a4374f47dd..10b366f0b9c 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -267,9 +267,9 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $parameters = array('obj' => $obj); $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'] : ''; - $refcomp = isset($hookmanager->resArray['refcomp']) ? $hookmanager->resArray['refcomp'] : ''; - $paiement = isset($hookmanager->resArray['paiement']) ? $hookmanager->resArray['paiement'] : 0; + $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; } $total_ttc = $obj->total_ttc; From 65fee73b225ca47daa3667369171fff61403790d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Sep 2019 17:31:20 +0200 Subject: [PATCH 2/3] Update treso.php --- htdocs/compta/bank/treso.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 10b366f0b9c..8ce3370587f 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -264,12 +264,12 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $paiement = -1*$socialcontribstatic->getSommePaiement(); // Payment already done } - $parameters = array('obj' => $obj); + $parameters = array('obj' => $obj, 'ref' => $ref, 'refcomp' => $refcomp, 'payment' => $paiement); $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; + $paiement = isset($hookmanager->resArray['payment']) ? $hookmanager->resArray['payment'] : $paiement; } $total_ttc = $obj->total_ttc; From 7c07e64adcf1b121d410644eda4471c3c87c1224 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Sep 2019 17:32:18 +0200 Subject: [PATCH 3/3] Update treso.php --- htdocs/compta/bank/treso.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 8ce3370587f..5b39e8fd79b 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -269,7 +269,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) 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['payment']) ? $hookmanager->resArray['payment'] : $paiement; + $paiement = isset($hookmanager->resArray['paiement']) ? $hookmanager->resArray['paiement'] : $paiement; } $total_ttc = $obj->total_ttc;