fix: discounting not applied on sales invoice created by subscriptions (#20431)
This commit is contained in:
parent
4e7625bd8f
commit
3fb48ebf61
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"autoname": "ACC-SUB-.YYYY.-.#####",
|
"autoname": "ACC-SUB-.YYYY.-.#####",
|
||||||
"creation": "2017-07-18 17:50:43.967266",
|
"creation": "2017-07-18 17:50:43.967266",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -155,7 +156,7 @@
|
|||||||
"fieldname": "apply_additional_discount",
|
"fieldname": "apply_additional_discount",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Apply Additional Discount On",
|
"label": "Apply Additional Discount On",
|
||||||
"options": "\nGrand Total\nNet total"
|
"options": "\nGrand Total\nNet Total"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "cb_2",
|
"fieldname": "cb_2",
|
||||||
@ -196,7 +197,8 @@
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2019-07-25 18:45:38.579579",
|
"links": [],
|
||||||
|
"modified": "2020-01-27 14:37:32.845173",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Subscription",
|
"name": "Subscription",
|
||||||
|
@ -280,7 +280,7 @@ class Subscription(Document):
|
|||||||
|
|
||||||
if self.additional_discount_percentage or self.additional_discount_amount:
|
if self.additional_discount_percentage or self.additional_discount_amount:
|
||||||
discount_on = self.apply_additional_discount
|
discount_on = self.apply_additional_discount
|
||||||
invoice.apply_additional_discount = discount_on if discount_on else 'Grand Total'
|
invoice.apply_discount_on = discount_on if discount_on else 'Grand Total'
|
||||||
|
|
||||||
# Subscription period
|
# Subscription period
|
||||||
invoice.from_date = self.current_invoice_start
|
invoice.from_date = self.current_invoice_start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user