* fix: pricing rule for non stock UOM and conversions
* fix: pricing rule for non stock UOM and conversions
(cherry picked from commit 96b4211ea1)
# Conflicts:
# erpnext/accounts/doctype/pricing_rule/pricing_rule.py
* chore: resolve conflicts
Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -545,6 +545,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
if(!this.validate_company_and_party()) {
|
||||
this.frm.fields_dict["items"].grid.grid_rows[item.idx - 1].remove();
|
||||
} else {
|
||||
item.pricing_rules = ''
|
||||
return this.frm.call({
|
||||
method: "erpnext.stock.get_item_details.get_item_details",
|
||||
child: item,
|
||||
@@ -1160,6 +1161,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
uom: function(doc, cdt, cdn) {
|
||||
var me = this;
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
item.pricing_rules = ''
|
||||
if(item.item_code && item.uom) {
|
||||
return this.frm.call({
|
||||
method: "erpnext.stock.get_item_details.get_conversion_factor",
|
||||
@@ -1236,6 +1238,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
qty: function(doc, cdt, cdn) {
|
||||
let item = frappe.get_doc(cdt, cdn);
|
||||
item.pricing_rules = ''
|
||||
this.conversion_factor(doc, cdt, cdn, true);
|
||||
this.calculate_stock_uom_rate(doc, cdt, cdn);
|
||||
this.apply_pricing_rule(item, true);
|
||||
|
||||
Reference in New Issue
Block a user