From cd42089e20df5776e8a716e395a946929a829341 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Thu, 22 Feb 2024 16:24:42 +0530 Subject: [PATCH] fix: skip SO & DN validation for debit note (cherry picked from commit e2d16955dd6de197ef621e5f8fb3159f5a9bfaaa) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 57635f5a7dab..aaaa3368fd3f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -269,7 +269,7 @@ def validate(self): super(SalesInvoice, self).validate() self.validate_auto_set_posting_time() - if not self.is_pos: + if not (self.is_pos or self.is_debit_note): self.so_dn_required() self.set_tax_withholding()