From d8f1d4837eca10c487a0051c5b44351882138631 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 Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer (cherry picked from commit bed0563e568c4ee13a851d22025d66f36651beec) Signed-off-by: Fridolin Somers (cherry picked from commit cf64df296cd1c97016ae245da847a3ce4ba4ba9d) Signed-off-by: Lucas Gass --- .../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 dde829af99..91017dcd5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -187,7 +187,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.39.5