fix: Do not apply shipping rule for POS transactions

This commit is contained in:
Deepesh Garg
2022-04-04 20:05:10 +05:30
parent b524e657e2
commit c0ebcfb393
2 changed files with 10 additions and 0 deletions

View File

@@ -271,6 +271,11 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
},
calculate_shipping_charges: function() {
// Do not apply shipping rule for POS
if (this.frm.doc.is_pos) {
return;
}
frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]);
if (frappe.meta.get_docfield(this.frm.doc.doctype, "shipping_rule", this.frm.doc.name)) {
return this.shipping_rule();