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 <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commitbed0563e56
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitcf64df296c
) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
b05d87a703
commit
d8f1d4837e
2 changed files with 8 additions and 2 deletions
|
@ -187,7 +187,7 @@
|
|||
</li>
|
||||
<li class="price">
|
||||
<label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
|
||||
<input id="price_record_[% biblio.import_record_id | html %]" class="decimal" type="text" value="[% biblio.price | $Price on_editing => 1 %]" name="price_[% biblio.import_record_id | html %]" />
|
||||
<input id="price_record_[% biblio.import_record_id | html %]" class="decimal" type="text" value="[% biblio.price | $Price on_editing => 1 %]" name="price_[% biblio.import_record_id | html %]" onchange="syncReplacementPrice('price_record_[% biblio.import_record_id | html %]', 'replacementprice_record_[% biblio.import_record_id | html %]')" />
|
||||
</li>
|
||||
<li class="replacementprice">
|
||||
<label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue