feat(Regional): patch to disable ksa print formats for other countries
This commit is contained in:
parent
09f178ceee
commit
2256155e80
14
erpnext/patches/v13_0/disable_ksa_print_format_for_others.py
Normal file
14
erpnext/patches/v13_0/disable_ksa_print_format_for_others.py
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2020, Wahni Green Technologies and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
company = frappe.get_all('Company', filters = {'country': 'Saudi Arabia'})
|
||||
if company:
|
||||
return
|
||||
|
||||
if frappe.db.exists('DocType', 'Print Format'):
|
||||
frappe.db.sql("""UPDATE`tabPrint Format` SET disabled = 1 WHERE
|
||||
name IN ('KSA VAT Invoice', 'KSA POS Invoice')""")
|
Loading…
Reference in New Issue
Block a user