From 054b466e0a5484d9851cc13d1b36f8a01fd38b5d Mon Sep 17 00:00:00 2001 From: henrynopo Date: Thu, 26 Aug 2021 09:40:44 +0800 Subject: [PATCH 1/4] Update card.php --- htdocs/fourn/facture/card.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index b39041542eb..660401e9131 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3242,7 +3242,11 @@ if ($action == 'create') { if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; print ''; - print $langs->trans('MulticurrencyRemainderToPay'); + if ($resteapayeraffiche <= 0) { + print $langs->trans('RemainderToPayBackMulticurrency'); + } else { + print $langs->trans('ExcessPaidMulticurrency'); + } print ''; print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).''; @@ -3272,6 +3276,21 @@ if ($action == 'create') { print ''; print ''; print ''.price($sign * $resteapayeraffiche).''; + + // Remainder to pay back Multicurrency + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { + print ''; + print ''; + if ($resteapayeraffiche <= 0) { + print $langs->trans('RemainderToPayBackMulticurrency'); + } else { + print $langs->trans('ExcessPaidMulticurrency'); + } + print ''; + print ''; + print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT')).''; + } + print ' '; // Sold credit note From daa34032ff1d9e22c7b9207504f074c9cc0c2275 Mon Sep 17 00:00:00 2001 From: henrynopo Date: Thu, 26 Aug 2021 09:43:02 +0800 Subject: [PATCH 2/4] Update bills.lang --- htdocs/langs/en_US/bills.lang | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 0c660de8e22..2d823245623 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -234,12 +234,17 @@ AlreadyPaidBack=Already paid back AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments) Abandoned=Abandoned RemainderToPay=Remaining unpaid +RemainderToPayMulticurrency=Remaining unpaid, original currency RemainderToTake=Remaining amount to take +RemainderToTakeMulticurrency=Remaining amount to take, original currency RemainderToPayBack=Remaining amount to refund +RemainderToPayBackMulticurrency=Remaining amount to refund, original currency Rest=Pending AmountExpected=Amount claimed ExcessReceived=Excess received +ExcessReceivedMulticurrency=Excess received, original currency ExcessPaid=Excess paid +ExcessPaidMulticurrency=Excess paid, original currency EscompteOffered=Discount offered (payment before term) EscompteOfferedShort=Discount SendBillRef=Submission of invoice %s @@ -590,4 +595,4 @@ FacParentLine=Invoice Line Parent SituationTotalRayToRest=Remainder to pay without taxe PDFSituationTitle=Situation n° %d SituationTotalProgress=Total progress %d %% -SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s \ No newline at end of file +SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s From 444786b34fce30ff83f9d82ef702678d73f6be4d Mon Sep 17 00:00:00 2001 From: henrynopo Date: Sat, 28 Aug 2021 22:52:06 +0800 Subject: [PATCH 3/4] Update card.php --- htdocs/fourn/facture/card.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 660401e9131..5558bb26207 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3236,7 +3236,7 @@ if ($action == 'create') { } print ''; print ''; - print ''.price($resteapayeraffiche).''; + print ''.price($resteapayeraffiche).' '; // Remainder to pay Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { @@ -3249,10 +3249,9 @@ if ($action == 'create') { } print ''; print ''; - print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).''; + print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).' '; } - - print ' '; + } else // Credit note { $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -3275,7 +3274,7 @@ if ($action == 'create') { } print ''; print ''; - print ''.price($sign * $resteapayeraffiche).''; + print ''.price($sign * $resteapayeraffiche).' '; // Remainder to pay back Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { @@ -3288,11 +3287,9 @@ if ($action == 'create') { } print ''; print ''; - print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT')).''; + print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT')).' '; } - - print ' '; - + // Sold credit note // print ''.$langs->trans('TotalTTC').' :'; // print ''.price($sign * From 63427638d85d734d6b847dd742a43267e151854b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 28 Aug 2021 14:54:16 +0000 Subject: [PATCH 4/4] Fixing style errors. --- htdocs/fourn/facture/card.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5558bb26207..ce1e6a06136 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3251,7 +3251,6 @@ if ($action == 'create') { print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).' '; } - } else // Credit note { $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -3275,7 +3274,7 @@ if ($action == 'create') { print ''; print ''; print ''.price($sign * $resteapayeraffiche).' '; - + // Remainder to pay back Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; @@ -3289,7 +3288,7 @@ if ($action == 'create') { print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT')).' '; } - + // Sold credit note // print ''.$langs->trans('TotalTTC').' :'; // print ''.price($sign *