feat: add transaction details in ledger
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.json b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
index 0903398..12c74de 100644
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
@@ -1,757 +1,736 @@
 {
- "allow_copy": 0,
- "allow_events_in_timeline": 0,
- "allow_guest_to_view": 0,
- "allow_import": 1,
- "allow_rename": 0,
- "autoname": "naming_series:",
- "beta": 0,
- "creation": "2013-02-20 19:10:38",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 0,
- "engine": "InnoDB",
- "fields": [
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "default": "",
-   "fetch_if_empty": 0,
-   "fieldname": "naming_series",
-   "fieldtype": "Select",
-   "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": "Series",
-   "length": 0,
-   "no_copy": 1,
-   "options": "HR-LAL-.YYYY.-",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 1,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "employee",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 1,
-   "in_list_view": 1,
-   "in_standard_filter": 1,
-   "label": "Employee",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "employee",
-   "oldfieldtype": "Link",
-   "options": "Employee",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 1,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_from": "employee.employee_name",
-   "fetch_if_empty": 0,
-   "fieldname": "employee_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 1,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Employee Name",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 1,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_from": "employee.department",
-   "fetch_if_empty": 0,
-   "fieldname": "department",
-   "fieldtype": "Link",
-   "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": "Department",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Department",
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "column_break1",
-   "fieldtype": "Column Break",
-   "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,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0,
-   "width": "50%"
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "leave_type",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 1,
-   "label": "Leave Type",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "leave_type",
-   "oldfieldtype": "Link",
-   "options": "Leave Type",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 1,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "from_date",
-   "fieldtype": "Date",
-   "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": "From Date",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "to_date",
-   "fieldtype": "Date",
-   "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": "To Date",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "section_break_6",
-   "fieldtype": "Section Break",
-   "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": "Allocation",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 1,
-   "bold": 1,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "eval: doc.carry_forward != 1",
-   "fetch_if_empty": 0,
-   "fieldname": "new_leaves_allocated",
-   "fieldtype": "Float",
-   "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": "New Leaves Allocated",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "eval: doc.carry_forward == 1",
-   "fetch_if_empty": 0,
-   "fieldname": "carry_forwarded_leaves",
-   "fieldtype": "Int",
-   "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": "Unused Leaves",
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "",
-   "description": "",
-   "fetch_if_empty": 0,
-   "fieldname": "carry_forward",
-   "fieldtype": "Check",
-   "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": "Allocate unused leaves from previous allocations",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 1,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "",
-   "fetch_if_empty": 0,
-   "fieldname": "total_leaves_allocated",
-   "fieldtype": "Float",
-   "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 Leaves Allocated",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0
-  },
-  {
-   "allow_bulk_edit": 0,
-   "allow_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "eval:doc.total_leaves_encashed>0",
-   "fetch_if_empty": 0,
-   "fieldname": "total_leaves_encashed",
-   "fieldtype": "Float",
-   "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 Leaves Encashed",
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "column_break_10",
-   "fieldtype": "Column Break",
-   "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,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "compensatory_request",
-   "fieldtype": "Link",
-   "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": "Compensatory Leave Request",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Compensatory Leave Request",
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "leave_period",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 1,
-   "label": "Leave Period",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Leave Period",
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "amended_from",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 1,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Amended From",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "amended_from",
-   "oldfieldtype": "Data",
-   "options": "Leave Allocation",
-   "permlevel": 0,
-   "print_hide": 1,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 1,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "notes",
-   "fieldtype": "Section Break",
-   "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": "Notes",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "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_in_quick_entry": 0,
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fetch_if_empty": 0,
-   "fieldname": "description",
-   "fieldtype": "Small Text",
-   "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": "Description",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "reason",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "translatable": 0,
-   "unique": 0,
-   "width": "300px"
-  }
- ],
- "has_web_view": 0,
- "hide_toolbar": 0,
- "icon": "fa fa-ok",
- "idx": 1,
- "in_create": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2019-04-22 18:33:15.858006",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Leave Allocation",
- "owner": "Administrator",
- "permissions": [
-  {
-   "amend": 1,
-   "cancel": 1,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "export": 0,
-   "if_owner": 0,
-   "import": 0,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "HR User",
-   "set_user_permissions": 0,
-   "share": 1,
-   "submit": 1,
-   "write": 1
-  },
-  {
-   "amend": 1,
-   "cancel": 1,
-   "create": 1,
-   "delete": 1,
-   "email": 1,
-   "export": 1,
-   "if_owner": 0,
-   "import": 1,
-   "permlevel": 0,
-   "print": 1,
-   "read": 1,
-   "report": 1,
-   "role": "HR Manager",
-   "set_user_permissions": 0,
-   "share": 1,
-   "submit": 1,
-   "write": 1
-  }
- ],
- "quick_entry": 0,
- "read_only": 0,
- "search_fields": "employee,employee_name,leave_type,total_leaves_allocated",
- "show_name_in_global_search": 1,
- "sort_field": "modified",
- "sort_order": "DESC",
- "timeline_field": "employee",
- "track_changes": 0,
- "track_seen": 0,
- "track_views": 0
-}
\ No newline at end of file
+    "allow_copy": 0,
+    "allow_events_in_timeline": 0,
+    "allow_guest_to_view": 0,
+    "allow_import": 1,
+    "allow_rename": 0,
+    "autoname": "naming_series:",
+    "beta": 0,
+    "creation": "2013-02-20 19:10:38",
+    "custom": 0,
+    "docstatus": 0,
+    "doctype": "DocType",
+    "document_type": "Setup",
+    "editable_grid": 0,
+    "engine": "InnoDB",
+    "fields": [
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "default": "",
+        "fieldname": "naming_series",
+        "fieldtype": "Select",
+        "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": "Series",
+        "length": 0,
+        "no_copy": 1,
+        "options": "HR-LAL-.YYYY.-",
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 1,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 0,
+        "set_only_once": 1,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "employee",
+        "fieldtype": "Link",
+        "hidden": 0,
+        "ignore_user_permissions": 0,
+        "ignore_xss_filter": 0,
+        "in_filter": 0,
+        "in_global_search": 1,
+        "in_list_view": 1,
+        "in_standard_filter": 1,
+        "label": "Employee",
+        "length": 0,
+        "no_copy": 0,
+        "oldfieldname": "employee",
+        "oldfieldtype": "Link",
+        "options": "Employee",
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 1,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fetch_from": "employee.employee_name",
+        "fieldname": "employee_name",
+        "fieldtype": "Data",
+        "hidden": 0,
+        "ignore_user_permissions": 0,
+        "ignore_xss_filter": 0,
+        "in_filter": 0,
+        "in_global_search": 1,
+        "in_list_view": 1,
+        "in_standard_filter": 0,
+        "label": "Employee Name",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 1,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 0,
+        "search_index": 1,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fetch_from": "employee.department",
+        "fieldname": "department",
+        "fieldtype": "Link",
+        "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": "Department",
+        "length": 0,
+        "no_copy": 0,
+        "options": "Department",
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "column_break1",
+        "fieldtype": "Column Break",
+        "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,
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 0,
+        "search_index": 0,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0,
+        "width": "50%"
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "leave_type",
+        "fieldtype": "Link",
+        "hidden": 0,
+        "ignore_user_permissions": 0,
+        "ignore_xss_filter": 0,
+        "in_filter": 0,
+        "in_global_search": 0,
+        "in_list_view": 1,
+        "in_standard_filter": 1,
+        "label": "Leave Type",
+        "length": 0,
+        "no_copy": 0,
+        "oldfieldname": "leave_type",
+        "oldfieldtype": "Link",
+        "options": "Leave Type",
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 1,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "from_date",
+        "fieldtype": "Date",
+        "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": "From Date",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 0,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "to_date",
+        "fieldtype": "Date",
+        "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": "To Date",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 0,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "section_break_6",
+        "fieldtype": "Section Break",
+        "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": "Allocation",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 1,
+        "bold": 1,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "new_leaves_allocated",
+        "fieldtype": "Float",
+        "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": "New Leaves Allocated",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "description": "",
+        "fieldname": "carry_forward",
+        "fieldtype": "Check",
+        "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": "Add unused leaves from previous allocations",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "depends_on": "carry_forward",
+        "fieldname": "carry_forwarded_leaves",
+        "fieldtype": "Float",
+        "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": "Unused leaves",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 1,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "total_leaves_allocated",
+        "fieldtype": "Float",
+        "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 Leaves Allocated",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 1,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 1,
+        "search_index": 0,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0
+      },
+      {
+        "allow_bulk_edit": 0,
+        "allow_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "depends_on": "eval:doc.total_leaves_encashed>0",
+        "fieldname": "total_leaves_encashed",
+        "fieldtype": "Float",
+        "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 Leaves Encashed",
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "column_break_10",
+        "fieldtype": "Column Break",
+        "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,
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "compensatory_request",
+        "fieldtype": "Link",
+        "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": "Compensatory Leave Request",
+        "length": 0,
+        "no_copy": 0,
+        "options": "Compensatory Leave Request",
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "leave_period",
+        "fieldtype": "Link",
+        "hidden": 0,
+        "ignore_user_permissions": 0,
+        "ignore_xss_filter": 0,
+        "in_filter": 0,
+        "in_global_search": 0,
+        "in_list_view": 0,
+        "in_standard_filter": 1,
+        "label": "Leave Period",
+        "length": 0,
+        "no_copy": 0,
+        "options": "Leave Period",
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "amended_from",
+        "fieldtype": "Link",
+        "hidden": 0,
+        "ignore_user_permissions": 1,
+        "ignore_xss_filter": 0,
+        "in_filter": 0,
+        "in_global_search": 0,
+        "in_list_view": 0,
+        "in_standard_filter": 0,
+        "label": "Amended From",
+        "length": 0,
+        "no_copy": 1,
+        "oldfieldname": "amended_from",
+        "oldfieldtype": "Data",
+        "options": "Leave Allocation",
+        "permlevel": 0,
+        "print_hide": 1,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 1,
+        "columns": 0,
+        "fieldname": "notes",
+        "fieldtype": "Section Break",
+        "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": "Notes",
+        "length": 0,
+        "no_copy": 0,
+        "permlevel": 0,
+        "precision": "",
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "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_in_quick_entry": 0,
+        "allow_on_submit": 0,
+        "bold": 0,
+        "collapsible": 0,
+        "columns": 0,
+        "fieldname": "description",
+        "fieldtype": "Small Text",
+        "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": "Description",
+        "length": 0,
+        "no_copy": 0,
+        "oldfieldname": "reason",
+        "oldfieldtype": "Small Text",
+        "permlevel": 0,
+        "print_hide": 0,
+        "print_hide_if_no_value": 0,
+        "read_only": 0,
+        "remember_last_selected_value": 0,
+        "report_hide": 0,
+        "reqd": 0,
+        "search_index": 0,
+        "set_only_once": 0,
+        "translatable": 0,
+        "unique": 0,
+        "width": "300px"
+      }
+    ],
+    "has_web_view": 0,
+    "hide_heading": 0,
+    "hide_toolbar": 0,
+    "icon": "fa fa-ok",
+    "idx": 1,
+    "image_view": 0,
+    "in_create": 0,
+    "is_submittable": 1,
+    "issingle": 0,
+    "istable": 0,
+    "max_attachments": 0,
+    "modified": "2019-01-30 11:28:09.360525",
+    "modified_by": "Administrator",
+    "module": "HR",
+    "name": "Leave Allocation",
+    "owner": "Administrator",
+    "permissions": [
+      {
+        "amend": 1,
+        "cancel": 1,
+        "create": 1,
+        "delete": 1,
+        "email": 1,
+        "export": 0,
+        "if_owner": 0,
+        "import": 0,
+        "permlevel": 0,
+        "print": 1,
+        "read": 1,
+        "report": 1,
+        "role": "HR User",
+        "set_user_permissions": 0,
+        "share": 1,
+        "submit": 1,
+        "write": 1
+      },
+      {
+        "amend": 1,
+        "cancel": 1,
+        "create": 1,
+        "delete": 1,
+        "email": 1,
+        "export": 1,
+        "if_owner": 0,
+        "import": 1,
+        "permlevel": 0,
+        "print": 1,
+        "read": 1,
+        "report": 1,
+        "role": "HR Manager",
+        "set_user_permissions": 0,
+        "share": 1,
+        "submit": 1,
+        "write": 1
+      }
+    ],
+    "quick_entry": 0,
+    "read_only": 0,
+    "read_only_onload": 0,
+    "search_fields": "employee,employee_name,leave_type,total_leaves_allocated",
+    "show_name_in_global_search": 1,
+    "sort_field": "modified",
+    "sort_order": "DESC",
+    "timeline_field": "employee",
+    "track_changes": 0,
+    "track_seen": 0,
+    "track_views": 0
+  }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.json b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.json
index 8ef3024..c7e6b70 100644
--- a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.json
+++ b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.json
@@ -75,7 +75,7 @@
   }
  ],
  "is_submittable": 1,
- "modified": "2019-05-09 15:54:52.834794",
+ "modified": "2019-05-09 18:36:07.383714",
  "modified_by": "Administrator",
  "module": "HR",
  "name": "Leave Ledger Entry",
diff --git a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py
index dd8de56..35dce97 100644
--- a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py
+++ b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py
@@ -3,7 +3,7 @@
 # For license information, please see license.txt
 
 from __future__ import unicode_literals
-# import frappe
+import frappe
 from frappe.model.document import Document
 from frappe.utils import add_days
 
@@ -17,10 +17,9 @@
 		employee_name=ref_doc.employee_name,
 		leave_type=ref_doc.leave_type,
 		from_date=ref_doc.from_date,
-		transaction_document_type=ref_doc.doctype,
-		transaction_document_name=ref_doc.name
+		transaction_type=ref_doc.doctype,
+		transaction_name=ref_doc.name
 	)
-
 	if ref_doc.carry_forwarded_leaves:
 		expiry_days = frappe.db.get_value("Leave Type", ref_doc.leave_type, "carry_forward_leave_expiry")
 
@@ -29,11 +28,11 @@
 			to_date=add_days(ref_doc.from_date, expiry_days) if expiry_days else ref_doc.to_date,
 			is_carry_forward=1
 		))
-		frappe.get_doc(ledger).insert()
+		frappe.get_doc(ledger).submit()
 
 	ledger.update(dict(
 		leaves=ref_doc.new_leaves_allocated * 1 if submit else -1,
 		to_date=ref_doc.to_date,
 		is_carry_forward=0
 	))
-	frappe.get_doc(ledger).insert()
\ No newline at end of file
+	frappe.get_doc(ledger).submit()
\ No newline at end of file