From f6daad448005a34b782b9232f74a8b77c2aff359 Mon Sep 17 00:00:00 2001 From: henrynopo Date: Thu, 26 Aug 2021 10:25:32 +0800 Subject: [PATCH 1/3] Update card.php --- htdocs/compta/facture/card.php | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 31de2bbd4ff..0d74b1a6632 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5064,24 +5064,30 @@ if ($action == 'create') { // Remainder to pay print ''; print ''; - print $langs->trans('RemainderToPay'); - if ($resteapayeraffiche < 0) { - print ' ('.$langs->trans('ExcessReceived').')'; + if ($resteapayeraffiche >= 0) { + print $langs->trans('RemainderToPay'); + } else { + print $langs->trans('ExcessReceived'); } print ''; print ''; print ''.price($resteapayeraffiche).''; - print ' '; - + // Remainder to pay Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; print ''; - print $langs->trans('MulticurrencyRemainderToPay'); + if ($resteapayeraffiche >= 0) { + print $langs->trans('RemainderToPayMulticurrency'); + } else { + print $langs->trans('ExcessReceivedMulticurrency'); + } print ''; print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).''; } + + print ' '; // Retained warranty : usualy use on construction industry if (!empty($object->situation_final) && !empty($object->retained_warranty) && $displayWarranty) { @@ -5122,6 +5128,21 @@ if ($action == 'create') { } 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 bafe22ff77f72424a2d3cb51b83d2636f2db33be Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 26 Aug 2021 02:29:45 +0000 Subject: [PATCH 2/3] Fixing style errors. --- htdocs/compta/facture/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 0d74b1a6632..0386b30dcc5 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5072,7 +5072,7 @@ if ($action == 'create') { print ''; print ''; print ''.price($resteapayeraffiche).''; - + // Remainder to pay Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; @@ -5086,7 +5086,7 @@ if ($action == 'create') { print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($object->multicurrency_tx*$resteapayeraffiche, 'MT')).''; } - + print ' '; // Retained warranty : usualy use on construction industry @@ -5128,7 +5128,7 @@ if ($action == 'create') { } print ' :'; print ''.price($sign * $resteapayeraffiche).''; - + // Remainder to pay back Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; @@ -5142,7 +5142,7 @@ if ($action == 'create') { print ''; print ''.(!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency).' '.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT')).''; } - + print ' '; // Sold credit note From 11497d4bf0c0f28d0dc5afaf2cfd5454ce922f84 Mon Sep 17 00:00:00 2001 From: henrynopo Date: Sat, 28 Aug 2021 22:38:17 +0800 Subject: [PATCH 3/3] Update card.php --- htdocs/compta/facture/card.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 0386b30dcc5..2f56ef3b3a7 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5071,7 +5071,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) { @@ -5084,11 +5084,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 ' '; - // Retained warranty : usualy use on construction industry if (!empty($object->situation_final) && !empty($object->retained_warranty) && $displayWarranty) { // Billed - retained warranty @@ -5127,7 +5125,7 @@ if ($action == 'create') { print ' ('.$langs->trans('ExcessPaid').')'; } print ' :'; - print ''.price($sign * $resteapayeraffiche).''; + print ''.price($sign * $resteapayeraffiche).' '; // Remainder to pay back Multicurrency if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { @@ -5140,11 +5138,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 *