fix: Changing item prices on converting orders/receipts to invoices
This commit is contained in:
parent
01fd3adedf
commit
66ca085e39
@ -442,6 +442,8 @@ def make_purchase_receipt(source_name, target_doc=None):
|
|||||||
}
|
}
|
||||||
}, target_doc, set_missing_values)
|
}, target_doc, set_missing_values)
|
||||||
|
|
||||||
|
doc.set_onload('ignore_price_list', True)
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@ -509,6 +511,7 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions
|
|||||||
|
|
||||||
doc = get_mapped_doc("Purchase Order", source_name, fields,
|
doc = get_mapped_doc("Purchase Order", source_name, fields,
|
||||||
target_doc, postprocess, ignore_permissions=ignore_permissions)
|
target_doc, postprocess, ignore_permissions=ignore_permissions)
|
||||||
|
doc.set_onload('ignore_price_list', True)
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
|
@ -1070,7 +1070,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(flt(this.frm.doc.conversion_rate)>0.0) {
|
if(flt(this.frm.doc.conversion_rate)>0.0) {
|
||||||
if(this.frm.doc.ignore_pricing_rule) {
|
if(this.frm.doc.__onload.ignore_price_list) {
|
||||||
this.calculate_taxes_and_totals();
|
this.calculate_taxes_and_totals();
|
||||||
} else if (!this.in_apply_price_list){
|
} else if (!this.in_apply_price_list){
|
||||||
this.apply_price_list();
|
this.apply_price_list();
|
||||||
@ -1884,6 +1884,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
item.item_tax_rate = r.message;
|
item.item_tax_rate = r.message;
|
||||||
|
me.add_taxes_from_item_tax_template(item.item_tax_rate);
|
||||||
me.calculate_taxes_and_totals();
|
me.calculate_taxes_and_totals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -584,6 +584,8 @@ def make_delivery_note(source_name, target_doc=None, skip_item_mapping=False):
|
|||||||
|
|
||||||
target_doc = get_mapped_doc("Sales Order", source_name, mapper, target_doc, set_missing_values)
|
target_doc = get_mapped_doc("Sales Order", source_name, mapper, target_doc, set_missing_values)
|
||||||
|
|
||||||
|
target_doc.set_onload('ignore_price_list', True)
|
||||||
|
|
||||||
return target_doc
|
return target_doc
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@ -664,6 +666,8 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
|
|||||||
if automatically_fetch_payment_terms:
|
if automatically_fetch_payment_terms:
|
||||||
doclist.set_payment_schedule()
|
doclist.set_payment_schedule()
|
||||||
|
|
||||||
|
doclist.set_onload('ignore_price_list', True)
|
||||||
|
|
||||||
return doclist
|
return doclist
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
@ -519,6 +519,8 @@ def make_sales_invoice(source_name, target_doc=None):
|
|||||||
if automatically_fetch_payment_terms:
|
if automatically_fetch_payment_terms:
|
||||||
doc.set_payment_schedule()
|
doc.set_payment_schedule()
|
||||||
|
|
||||||
|
doc.set_onload('ignore_price_list', True)
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
@ -823,6 +823,7 @@ def make_purchase_invoice(source_name, target_doc=None):
|
|||||||
}
|
}
|
||||||
}, target_doc, set_missing_values)
|
}, target_doc, set_missing_values)
|
||||||
|
|
||||||
|
doclist.set_onload('ignore_price_list', True)
|
||||||
return doclist
|
return doclist
|
||||||
|
|
||||||
def get_invoiced_qty_map(purchase_receipt):
|
def get_invoiced_qty_map(purchase_receipt):
|
||||||
|
Loading…
Reference in New Issue
Block a user