fix: use user defined discount amount or default
(cherry picked from commit e2a32b7257)
This commit is contained in:
@@ -328,8 +328,8 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
|
|||||||
"parent": args.parent,
|
"parent": args.parent,
|
||||||
"parenttype": args.parenttype,
|
"parenttype": args.parenttype,
|
||||||
"child_docname": args.get("child_docname"),
|
"child_docname": args.get("child_docname"),
|
||||||
"discount_percentage": 0.0,
|
"discount_percentage": args.get("discount_percentage") or 0.0,
|
||||||
"discount_amount": 0,
|
"discount_amount": args.get("discount_amount") or 0.0,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1527,7 +1527,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
"serial_no": d.serial_no,
|
"serial_no": d.serial_no,
|
||||||
"batch_no": d.batch_no,
|
"batch_no": d.batch_no,
|
||||||
"price_list_rate": d.price_list_rate,
|
"price_list_rate": d.price_list_rate,
|
||||||
"conversion_factor": d.conversion_factor || 1.0
|
"conversion_factor": d.conversion_factor || 1.0,
|
||||||
|
"discount_percentage" : d.discount_percentage,
|
||||||
|
"discount_amount" : d.discount_amount,
|
||||||
});
|
});
|
||||||
|
|
||||||
// if doctype is Quotation Item / Sales Order Iten then add Margin Type and rate in item_list
|
// if doctype is Quotation Item / Sales Order Iten then add Margin Type and rate in item_list
|
||||||
|
|||||||
Reference in New Issue
Block a user