From 96e8474fe5cc4bc1860d3259c9f9ad137dc2479f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 27 Apr 2023 14:53:02 +0200 Subject: [PATCH] FIX bank account not visible on credit transfer --- htdocs/compta/prelevement/card.php | 1 + htdocs/compta/prelevement/factures.php | 3 ++- htdocs/compta/prelevement/fiche-rejet.php | 2 +- htdocs/compta/prelevement/fiche-stat.php | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 33a4409bac9..69859f28cef 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -213,6 +213,7 @@ if ($id > 0 || $ref) { $acc = new Account($db); $result = $acc->fetch(($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT)); + // Bank account print ''; $labelofbankfield = "BankToReceiveWithdraw"; if ($object->type == 'bank-transfer') { diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index f1e1ac7a868..d30d90fe752 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -130,7 +130,7 @@ if ($id > 0 || $ref) { print ''; $acc = new Account($db); - $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); + $result = $acc->fetch(($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT)); print ''; + print '
'; $labelofbankfield = "BankToReceiveWithdraw"; @@ -139,6 +139,7 @@ if ($id > 0 || $ref) { } print $langs->trans($labelofbankfield); print ''; if ($acc->id > 0) { print $acc->getNomUrl(1); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 8f480742b51..28d0e1071b5 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -125,7 +125,7 @@ if ($id > 0 || $ref) { print ''; $acc = new Account($db); - $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); + $result = $acc->fetch(($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT)); print '
'; $labelofbankfield = "BankToReceiveWithdraw"; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index ac7959b795a..7265ae5af1b 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -119,7 +119,7 @@ if ($id > 0 || $ref) { print ''; $acc = new Account($db); - $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); + $result = $acc->fetch(($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT)); print '
'; $labelofbankfield = "BankToReceiveWithdraw";