{
 "actions": [],
 "allow_import": 1,
 "autoname": "ACC-LOAN-.YYYY.-.#####",
 "creation": "2019-08-29 17:29:18.176786",
 "doctype": "DocType",
 "document_type": "Document",
 "editable_grid": 1,
 "engine": "InnoDB",
 "field_order": [
  "applicant_type",
  "applicant",
  "applicant_name",
  "loan_application",
  "column_break_3",
  "company",
  "posting_date",
  "status",
  "repay_from_salary",
  "section_break_8",
  "loan_type",
  "loan_amount",
  "rate_of_interest",
  "is_secured_loan",
  "disbursement_date",
  "closure_date",
  "disbursed_amount",
  "column_break_11",
  "maximum_loan_amount",
  "repayment_method",
  "repayment_periods",
  "monthly_repayment_amount",
  "repayment_start_date",
  "is_term_loan",
  "account_info",
  "mode_of_payment",
  "payment_account",
  "column_break_9",
  "loan_account",
  "interest_income_account",
  "penalty_income_account",
  "section_break_15",
  "repayment_schedule",
  "section_break_17",
  "total_payment",
  "total_principal_paid",
  "written_off_amount",
  "column_break_19",
  "total_interest_payable",
  "total_amount_paid",
  "amended_from"
 ],
 "fields": [
  {
   "fieldname": "applicant_type",
   "fieldtype": "Select",
   "label": "Applicant Type",
   "options": "Employee\nMember\nCustomer",
   "reqd": 1
  },
  {
   "fieldname": "applicant",
   "fieldtype": "Dynamic Link",
   "in_standard_filter": 1,
   "label": "Applicant",
   "options": "applicant_type",
   "reqd": 1
  },
  {
   "fieldname": "applicant_name",
   "fieldtype": "Data",
   "in_global_search": 1,
   "label": "Applicant Name",
   "read_only": 1
  },
  {
   "fieldname": "loan_application",
   "fieldtype": "Link",
   "label": "Loan Application",
   "no_copy": 1,
   "options": "Loan Application"
  },
  {
   "fieldname": "loan_type",
   "fieldtype": "Link",
   "in_list_view": 1,
   "in_standard_filter": 1,
   "label": "Loan Type",
   "options": "Loan Type",
   "reqd": 1
  },
  {
   "fieldname": "column_break_3",
   "fieldtype": "Column Break"
  },
  {
   "default": "Today",
   "fieldname": "posting_date",
   "fieldtype": "Date",
   "in_list_view": 1,
   "label": "Posting Date",
   "no_copy": 1,
   "reqd": 1
  },
  {
   "fieldname": "company",
   "fieldtype": "Link",
   "in_standard_filter": 1,
   "label": "Company",
   "options": "Company",
   "remember_last_selected_value": 1,
   "reqd": 1
  },
  {
   "default": "Sanctioned",
   "fieldname": "status",
   "fieldtype": "Select",
   "in_standard_filter": 1,
   "label": "Status",
   "no_copy": 1,
   "options": "Sanctioned\nPartially Disbursed\nDisbursed\nLoan Closure Requested\nClosed",
   "read_only": 1
  },
  {
   "default": "0",
   "depends_on": "eval:doc.applicant_type==\"Employee\"",
   "fieldname": "repay_from_salary",
   "fieldtype": "Check",
   "label": "Repay From Salary"
  },
  {
   "fieldname": "section_break_8",
   "fieldtype": "Section Break",
   "label": "Loan Details"
  },
  {
   "fieldname": "loan_amount",
   "fieldtype": "Currency",
   "label": "Loan Amount",
   "non_negative": 1,
   "options": "Company:company:default_currency"
  },
  {
   "fetch_from": "loan_type.rate_of_interest",
   "fieldname": "rate_of_interest",
   "fieldtype": "Percent",
   "label": "Rate of Interest (%) / Year",
   "read_only": 1,
   "reqd": 1
  },
  {
   "depends_on": "eval:doc.status==\"Disbursed\"",
   "fieldname": "disbursement_date",
   "fieldtype": "Date",
   "label": "Disbursement Date",
   "no_copy": 1
  },
  {
   "depends_on": "is_term_loan",
   "fieldname": "repayment_start_date",
   "fieldtype": "Date",
   "label": "Repayment Start Date"
  },
  {
   "fieldname": "column_break_11",
   "fieldtype": "Column Break"
  },
  {
   "depends_on": "is_term_loan",
   "fieldname": "repayment_method",
   "fieldtype": "Select",
   "label": "Repayment Method",
   "options": "\nRepay Fixed Amount per Period\nRepay Over Number of Periods"
  },
  {
   "depends_on": "is_term_loan",
   "fieldname": "repayment_periods",
   "fieldtype": "Int",
   "label": "Repayment Period in Months"
  },
  {
   "depends_on": "is_term_loan",
   "fetch_from": "loan_application.repayment_amount",
   "fetch_if_empty": 1,
   "fieldname": "monthly_repayment_amount",
   "fieldtype": "Currency",
   "label": "Monthly Repayment Amount",
   "options": "Company:company:default_currency"
  },
  {
   "collapsible": 1,
   "fieldname": "account_info",
   "fieldtype": "Section Break",
   "label": "Account Info"
  },
  {
   "fetch_from": "loan_type.mode_of_payment",
   "fieldname": "mode_of_payment",
   "fieldtype": "Link",
   "label": "Mode of Payment",
   "options": "Mode of Payment",
   "read_only": 1,
   "reqd": 1
  },
  {
   "fetch_from": "loan_type.payment_account",
   "fieldname": "payment_account",
   "fieldtype": "Link",
   "label": "Payment Account",
   "options": "Account",
   "read_only": 1,
   "reqd": 1
  },
  {
   "fieldname": "column_break_9",
   "fieldtype": "Column Break"
  },
  {
   "fetch_from": "loan_type.loan_account",
   "fieldname": "loan_account",
   "fieldtype": "Link",
   "label": "Loan Account",
   "options": "Account",
   "read_only": 1,
   "reqd": 1
  },
  {
   "fetch_from": "loan_type.interest_income_account",
   "fieldname": "interest_income_account",
   "fieldtype": "Link",
   "label": "Interest Income Account",
   "options": "Account",
   "read_only": 1,
   "reqd": 1
  },
  {
   "depends_on": "is_term_loan",
   "fieldname": "section_break_15",
   "fieldtype": "Section Break",
   "label": "Repayment Schedule"
  },
  {
   "depends_on": "eval:doc.is_term_loan == 1",
   "fieldname": "repayment_schedule",
   "fieldtype": "Table",
   "label": "Repayment Schedule",
   "no_copy": 1,
   "options": "Repayment Schedule"
  },
  {
   "fieldname": "section_break_17",
   "fieldtype": "Section Break",
   "label": "Totals"
  },
  {
   "default": "0",
   "fieldname": "total_payment",
   "fieldtype": "Currency",
   "label": "Total Payable Amount",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "fieldname": "column_break_19",
   "fieldtype": "Column Break"
  },
  {
   "default": "0",
   "depends_on": "is_term_loan",
   "fieldname": "total_interest_payable",
   "fieldtype": "Currency",
   "label": "Total Interest Payable",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "allow_on_submit": 1,
   "fieldname": "total_amount_paid",
   "fieldtype": "Currency",
   "label": "Total Amount Paid",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "fieldname": "amended_from",
   "fieldtype": "Link",
   "label": "Amended From",
   "no_copy": 1,
   "options": "Loan",
   "print_hide": 1,
   "read_only": 1
  },
  {
   "default": "0",
   "fieldname": "is_secured_loan",
   "fieldtype": "Check",
   "label": "Is Secured Loan"
  },
  {
   "default": "0",
   "fetch_from": "loan_type.is_term_loan",
   "fieldname": "is_term_loan",
   "fieldtype": "Check",
   "label": "Is Term Loan",
   "read_only": 1
  },
  {
   "fetch_from": "loan_type.penalty_income_account",
   "fieldname": "penalty_income_account",
   "fieldtype": "Link",
   "label": "Penalty Income Account",
   "options": "Account",
   "read_only": 1,
   "reqd": 1
  },
  {
   "fieldname": "total_principal_paid",
   "fieldtype": "Currency",
   "label": "Total Principal Paid",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "fieldname": "disbursed_amount",
   "fieldtype": "Currency",
   "label": "Disbursed Amount",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "depends_on": "eval:doc.is_secured_loan",
   "fieldname": "maximum_loan_amount",
   "fieldtype": "Currency",
   "label": "Maximum Loan Amount",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "fieldname": "written_off_amount",
   "fieldtype": "Currency",
   "label": "Written Off Amount",
   "no_copy": 1,
   "options": "Company:company:default_currency",
   "read_only": 1
  },
  {
   "fieldname": "closure_date",
   "fieldtype": "Date",
   "label": "Closure Date",
   "read_only": 1
  }
 ],
 "index_web_pages_for_search": 1,
 "is_submittable": 1,
 "links": [],
 "modified": "2021-10-12 18:10:32.360818",
 "modified_by": "Administrator",
 "module": "Loan Management",
 "name": "Loan",
 "owner": "Administrator",
 "permissions": [
  {
   "amend": 1,
   "cancel": 1,
   "create": 1,
   "delete": 1,
   "email": 1,
   "export": 1,
   "print": 1,
   "read": 1,
   "report": 1,
   "role": "Loan Manager",
   "share": 1,
   "submit": 1,
   "write": 1
  },
  {
   "read": 1,
   "role": "Employee"
  }
 ],
 "search_fields": "posting_date",
 "sort_field": "creation",
 "sort_order": "DESC",
 "track_changes": 1
}