mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 10:41:21 +00:00
Merge branch 'enterprise-hotfix' of https://github.com/frappe/erpnext into enterprise-hotfix
This commit is contained in:
@@ -861,6 +861,22 @@ def get_depreciation_amount(asset, depreciable_value, row):
|
||||
|
||||
return depreciation_amount
|
||||
|
||||
def delete_gst_settings_for_company(doc, method):
|
||||
if doc.country != 'India':
|
||||
return
|
||||
|
||||
gst_settings = frappe.get_doc("GST Settings")
|
||||
records_to_delete = []
|
||||
|
||||
for d in reversed(gst_settings.get('gst_accounts')):
|
||||
if d.company == doc.name:
|
||||
records_to_delete.append(d)
|
||||
|
||||
for d in records_to_delete:
|
||||
gst_settings.remove(d)
|
||||
|
||||
gst_settings.save()
|
||||
|
||||
def set_item_tax_from_hsn_code(item):
|
||||
if not item.taxes and item.gst_hsn_code:
|
||||
hsn_doc = frappe.get_doc("GST HSN Code", item.gst_hsn_code)
|
||||
|
||||
Reference in New Issue
Block a user