From 1100bf4def033f87b5d70a1dd3a901f4848660dd Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 27 Sep 2024 13:19:31 +0530 Subject: [PATCH] fix: validate doc name which are required in doc issue summary --- india_compliance/gst_india/overrides/purchase_invoice.py | 3 ++- .../gst_india/overrides/subcontracting_transaction.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/india_compliance/gst_india/overrides/purchase_invoice.py b/india_compliance/gst_india/overrides/purchase_invoice.py index 2572d5436..0b9f14ead 100644 --- a/india_compliance/gst_india/overrides/purchase_invoice.py +++ b/india_compliance/gst_india/overrides/purchase_invoice.py @@ -9,7 +9,7 @@ validate_hsn_codes as _validate_hsn_codes, ) from india_compliance.gst_india.overrides.transaction import validate_transaction -from india_compliance.gst_india.utils import is_api_enabled +from india_compliance.gst_india.utils import is_api_enabled, validate_invoice_number from india_compliance.gst_india.utils.e_waybill import get_e_waybill_info @@ -47,6 +47,7 @@ def validate(doc, method=None): return validate_hsn_codes(doc) + validate_invoice_number(doc) set_ineligibility_reason(doc) update_itc_totals(doc) validate_supplier_invoice_number(doc) diff --git a/india_compliance/gst_india/overrides/subcontracting_transaction.py b/india_compliance/gst_india/overrides/subcontracting_transaction.py index 200a0dc36..e4dfb444c 100644 --- a/india_compliance/gst_india/overrides/subcontracting_transaction.py +++ b/india_compliance/gst_india/overrides/subcontracting_transaction.py @@ -24,6 +24,9 @@ validate_place_of_supply, ) from india_compliance.gst_india.utils import get_gst_accounts_by_type, is_api_enabled +from india_compliance.gst_india.utils import ( + validate_invoice_number as validate_transaction_name, +) from india_compliance.gst_india.utils.e_waybill import get_e_waybill_info from india_compliance.gst_india.utils.taxes_controller import ( CustomTaxController, @@ -165,6 +168,8 @@ def onload(doc, method=None): def validate(doc, method=None): + validate_transaction_name(doc) + if ignore_gst_validation_for_subcontracting(doc): return