Exemption Declaration - field total_amount
This commit is contained in:
parent
4bbf705e58
commit
29e0ed3da1
@ -139,6 +139,37 @@
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "total_exemption_amount",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Total Exemption Amount",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@ -243,7 +274,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-05-15 16:16:46.075493",
|
||||
"modified": "2018-05-16 19:03:57.624215",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Employee Tax Exemption Declaration",
|
||||
|
@ -19,3 +19,6 @@ class EmployeeTaxExemptionDeclaration(Document):
|
||||
"docstatus": 1}):
|
||||
frappe.throw(_("Tax Declaration of {0} for period {1} already submitted.")\
|
||||
.format(self.employee, self.payroll_period), frappe.DocstatusTransitionError)
|
||||
self.total_exemption_amount = 0
|
||||
for item in self.declarations:
|
||||
self.total_exemption_amount += item.amount
|
||||
|
Loading…
x
Reference in New Issue
Block a user