From f233c8452e87b95605ca25027a71c3011878dac7 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Wed, 15 May 2024 12:19:14 +0200 Subject: [PATCH 1/3] New add of warning if invoice payment is VIR on newpayment.php --- htdocs/langs/en_US/other.lang | 1 + htdocs/public/payment/newpayment.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index be00ba62bbd13..e853917ccb24d 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -349,3 +349,4 @@ EmailContent=Email content Pre-Prompt=Pre-prompt Post-Prompt=Post-prompt AIProcessingPleaseWait=AI (%s) is processing your request, please wait... +PayOfBankTransferInvoice=This invoice has Bank Transfer as payment method.
Please verify that a payment isn't already done or is pending. \ No newline at end of file diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 0d04dfe1776b3..eafdb9d792262 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1172,6 +1172,7 @@ if ($source == 'invoice') { $found = true; $langs->load("bills"); + $form->load_cache_types_paiements(); require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -1267,6 +1268,13 @@ print ''; print ''; print ''."\n"; + if ($form->cache_types_paiements[$invoice->mode_reglement_id]["code"] == "VIR") { + print ''; + print '
'; + print $langs->trans("PayOfBankTransferInvoice"); + print '
'; + print ''."\n"; + } // Shipping address $shipToName = $invoice->thirdparty->name; From 9b17735483bfb913f97fe9b5fa6582d45138aa39 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 May 2024 15:26:11 +0200 Subject: [PATCH 2/3] Update newpayment.php --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index eafdb9d792262..f56c3cabb1dce 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1268,7 +1268,7 @@ print ''; print ''; print ''."\n"; - if ($form->cache_types_paiements[$invoice->mode_reglement_id]["code"] == "VIR") { + if ($invoice->mode_reglement_id > 0 && $form->cache_types_paiements[$invoice->mode_reglement_id]["code"] == "VIR") { print ''; print '
'; print $langs->trans("PayOfBankTransferInvoice"); From c7f162a4b397d6f23b9e29c710216230e5593e7d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 May 2024 15:31:04 +0200 Subject: [PATCH 3/3] Update other.lang --- htdocs/langs/en_US/other.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index e853917ccb24d..9be9215c46cbd 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -349,4 +349,4 @@ EmailContent=Email content Pre-Prompt=Pre-prompt Post-Prompt=Post-prompt AIProcessingPleaseWait=AI (%s) is processing your request, please wait... -PayOfBankTransferInvoice=This invoice has Bank Transfer as payment method.
Please verify that a payment isn't already done or is pending. \ No newline at end of file +PayOfBankTransferInvoice=You will make an online payment for this invoice. However, this invoice has been set up to be paid in "Bank Transfer" mode, so to avoid paying twice, please verify that no current bank transfer has already been initiated before continuing.