From 717297ef295f69c627295eff4f0dfdee3b37f2e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Mar 2024 14:49:27 +0100 Subject: [PATCH] FIX Wrong currency shown in TakePOS payment page --- htdocs/takepos/pay.php | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index f2e58f98573..df498a5fec7 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -248,6 +248,7 @@ if ($resql) { } } } + ?> +currency != $_SESSION["takeposcustomercurrency"]) { + //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency + $showothercurrency = 1; + include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; + $multicurrency = new MultiCurrency($db); + $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); +} +?> +
- trans('TotalTTC'); ?>: total_ttc, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?> + trans('TotalTTC'); ?>: total_ttc, 1, '', 1, -1, -1, $conf->currency); + if ($showothercurrency) { + print '   (' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')'; + } + ?>
total_ttc) { ?>
- trans('RemainToPay'); ?>: multicurrency_code); ?> + trans('RemainToPay'); ?>: multicurrency_code); + if ($showothercurrency) { + print '   (' . price($remaintopay * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')'; + } + ?>
- trans("Received"); ?>: multicurrency_code); ?> + trans("Received"); ?>: multicurrency_code); + if ($showothercurrency) { + print '   (' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')'; + } + ?>
- trans("Change"); ?>: multicurrency_code); ?> + trans("Change"); ?>: multicurrency_code); + if ($showothercurrency) { + print '   (' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')'; + } + ?>
global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) {