mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix Leave Encashment unlink additional component, readonly encashed days
This commit is contained in:
@@ -454,6 +454,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"depends_on": "eval:doc.total_leaves_encashed>0",
|
||||||
"fieldname": "total_leaves_encashed",
|
"fieldname": "total_leaves_encashed",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -470,7 +471,7 @@
|
|||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -588,7 +589,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-05-15 17:06:18.343451",
|
"modified": "2018-05-15 20:04:56.901123",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Leave Allocation",
|
"name": "Leave Allocation",
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class LeaveEncashment(Document):
|
|||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
if self.additional_component:
|
if self.additional_component:
|
||||||
frappe.get_doc("Additional Salary Component", self.additional_component).cancel()
|
frappe.get_doc("Additional Salary Component", self.additional_component).cancel()
|
||||||
|
self.db_set("additional_component", "")
|
||||||
|
|
||||||
if self.leave_allocation:
|
if self.leave_allocation:
|
||||||
frappe.db.set_value("Leave Allocation", self.leave_allocation, "total_leaves_encashed",
|
frappe.db.set_value("Leave Allocation", self.leave_allocation, "total_leaves_encashed",
|
||||||
|
|||||||
Reference in New Issue
Block a user