make sure default apply_discount_on is set when creating invoice

This commit is contained in:
tundebabzy 2018-03-01 17:11:14 +01:00
parent ca5cf35a99
commit 8670c85827

View File

@ -269,6 +269,8 @@ class Subscriptions(Document):
# Discounts # Discounts
if self.apply_additional_discount: if self.apply_additional_discount:
invoice.apply_discount_on = self.apply_additional_discount invoice.apply_discount_on = self.apply_additional_discount
else:
invoice.apply_discount_on = 'Grand Total'
if self.additional_discount_percentage: if self.additional_discount_percentage:
invoice.additional_discount_percentage = self.additional_discount_percentage invoice.additional_discount_percentage = self.additional_discount_percentage