-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(regional): toggle for reduced depreciation rate as per IT Act (#…
- Loading branch information
1 parent
fbae3c7
commit 86c6ad5
Showing
6 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
erpnext/patches/v13_0/create_custom_field_for_finance_book.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import frappe | ||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields | ||
|
||
|
||
def execute(): | ||
company = frappe.get_all('Company', filters = {'country': 'India'}) | ||
if not company: | ||
return | ||
|
||
custom_field = { | ||
'Finance Book': [ | ||
{ | ||
'fieldname': 'for_income_tax', | ||
'label': 'For Income Tax', | ||
'fieldtype': 'Check', | ||
'insert_after': 'finance_book_name', | ||
'description': 'If the asset is put to use for less than 180 days, the first Depreciation Rate will be reduced by 50%.' | ||
} | ||
] | ||
} | ||
create_custom_fields(custom_field, update=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters