fix: Add round floats for price list rate
(cherry picked from commit b60fbf5ba95350e79463f922b0e8dce518780383)
This commit is contained in:
parent
d19369b198
commit
2d0208ba1f
@ -680,7 +680,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
var item = frappe.get_doc(cdt, cdn);
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
frappe.model.round_floats_in(item, ["price_list_rate", "discount_percentage"]);
|
frappe.model.round_floats_in(item, ["price_list_rate", "discount_percentage"]);
|
||||||
|
|
||||||
// check if child doctype is Sales Order Item/Qutation Item and calculate the rate
|
// check if child doctype is Sales Order Item/Quotation Item and calculate the rate
|
||||||
if (in_list(["Quotation Item", "Sales Order Item", "Delivery Note Item", "Sales Invoice Item", "POS Invoice Item", "Purchase Invoice Item", "Purchase Order Item", "Purchase Receipt Item"]), cdt)
|
if (in_list(["Quotation Item", "Sales Order Item", "Delivery Note Item", "Sales Invoice Item", "POS Invoice Item", "Purchase Invoice Item", "Purchase Order Item", "Purchase Receipt Item"]), cdt)
|
||||||
this.apply_pricing_rule_on_item(item);
|
this.apply_pricing_rule_on_item(item);
|
||||||
else
|
else
|
||||||
@ -1601,6 +1601,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frappe.model.round_floats_in(item_row, ["price_list_rate", "discount_percentage"]);
|
||||||
|
|
||||||
// if pricing rule set as blank from an existing value, apply price_list
|
// if pricing rule set as blank from an existing value, apply price_list
|
||||||
if(!me.frm.doc.ignore_pricing_rule && existing_pricing_rule && !d.pricing_rules) {
|
if(!me.frm.doc.ignore_pricing_rule && existing_pricing_rule && !d.pricing_rules) {
|
||||||
me.apply_price_list(frappe.get_doc(d.doctype, d.name));
|
me.apply_price_list(frappe.get_doc(d.doctype, d.name));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user