mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: create zero-dollar invoices fro trial subscriptions (#26441)
This commit is contained in:
@@ -367,6 +367,9 @@ class Subscription(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Discounts
|
# Discounts
|
||||||
|
if self.is_trialling():
|
||||||
|
invoice.additional_discount_percentage = 100
|
||||||
|
else:
|
||||||
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
|
||||||
|
|
||||||
@@ -382,6 +385,7 @@ class Subscription(Document):
|
|||||||
invoice.to_date = self.current_invoice_end
|
invoice.to_date = self.current_invoice_end
|
||||||
|
|
||||||
invoice.flags.ignore_mandatory = True
|
invoice.flags.ignore_mandatory = True
|
||||||
|
|
||||||
invoice.save()
|
invoice.save()
|
||||||
|
|
||||||
if self.submit_invoice:
|
if self.submit_invoice:
|
||||||
|
|||||||
Reference in New Issue
Block a user