Price list rate fix multiple uom and validation with prev doc (#8718)
This commit is contained in:
@@ -564,14 +564,14 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
}
|
||||
},
|
||||
|
||||
conversion_factor: function(doc, cdt, cdn) {
|
||||
conversion_factor: function(doc, cdt, cdn, dont_fetch_price_list_rate) {
|
||||
if(frappe.meta.get_docfield(cdt, "stock_qty", cdn)) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
frappe.model.round_floats_in(item, ["qty", "conversion_factor"]);
|
||||
item.stock_qty = flt(item.qty * item.conversion_factor, precision("stock_qty", item));
|
||||
refresh_field("stock_qty", item.name, item.parentfield);
|
||||
this.toggle_conversion_factor(item);
|
||||
this.apply_price_list(item, true);
|
||||
if(!dont_fetch_price_list_rate) this.apply_price_list(item, true);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -582,7 +582,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
|
||||
qty: function(doc, cdt, cdn) {
|
||||
this.conversion_factor(doc, cdt, cdn);
|
||||
this.conversion_factor(doc, cdt, cdn, true);
|
||||
this.apply_pricing_rule(frappe.get_doc(cdt, cdn), true);
|
||||
},
|
||||
|
||||
set_dynamic_labels: function() {
|
||||
|
||||
Reference in New Issue
Block a user