Merge pull request #22705 from deepeshgarg007/rcm_country_v13

fix: Update RCM only for indian countries
This commit is contained in:
Deepesh Garg 2020-07-16 00:25:14 +05:30 committed by GitHub
commit 56475999cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,6 +668,11 @@ def get_gst_accounts(company, account_wise=False):
return gst_accounts
def update_grand_total_for_rcm(doc, method):
country = frappe.get_cached_value('Company', doc.company, 'country')
if country != 'India':
return
if doc.reverse_charge == 'Y':
gst_accounts = get_gst_accounts(doc.company)
gst_account_list = gst_accounts.get('cgst_account') + gst_accounts.get('sgst_account') \