Skip to content

fix(tax_validation): tax id validation based on vat registraton such as turnover#571

Open
kunhimohamed wants to merge 1 commit intoParaLogicTech:version-15from
kunhimohamed:vat_validation
Open

fix(tax_validation): tax id validation based on vat registraton such as turnover#571
kunhimohamed wants to merge 1 commit intoParaLogicTech:version-15from
kunhimohamed:vat_validation

Conversation

@kunhimohamed
Copy link
Copy Markdown

No description provided.

if validation == "Mandatory for Company and Annual Turnover":
if frappe.get_cached_value("Customer", self.bill_to or self.customer, "customer_type") == "Individual" or \
(frappe.get_cached_value("Customer", self.bill_to or self.customer, "customer_type") == "Company" and \
frappe.get_cached_value("Customer", self.bill_to or self.customer, "vat_registration_decider") == "Annual Turnover <= 375,000 AED"):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot add into core because vat_registration_decider is not a core field

Copy link
Copy Markdown
Author

@kunhimohamed kunhimohamed Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is we need to override the method by custom application?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend a hidden checkbox in Customer master for the core something like "Tax ID Non Mandatory" tax_id_non_mandatory, this checkbox will be 0 by default, and 1 only if vat_registration_decider meets the criteria. The core will only check tax_id_non_mandatory to override the validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants