{
 "actions": [],
 "allow_import": 1,
 "autoname": "naming_series:",
 "creation": "2013-02-20 11:18:11",
 "description": "Apply / Approve Leaves",
 "doctype": "DocType",
 "document_type": "Document",
 "engine": "InnoDB",
 "field_order": [
  "naming_series",
  "employee",
  "employee_name",
  "column_break_4",
  "leave_type",
  "department",
  "leave_balance",
  "section_break_5",
  "from_date",
  "to_date",
  "half_day",
  "half_day_date",
  "total_leave_days",
  "column_break1",
  "description",
  "section_break_7",
  "leave_approver",
  "leave_approver_name",
  "column_break_18",
  "status",
  "salary_slip",
  "sb10",
  "posting_date",
  "follow_via_email",
  "color",
  "column_break_17",
  "company",
  "letter_head",
  "amended_from"
 ],
 "fields": [
  {
   "fieldname": "naming_series",
   "fieldtype": "Select",
   "label": "Series",
   "no_copy": 1,
   "options": "HR-LAP-.YYYY.-",
   "print_hide": 1,
   "reqd": 1,
   "set_only_once": 1
  },
  {
   "fieldname": "employee",
   "fieldtype": "Link",
   "in_global_search": 1,
   "in_standard_filter": 1,
   "label": "Employee",
   "options": "Employee",
   "reqd": 1,
   "search_index": 1
  },
  {
   "fieldname": "employee_name",
   "fieldtype": "Data",
   "in_global_search": 1,
   "label": "Employee Name",
   "read_only": 1
  },
  {
   "fieldname": "column_break_4",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "leave_type",
   "fieldtype": "Link",
   "ignore_user_permissions": 1,
   "in_standard_filter": 1,
   "label": "Leave Type",
   "options": "Leave Type",
   "reqd": 1,
   "search_index": 1
  },
  {
   "fetch_from": "employee.department",
   "fieldname": "department",
   "fieldtype": "Link",
   "label": "Department",
   "options": "Department",
   "read_only": 1
  },
  {
   "fieldname": "leave_balance",
   "fieldtype": "Float",
   "label": "Leave Balance Before Application",
   "no_copy": 1,
   "read_only": 1
  },
  {
   "fieldname": "section_break_5",
   "fieldtype": "Section Break"
  },
  {
   "fieldname": "from_date",
   "fieldtype": "Date",
   "in_list_view": 1,
   "label": "From Date",
   "reqd": 1,
   "search_index": 1
  },
  {
   "fieldname": "to_date",
   "fieldtype": "Date",
   "label": "To Date",
   "reqd": 1,
   "search_index": 1
  },
  {
   "default": "0",
   "fieldname": "half_day",
   "fieldtype": "Check",
   "label": "Half Day"
  },
  {
   "depends_on": "eval:doc.half_day && (doc.from_date != doc.to_date)",
   "fieldname": "half_day_date",
   "fieldtype": "Date",
   "label": "Half Day Date"
  },
  {
   "fieldname": "total_leave_days",
   "fieldtype": "Float",
   "in_list_view": 1,
   "label": "Total Leave Days",
   "no_copy": 1,
   "precision": "1",
   "read_only": 1
  },
  {
   "fieldname": "column_break1",
   "fieldtype": "Column Break",
   "print_width": "50%",
   "width": "50%"
  },
  {
   "fieldname": "description",
   "fieldtype": "Small Text",
   "label": "Reason"
  },
  {
   "fieldname": "section_break_7",
   "fieldtype": "Section Break"
  },
  {
   "fieldname": "leave_approver",
   "fieldtype": "Link",
   "label": "Leave Approver",
   "options": "User"
  },
  {
   "fieldname": "leave_approver_name",
   "fieldtype": "Data",
   "label": "Leave Approver Name",
   "read_only": 1
  },
  {
   "fieldname": "column_break_18",
   "fieldtype": "Column Break"
  },
  {
   "default": "Open",
   "fieldname": "status",
   "fieldtype": "Select",
   "in_standard_filter": 1,
   "label": "Status",
   "no_copy": 1,
   "options": "Open\nApproved\nRejected\nCancelled",
   "permlevel": 1,
   "reqd": 1
  },
  {
   "fieldname": "sb10",
   "fieldtype": "Section Break"
  },
  {
   "default": "Today",
   "fieldname": "posting_date",
   "fieldtype": "Date",
   "label": "Posting Date",
   "no_copy": 1,
   "reqd": 1
  },
  {
   "fetch_from": "employee.company",
   "fieldname": "company",
   "fieldtype": "Link",
   "label": "Company",
   "options": "Company",
   "read_only": 1,
   "remember_last_selected_value": 1,
   "reqd": 1
  },
  {
   "allow_on_submit": 1,
   "default": "1",
   "fieldname": "follow_via_email",
   "fieldtype": "Check",
   "label": "Follow via Email",
   "print_hide": 1
  },
  {
   "fieldname": "column_break_17",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "salary_slip",
   "fieldtype": "Link",
   "label": "Salary Slip",
   "options": "Salary Slip",
   "print_hide": 1
  },
  {
   "allow_on_submit": 1,
   "fieldname": "letter_head",
   "fieldtype": "Link",
   "ignore_user_permissions": 1,
   "label": "Letter Head",
   "options": "Letter Head",
   "print_hide": 1
  },
  {
   "allow_on_submit": 1,
   "fieldname": "color",
   "fieldtype": "Color",
   "label": "Color",
   "print_hide": 1
  },
  {
   "fieldname": "amended_from",
   "fieldtype": "Link",
   "ignore_user_permissions": 1,
   "label": "Amended From",
   "no_copy": 1,
   "options": "Leave Application",
   "print_hide": 1,
   "read_only": 1
  }
 ],
 "icon": "fa fa-calendar",
 "idx": 1,
 "is_submittable": 1,
 "links": [],
 "max_attachments": 3,
 "modified": "2020-05-18 13:00:41.577327",
 "modified_by": "Administrator",
 "module": "HR",
 "name": "Leave Application",
 "owner": "Administrator",
 "permissions": [
  {
   "create": 1,
   "email": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "Employee",
   "share": 1,
   "write": 1
  },
  {
   "amend": 1,
   "cancel": 1,
   "create": 1,
   "delete": 1,
   "email": 1,
   "export": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "HR Manager",
   "set_user_permissions": 1,
   "share": 1,
   "submit": 1,
   "write": 1
  },
  {
   "permlevel": 1,
   "read": 1,
   "role": "All"
  },
  {
   "amend": 1,
   "cancel": 1,
   "create": 1,
   "delete": 1,
   "email": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "HR User",
   "set_user_permissions": 1,
   "share": 1,
   "submit": 1,
   "write": 1
  },
  {
   "amend": 1,
   "cancel": 1,
   "delete": 1,
   "email": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "Leave Approver",
   "share": 1,
   "submit": 1,
   "write": 1
  },
  {
   "permlevel": 1,
   "read": 1,
   "report": 1,
   "role": "HR User",
   "write": 1
  },
  {
   "permlevel": 1,
   "read": 1,
   "report": 1,
   "role": "Leave Approver",
   "write": 1
  }
 ],
 "search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days",
 "sort_field": "modified",
 "sort_order": "DESC",
 "timeline_field": "employee",
 "title_field": "employee_name"
}