From b3df32fcff6b1fb56dbd05c684e6918cbd3a8a86 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 29 May 2023 16:14:56 -0300 Subject: [PATCH] Bug 33783: Make sure the value is populated on load time The original patch makes the form set the right values in the order row (before storing it) but misses to load the right value on page load, which is still a regression. This patch solves that. Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index 5c39f380d34..3100d18d9f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -1161,12 +1161,12 @@ if(invoiceincgst == "1") { rrp_txt = Number(row.rrp_tax_included).format_price()+' '+ADJ_TAX_INC.format(active_currency)+""; ecost_txt = Number(row.ecost_tax_included).format_price()+' '+TAX_INC+""; - $("#unitprice").val(row.unit_price_tax_included); + $("#unitprice").val(Number(row.ecost_tax_included).format_price()); $("#unitprice_hint").html(TAX_INC); } else { rrp_txt = Number(row.rrp_tax_excluded).format_price()+' '+ADJ_TAX_EXC.format(active_currency)+""; ecost_txt = Number(row.ecost_tax_excluded).format_price()+' '+TAX_EXC+""; - $("#unitprice").val(row.unit_price_tax_excluded); + $("#unitprice").val(Number(row.ecost_tax_excluded).format_price()); $("#unitprice_hint").html(TAX_EXC); } $("#rrp").html(rrp_txt); -- 2.40.1