Merge pull request #23089 from deepeshgarg007/rcm_deduction_v13

fix: Do not update total for RCM invoices if net taxes are zero
This commit is contained in:
Deepesh Garg 2020-08-19 20:19:06 +05:30 committed by GitHub
commit cbedb3de3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -674,6 +674,9 @@ def update_grand_total_for_rcm(doc, method):
if country != 'India':
return
if not doc.total_taxes_and_charges:
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') \
@ -721,7 +724,10 @@ def make_regional_gl_entries(gl_entries, doc):
country = frappe.get_cached_value('Company', doc.company, 'country')
if country != 'India':
return
return gl_entries
if not doc.total_taxes_and_charges:
return gl_entries
if doc.reverse_charge == 'Y':
gst_accounts = get_gst_accounts(doc.company)