Merge pull request #28489 from deepeshgarg007/ksa_print_format

fix: KSA Invoice print format for multicurrency invoices
This commit is contained in:
Deepesh Garg 2021-11-22 16:34:34 +05:30 committed by GitHub
commit e8370147e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -306,7 +306,8 @@ doc_events = {
'validate': ["erpnext.erpnext_integrations.taxjar_integration.set_sales_tax"]
},
"Company": {
"on_trash": "erpnext.regional.india.utils.delete_gst_settings_for_company"
"on_trash": ["erpnext.regional.india.utils.delete_gst_settings_for_company",
"erpnext.regional.saudi_arabia.utils.delete_vat_settings_for_company"]
},
"Integration Request": {
"validate": "erpnext.accounts.doctype.payment_request.payment_request.validate_payment"

File diff suppressed because one or more lines are too long

View File

@ -83,3 +83,10 @@ def delete_qr_code_file(doc, method):
})
if len(file_doc):
frappe.delete_doc('File', file_doc[0].name)
def delete_vat_settings_for_company(doc, method):
if doc.country != 'Saudi Arabia':
return
settings_doc = frappe.get_doc('KSA VAT Setting', {'company': doc.name})
settings_doc.delete()