Merge pull request #9518 from sagarvora/gh-9516
[minor] fix supplier GSTIN portal not getting displayed
This commit is contained in:
commit
550268eaf3
@ -83,7 +83,7 @@ def _send_gstin_reminder(party_type, party, default_email_id=None, sent_to=None)
|
||||
<p>Please help us send you GST Ready Invoices.</p>
|
||||
<p>
|
||||
<a href="{0}?party={1}">
|
||||
Click on the here to update your GSTIN Number in our system
|
||||
Click here to update your GSTIN Number in our system
|
||||
</a>
|
||||
</p>
|
||||
<p style="color: #aaa; font-size: 11px; margin-top: 30px;">
|
||||
|
@ -11,16 +11,16 @@ def get_context(context):
|
||||
context.invalid_gstin = 1
|
||||
|
||||
party_type = 'Customer'
|
||||
party = frappe.db.get_value('Customer', party)
|
||||
party_name = frappe.db.get_value('Customer', party)
|
||||
|
||||
if not party:
|
||||
if not party_name:
|
||||
party_type = 'Supplier'
|
||||
party = frappe.db.get_value('Supplier', party)
|
||||
party_name = frappe.db.get_value('Supplier', party)
|
||||
|
||||
if not party:
|
||||
if not party_name:
|
||||
frappe.throw(_("Not Found"), frappe.DoesNotExistError)
|
||||
|
||||
context.party = frappe.get_doc(party_type, party)
|
||||
context.party = frappe.get_doc(party_type, party_name)
|
||||
context.party.onload()
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ def update_gstin(context):
|
||||
address_name = frappe.get_value('Address', key)
|
||||
if address_name:
|
||||
address = frappe.get_doc('Address', address_name)
|
||||
address.gstin = value
|
||||
address.gstin = value.upper()
|
||||
address.save(ignore_permissions=True)
|
||||
dirty = True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user