fix: Unnecessary validation for non deferred sales invoices (#43816)

This commit is contained in:
Deepesh Garg
2024-10-24 12:58:47 +05:30
committed by GitHub
parent 076486e1f8
commit af472054f6

View File

@@ -311,8 +311,11 @@ class SalesInvoice(SellingController):
self.validate_delivery_note()
is_deferred_invoice = any(d.get("enable_deferred_revenue") for d in self.get("items"))
# validate service stop date to lie in between start and end date
validate_service_stop_date(self)
if is_deferred_invoice:
validate_service_stop_date(self)
if not self.is_opening:
self.is_opening = "No"