mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
fix(e-invoice): do not validate gstin for exports (#24564)
This commit is contained in:
@@ -303,7 +303,7 @@ def validate_mandatory_fields(invoice):
|
|||||||
_('GSTIN is mandatory to fetch company GSTIN details. Please enter GSTIN in selected company address.'),
|
_('GSTIN is mandatory to fetch company GSTIN details. Please enter GSTIN in selected company address.'),
|
||||||
title=_('Missing Fields')
|
title=_('Missing Fields')
|
||||||
)
|
)
|
||||||
if not frappe.db.get_value('Address', invoice.customer_address, 'gstin'):
|
if invoice.gst_category != 'Overseas' and not frappe.db.get_value('Address', invoice.customer_address, 'gstin'):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_('GSTIN is mandatory to fetch customer GSTIN details. Please enter GSTIN in selected customer address.'),
|
_('GSTIN is mandatory to fetch customer GSTIN details. Please enter GSTIN in selected customer address.'),
|
||||||
title=_('Missing Fields')
|
title=_('Missing Fields')
|
||||||
@@ -330,7 +330,10 @@ def make_einvoice(invoice):
|
|||||||
|
|
||||||
shipping_details = payment_details = prev_doc_details = eway_bill_details = frappe._dict({})
|
shipping_details = payment_details = prev_doc_details = eway_bill_details = frappe._dict({})
|
||||||
if invoice.shipping_address_name and invoice.customer_address != invoice.shipping_address_name:
|
if invoice.shipping_address_name and invoice.customer_address != invoice.shipping_address_name:
|
||||||
shipping_details = get_party_details(invoice.shipping_address_name)
|
if invoice.gst_category == 'Overseas':
|
||||||
|
shipping_details = get_overseas_address_details(invoice.shipping_address_name)
|
||||||
|
else:
|
||||||
|
shipping_details = get_party_details(invoice.shipping_address_name)
|
||||||
|
|
||||||
if invoice.is_pos and invoice.base_paid_amount:
|
if invoice.is_pos and invoice.base_paid_amount:
|
||||||
payment_details = get_payment_details(invoice)
|
payment_details = get_payment_details(invoice)
|
||||||
|
|||||||
Reference in New Issue
Block a user