fix: expense claim type (#16760)

This commit is contained in:
Rushabh Mehta
2019-02-25 11:56:30 +05:30
committed by Sagar Vora
parent 3ed3332c46
commit e2de8e0fa5
2 changed files with 345 additions and 332 deletions

View File

@@ -35,6 +35,7 @@ $.extend(cur_frm.cscript, new erpnext.hr.ExpenseClaimController({frm: cur_frm}))
cur_frm.add_fetch('employee', 'company', 'company'); cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.add_fetch('employee','employee_name','employee_name'); cur_frm.add_fetch('employee','employee_name','employee_name');
cur_frm.add_fetch('expense_type','description','description');
cur_frm.cscript.onload = function(doc) { cur_frm.cscript.onload = function(doc) {
if (doc.__islocal) { if (doc.__islocal) {

View File

@@ -1,366 +1,378 @@
{ {
"allow_copy": 0, "allow_copy": 0,
"allow_guest_to_view": 0, "allow_events_in_timeline": 0,
"allow_import": 0, "allow_guest_to_view": 0,
"allow_rename": 0, "allow_import": 0,
"beta": 0, "allow_rename": 0,
"creation": "2013-02-22 01:27:46", "beta": 0,
"custom": 0, "creation": "2013-02-22 01:27:46",
"docstatus": 0, "custom": 0,
"doctype": "DocType", "docstatus": 0,
"editable_grid": 1, "doctype": "DocType",
"editable_grid": 1,
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "expense_date", "columns": 0,
"fieldtype": "Date", "fieldname": "expense_date",
"hidden": 0, "fieldtype": "Date",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 1, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 1,
"label": "Expense Date", "in_standard_filter": 0,
"length": 0, "label": "Expense Date",
"no_copy": 0, "length": 0,
"oldfieldname": "expense_date", "no_copy": 0,
"oldfieldtype": "Date", "oldfieldname": "expense_date",
"permlevel": 0, "oldfieldtype": "Date",
"print_hide": 0, "permlevel": 0,
"print_hide_if_no_value": 0, "print_hide": 0,
"print_width": "150px", "print_hide_if_no_value": 0,
"read_only": 0, "print_width": "150px",
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0, "unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "column_break_2", "columns": 0,
"fieldtype": "Column Break", "fieldname": "column_break_2",
"hidden": 0, "fieldtype": "Column Break",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 0, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 0,
"length": 0, "in_standard_filter": 0,
"no_copy": 0, "length": 0,
"permlevel": 0, "no_copy": 0,
"precision": "", "permlevel": 0,
"print_hide": 0, "precision": "",
"print_hide_if_no_value": 0, "print_hide": 0,
"read_only": 0, "print_hide_if_no_value": 0,
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "expense_type", "columns": 0,
"fieldtype": "Link", "fieldname": "expense_type",
"hidden": 0, "fieldtype": "Link",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 1, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 1,
"label": "Expense Claim Type", "in_standard_filter": 0,
"length": 0, "label": "Expense Claim Type",
"no_copy": 0, "length": 0,
"oldfieldname": "expense_type", "no_copy": 0,
"oldfieldtype": "Link", "oldfieldname": "expense_type",
"options": "Expense Claim Type", "oldfieldtype": "Link",
"permlevel": 0, "options": "Expense Claim Type",
"print_hide": 0, "permlevel": 0,
"print_hide_if_no_value": 0, "print_hide": 0,
"print_width": "150px", "print_hide_if_no_value": 0,
"read_only": 0, "print_width": "150px",
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 1, "report_hide": 0,
"search_index": 0, "reqd": 1,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0, "unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"depends_on": "expense_type", "columns": 0,
"fieldname": "default_account", "depends_on": "expense_type",
"fieldtype": "Link", "fieldname": "default_account",
"hidden": 1, "fieldtype": "Link",
"ignore_user_permissions": 0, "hidden": 1,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 0, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 0,
"label": "Default Account", "in_standard_filter": 0,
"length": 0, "label": "Default Account",
"no_copy": 0, "length": 0,
"options": "Account", "no_copy": 0,
"permlevel": 0, "options": "Account",
"precision": "", "permlevel": 0,
"print_hide": 0, "precision": "",
"print_hide_if_no_value": 0, "print_hide": 0,
"read_only": 1, "print_hide_if_no_value": 0,
"remember_last_selected_value": 0, "read_only": 1,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "section_break_4", "columns": 0,
"fieldtype": "Section Break", "fieldname": "section_break_4",
"hidden": 0, "fieldtype": "Section Break",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 0, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 0,
"length": 0, "in_standard_filter": 0,
"no_copy": 0, "length": 0,
"permlevel": 0, "no_copy": 0,
"precision": "", "permlevel": 0,
"print_hide": 0, "precision": "",
"print_hide_if_no_value": 0, "print_hide": 0,
"read_only": 0, "print_hide_if_no_value": 0,
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fetch_from": "expense_type.description", "columns": 0,
"fieldname": "description", "fetch_from": "",
"fieldtype": "Text Editor", "fieldname": "description",
"hidden": 0, "fieldtype": "Text Editor",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 1, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 1,
"label": "Description", "in_standard_filter": 0,
"length": 0, "label": "Description",
"no_copy": 0, "length": 0,
"oldfieldname": "description", "no_copy": 0,
"oldfieldtype": "Small Text", "oldfieldname": "description",
"options": "", "oldfieldtype": "Small Text",
"permlevel": 0, "options": "",
"print_hide": 0, "permlevel": 0,
"print_hide_if_no_value": 0, "print_hide": 0,
"print_width": "300px", "print_hide_if_no_value": 0,
"read_only": 0, "print_width": "300px",
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0, "unique": 0,
"width": "300px" "width": "300px"
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "section_break_6", "columns": 0,
"fieldtype": "Section Break", "fieldname": "section_break_6",
"hidden": 0, "fieldtype": "Section Break",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 0, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 0,
"length": 0, "in_standard_filter": 0,
"no_copy": 0, "length": 0,
"permlevel": 0, "no_copy": 0,
"precision": "", "permlevel": 0,
"print_hide": 0, "precision": "",
"print_hide_if_no_value": 0, "print_hide": 0,
"read_only": 0, "print_hide_if_no_value": 0,
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "claim_amount", "columns": 0,
"fieldtype": "Currency", "fieldname": "claim_amount",
"hidden": 0, "fieldtype": "Currency",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 1, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 1,
"label": "Claim Amount", "in_standard_filter": 0,
"length": 0, "label": "Claim Amount",
"no_copy": 0, "length": 0,
"oldfieldname": "claim_amount", "no_copy": 0,
"oldfieldtype": "Currency", "oldfieldname": "claim_amount",
"options": "Company:company:default_currency", "oldfieldtype": "Currency",
"permlevel": 0, "options": "Company:company:default_currency",
"print_hide": 0, "permlevel": 0,
"print_hide_if_no_value": 0, "print_hide": 0,
"print_width": "150px", "print_hide_if_no_value": 0,
"read_only": 0, "print_width": "150px",
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 1, "report_hide": 0,
"search_index": 0, "reqd": 1,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0, "unique": 0,
"width": "150px" "width": "150px"
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "column_break_8", "columns": 0,
"fieldtype": "Column Break", "fieldname": "column_break_8",
"hidden": 0, "fieldtype": "Column Break",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 0, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 0,
"length": 0, "in_standard_filter": 0,
"no_copy": 0, "length": 0,
"permlevel": 0, "no_copy": 0,
"precision": "", "permlevel": 0,
"print_hide": 0, "precision": "",
"print_hide_if_no_value": 0, "print_hide": 0,
"read_only": 0, "print_hide_if_no_value": 0,
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_in_quick_entry": 0,
"bold": 0, "allow_on_submit": 0,
"collapsible": 0, "bold": 0,
"columns": 0, "collapsible": 0,
"fieldname": "sanctioned_amount", "columns": 0,
"fieldtype": "Currency", "fieldname": "sanctioned_amount",
"hidden": 0, "fieldtype": "Currency",
"ignore_user_permissions": 0, "hidden": 0,
"ignore_xss_filter": 0, "ignore_user_permissions": 0,
"in_filter": 0, "ignore_xss_filter": 0,
"in_global_search": 0, "in_filter": 0,
"in_list_view": 1, "in_global_search": 0,
"in_standard_filter": 0, "in_list_view": 1,
"label": "Sanctioned Amount", "in_standard_filter": 0,
"length": 0, "label": "Sanctioned Amount",
"no_copy": 1, "length": 0,
"oldfieldname": "sanctioned_amount", "no_copy": 1,
"oldfieldtype": "Currency", "oldfieldname": "sanctioned_amount",
"options": "Company:company:default_currency", "oldfieldtype": "Currency",
"permlevel": 0, "options": "Company:company:default_currency",
"print_hide": 0, "permlevel": 0,
"print_hide_if_no_value": 0, "print_hide": 0,
"print_width": "150px", "print_hide_if_no_value": 0,
"read_only": 0, "print_width": "150px",
"remember_last_selected_value": 0, "read_only": 0,
"report_hide": 0, "remember_last_selected_value": 0,
"reqd": 0, "report_hide": 0,
"search_index": 0, "reqd": 0,
"set_only_once": 0, "search_index": 0,
"set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0, "unique": 0,
"width": "150px" "width": "150px"
} }
], ],
"has_web_view": 0, "has_web_view": 0,
"hide_heading": 0, "hide_heading": 0,
"hide_toolbar": 0, "hide_toolbar": 0,
"idx": 1, "idx": 1,
"image_view": 0, "image_view": 0,
"in_create": 0, "in_create": 0,
"is_submittable": 0, "is_submittable": 0,
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-05-16 22:42:56.727863", "modified": "2019-02-24 08:41:36.122565",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Expense Claim Detail", "name": "Expense Claim Detail",
"owner": "harshada@webnotestech.com", "owner": "harshada@webnotestech.com",
"permissions": [], "permissions": [],
"quick_entry": 0, "quick_entry": 0,
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"show_name_in_global_search": 0, "show_name_in_global_search": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"track_changes": 0, "track_changes": 0,
"track_seen": 0 "track_seen": 0,
"track_views": 0
} }