From 378a917d95284c0ae2a8cb8efd3c859756b77281 Mon Sep 17 00:00:00 2001 From: Phan Tung Bui Date: Fri, 12 Apr 2024 16:53:24 -0400 Subject: [PATCH] Bug 30598: Replacement cost is not copied from retail price when ordering from file Test plan : To test : 1- In Acquisitions, create a basket 2- Add an order from a new (empty) record --> Note that when you enter the "vendor price", it is copied in the "replacement cost" field 3- Add an order from a new file --> Note that when you enter the "price", the "replacement price" field stays empty 4- Apply the batch 5- Redo step 3 and notice that when you change the 'price', the 'replacement price' syncs with it Signed-off-by: Matt Blenkinsop --- .../prog/en/modules/acqui/addorderiso2709.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/acq.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 4115b22565..09066e6795 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -194,7 +194,7 @@
  • - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/acq.js b/koha-tmpl/intranet-tmpl/prog/js/acq.js index 89e1ad1fc4..ab9d6513fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/js/acq.js @@ -179,6 +179,7 @@ function messenger(X,Y,etc){ // FIXME: unused? // NEXT BLOCK IS USED BY NEWORDERBEMPTY function updateCosts(){ + console.log("updateCosts"); var quantity = new Number($("#quantity").val()); var discount = new Number($("#discount").val()); var listprice = new Number($("#listprice").val()); @@ -202,8 +203,13 @@ function updateCosts(){ return true; } -// Calculates total amount in a suggestion +function syncReplacementPrice(sourceId, targetId) { + console.log("updatePRice"); + var priceValue = $("#" + sourceId).val(); + $("#" + targetId).val(priceValue); +} +// Calculates total amount in a suggestion function calcNewsuggTotal(){ //collect values var quantity = Number(document.getElementById('quantity').value); -- 2.34.1