From 90404da0a74ee999520f43b2caf5cb4d56cec932 Mon Sep 17 00:00:00 2001 From: Maximilien Valenzano Date: Tue, 23 Jan 2024 15:55:55 +0100 Subject: [PATCH 1/2] fix: use the currency for propal signature page --- htdocs/public/onlinesign/newonlinesign.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 0bf197e7a5edc..4f4df59656960 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -350,7 +350,7 @@ // Amount $amount = ''.$langs->trans("Amount"); $amount .= ''; - $amount .= ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + $amount .= ''.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).''; $amount .= ''."\n"; // Call Hook amountPropalSign From e644782b53b4d0eb98c4fce70be5ae4dbfbeb815 Mon Sep 17 00:00:00 2001 From: Maximilien Valenzano Date: Tue, 23 Jan 2024 17:54:11 +0100 Subject: [PATCH 2/2] fix: diff for currency while currency of propal is not the same as global currency, we show both with propal currency in parentheses --- htdocs/public/onlinesign/newonlinesign.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 4f4df59656960..43cd662677a53 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -348,9 +348,13 @@ print ''."\n"; // Amount + $amount = ''.$langs->trans("Amount"); $amount .= ''; - $amount .= ''.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).''; + $amount .= ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + if ($object->multicurrency_code != $conf->currency) { + $amount .= ' ('.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).')'; + } $amount .= ''."\n"; // Call Hook amountPropalSign