mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: Item discounts for quotation
This commit is contained in:
@@ -116,7 +116,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
if item.discount_percentage == 100:
|
if item.discount_percentage == 100:
|
||||||
item.rate = 0.0
|
item.rate = 0.0
|
||||||
elif item.price_list_rate:
|
elif item.price_list_rate:
|
||||||
if not item.rate or (item.pricing_rules and item.discount_percentage > 0):
|
if item.pricing_rules or item.discount_percentage > 0:
|
||||||
item.rate = flt(item.price_list_rate *
|
item.rate = flt(item.price_list_rate *
|
||||||
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
||||||
item.discount_amount = item.price_list_rate * (item.discount_percentage / 100.0)
|
item.discount_amount = item.price_list_rate * (item.discount_percentage / 100.0)
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ frappe.ui.form.on('Quotation', {
|
|||||||
|
|
||||||
erpnext.selling.QuotationController = class QuotationController extends erpnext.selling.SellingController {
|
erpnext.selling.QuotationController = class QuotationController extends erpnext.selling.SellingController {
|
||||||
onload(doc, dt, dn) {
|
onload(doc, dt, dn) {
|
||||||
var me = this;
|
|
||||||
super.onload(doc, dt, dn);
|
super.onload(doc, dt, dn);
|
||||||
}
|
}
|
||||||
party_name() {
|
party_name() {
|
||||||
|
|||||||
Reference in New Issue
Block a user