Merge branch 'develop' into coa-sorting
This commit is contained in:
commit
7ca243094e
@ -12,6 +12,11 @@ frappe.ui.form.on('Bank Account', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
frm.set_query("party_type", function() {
|
||||||
|
return {
|
||||||
|
query: "erpnext.setup.doctype.party_type.party_type.get_party_type",
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
|
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
|
||||||
|
@ -1,729 +1,189 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_import": 1,
|
||||||
"allow_events_in_timeline": 0,
|
"allow_rename": 1,
|
||||||
"allow_guest_to_view": 0,
|
"autoname": "field:account_name",
|
||||||
"allow_import": 0,
|
"creation": "2017-05-29 21:35:13.136357",
|
||||||
"allow_rename": 1,
|
"doctype": "DocType",
|
||||||
"autoname": "field:account_name",
|
"document_type": "Setup",
|
||||||
"beta": 0,
|
"engine": "InnoDB",
|
||||||
"creation": "2017-05-29 21:35:13.136357",
|
"field_order": [
|
||||||
"custom": 0,
|
"account_name",
|
||||||
"docstatus": 0,
|
"account",
|
||||||
"doctype": "DocType",
|
"bank",
|
||||||
"document_type": "Setup",
|
"is_company_account",
|
||||||
"editable_grid": 0,
|
"company",
|
||||||
"engine": "InnoDB",
|
"column_break_7",
|
||||||
|
"is_default",
|
||||||
|
"bank_account_no",
|
||||||
|
"iban",
|
||||||
|
"branch_code",
|
||||||
|
"swift_number",
|
||||||
|
"section_break_11",
|
||||||
|
"party_type",
|
||||||
|
"column_break_14",
|
||||||
|
"party",
|
||||||
|
"address_and_contact",
|
||||||
|
"address_html",
|
||||||
|
"website",
|
||||||
|
"column_break_12",
|
||||||
|
"contact_html"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "account_name",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"in_global_search": 1,
|
||||||
"bold": 0,
|
"in_list_view": 1,
|
||||||
"collapsible": 0,
|
"in_standard_filter": 1,
|
||||||
"columns": 0,
|
"label": "Account Name",
|
||||||
"fieldname": "account_name",
|
"reqd": 1,
|
||||||
"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": 1,
|
|
||||||
"label": "Account Name",
|
|
||||||
"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": 1
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "account",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"in_list_view": 1,
|
||||||
"bold": 0,
|
"label": "Account",
|
||||||
"collapsible": 0,
|
"options": "Account",
|
||||||
"columns": 0,
|
"reqd": 1
|
||||||
"fieldname": "account",
|
},
|
||||||
"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": 0,
|
|
||||||
"label": "Account",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Account",
|
|
||||||
"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,
|
"fieldname": "bank",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Bank",
|
||||||
"bold": 0,
|
"options": "Bank",
|
||||||
"collapsible": 0,
|
"reqd": 1
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "bank",
|
|
||||||
"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": "Bank",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Bank",
|
|
||||||
"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,
|
"fieldname": "is_company_account",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Check",
|
||||||
"allow_on_submit": 0,
|
"label": "Is Company Account"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "is_company_account",
|
|
||||||
"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": "Is Company Account",
|
|
||||||
"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,
|
"depends_on": "is_company_account",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "company",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Link",
|
||||||
"bold": 0,
|
"in_list_view": 1,
|
||||||
"collapsible": 0,
|
"in_standard_filter": 1,
|
||||||
"columns": 0,
|
"label": "Company",
|
||||||
"depends_on": "is_company_account",
|
"options": "Company"
|
||||||
"fieldname": "company",
|
},
|
||||||
"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": "Company",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Company",
|
|
||||||
"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,
|
"fieldname": "column_break_7",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Column Break",
|
||||||
"allow_on_submit": 0,
|
"search_index": 1
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_7",
|
|
||||||
"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,
|
|
||||||
"label": "",
|
|
||||||
"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": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "is_default",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Check",
|
||||||
"allow_on_submit": 0,
|
"label": "Is Default"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "is_default",
|
|
||||||
"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": "Is Default",
|
|
||||||
"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,
|
"fieldname": "bank_account_no",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"in_list_view": 1,
|
||||||
"bold": 0,
|
"label": "Bank Account No",
|
||||||
"collapsible": 0,
|
"length": 30
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "bank_account_no",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Bank Account No",
|
|
||||||
"length": 30,
|
|
||||||
"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,
|
"fieldname": "iban",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"in_list_view": 1,
|
||||||
"bold": 0,
|
"label": "IBAN",
|
||||||
"collapsible": 0,
|
"length": 30
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "iban",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "IBAN",
|
|
||||||
"length": 30,
|
|
||||||
"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,
|
"fieldname": "branch_code",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"in_list_view": 1,
|
||||||
"bold": 0,
|
"label": "Branch Code"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "branch_code",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Branch Code",
|
|
||||||
"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,
|
"fieldname": "swift_number",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"label": "SWIFT number"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "swift_number",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"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": "SWIFT number",
|
|
||||||
"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,
|
"depends_on": "eval:!doc.is_company_account",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "section_break_11",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Section Break"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "eval:!doc.is_company_account",
|
|
||||||
"fieldname": "section_break_11",
|
|
||||||
"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,
|
|
||||||
"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,
|
"fieldname": "party_type",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Party Type",
|
||||||
"bold": 0,
|
"options": "DocType"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "party_type",
|
|
||||||
"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": "Party Type",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "DocType",
|
|
||||||
"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,
|
"fieldname": "column_break_14",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Column Break"
|
||||||
"allow_on_submit": 0,
|
},
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_14",
|
|
||||||
"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,
|
"fieldname": "party",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Dynamic Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Party",
|
||||||
"bold": 0,
|
"options": "party_type"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "party",
|
|
||||||
"fieldtype": "Dynamic 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": "Party",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "party_type",
|
|
||||||
"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,
|
"fieldname": "address_and_contact",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Section Break",
|
||||||
"allow_on_submit": 0,
|
"label": "Address and Contact",
|
||||||
"bold": 0,
|
"options": "fa fa-map-marker"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "address_and_contact",
|
|
||||||
"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": "Address and Contact",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "fa fa-map-marker",
|
|
||||||
"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,
|
"fieldname": "address_html",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "HTML",
|
||||||
"allow_on_submit": 0,
|
"label": "Address HTML"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "address_html",
|
|
||||||
"fieldtype": "HTML",
|
|
||||||
"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": "Address HTML",
|
|
||||||
"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,
|
"fieldname": "website",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Data",
|
||||||
"allow_on_submit": 0,
|
"label": "Website"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "website",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"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": "Website",
|
|
||||||
"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,
|
"fieldname": "column_break_12",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Column Break"
|
||||||
"allow_on_submit": 0,
|
},
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_12",
|
|
||||||
"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,
|
"fieldname": "contact_html",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "HTML",
|
||||||
"allow_on_submit": 0,
|
"label": "Contact HTML"
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "contact_html",
|
|
||||||
"fieldtype": "HTML",
|
|
||||||
"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": "Contact HTML",
|
|
||||||
"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
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"modified": "2019-04-25 22:10:07.951351",
|
||||||
"hide_heading": 0,
|
"modified_by": "Administrator",
|
||||||
"hide_toolbar": 0,
|
"module": "Accounts",
|
||||||
"idx": 0,
|
"name": "Bank Account",
|
||||||
"image_view": 0,
|
"owner": "Administrator",
|
||||||
"in_create": 0,
|
|
||||||
"is_submittable": 0,
|
|
||||||
"issingle": 0,
|
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2019-03-05 17:56:05.103238",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Accounts",
|
|
||||||
"name": "Bank Account",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"create": 1,
|
||||||
"cancel": 0,
|
"delete": 1,
|
||||||
"create": 1,
|
"email": 1,
|
||||||
"delete": 1,
|
"export": 1,
|
||||||
"email": 1,
|
"import": 1,
|
||||||
"export": 1,
|
"print": 1,
|
||||||
"if_owner": 0,
|
"read": 1,
|
||||||
"import": 0,
|
"report": 1,
|
||||||
"permlevel": 0,
|
"role": "Accounts Manager",
|
||||||
"print": 1,
|
"share": 1,
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Accounts Manager",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"create": 1,
|
||||||
"cancel": 0,
|
"delete": 1,
|
||||||
"create": 1,
|
"email": 1,
|
||||||
"delete": 1,
|
"export": 1,
|
||||||
"email": 1,
|
"print": 1,
|
||||||
"export": 1,
|
"read": 1,
|
||||||
"if_owner": 0,
|
"report": 1,
|
||||||
"import": 0,
|
"role": "Accounts User",
|
||||||
"permlevel": 0,
|
"share": 1,
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Accounts User",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 0,
|
"search_fields": "bank,account",
|
||||||
"read_only": 0,
|
"sort_field": "modified",
|
||||||
"read_only_onload": 0,
|
"sort_order": "DESC",
|
||||||
"search_fields": "bank,account",
|
"track_changes": 1
|
||||||
"show_name_in_global_search": 0,
|
|
||||||
"sort_field": "modified",
|
|
||||||
"sort_order": "DESC",
|
|
||||||
"track_changes": 1,
|
|
||||||
"track_seen": 0,
|
|
||||||
"track_views": 0
|
|
||||||
}
|
}
|
@ -4,24 +4,38 @@
|
|||||||
//c-form js file
|
//c-form js file
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
|
frappe.ui.form.on('C-Form', {
|
||||||
|
setup(frm) {
|
||||||
|
frm.fields_dict.invoices.grid.get_field("invoice_no").get_query = function(doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"docstatus": 1,
|
||||||
|
"customer": doc.customer,
|
||||||
|
"company": doc.company,
|
||||||
|
"c_form_applicable": 'Yes',
|
||||||
|
"c_form_no": ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.invoices.grid.get_field("invoice_no").get_query = function(doc) {
|
frm.fields_dict.state.get_query = function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"docstatus": 1,
|
country: "India"
|
||||||
"customer": doc.customer,
|
}
|
||||||
"company": doc.company,
|
};
|
||||||
"c_form_applicable": 'Yes',
|
|
||||||
"c_form_no": ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
cur_frm.fields_dict.state.get_query = function(doc) {
|
frappe.ui.form.on('C-Form Invoice Detail', {
|
||||||
return {filters: { country: "India"}}
|
invoice_no(frm, cdt, cdn) {
|
||||||
}
|
let d = frappe.get_doc(cdt, cdn);
|
||||||
|
|
||||||
cur_frm.cscript.invoice_no = function(doc, cdt, cdn) {
|
frm.call('get_invoice_details', {
|
||||||
var d = locals[cdt][cdn];
|
invoice_no: d.invoice_no
|
||||||
return get_server_fields('get_invoice_details', d.invoice_no, 'invoices', doc, cdt, cdn, 1);
|
}).then(r => {
|
||||||
}
|
frappe.model.set_value(cdt, cdn, r.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
from functools import reduce
|
||||||
import frappe, csv
|
import frappe, csv
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import cstr
|
from frappe.utils import cstr
|
||||||
|
@ -22,6 +22,28 @@ frappe.ui.form.on('Cost Center', {
|
|||||||
frm.trigger("update_cost_center_number");
|
frm.trigger("update_cost_center_number");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let intro_txt = '';
|
||||||
|
let doc = frm.doc;
|
||||||
|
frm.toggle_display('cost_center_name', doc.__islocal);
|
||||||
|
frm.toggle_enable(['is_group', 'company'], doc.__islocal);
|
||||||
|
|
||||||
|
if(!doc.__islocal && doc.is_group==1) {
|
||||||
|
intro_txt += __('Note: This Cost Center is a Group. Cannot make accounting entries against groups.');
|
||||||
|
}
|
||||||
|
|
||||||
|
frm.events.hide_unhide_group_ledger(frm);
|
||||||
|
|
||||||
|
frm.toggle_display('sb1', doc.is_group==0);
|
||||||
|
frm.set_intro(intro_txt);
|
||||||
|
|
||||||
|
if(!frm.doc.__islocal) {
|
||||||
|
frm.add_custom_button(__('Chart of Cost Centers'),
|
||||||
|
function() { frappe.set_route("Tree", "Cost Center"); });
|
||||||
|
|
||||||
|
frm.add_custom_button(__('Budget'),
|
||||||
|
function() { frappe.set_route("List", "Budget", {'cost_center': frm.doc.name}); });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
update_cost_center_number: function(frm) {
|
update_cost_center_number: function(frm) {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
@ -64,62 +86,38 @@ frappe.ui.form.on('Cost Center', {
|
|||||||
primary_action_label: __('Update')
|
primary_action_label: __('Update')
|
||||||
});
|
});
|
||||||
d.show();
|
d.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
parent_cost_center(frm) {
|
||||||
|
if(!frm.doc.company) {
|
||||||
|
frappe.msgprint(__('Please enter company name first'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hide_unhide_group_ledger(frm) {
|
||||||
|
let doc = frm.doc;
|
||||||
|
if (doc.is_group == 1) {
|
||||||
|
frm.add_custom_button(__('Convert to Non-Group'),
|
||||||
|
() => frm.events.convert_to_ledger(frm));
|
||||||
|
} else if (doc.is_group == 0) {
|
||||||
|
frm.add_custom_button(__('Convert to Group'),
|
||||||
|
() => frm.events.convert_to_group(frm));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
convert_to_group(frm) {
|
||||||
|
frm.call('convert_ledger_to_group').then(r => {
|
||||||
|
if(r.message === 1) {
|
||||||
|
frm.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
convert_to_ledger(frm) {
|
||||||
|
frm.call('convert_group_to_ledger').then(r => {
|
||||||
|
if(r.message === 1) {
|
||||||
|
frm.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|
||||||
var intro_txt = '';
|
|
||||||
cur_frm.toggle_display('cost_center_name', doc.__islocal);
|
|
||||||
cur_frm.toggle_enable(['is_group', 'company'], doc.__islocal);
|
|
||||||
|
|
||||||
if(!doc.__islocal && doc.is_group==1) {
|
|
||||||
intro_txt += __('Note: This Cost Center is a Group. Cannot make accounting entries against groups.');
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.hide_unhide_group_ledger(doc);
|
|
||||||
|
|
||||||
cur_frm.toggle_display('sb1', doc.is_group==0)
|
|
||||||
cur_frm.set_intro(intro_txt);
|
|
||||||
|
|
||||||
if(!cur_frm.doc.__islocal) {
|
|
||||||
cur_frm.add_custom_button(__('Chart of Cost Centers'),
|
|
||||||
function() { frappe.set_route("Tree", "Cost Center"); });
|
|
||||||
|
|
||||||
cur_frm.add_custom_button(__('Budget'),
|
|
||||||
function() { frappe.set_route("List", "Budget", {'cost_center': cur_frm.doc.name}); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
|
|
||||||
if(!doc.company){
|
|
||||||
frappe.msgprint(__('Please enter company name first'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
|
|
||||||
if (doc.is_group == 1) {
|
|
||||||
cur_frm.add_custom_button(__('Convert to Non-Group'),
|
|
||||||
function() { cur_frm.cscript.convert_to_ledger(); }, "fa fa-retweet",
|
|
||||||
"btn-default")
|
|
||||||
} else if (doc.is_group == 0) {
|
|
||||||
cur_frm.add_custom_button(__('Convert to Group'),
|
|
||||||
function() { cur_frm.cscript.convert_to_group(); }, "fa fa-retweet",
|
|
||||||
"btn-default")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.convert_to_ledger = function(doc, cdt, cdn) {
|
|
||||||
return $c_obj(cur_frm.doc,'convert_group_to_ledger','',function(r,rt) {
|
|
||||||
if(r.message == 1) {
|
|
||||||
cur_frm.refresh();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.convert_to_group = function(doc, cdt, cdn) {
|
|
||||||
return $c_obj(cur_frm.doc,'convert_ledger_to_group','',function(r,rt) {
|
|
||||||
if(r.message == 1) {
|
|
||||||
cur_frm.refresh();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
@ -1,37 +1,31 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
$.extend(cur_frm.cscript, {
|
frappe.ui.form.on('Fiscal Year', {
|
||||||
onload: function() {
|
onload: function(frm) {
|
||||||
if(cur_frm.doc.__islocal) {
|
if(frm.doc.__islocal) {
|
||||||
cur_frm.set_value("year_start_date",
|
frm.set_value("year_start_date",
|
||||||
frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1));
|
frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
refresh: function (doc, dt, dn) {
|
refresh: function (frm) {
|
||||||
var me = this;
|
let doc = frm.doc;
|
||||||
this.frm.toggle_enable('year_start_date', doc.__islocal)
|
frm.toggle_enable('year_start_date', doc.__islocal);
|
||||||
this.frm.toggle_enable('year_end_date', doc.__islocal)
|
frm.toggle_enable('year_end_date', doc.__islocal);
|
||||||
|
|
||||||
if (!doc.__islocal && (doc.name != frappe.sys_defaults.fiscal_year)) {
|
if (!doc.__islocal && (doc.name != frappe.sys_defaults.fiscal_year)) {
|
||||||
this.frm.add_custom_button(__("Default"),
|
frm.add_custom_button(__("Set as Default"), () => frm.events.set_as_default(frm));
|
||||||
this.frm.cscript.set_as_default, "fa fa-star");
|
frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
|
||||||
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
|
|
||||||
} else {
|
} else {
|
||||||
this.frm.set_intro("");
|
frm.set_intro("");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set_as_default: function() {
|
set_as_default: function(frm) {
|
||||||
return frappe.call({
|
return frm.call('set_as_default');
|
||||||
doc: cur_frm.doc,
|
|
||||||
method: "set_as_default"
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
year_start_date: function(doc, dt, dn) {
|
year_start_date: function(frm) {
|
||||||
var me = this;
|
let year_end_date =
|
||||||
|
frappe.datetime.add_days(frappe.datetime.add_months(frm.doc.year_start_date, 12), -1);
|
||||||
var year_end_date =
|
frm.set_value("year_end_date", year_end_date);
|
||||||
frappe.datetime.add_days(frappe.datetime.add_months(this.frm.doc.year_start_date, 12), -1);
|
|
||||||
this.frm.set_value("year_end_date", year_end_date);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc,cdt,cdn){
|
frappe.ui.form.on('Monthly Distribution', {
|
||||||
if(doc.__islocal){
|
onload(frm) {
|
||||||
var callback1 = function(r,rt){
|
if(frm.doc.__islocal) {
|
||||||
refresh_field('percentages');
|
return frm.call('get_months').then(() => {
|
||||||
|
frm.refresh_field('percentages');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
return $c('runserverobj', {'method':'get_months', 'docs':doc}, callback1);
|
refresh(frm) {
|
||||||
|
frm.toggle_display('distribution_id', frm.doc.__islocal);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
|
||||||
cur_frm.toggle_display('distribution_id', doc.__islocal);
|
|
||||||
}
|
|
||||||
|
@ -161,7 +161,7 @@ class PaymentEntry(AccountsController):
|
|||||||
d.reference_name, self.party_account_currency)
|
d.reference_name, self.party_account_currency)
|
||||||
|
|
||||||
for field, value in iteritems(ref_details):
|
for field, value in iteritems(ref_details):
|
||||||
if not d.get(field) or force:
|
if field == 'exchange_rate' or not d.get(field) or force:
|
||||||
d.set(field, value)
|
d.set(field, value)
|
||||||
|
|
||||||
def validate_payment_type(self):
|
def validate_payment_type(self):
|
||||||
|
@ -1,334 +1,343 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_events_in_timeline": 0,
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2016-06-01 16:55:32.196722",
|
"creation": "2016-06-01 16:55:32.196722",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
"document_type": "",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
"fieldname": "reference_doctype",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Link",
|
"fieldname": "reference_doctype",
|
||||||
"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": "Type",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Type",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "DocType",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "DocType",
|
||||||
"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": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
"fieldname": "reference_name",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Dynamic Link",
|
"fieldname": "reference_name",
|
||||||
"hidden": 0,
|
"fieldtype": "Dynamic 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": 1,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 1,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Name",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Name",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "reference_doctype",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "reference_doctype",
|
||||||
"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": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "due_date",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Date",
|
"fieldname": "due_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": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Due Date",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Due Date",
|
||||||
"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": 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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"fieldname": "bill_no",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Data",
|
"fieldname": "bill_no",
|
||||||
"hidden": 0,
|
"fieldtype": "Data",
|
||||||
"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,
|
||||||
"label": "Supplier Invoice No",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Supplier Invoice No",
|
||||||
"no_copy": 1,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 1,
|
||||||
"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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "column_break_4",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Column Break",
|
"fieldname": "column_break_4",
|
||||||
"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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
"fieldname": "total_amount",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "total_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"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": "Total Amount",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Total Amount",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 1,
|
||||||
"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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
"fieldname": "outstanding_amount",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "outstanding_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"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": "Outstanding",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Outstanding",
|
||||||
"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": 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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
"fieldname": "allocated_amount",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "allocated_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"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": "Allocated",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Allocated",
|
||||||
"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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:(doc.reference_doctype=='Purchase Invoice')",
|
"depends_on": "eval:(doc.reference_doctype=='Purchase Invoice')",
|
||||||
"fieldname": "exchange_rate",
|
"fetch_if_empty": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "exchange_rate",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"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,
|
||||||
"label": "Exchange Rate",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Exchange Rate",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 1,
|
||||||
"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,
|
||||||
"translatable": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"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": "2019-01-07 16:52:06.884796",
|
"modified": "2019-05-01 13:24:56.586677",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Entry Reference",
|
"name": "Payment Entry Reference",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"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": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0,
|
"track_seen": 0,
|
||||||
"track_views": 0
|
"track_views": 0
|
||||||
}
|
}
|
@ -1,6 +1,10 @@
|
|||||||
cur_frm.cscript.refresh = function(doc, dt, dn){
|
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
if(!doc.__islocal){
|
// License: GNU General Public License v3. See license.txt
|
||||||
var df = frappe.meta.get_docfield(doc.doctype, "payment_gateway", doc.name);
|
|
||||||
df.read_only = 1;
|
frappe.ui.form.on('Payment Gateway Account', {
|
||||||
|
refresh(frm) {
|
||||||
|
if(!frm.doc.__islocal) {
|
||||||
|
frm.set_df_property('payment_gateway', 'read_only', 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
@ -1,108 +1,6 @@
|
|||||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Pricing Rule", "refresh", function(frm) {
|
|
||||||
var help_content =
|
|
||||||
`<table class="table table-bordered" style="background-color: #f9f9f9;">
|
|
||||||
<tr><td>
|
|
||||||
<h4>
|
|
||||||
<i class="fa fa-hand-right"></i>
|
|
||||||
${__('Notes')}
|
|
||||||
</h4>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
${__("Pricing Rule is made to overwrite Price List / define discount percentage, based on some criteria.")}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__("If selected Pricing Rule is made for 'Rate', it will overwrite Price List. Pricing Rule rate is the final rate, so no further discount should be applied. Hence, in transactions like Sales Order, Purchase Order etc, it will be fetched in 'Rate' field, rather than 'Price List Rate' field.")}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('Discount Percentage can be applied either against a Price List or for all Price List.')}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('To not apply Pricing Rule in a particular transaction, all applicable Pricing Rules should be disabled.')}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>
|
|
||||||
<h4><i class="fa fa-question-sign"></i>
|
|
||||||
${__('How Pricing Rule is applied?')}
|
|
||||||
</h4>
|
|
||||||
<ol>
|
|
||||||
<li>
|
|
||||||
${__("Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand.")}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__("Then Pricing Rules are filtered out based on Customer, Customer Group, Territory, Supplier, Supplier Group, Campaign, Sales Partner etc.")}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('Pricing Rules are further filtered based on quantity.')}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('If two or more Pricing Rules are found based on the above conditions, Priority is applied. Priority is a number between 0 to 20 while default value is zero (blank). Higher number means it will take precedence if there are multiple Pricing Rules with same conditions.')}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('Even if there are multiple Pricing Rules with highest priority, then following internal priorities are applied:')}
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
${__('Item Code > Item Group > Brand')}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('Customer > Customer Group > Territory')}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('Supplier > Supplier Group')}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
${__('If multiple Pricing Rules continue to prevail, users are asked to set Priority manually to resolve conflict.')}
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</td></tr>
|
|
||||||
</table>`;
|
|
||||||
|
|
||||||
set_field_options("pricing_rule_help", help_content);
|
|
||||||
|
|
||||||
cur_frm.cscript.set_options_for_applicable_for();
|
|
||||||
});
|
|
||||||
|
|
||||||
cur_frm.cscript.set_options_for_applicable_for = function() {
|
|
||||||
var options = [""];
|
|
||||||
var applicable_for = cur_frm.doc.applicable_for;
|
|
||||||
|
|
||||||
if(cur_frm.doc.selling) {
|
|
||||||
options = $.merge(options, ["Customer", "Customer Group", "Territory", "Sales Partner", "Campaign"]);
|
|
||||||
}
|
|
||||||
if(cur_frm.doc.buying) {
|
|
||||||
$.merge(options, ["Supplier", "Supplier Group"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
set_field_options("applicable_for", options.join("\n"));
|
|
||||||
|
|
||||||
if(!in_list(options, applicable_for)) applicable_for = null;
|
|
||||||
cur_frm.set_value("applicable_for", applicable_for)
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.selling = function() {
|
|
||||||
cur_frm.cscript.set_options_for_applicable_for();
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.buying = function() {
|
|
||||||
cur_frm.cscript.set_options_for_applicable_for();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Dynamically change the description based on type of margin
|
|
||||||
cur_frm.cscript.margin_type = function(doc){
|
|
||||||
cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount')
|
|
||||||
}
|
|
||||||
|
|
||||||
frappe.ui.form.on('Pricing Rule', 'rate_or_discount', function(frm){
|
|
||||||
if(frm.doc.rate_or_discount == 'Rate') {
|
|
||||||
frm.set_value('for_price_list', "")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
frappe.ui.form.on('Pricing Rule', {
|
frappe.ui.form.on('Pricing Rule', {
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.fields_dict["for_price_list"].get_query = function(doc){
|
frm.fields_dict["for_price_list"].get_query = function(doc){
|
||||||
@ -199,7 +97,7 @@ frappe.ui.form.on('Pricing Rule', {
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
</table>`;
|
</table>`;
|
||||||
|
|
||||||
set_field_options("pricing_rule_help", help_content);
|
frm.set_df_property('pricing_rule_help', 'options', help_content);
|
||||||
frm.events.set_options_for_applicable_for(frm);
|
frm.events.set_options_for_applicable_for(frm);
|
||||||
frm.trigger("toggle_reqd_apply_on");
|
frm.trigger("toggle_reqd_apply_on");
|
||||||
},
|
},
|
||||||
@ -256,5 +154,4 @@ frappe.ui.form.on('Pricing Rule', {
|
|||||||
if(!in_list(options, applicable_for)) applicable_for = null;
|
if(!in_list(options, applicable_for)) applicable_for = null;
|
||||||
frm.set_value("applicable_for", applicable_for);
|
frm.set_value("applicable_for", applicable_for);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
frappe.query_reports["Inactive Items"] = {
|
frappe.query_reports["Inactive Sales Items"] = {
|
||||||
"filters": [
|
"filters": [
|
||||||
{
|
{
|
||||||
fieldname: "item",
|
fieldname: "item",
|
||||||
@ -31,4 +31,4 @@ frappe.query_reports["Inactive Items"] = {
|
|||||||
default: 30
|
default: 30
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
};
|
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"add_total_row": 0,
|
||||||
|
"creation": "2019-05-01 13:46:23.044979",
|
||||||
|
"disable_prepared_report": 0,
|
||||||
|
"disabled": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Report",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"letter_head": "Test Letter Head 1",
|
||||||
|
"modified": "2019-05-01 13:46:23.044979",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Inactive Sales Items",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"prepared_report": 0,
|
||||||
|
"ref_doctype": "Sales Invoice",
|
||||||
|
"report_name": "Inactive Sales Items",
|
||||||
|
"report_type": "Script Report",
|
||||||
|
"roles": []
|
||||||
|
}
|
@ -145,4 +145,3 @@ def get_items(filters):
|
|||||||
items = frappe.get_all("Item", fields=["name", "item_group", "item_name"], filters=filters_dict, order_by="name")
|
items = frappe.get_all("Item", fields=["name", "item_group", "item_name"], filters=filters_dict, order_by="name")
|
||||||
|
|
||||||
return items
|
return items
|
||||||
|
|
@ -36,7 +36,7 @@ class AssetValueAdjustment(Document):
|
|||||||
fixed_asset_account, accumulated_depreciation_account, depreciation_expense_account = \
|
fixed_asset_account, accumulated_depreciation_account, depreciation_expense_account = \
|
||||||
get_depreciation_accounts(asset)
|
get_depreciation_accounts(asset)
|
||||||
|
|
||||||
depreciation_cost_center, depreciation_series = frappe.get_cached_value('Company', asset.company,
|
depreciation_cost_center, depreciation_series = frappe.get_cached_value('Company', asset.company,
|
||||||
["depreciation_cost_center", "series_for_depreciation_entry"])
|
["depreciation_cost_center", "series_for_depreciation_entry"])
|
||||||
|
|
||||||
je = frappe.new_doc("Journal Entry")
|
je = frappe.new_doc("Journal Entry")
|
||||||
@ -75,8 +75,8 @@ class AssetValueAdjustment(Document):
|
|||||||
rate_per_day = flt(d.value_after_depreciation) / flt(total_days)
|
rate_per_day = flt(d.value_after_depreciation) / flt(total_days)
|
||||||
from_date = self.date
|
from_date = self.date
|
||||||
else:
|
else:
|
||||||
no_of_depreciations = len([e.name for e in asset.schedules
|
no_of_depreciations = len([s.name for s in asset.schedules
|
||||||
if (cint(s.finance_book_id) == d.idx and not e.journal_entry)])
|
if (cint(s.finance_book_id) == d.idx and not s.journal_entry)])
|
||||||
|
|
||||||
value_after_depreciation = d.value_after_depreciation
|
value_after_depreciation = d.value_after_depreciation
|
||||||
for data in asset.schedules:
|
for data in asset.schedules:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,738 +1,234 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"autoname": "hash",
|
||||||
"allow_import": 0,
|
"creation": "2016-02-25 08:04:02.452958",
|
||||||
"allow_rename": 0,
|
"doctype": "DocType",
|
||||||
"autoname": "hash",
|
"editable_grid": 1,
|
||||||
"beta": 0,
|
"engine": "InnoDB",
|
||||||
"creation": "2016-02-25 08:04:02.452958",
|
"field_order": [
|
||||||
"custom": 0,
|
"item_code",
|
||||||
"docstatus": 0,
|
"supplier_part_no",
|
||||||
"doctype": "DocType",
|
"column_break_3",
|
||||||
"document_type": "",
|
"item_name",
|
||||||
"editable_grid": 1,
|
"section_break_5",
|
||||||
"engine": "InnoDB",
|
"description",
|
||||||
|
"item_group",
|
||||||
|
"brand",
|
||||||
|
"image_section",
|
||||||
|
"image",
|
||||||
|
"image_view",
|
||||||
|
"quantity",
|
||||||
|
"qty",
|
||||||
|
"col_break2",
|
||||||
|
"schedule_date",
|
||||||
|
"uom",
|
||||||
|
"warehouse_and_reference",
|
||||||
|
"warehouse",
|
||||||
|
"project_name",
|
||||||
|
"col_break4",
|
||||||
|
"material_request",
|
||||||
|
"material_request_item",
|
||||||
|
"section_break_23",
|
||||||
|
"page_break"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"bold": 1,
|
||||||
"bold": 1,
|
"columns": 3,
|
||||||
"collapsible": 0,
|
"fieldname": "item_code",
|
||||||
"columns": 3,
|
"fieldtype": "Link",
|
||||||
"fieldname": "item_code",
|
"in_list_view": 1,
|
||||||
"fieldtype": "Link",
|
"label": "Item Code",
|
||||||
"hidden": 0,
|
"oldfieldname": "item_code",
|
||||||
"ignore_user_permissions": 0,
|
"oldfieldtype": "Link",
|
||||||
"ignore_xss_filter": 0,
|
"options": "Item",
|
||||||
"in_filter": 0,
|
"print_hide": 1,
|
||||||
"in_global_search": 0,
|
"reqd": 1,
|
||||||
"in_list_view": 1,
|
"search_index": 1
|
||||||
"in_standard_filter": 0,
|
},
|
||||||
"label": "Item Code",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "item_code",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Item",
|
|
||||||
"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": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "supplier_part_no",
|
||||||
"bold": 0,
|
"fieldtype": "Data",
|
||||||
"collapsible": 0,
|
"hidden": 1,
|
||||||
"columns": 0,
|
"label": "Supplier Part No",
|
||||||
"fieldname": "supplier_part_no",
|
"no_copy": 1,
|
||||||
"fieldtype": "Data",
|
"read_only": 1
|
||||||
"hidden": 1,
|
},
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Supplier Part No",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "column_break_3",
|
||||||
"bold": 0,
|
"fieldtype": "Column Break"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_3",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "item_name",
|
||||||
"bold": 0,
|
"fieldtype": "Data",
|
||||||
"collapsible": 0,
|
"in_global_search": 1,
|
||||||
"columns": 0,
|
"label": "Item Name",
|
||||||
"fieldname": "item_name",
|
"oldfieldname": "item_name",
|
||||||
"fieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"hidden": 0,
|
"search_index": 1
|
||||||
"ignore_user_permissions": 0,
|
},
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 1,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Item Name",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "item_name",
|
|
||||||
"oldfieldtype": "Data",
|
|
||||||
"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": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"collapsible": 1,
|
||||||
"bold": 0,
|
"fieldname": "section_break_5",
|
||||||
"collapsible": 1,
|
"fieldtype": "Section Break",
|
||||||
"columns": 0,
|
"label": "Description"
|
||||||
"fieldname": "section_break_5",
|
},
|
||||||
"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": "Description",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "description",
|
||||||
"bold": 0,
|
"fieldtype": "Text Editor",
|
||||||
"collapsible": 0,
|
"label": "Description",
|
||||||
"columns": 0,
|
"oldfieldname": "description",
|
||||||
"fieldname": "description",
|
"oldfieldtype": "Small Text",
|
||||||
"fieldtype": "Text Editor",
|
"print_width": "300px",
|
||||||
"hidden": 0,
|
"reqd": 1,
|
||||||
"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": "description",
|
|
||||||
"oldfieldtype": "Small Text",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"print_width": "300px",
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0,
|
|
||||||
"width": "300px"
|
"width": "300px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "image",
|
||||||
"bold": 0,
|
"fieldtype": "Attach",
|
||||||
"collapsible": 0,
|
"hidden": 1,
|
||||||
"columns": 0,
|
"label": "Image"
|
||||||
"fieldname": "col_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,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "image_view",
|
||||||
"bold": 0,
|
"fieldtype": "Image",
|
||||||
"collapsible": 0,
|
"label": "Image View",
|
||||||
"columns": 0,
|
"options": "image",
|
||||||
"fieldname": "image",
|
"print_hide": 1
|
||||||
"fieldtype": "Attach",
|
},
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Image",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "quantity",
|
||||||
"bold": 0,
|
"fieldtype": "Section Break",
|
||||||
"collapsible": 0,
|
"label": "Quantity"
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "image_view",
|
|
||||||
"fieldtype": "Image",
|
|
||||||
"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": "Image View",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "image",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"bold": 1,
|
||||||
"bold": 0,
|
"columns": 2,
|
||||||
"collapsible": 0,
|
"fieldname": "qty",
|
||||||
"columns": 0,
|
"fieldtype": "Float",
|
||||||
"fieldname": "quantity",
|
"in_list_view": 1,
|
||||||
"fieldtype": "Section Break",
|
"label": "Quantity",
|
||||||
"hidden": 0,
|
"oldfieldname": "qty",
|
||||||
"ignore_user_permissions": 0,
|
"oldfieldtype": "Currency",
|
||||||
"ignore_xss_filter": 0,
|
"print_width": "60px",
|
||||||
"in_filter": 0,
|
"reqd": 1,
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Quantity",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 1,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 2,
|
|
||||||
"fieldname": "qty",
|
|
||||||
"fieldtype": "Float",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Quantity",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "qty",
|
|
||||||
"oldfieldtype": "Currency",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"print_width": "60px",
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0,
|
|
||||||
"width": "60px"
|
"width": "60px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "col_break2",
|
||||||
"bold": 0,
|
"fieldtype": "Column Break"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "col_break2",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"columns": 2,
|
||||||
"bold": 0,
|
"default": "Today",
|
||||||
"collapsible": 0,
|
"fieldname": "schedule_date",
|
||||||
"columns": 2,
|
"fieldtype": "Date",
|
||||||
"default": "Today",
|
"in_list_view": 1,
|
||||||
"fieldname": "schedule_date",
|
"label": "Required Date",
|
||||||
"fieldtype": "Date",
|
"reqd": 1
|
||||||
"hidden": 0,
|
},
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Required 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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "uom",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"label": "UOM",
|
||||||
"columns": 0,
|
"oldfieldname": "uom",
|
||||||
"fieldname": "uom",
|
"oldfieldtype": "Link",
|
||||||
"fieldtype": "Link",
|
"options": "UOM",
|
||||||
"hidden": 0,
|
"print_width": "100px",
|
||||||
"ignore_user_permissions": 0,
|
"read_only": 1,
|
||||||
"ignore_xss_filter": 0,
|
"reqd": 1,
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "UOM",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "uom",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "UOM",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"print_width": "100px",
|
|
||||||
"read_only": 1,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0,
|
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "warehouse_and_reference",
|
||||||
"bold": 0,
|
"fieldtype": "Section Break",
|
||||||
"collapsible": 0,
|
"label": "Warehouse and Reference"
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "warehouse_and_reference",
|
|
||||||
"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": "Warehouse and Reference",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"columns": 3,
|
||||||
"bold": 0,
|
"fieldname": "warehouse",
|
||||||
"collapsible": 0,
|
"fieldtype": "Link",
|
||||||
"columns": 3,
|
"in_list_view": 1,
|
||||||
"fieldname": "warehouse",
|
"label": "Warehouse",
|
||||||
"fieldtype": "Link",
|
"oldfieldname": "warehouse",
|
||||||
"hidden": 0,
|
"oldfieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"options": "Warehouse",
|
||||||
"ignore_xss_filter": 0,
|
"print_hide": 1
|
||||||
"in_filter": 0,
|
},
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Warehouse",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "warehouse",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Warehouse",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "project_name",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"label": "Project Name",
|
||||||
"columns": 0,
|
"options": "Project",
|
||||||
"fieldname": "project_name",
|
"print_hide": 1
|
||||||
"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": "Project Name",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Project",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "material_request",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"label": "Material Request",
|
||||||
"columns": 0,
|
"options": "Material Request",
|
||||||
"fieldname": "material_request",
|
"print_hide": 1,
|
||||||
"fieldtype": "Link",
|
"read_only": 1
|
||||||
"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": "Material Request",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Material Request",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "col_break4",
|
||||||
"bold": 0,
|
"fieldtype": "Column Break"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "col_break4",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "material_request_item",
|
||||||
"bold": 0,
|
"fieldtype": "Data",
|
||||||
"collapsible": 0,
|
"hidden": 1,
|
||||||
"columns": 0,
|
"label": "Material Request Item",
|
||||||
"fieldname": "material_request_item",
|
"print_hide": 1
|
||||||
"fieldtype": "Data",
|
},
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Material Request Item",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "brand",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"label": "Brand",
|
||||||
"columns": 0,
|
"oldfieldname": "brand",
|
||||||
"fieldname": "brand",
|
"oldfieldtype": "Link",
|
||||||
"fieldtype": "Link",
|
"options": "Brand",
|
||||||
"hidden": 0,
|
"print_hide": 1,
|
||||||
"ignore_user_permissions": 0,
|
"read_only": 1
|
||||||
"ignore_xss_filter": 0,
|
},
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Brand",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "brand",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Brand",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"fieldname": "item_group",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"label": "Item Group",
|
||||||
"columns": 0,
|
"oldfieldname": "item_group",
|
||||||
"description": "",
|
"oldfieldtype": "Link",
|
||||||
"fieldname": "item_group",
|
"options": "Item Group",
|
||||||
"fieldtype": "Link",
|
"print_hide": 1,
|
||||||
"hidden": 0,
|
"read_only": 1
|
||||||
"ignore_user_permissions": 0,
|
},
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Item Group",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "item_group",
|
|
||||||
"oldfieldtype": "Link",
|
|
||||||
"options": "Item Group",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"fieldname": "page_break",
|
||||||
"collapsible": 0,
|
"fieldtype": "Check",
|
||||||
"columns": 0,
|
"label": "Page Break",
|
||||||
"fieldname": "page_break",
|
"no_copy": 1,
|
||||||
"fieldtype": "Check",
|
"oldfieldname": "page_break",
|
||||||
"hidden": 0,
|
"oldfieldtype": "Check",
|
||||||
"ignore_user_permissions": 0,
|
"print_hide": 1
|
||||||
"ignore_xss_filter": 0,
|
},
|
||||||
"in_filter": 0,
|
{
|
||||||
"in_global_search": 0,
|
"collapsible": 1,
|
||||||
"in_list_view": 0,
|
"fieldname": "image_section",
|
||||||
"in_standard_filter": 0,
|
"fieldtype": "Section Break",
|
||||||
"label": "Page Break",
|
"label": "Image"
|
||||||
"length": 0,
|
},
|
||||||
"no_copy": 1,
|
{
|
||||||
"oldfieldname": "page_break",
|
"fieldname": "section_break_23",
|
||||||
"oldfieldtype": "Check",
|
"fieldtype": "Section Break"
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 1,
|
|
||||||
"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,
|
|
||||||
"unique": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_heading": 0,
|
"istable": 1,
|
||||||
"hide_toolbar": 0,
|
"modified": "2019-05-01 17:50:23.703801",
|
||||||
"idx": 0,
|
"modified_by": "Administrator",
|
||||||
"image_view": 0,
|
"module": "Buying",
|
||||||
"in_create": 0,
|
"name": "Request for Quotation Item",
|
||||||
|
"owner": "Administrator",
|
||||||
"is_submittable": 0,
|
"permissions": [],
|
||||||
"issingle": 0,
|
"sort_field": "modified",
|
||||||
"istable": 1,
|
"sort_order": "DESC",
|
||||||
"max_attachments": 0,
|
"track_changes": 1
|
||||||
"modified": "2017-02-17 16:43:46.152268",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Buying",
|
|
||||||
"name": "Request for Quotation Item",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [],
|
|
||||||
"quick_entry": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"show_name_in_global_search": 0,
|
|
||||||
"sort_field": "modified",
|
|
||||||
"sort_order": "DESC",
|
|
||||||
"track_changes": 1,
|
|
||||||
"track_seen": 0
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -59,19 +59,21 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
if item.discount_percentage == 100:
|
if item.discount_percentage == 100:
|
||||||
item.rate = 0.0
|
item.rate = 0.0
|
||||||
elif (not item.rate or item.discount_percentage > 0) and item.price_list_rate:
|
elif item.price_list_rate:
|
||||||
item.rate = flt(item.price_list_rate *
|
if not item.rate or (item.pricing_rules and item.discount_percentage > 0):
|
||||||
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
item.rate = flt(item.price_list_rate *
|
||||||
item.discount_amount = item.price_list_rate * (item.discount_percentage / 100.0)
|
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
||||||
elif item.discount_amount and item.price_list_rate:
|
item.discount_amount = item.price_list_rate * (item.discount_percentage / 100.0)
|
||||||
item.rate = item.price_list_rate - item.discount_amount
|
elif item.discount_amount and item.pricing_rules:
|
||||||
|
item.rate = item.price_list_rate - item.discount_amount
|
||||||
|
|
||||||
if item.doctype in ['Quotation Item', 'Sales Order Item', 'Delivery Note Item', 'Sales Invoice Item']:
|
if item.doctype in ['Quotation Item', 'Sales Order Item', 'Delivery Note Item', 'Sales Invoice Item']:
|
||||||
item.rate_with_margin, item.base_rate_with_margin = self.calculate_margin(item)
|
item.rate_with_margin, item.base_rate_with_margin = self.calculate_margin(item)
|
||||||
|
|
||||||
if flt(item.rate_with_margin) > 0:
|
if flt(item.rate_with_margin) > 0:
|
||||||
item.rate = flt(item.rate_with_margin * (1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
item.rate = flt(item.rate_with_margin * (1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
||||||
item.discount_amount = item.rate_with_margin - item.rate
|
item.discount_amount = item.rate_with_margin - item.rate
|
||||||
|
elif flt(item.price_list_rate) > 0:
|
||||||
|
item.discount_amount = item.price_list_rate - item.rate
|
||||||
elif flt(item.price_list_rate) > 0 and not item.discount_amount:
|
elif flt(item.price_list_rate) > 0 and not item.discount_amount:
|
||||||
item.discount_amount = item.price_list_rate - item.rate
|
item.discount_amount = item.price_list_rate - item.rate
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import erpnext
|
||||||
import frappe
|
import frappe
|
||||||
import random
|
import random
|
||||||
from frappe.utils import random_string
|
from frappe.utils import random_string
|
||||||
@ -72,8 +73,10 @@ def work():
|
|||||||
make_pos_invoice()
|
make_pos_invoice()
|
||||||
|
|
||||||
def make_payment_entries(ref_doctype, report):
|
def make_payment_entries(ref_doctype, report):
|
||||||
outstanding_invoices = list(set([r[3] for r in query_report.run(report,
|
outstanding_invoices = list(set([r[3] for r in query_report.run(report, {
|
||||||
{"report_date": frappe.flags.current_date })["result"] if r[2]==ref_doctype]))
|
"report_date": frappe.flags.current_date,
|
||||||
|
"company": erpnext.get_default_company()
|
||||||
|
})["result"] if r[2]==ref_doctype]))
|
||||||
|
|
||||||
# make Payment Entry
|
# make Payment Entry
|
||||||
for inv in outstanding_invoices[:random.randint(1, 2)]:
|
for inv in outstanding_invoices[:random.randint(1, 2)]:
|
||||||
|
@ -102,10 +102,18 @@ def submit_job_cards():
|
|||||||
|
|
||||||
for operation in work_order.operations:
|
for operation in work_order.operations:
|
||||||
job = job_map[operation.operation]
|
job = job_map[operation.operation]
|
||||||
job.actual_start_date = start_date
|
job_time_log = frappe.new_doc("Job Card Time Log")
|
||||||
|
job_time_log.from_time = start_date
|
||||||
minutes = operation.get("time_in_mins")
|
minutes = operation.get("time_in_mins")
|
||||||
random_minutes = random.randint(int(minutes/2), minutes)
|
job_time_log.time_in_mins = random.randint(int(minutes/2), minutes)
|
||||||
job.actual_end_date = job.actual_start_date + timedelta(minutes=random_minutes)
|
job_time_log.to_time = job_time_log.from_time + \
|
||||||
start_date = job.actual_end_date
|
timedelta(minutes=job_time_log.time_in_mins)
|
||||||
job.save()
|
job_time_log.parent = job.name
|
||||||
|
job_time_log.parenttype = 'Job Card'
|
||||||
|
job_time_log.parentfield = 'time_logs'
|
||||||
|
job_time_log.completed_qty = work_order.qty
|
||||||
|
job_time_log.save(ignore_permissions=True)
|
||||||
|
job.time_logs.append(job_time_log)
|
||||||
|
job.save(ignore_permissions=True)
|
||||||
job.submit()
|
job.submit()
|
||||||
|
start_date = job_time_log.to_time
|
||||||
|
@ -21,17 +21,26 @@ def work(domain="Manufacturing"):
|
|||||||
if random.random() < 0.5:
|
if random.random() < 0.5:
|
||||||
make_quotation(domain)
|
make_quotation(domain)
|
||||||
|
|
||||||
|
try:
|
||||||
|
lost_reason = frappe.get_doc({
|
||||||
|
"doctype": "Opportunity Lost Reason",
|
||||||
|
"lost_reason": "Did not ask"
|
||||||
|
})
|
||||||
|
lost_reason.save(ignore_permissions=True)
|
||||||
|
except frappe.exceptions.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
# lost quotations / inquiries
|
# lost quotations / inquiries
|
||||||
if random.random() < 0.3:
|
if random.random() < 0.3:
|
||||||
for i in range(random.randint(1,3)):
|
for i in range(random.randint(1,3)):
|
||||||
quotation = get_random('Quotation', doc=True)
|
quotation = get_random('Quotation', doc=True)
|
||||||
if quotation and quotation.status == 'Submitted':
|
if quotation and quotation.status == 'Submitted':
|
||||||
quotation.declare_order_lost('Did not ask')
|
quotation.declare_order_lost([{'lost_reason': 'Did not ask'}])
|
||||||
|
|
||||||
for i in range(random.randint(1,3)):
|
for i in range(random.randint(1,3)):
|
||||||
opportunity = get_random('Opportunity', doc=True)
|
opportunity = get_random('Opportunity', doc=True)
|
||||||
if opportunity and opportunity.status in ('Open', 'Replied'):
|
if opportunity and opportunity.status in ('Open', 'Replied'):
|
||||||
opportunity.declare_enquiry_lost('Did not ask')
|
opportunity.declare_enquiry_lost([{'lost_reason': 'Did not ask'}])
|
||||||
|
|
||||||
for i in range(random.randint(1,3)):
|
for i in range(random.randint(1,3)):
|
||||||
if random.random() < 0.6:
|
if random.random() < 0.6:
|
||||||
|
@ -73,13 +73,13 @@ def make_stock_reconciliation():
|
|||||||
stock_reco = frappe.new_doc("Stock Reconciliation")
|
stock_reco = frappe.new_doc("Stock Reconciliation")
|
||||||
stock_reco.posting_date = frappe.flags.current_date
|
stock_reco.posting_date = frappe.flags.current_date
|
||||||
stock_reco.company = erpnext.get_default_company()
|
stock_reco.company = erpnext.get_default_company()
|
||||||
stock_reco.get_items_for("Stores - WP")
|
stock_reco.get_items_for("Stores - WPL")
|
||||||
if stock_reco.items:
|
if stock_reco.items:
|
||||||
for item in stock_reco.items:
|
for item in stock_reco.items:
|
||||||
if item.qty:
|
if item.qty:
|
||||||
item.qty = item.qty - round(random.randint(1, item.qty))
|
item.qty = item.qty - round(random.randint(1, item.qty))
|
||||||
try:
|
try:
|
||||||
stock_reco.insert()
|
stock_reco.insert(ignore_permissions=True)
|
||||||
stock_reco.submit()
|
stock_reco.submit()
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
except OpeningEntryAccountError:
|
except OpeningEntryAccountError:
|
||||||
|
@ -24,7 +24,8 @@ web_include_css = "assets/css/erpnext-web.css"
|
|||||||
doctype_js = {
|
doctype_js = {
|
||||||
"Communication": "public/js/communication.js",
|
"Communication": "public/js/communication.js",
|
||||||
"Event": "public/js/event.js",
|
"Event": "public/js/event.js",
|
||||||
"Website Theme": "public/js/website_theme.js"
|
"Website Theme": "public/js/website_theme.js",
|
||||||
|
"Newsletter": "public/js/newsletter.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
welcome_email = "erpnext.setup.utils.welcome_email"
|
welcome_email = "erpnext.setup.utils.welcome_email"
|
||||||
@ -268,7 +269,7 @@ scheduler_events = {
|
|||||||
"daily_long": [
|
"daily_long": [
|
||||||
"erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms"
|
"erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_latest_price_in_all_boms"
|
||||||
],
|
],
|
||||||
"monthly": [
|
"monthly_long": [
|
||||||
"erpnext.accounts.deferred_revenue.convert_deferred_revenue_to_income",
|
"erpnext.accounts.deferred_revenue.convert_deferred_revenue_to_income",
|
||||||
"erpnext.accounts.deferred_revenue.convert_deferred_expense_to_expense",
|
"erpnext.accounts.deferred_revenue.convert_deferred_expense_to_expense",
|
||||||
"erpnext.hr.utils.allocate_earned_leaves"
|
"erpnext.hr.utils.allocate_earned_leaves"
|
||||||
|
@ -177,9 +177,12 @@ def get_benefit_component_amount(employee, start_date, end_date, struct_row, sal
|
|||||||
|
|
||||||
# Considering there is only one application for a year
|
# Considering there is only one application for a year
|
||||||
benefit_application_name = frappe.db.sql("""
|
benefit_application_name = frappe.db.sql("""
|
||||||
select name from `tabEmployee Benefit Application`
|
select name
|
||||||
where payroll_period=%(payroll_period)s and employee=%(employee)s
|
from `tabEmployee Benefit Application`
|
||||||
and docstatus = 1
|
where
|
||||||
|
payroll_period=%(payroll_period)s
|
||||||
|
and employee=%(employee)s
|
||||||
|
and docstatus = 1
|
||||||
""", {
|
""", {
|
||||||
'employee': employee,
|
'employee': employee,
|
||||||
'payroll_period': payroll_period
|
'payroll_period': payroll_period
|
||||||
@ -209,7 +212,8 @@ def get_benefit_pro_rata_ratio_amount(sal_struct, component_max):
|
|||||||
total_pro_rata_max = 0
|
total_pro_rata_max = 0
|
||||||
benefit_amount = 0
|
benefit_amount = 0
|
||||||
for sal_struct_row in sal_struct.get("earnings"):
|
for sal_struct_row in sal_struct.get("earnings"):
|
||||||
pay_against_benefit_claim, max_benefit_amount = frappe.db.get_value("Salary Component", sal_struct_row.salary_component, ["pay_against_benefit_claim", "max_benefit_amount"])
|
pay_against_benefit_claim, max_benefit_amount = frappe.db.get_value("Salary Component",
|
||||||
|
sal_struct_row.salary_component, ["pay_against_benefit_claim", "max_benefit_amount"])
|
||||||
if sal_struct_row.is_flexible_benefit == 1 and pay_against_benefit_claim != 1:
|
if sal_struct_row.is_flexible_benefit == 1 and pay_against_benefit_claim != 1:
|
||||||
total_pro_rata_max += max_benefit_amount
|
total_pro_rata_max += max_benefit_amount
|
||||||
if total_pro_rata_max > 0:
|
if total_pro_rata_max > 0:
|
||||||
|
@ -1,179 +1,179 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_events_in_timeline": 0,
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2018-04-13 16:56:23.333041",
|
"creation": "2018-04-13 16:56:23.333041",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
"document_type": "",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "exemption_sub_category",
|
"fieldname": "exemption_sub_category",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Exemption Sub Category",
|
"label": "Exemption Sub Category",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Employee Tax Exemption Sub Category",
|
"options": "Employee Tax Exemption Sub Category",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"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": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_from": "exemption_sub_category.exemption_category",
|
"fetch_from": "exemption_sub_category.exemption_category",
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "exemption_category",
|
"fieldname": "exemption_category",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Exemption Category",
|
"label": "Exemption Category",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Employee Tax Exemption Category",
|
"options": "Employee Tax Exemption Category",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_from": "exemption_sub_category.max_amount",
|
"fetch_from": "exemption_sub_category.max_amount",
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "max_amount",
|
"fieldname": "max_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Maximum Exemption Amount",
|
"label": "Maximum Exempted Amount",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_if_empty": 0,
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Declared Amount",
|
"label": "Declared Amount",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"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": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"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": "2019-04-25 15:45:11.279158",
|
"modified": "2019-04-26 11:28:14.023086",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Employee Tax Exemption Declaration Category",
|
"name": "Employee Tax Exemption Declaration Category",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"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": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0,
|
"track_seen": 0,
|
||||||
"track_views": 0
|
"track_views": 0
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@ -20,6 +21,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -53,6 +55,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_2",
|
"fieldname": "column_break_2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -84,6 +87,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "start_date",
|
"fieldname": "start_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -116,6 +120,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "end_date",
|
"fieldname": "end_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -148,6 +153,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "section_break_5",
|
"fieldname": "section_break_5",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@ -180,6 +186,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "periods",
|
"fieldname": "periods",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -213,6 +220,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "section_break_7",
|
"fieldname": "section_break_7",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -245,6 +253,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "taxable_salary_slabs",
|
"fieldname": "taxable_salary_slabs",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -270,6 +279,39 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 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": "standard_tax_exemption_amount",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"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": "Standard Tax Exemption Amount",
|
||||||
|
"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
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
@ -282,7 +324,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-05-25 12:29:07.207927",
|
"modified": "2019-04-26 01:45:03.160929",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Payroll Period",
|
"name": "Payroll Period",
|
||||||
@ -354,5 +396,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
@ -5,10 +5,8 @@ frappe.ui.form.on('Salary Component', {
|
|||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_query("default_account", "accounts", function(doc, cdt, cdn) {
|
frm.set_query("default_account", "accounts", function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
var root_types = ["Expense", "Liability"];
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"root_type": ["in", root_types],
|
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"company": d.company
|
"company": d.company
|
||||||
}
|
}
|
||||||
|
@ -107,8 +107,8 @@ class SalarySlip(TransactionBase):
|
|||||||
for d in self.get("earnings"):
|
for d in self.get("earnings"):
|
||||||
if d.is_flexible_benefit == 1:
|
if d.is_flexible_benefit == 1:
|
||||||
current_flexi_amount += d.amount
|
current_flexi_amount += d.amount
|
||||||
last_benefits = get_last_payroll_period_benefits(self.employee, self.start_date, self.end_date,\
|
last_benefits = get_last_payroll_period_benefits(self.employee, self.start_date, self.end_date,
|
||||||
current_flexi_amount, payroll_period, self._salary_structure_doc)
|
current_flexi_amount, payroll_period, self._salary_structure_doc)
|
||||||
if last_benefits:
|
if last_benefits:
|
||||||
for last_benefit in last_benefits:
|
for last_benefit in last_benefits:
|
||||||
last_benefit = frappe._dict(last_benefit)
|
last_benefit = frappe._dict(last_benefit)
|
||||||
@ -118,7 +118,7 @@ class SalarySlip(TransactionBase):
|
|||||||
def add_employee_flexi_benefits(self, struct_row):
|
def add_employee_flexi_benefits(self, struct_row):
|
||||||
if frappe.db.get_value("Salary Component", struct_row.salary_component, "pay_against_benefit_claim") != 1:
|
if frappe.db.get_value("Salary Component", struct_row.salary_component, "pay_against_benefit_claim") != 1:
|
||||||
benefit_component_amount = get_benefit_component_amount(self.employee, self.start_date, self.end_date, \
|
benefit_component_amount = get_benefit_component_amount(self.employee, self.start_date, self.end_date, \
|
||||||
struct_row, self._salary_structure_doc, self.total_working_days, self.payroll_frequency)
|
struct_row, self._salary_structure_doc, self.total_working_days, self.payroll_frequency)
|
||||||
if benefit_component_amount:
|
if benefit_component_amount:
|
||||||
self.update_component_row(struct_row, benefit_component_amount, "earnings")
|
self.update_component_row(struct_row, benefit_component_amount, "earnings")
|
||||||
else:
|
else:
|
||||||
@ -418,7 +418,7 @@ class SalarySlip(TransactionBase):
|
|||||||
|
|
||||||
for d in self.get(component_type):
|
for d in self.get(component_type):
|
||||||
if (self.salary_structure and
|
if (self.salary_structure and
|
||||||
cint(d.depends_on_payment_days) and
|
cint(d.depends_on_payment_days) and cint(self.total_working_days) and
|
||||||
(not
|
(not
|
||||||
self.salary_slip_based_on_timesheet or
|
self.salary_slip_based_on_timesheet or
|
||||||
getdate(self.start_date) < joining_date or
|
getdate(self.start_date) < joining_date or
|
||||||
@ -577,8 +577,8 @@ class SalarySlip(TransactionBase):
|
|||||||
|
|
||||||
def calculate_variable_tax(self, tax_component, payroll_period):
|
def calculate_variable_tax(self, tax_component, payroll_period):
|
||||||
annual_taxable_earning, period_factor = 0, 0
|
annual_taxable_earning, period_factor = 0, 0
|
||||||
pro_rata_tax_paid, additional_tax_paid, benefit_tax_paid = 0, 0, 0
|
pro_rata_tax_paid, additional_tax_paid, benefit_tax_paid = 0.0, 0.0, 0.0
|
||||||
unclaimed_earning, unclaimed_benefit, additional_income = 0, 0, 0
|
unclaimed_earning, unclaimed_benefit, additional_income = 0.0, 0.0, 0.0
|
||||||
|
|
||||||
# get taxable_earning, additional_income in this slip
|
# get taxable_earning, additional_income in this slip
|
||||||
taxable_earning = self.get_taxable_earnings()
|
taxable_earning = self.get_taxable_earnings()
|
||||||
@ -593,7 +593,7 @@ class SalarySlip(TransactionBase):
|
|||||||
unclaimed_earning = self.calculate_unclaimed_taxable_earning(payroll_period, tax_component)
|
unclaimed_earning = self.calculate_unclaimed_taxable_earning(payroll_period, tax_component)
|
||||||
earning_in_period = taxable_earning["taxable_earning"] + unclaimed_earning
|
earning_in_period = taxable_earning["taxable_earning"] + unclaimed_earning
|
||||||
period_factor = self.get_period_factor(payroll_period.start_date, payroll_period.end_date,
|
period_factor = self.get_period_factor(payroll_period.start_date, payroll_period.end_date,
|
||||||
payroll_period.start_date, self.end_date)
|
payroll_period.start_date, self.end_date)
|
||||||
annual_taxable_earning = earning_in_period * period_factor
|
annual_taxable_earning = earning_in_period * period_factor
|
||||||
additional_income += self.get_total_additional_income(payroll_period.start_date)
|
additional_income += self.get_total_additional_income(payroll_period.start_date)
|
||||||
else:
|
else:
|
||||||
@ -607,6 +607,7 @@ class SalarySlip(TransactionBase):
|
|||||||
{"employee": self.employee, "payroll_period": payroll_period.name, "docstatus": 1},
|
{"employee": self.employee, "payroll_period": payroll_period.name, "docstatus": 1},
|
||||||
"total_exemption_amount")
|
"total_exemption_amount")
|
||||||
annual_taxable_earning = annual_earning - exemption_amount
|
annual_taxable_earning = annual_earning - exemption_amount
|
||||||
|
|
||||||
if self.deduct_tax_for_unclaimed_employee_benefits or self.deduct_tax_for_unsubmitted_tax_exemption_proof:
|
if self.deduct_tax_for_unclaimed_employee_benefits or self.deduct_tax_for_unsubmitted_tax_exemption_proof:
|
||||||
tax_detail = self.get_tax_paid_in_period(payroll_period, tax_component)
|
tax_detail = self.get_tax_paid_in_period(payroll_period, tax_component)
|
||||||
if tax_detail:
|
if tax_detail:
|
||||||
@ -616,11 +617,17 @@ class SalarySlip(TransactionBase):
|
|||||||
|
|
||||||
# add any additional income in this slip
|
# add any additional income in this slip
|
||||||
additional_income += taxable_earning["additional_income"]
|
additional_income += taxable_earning["additional_income"]
|
||||||
args = {"payroll_period": payroll_period.name, "tax_component": tax_component,
|
args = {
|
||||||
"annual_taxable_earning": annual_taxable_earning, "period_factor": period_factor,
|
"payroll_period": payroll_period.name,
|
||||||
"unclaimed_benefit": unclaimed_benefit, "additional_income": additional_income,
|
"tax_component": tax_component,
|
||||||
"pro_rata_tax_paid": pro_rata_tax_paid, "benefit_tax_paid": benefit_tax_paid,
|
"period_factor": period_factor,
|
||||||
"additional_tax_paid": additional_tax_paid}
|
"annual_taxable_earning": annual_taxable_earning,
|
||||||
|
"additional_income": additional_income,
|
||||||
|
"unclaimed_benefit": unclaimed_benefit,
|
||||||
|
"pro_rata_tax_paid": pro_rata_tax_paid,
|
||||||
|
"benefit_tax_paid": benefit_tax_paid,
|
||||||
|
"additional_tax_paid": additional_tax_paid
|
||||||
|
}
|
||||||
return self.calculate_tax(args)
|
return self.calculate_tax(args)
|
||||||
|
|
||||||
def calculate_unclaimed_taxable_benefit(self, payroll_period):
|
def calculate_unclaimed_taxable_benefit(self, payroll_period):
|
||||||
@ -667,27 +674,49 @@ class SalarySlip(TransactionBase):
|
|||||||
return total_taxable_earning
|
return total_taxable_earning
|
||||||
|
|
||||||
def get_total_additional_income(self, from_date):
|
def get_total_additional_income(self, from_date):
|
||||||
total_additional_pay = 0
|
sum_additional_earning = frappe.db.sql("""
|
||||||
sum_additional_earning = frappe.db.sql("""select sum(sd.amount) from `tabSalary Detail` sd join
|
select sum(sd.amount)
|
||||||
`tabSalary Slip` ss on sd.parent=ss.name where sd.parentfield='earnings'
|
from
|
||||||
and sd.is_tax_applicable=1 and is_additional_component=1 and is_flexible_benefit=0
|
`tabSalary Detail` sd join `tabSalary Slip` ss on sd.parent=ss.name
|
||||||
and ss.docstatus=1 and ss.employee='{0}' and ss.start_date between '{1}' and '{2}'
|
where
|
||||||
and ss.end_date between '{1}' and '{2}'""".format(self.employee,
|
sd.parentfield='earnings'
|
||||||
from_date, self.start_date))
|
and sd.is_tax_applicable=1 and is_additional_component=1
|
||||||
if sum_additional_earning and sum_additional_earning[0][0]:
|
and is_flexible_benefit=0 and ss.docstatus=1
|
||||||
total_additional_pay = sum_additional_earning[0][0]
|
and ss.employee=%(employee)s
|
||||||
return total_additional_pay
|
and ss.start_date between %(from_date)s and %(to_date)s
|
||||||
|
and ss.end_date between %(from_date)s and %(to_date)s
|
||||||
|
""", {
|
||||||
|
"employee": self.employee,
|
||||||
|
"from_date": from_date,
|
||||||
|
"to_date": self.start_date
|
||||||
|
})
|
||||||
|
return flt(sum_additional_earning[0][0]) if sum_additional_earning else 0
|
||||||
|
|
||||||
def get_tax_paid_in_period(self, payroll_period, tax_component, only_total=False):
|
def get_tax_paid_in_period(self, payroll_period, tax_component, only_total=False):
|
||||||
# find total_tax_paid, tax paid for benefit, additional_salary
|
# find total_tax_paid, tax paid for benefit, additional_salary
|
||||||
sum_tax_paid = frappe.db.sql("""select sum(sd.amount), sum(tax_on_flexible_benefit),
|
sum_tax_paid = frappe.db.sql("""
|
||||||
sum(tax_on_additional_salary) from `tabSalary Detail` sd join `tabSalary Slip`
|
select
|
||||||
ss on sd.parent=ss.name where sd.parentfield='deductions' and sd.salary_component='{3}'
|
sum(sd.amount), sum(tax_on_flexible_benefit), sum(tax_on_additional_salary)
|
||||||
and sd.variable_based_on_taxable_salary=1 and ss.docstatus=1 and ss.employee='{0}'
|
from
|
||||||
and ss.start_date between '{1}' and '{2}' and ss.end_date between '{1}' and
|
`tabSalary Detail` sd join `tabSalary Slip` ss on sd.parent=ss.name
|
||||||
'{2}'""".format(self.employee, payroll_period.start_date, self.start_date, tax_component))
|
where
|
||||||
|
sd.parentfield='deductions' and sd.salary_component=%(salary_component)s
|
||||||
|
and sd.variable_based_on_taxable_salary=1
|
||||||
|
and ss.docstatus=1 and ss.employee=%(employee)s
|
||||||
|
and ss.start_date between %(from_date)s and %(to_date)s
|
||||||
|
and ss.end_date between %(from_date)s and %(to_date)s
|
||||||
|
""", {
|
||||||
|
"salary_component": tax_component,
|
||||||
|
"employee": self.employee,
|
||||||
|
"from_date": payroll_period.start_date,
|
||||||
|
"to_date": self.start_date
|
||||||
|
})
|
||||||
if sum_tax_paid and sum_tax_paid[0][0]:
|
if sum_tax_paid and sum_tax_paid[0][0]:
|
||||||
return {'total_tax_paid': sum_tax_paid[0][0], 'benefit_tax':sum_tax_paid[0][1], 'additional_tax': sum_tax_paid[0][2]}
|
return {
|
||||||
|
'total_tax_paid': sum_tax_paid[0][0],
|
||||||
|
'benefit_tax':sum_tax_paid[0][1],
|
||||||
|
'additional_tax': sum_tax_paid[0][2]
|
||||||
|
}
|
||||||
|
|
||||||
def get_taxable_earnings(self, include_flexi=0, only_flexi=0):
|
def get_taxable_earnings(self, include_flexi=0, only_flexi=0):
|
||||||
taxable_earning = 0
|
taxable_earning = 0
|
||||||
@ -698,22 +727,22 @@ class SalarySlip(TransactionBase):
|
|||||||
additional_income += earning.amount
|
additional_income += earning.amount
|
||||||
continue
|
continue
|
||||||
if only_flexi:
|
if only_flexi:
|
||||||
if earning.is_tax_applicable and earning.is_flexible_benefit:
|
if earning.is_flexible_benefit:
|
||||||
taxable_earning += earning.amount
|
taxable_earning += earning.amount
|
||||||
continue
|
continue
|
||||||
if include_flexi:
|
if include_flexi or not earning.is_flexible_benefit:
|
||||||
if earning.is_tax_applicable or (earning.is_tax_applicable and earning.is_flexible_benefit):
|
taxable_earning += earning.amount
|
||||||
taxable_earning += earning.amount
|
return {
|
||||||
else:
|
"taxable_earning": taxable_earning,
|
||||||
if earning.is_tax_applicable and not earning.is_flexible_benefit:
|
"additional_income": additional_income
|
||||||
taxable_earning += earning.amount
|
}
|
||||||
return {"taxable_earning": taxable_earning, "additional_income": additional_income}
|
|
||||||
|
|
||||||
def calculate_tax(self, args):
|
def calculate_tax(self, args):
|
||||||
tax_amount, benefit_tax, additional_tax = 0, 0, 0
|
tax_amount, benefit_tax, additional_tax = 0, 0, 0
|
||||||
annual_taxable_earning = args.get("annual_taxable_earning")
|
annual_taxable_earning = args.get("annual_taxable_earning")
|
||||||
benefit_to_tax = args.get("unclaimed_benefit")
|
benefit_to_tax = args.get("unclaimed_benefit")
|
||||||
additional_income = args.get("additional_income")
|
additional_income = args.get("additional_income")
|
||||||
|
|
||||||
# Get tax calc by period
|
# Get tax calc by period
|
||||||
annual_tax = self.calculate_tax_by_tax_slab(args.get("payroll_period"), annual_taxable_earning)
|
annual_tax = self.calculate_tax_by_tax_slab(args.get("payroll_period"), annual_taxable_earning)
|
||||||
|
|
||||||
@ -744,8 +773,10 @@ class SalarySlip(TransactionBase):
|
|||||||
|
|
||||||
def calculate_tax_by_tax_slab(self, payroll_period, annual_taxable_earning):
|
def calculate_tax_by_tax_slab(self, payroll_period, annual_taxable_earning):
|
||||||
payroll_period_obj = frappe.get_doc("Payroll Period", payroll_period)
|
payroll_period_obj = frappe.get_doc("Payroll Period", payroll_period)
|
||||||
|
annual_taxable_earning -= flt(payroll_period_obj.standard_tax_exemption_amount)
|
||||||
data = self.get_data_for_eval()
|
data = self.get_data_for_eval()
|
||||||
data.update({"annual_taxable_earning": annual_taxable_earning})
|
data.update({"annual_taxable_earning": annual_taxable_earning})
|
||||||
|
|
||||||
taxable_amount = 0
|
taxable_amount = 0
|
||||||
for slab in payroll_period_obj.taxable_salary_slabs:
|
for slab in payroll_period_obj.taxable_salary_slabs:
|
||||||
if slab.condition and not self.eval_tax_slab_condition(slab.condition, data):
|
if slab.condition and not self.eval_tax_slab_condition(slab.condition, data):
|
||||||
|
@ -159,21 +159,21 @@ class TestSalarySlip(unittest.TestCase):
|
|||||||
month = "%02d" % getdate(nowdate()).month
|
month = "%02d" % getdate(nowdate()).month
|
||||||
m = get_month_details(fiscal_year, month)
|
m = get_month_details(fiscal_year, month)
|
||||||
|
|
||||||
for payroll_frequncy in ["Monthly", "Bimonthly", "Fortnightly", "Weekly", "Daily"]:
|
for payroll_frequency in ["Monthly", "Bimonthly", "Fortnightly", "Weekly", "Daily"]:
|
||||||
make_employee(payroll_frequncy + "_test_employee@salary.com")
|
make_employee(payroll_frequency + "_test_employee@salary.com")
|
||||||
ss = make_employee_salary_slip(payroll_frequncy + "_test_employee@salary.com", payroll_frequncy)
|
ss = make_employee_salary_slip(payroll_frequency + "_test_employee@salary.com", payroll_frequency)
|
||||||
if payroll_frequncy == "Monthly":
|
if payroll_frequency == "Monthly":
|
||||||
self.assertEqual(ss.end_date, m['month_end_date'])
|
self.assertEqual(ss.end_date, m['month_end_date'])
|
||||||
elif payroll_frequncy == "Bimonthly":
|
elif payroll_frequency == "Bimonthly":
|
||||||
if getdate(ss.start_date).day <= 15:
|
if getdate(ss.start_date).day <= 15:
|
||||||
self.assertEqual(ss.end_date, m['month_mid_end_date'])
|
self.assertEqual(ss.end_date, m['month_mid_end_date'])
|
||||||
else:
|
else:
|
||||||
self.assertEqual(ss.end_date, m['month_end_date'])
|
self.assertEqual(ss.end_date, m['month_end_date'])
|
||||||
elif payroll_frequncy == "Fortnightly":
|
elif payroll_frequency == "Fortnightly":
|
||||||
self.assertEqual(ss.end_date, add_days(nowdate(),13))
|
self.assertEqual(ss.end_date, add_days(nowdate(),13))
|
||||||
elif payroll_frequncy == "Weekly":
|
elif payroll_frequency == "Weekly":
|
||||||
self.assertEqual(ss.end_date, add_days(nowdate(),6))
|
self.assertEqual(ss.end_date, add_days(nowdate(),6))
|
||||||
elif payroll_frequncy == "Daily":
|
elif payroll_frequency == "Daily":
|
||||||
self.assertEqual(ss.end_date, nowdate())
|
self.assertEqual(ss.end_date, nowdate())
|
||||||
|
|
||||||
def test_tax_for_payroll_period(self):
|
def test_tax_for_payroll_period(self):
|
||||||
|
@ -57,11 +57,12 @@ class SalaryStructure(Document):
|
|||||||
have_a_flexi = True
|
have_a_flexi = True
|
||||||
max_of_component = frappe.db.get_value("Salary Component", earning_component.salary_component, "max_benefit_amount")
|
max_of_component = frappe.db.get_value("Salary Component", earning_component.salary_component, "max_benefit_amount")
|
||||||
flexi_amount += max_of_component
|
flexi_amount += max_of_component
|
||||||
|
|
||||||
if have_a_flexi and flt(self.max_benefits) == 0:
|
if have_a_flexi and flt(self.max_benefits) == 0:
|
||||||
frappe.throw(_("Max benefits should be greater than zero to dispense benefits"))
|
frappe.throw(_("Max benefits should be greater than zero to dispense benefits"))
|
||||||
if have_a_flexi and flt(self.max_benefits) > flexi_amount:
|
if have_a_flexi and flexi_amount and flt(self.max_benefits) > flexi_amount:
|
||||||
frappe.throw(_("Total flexible benefit component amount {0} should not be less \
|
frappe.throw(_("Total flexible benefit component amount {0} should not be less than max benefits {1}")
|
||||||
than max benefits {1}").format(flexi_amount, self.max_benefits))
|
.format(flexi_amount, self.max_benefits))
|
||||||
if not have_a_flexi and flt(self.max_benefits) > 0:
|
if not have_a_flexi and flt(self.max_benefits) > 0:
|
||||||
frappe.throw(_("Salary Structure should have flexible benefit component(s) to dispense benefit amount"))
|
frappe.throw(_("Salary Structure should have flexible benefit component(s) to dispense benefit amount"))
|
||||||
|
|
||||||
|
0
erpnext/hr/report/loan_repayment/__init__.py
Normal file
0
erpnext/hr/report/loan_repayment/__init__.py
Normal file
9
erpnext/hr/report/loan_repayment/loan_repayment.js
Normal file
9
erpnext/hr/report/loan_repayment/loan_repayment.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
frappe.query_reports["Loan Repayment"] = {
|
||||||
|
"filters": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
28
erpnext/hr/report/loan_repayment/loan_repayment.json
Normal file
28
erpnext/hr/report/loan_repayment/loan_repayment.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"add_total_row": 0,
|
||||||
|
"creation": "2019-03-29 18:58:00.166032",
|
||||||
|
"disable_prepared_report": 0,
|
||||||
|
"disabled": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Report",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"letter_head": "",
|
||||||
|
"modified": "2019-03-29 18:58:00.166032",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "HR",
|
||||||
|
"name": "Loan Repayment",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"prepared_report": 0,
|
||||||
|
"ref_doctype": "Loan",
|
||||||
|
"report_name": "Loan Repayment",
|
||||||
|
"report_type": "Script Report",
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"role": "HR Manager"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "Employee"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
95
erpnext/hr/report/loan_repayment/loan_repayment.py
Normal file
95
erpnext/hr/report/loan_repayment/loan_repayment.py
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
|
def execute(filters=None):
|
||||||
|
|
||||||
|
columns = create_columns()
|
||||||
|
data = get_record()
|
||||||
|
return columns, data
|
||||||
|
|
||||||
|
def create_columns():
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
"label": _("Employee"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"fieldname": "employee",
|
||||||
|
"options": "Employee",
|
||||||
|
"width": 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Loan"),
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"fieldname": "loan_name",
|
||||||
|
"options": "Loan",
|
||||||
|
"width": 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Loan Amount"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"fieldname": "loan_amount",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Interest"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"fieldname": "interest",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Payable Amount"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"fieldname": "payable_amount",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("EMI"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"fieldname": "emi",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Paid Amount"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"fieldname": "paid_amount",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Outstanding Amount"),
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"fieldname": "out_amt",
|
||||||
|
"options": "currency",
|
||||||
|
"width": 100
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
def get_record():
|
||||||
|
data = []
|
||||||
|
loans = frappe.get_all("Loan",
|
||||||
|
filters=[("status", "=", "Fully Disbursed")],
|
||||||
|
fields=["applicant", "applicant_name", "name", "loan_amount", "rate_of_interest",
|
||||||
|
"total_payment", "monthly_repayment_amount", "total_amount_paid"]
|
||||||
|
)
|
||||||
|
|
||||||
|
for loan in loans:
|
||||||
|
row = {
|
||||||
|
"employee": loan.applicant + ": " + loan.applicant_name,
|
||||||
|
"loan_name": loan.name,
|
||||||
|
"loan_amount": loan.loan_amount,
|
||||||
|
"interest": str(loan.rate_of_interest) + "%",
|
||||||
|
"payable_amount": loan.total_payment,
|
||||||
|
"emi": loan.monthly_repayment_amount,
|
||||||
|
"paid_amount": loan.total_amount_paid,
|
||||||
|
"out_amt": loan.total_payment - loan.total_amount_paid
|
||||||
|
}
|
||||||
|
|
||||||
|
data.append(row)
|
||||||
|
|
||||||
|
return data
|
@ -99,8 +99,6 @@ def get_employee_doj_map():
|
|||||||
employee,
|
employee,
|
||||||
date_of_joining
|
date_of_joining
|
||||||
FROM `tabEmployee`
|
FROM `tabEmployee`
|
||||||
WHERE
|
|
||||||
`status`='Active'
|
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
def get_ss_earning_map(salary_slips):
|
def get_ss_earning_map(salary_slips):
|
||||||
|
@ -5,11 +5,6 @@ frappe.provide("erpnext.bom");
|
|||||||
|
|
||||||
frappe.ui.form.on("BOM", {
|
frappe.ui.form.on("BOM", {
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.add_fetch("item", "description", "description");
|
|
||||||
frm.add_fetch("item", "image", "image");
|
|
||||||
frm.add_fetch("item", "item_name", "item_name");
|
|
||||||
frm.add_fetch("item", "stock_uom", "uom");
|
|
||||||
|
|
||||||
frm.set_query("bom_no", "items", function() {
|
frm.set_query("bom_no", "items", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
@ -413,8 +408,4 @@ frappe.ui.form.on("BOM", "with_operations", function(frm) {
|
|||||||
frm.set_value("operations", []);
|
frm.set_value("operations", []);
|
||||||
}
|
}
|
||||||
toggle_operations(frm);
|
toggle_operations(frm);
|
||||||
});
|
});
|
||||||
|
|
||||||
cur_frm.cscript.image = function() {
|
|
||||||
refresh_field("image_view");
|
|
||||||
};
|
|
@ -20,6 +20,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"description": "Item to be manufactured or repacked",
|
"description": "Item to be manufactured or repacked",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "item",
|
"fieldname": "item",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -55,6 +56,8 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
|
"fetch_from": "item.item_name",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "item_name",
|
"fieldname": "item_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -87,6 +90,43 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_from": "item.image",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
|
"fieldname": "image",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Image",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "image",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fetch_from": "item.stock_uom",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "uom",
|
"fieldname": "uom",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -121,6 +161,7 @@
|
|||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
"description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials",
|
"description": "Quantity of item obtained after manufacturing / repacking from given quantities of raw materials",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "quantity",
|
"fieldname": "quantity",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -154,6 +195,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "cb0",
|
"fieldname": "cb0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -185,6 +227,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "is_active",
|
"fieldname": "is_active",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -219,6 +262,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "is_default",
|
"fieldname": "is_default",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -253,6 +297,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"description": "Manage cost of operations",
|
"description": "Manage cost of operations",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "with_operations",
|
"fieldname": "with_operations",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -284,6 +329,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "inspection_required",
|
"fieldname": "inspection_required",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -316,6 +362,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "allow_alternative_item",
|
"fieldname": "allow_alternative_item",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -348,6 +395,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "allow_same_item_multiple_times",
|
"fieldname": "allow_same_item_multiple_times",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -381,6 +429,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "1",
|
"default": "1",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "set_rate_of_sub_assembly_item_based_on_bom",
|
"fieldname": "set_rate_of_sub_assembly_item_based_on_bom",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -414,6 +463,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "inspection_required",
|
"depends_on": "inspection_required",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "quality_inspection_template",
|
"fieldname": "quality_inspection_template",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -447,6 +497,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "currency_detail",
|
"fieldname": "currency_detail",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -479,6 +530,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -513,6 +565,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "",
|
"default": "",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "transfer_material_against",
|
"fieldname": "transfer_material_against",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -546,6 +599,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "conversion_rate",
|
"fieldname": "conversion_rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -578,6 +632,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_12",
|
"fieldname": "column_break_12",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -609,6 +664,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "currency",
|
"fieldname": "currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -643,6 +699,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "Valuation Rate",
|
"default": "Valuation Rate",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "rm_cost_as_per",
|
"fieldname": "rm_cost_as_per",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -676,6 +733,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
|
"depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "buying_price_list",
|
"fieldname": "buying_price_list",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -710,6 +768,7 @@
|
|||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "operations_section",
|
"fieldname": "operations_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -742,6 +801,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "routing",
|
"fieldname": "routing",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -775,6 +835,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "operations",
|
"fieldname": "operations",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -809,6 +870,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "materials_section",
|
"fieldname": "materials_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -841,6 +903,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "items",
|
"fieldname": "items",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -875,6 +938,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "scrap_section",
|
"fieldname": "scrap_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -907,6 +971,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "scrap_items",
|
"fieldname": "scrap_items",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -940,6 +1005,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "costing",
|
"fieldname": "costing",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -972,6 +1038,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "operating_cost",
|
"fieldname": "operating_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1004,6 +1071,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "raw_material_cost",
|
"fieldname": "raw_material_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1036,6 +1104,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "scrap_material_cost",
|
"fieldname": "scrap_material_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1069,6 +1138,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "cb1",
|
"fieldname": "cb1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1099,6 +1169,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "base_operating_cost",
|
"fieldname": "base_operating_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1132,6 +1203,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "base_raw_material_cost",
|
"fieldname": "base_raw_material_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1165,6 +1237,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "base_scrap_material_cost",
|
"fieldname": "base_scrap_material_cost",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1198,6 +1271,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "total_cost_of_bom",
|
"fieldname": "total_cost_of_bom",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1229,6 +1303,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "total_cost",
|
"fieldname": "total_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1261,6 +1336,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_26",
|
"fieldname": "column_break_26",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1292,6 +1368,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "base_total_cost",
|
"fieldname": "base_total_cost",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1325,6 +1402,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "more_info_section",
|
"fieldname": "more_info_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1356,6 +1434,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "project",
|
"fieldname": "project",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1390,6 +1469,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1422,6 +1502,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "col_break23",
|
"fieldname": "col_break23",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1452,6 +1533,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "section_break_25",
|
"fieldname": "section_break_25",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1483,6 +1565,8 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_from": "item.description",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1514,6 +1598,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_27",
|
"fieldname": "column_break_27",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1538,71 +1623,6 @@
|
|||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "image",
|
|
||||||
"fieldtype": "Attach",
|
|
||||||
"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": "Image",
|
|
||||||
"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": "image_view",
|
|
||||||
"fieldtype": "Image",
|
|
||||||
"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": "Image View",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "image",
|
|
||||||
"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_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
@ -1611,6 +1631,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:!doc.__islocal",
|
"depends_on": "eval:!doc.__islocal",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "section_break0",
|
"fieldname": "section_break0",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1642,6 +1663,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "exploded_items",
|
"fieldname": "exploded_items",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1676,6 +1698,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "website_section",
|
"fieldname": "website_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1710,6 +1733,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "show_in_website",
|
"fieldname": "show_in_website",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1742,6 +1766,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "route",
|
"fieldname": "route",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1776,6 +1801,7 @@
|
|||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "show_in_website",
|
"depends_on": "show_in_website",
|
||||||
"description": "Item Image (if not slideshow)",
|
"description": "Item Image (if not slideshow)",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "website_image",
|
"fieldname": "website_image",
|
||||||
"fieldtype": "Attach Image",
|
"fieldtype": "Attach Image",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1808,6 +1834,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "thumbnail",
|
"fieldname": "thumbnail",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1842,6 +1869,7 @@
|
|||||||
"collapsible_depends_on": "website_items",
|
"collapsible_depends_on": "website_items",
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "show_in_website",
|
"depends_on": "show_in_website",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "sb_web_spec",
|
"fieldname": "sb_web_spec",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1875,6 +1903,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "show_in_website",
|
"depends_on": "show_in_website",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "web_long_description",
|
"fieldname": "web_long_description",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1908,6 +1937,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "show_in_website",
|
"depends_on": "show_in_website",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "show_items",
|
"fieldname": "show_items",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1941,6 +1971,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:(doc.show_in_website && doc.with_operations)",
|
"depends_on": "eval:(doc.show_in_website && doc.with_operations)",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "show_operations",
|
"fieldname": "show_operations",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1972,13 +2003,14 @@
|
|||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"icon": "fa fa-sitemap",
|
"icon": "fa fa-sitemap",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
|
"image_field": "image",
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2019-01-30 16:39:34.353721",
|
"modified": "2019-05-01 16:36:05.197126",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM",
|
"name": "BOM",
|
||||||
@ -2026,7 +2058,7 @@
|
|||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"search_fields": "item",
|
"search_fields": "item, item_name",
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -568,7 +568,7 @@ execute:frappe.delete_doc_if_exists("Page", "sales-analytics")
|
|||||||
execute:frappe.delete_doc_if_exists("Page", "purchase-analytics")
|
execute:frappe.delete_doc_if_exists("Page", "purchase-analytics")
|
||||||
execute:frappe.delete_doc_if_exists("Page", "stock-analytics")
|
execute:frappe.delete_doc_if_exists("Page", "stock-analytics")
|
||||||
execute:frappe.delete_doc_if_exists("Page", "production-analytics")
|
execute:frappe.delete_doc_if_exists("Page", "production-analytics")
|
||||||
erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 #2019-01-09 #2019-04-01
|
erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 #2019-01-09 #2019-04-01 #2019-04-26
|
||||||
erpnext.patches.v11_0.drop_column_max_days_allowed
|
erpnext.patches.v11_0.drop_column_max_days_allowed
|
||||||
erpnext.patches.v10_0.update_user_image_in_employee
|
erpnext.patches.v10_0.update_user_image_in_employee
|
||||||
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe.utils import cint
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
woocommerce_setting_enable_sync = frappe.db.sql("SELECT t.value FROM tabSingles t WHERE doctype = 'Woocommerce Settings' AND field = 'enable_sync'", as_dict=True)
|
frappe.reload_doc("erpnext_integrations", "doctype","woocommerce_settings")
|
||||||
if len(woocommerce_setting_enable_sync) and woocommerce_setting_enable_sync[0].value == '1':
|
doc = frappe.get_doc("Woocommerce Settings")
|
||||||
frappe.db.sql("""UPDATE tabSingles
|
|
||||||
SET value = (SELECT t.value FROM tabSingles t WHERE doctype = 'Woocommerce Settings' AND field = 'modified_by')
|
if cint(doc.enable_sync):
|
||||||
WHERE doctype = 'Woocommerce Settings'
|
doc.creation_user = doc.modified_by
|
||||||
AND field = 'creation_user';""")
|
doc.save(ignore_permissions=True)
|
@ -62,15 +62,19 @@ class ItemVariantsCacheManager:
|
|||||||
|
|
||||||
item_variants_data = frappe.db.get_all('Item Variant Attribute',
|
item_variants_data = frappe.db.get_all('Item Variant Attribute',
|
||||||
{'variant_of': parent_item_code}, ['parent', 'attribute', 'attribute_value'],
|
{'variant_of': parent_item_code}, ['parent', 'attribute', 'attribute_value'],
|
||||||
order_by='parent',
|
order_by='name',
|
||||||
as_list=1
|
as_list=1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
disabled_items = [i.name for i in frappe.db.get_all('Item', {'disabled': 1})]
|
||||||
|
|
||||||
attribute_value_item_map = frappe._dict({})
|
attribute_value_item_map = frappe._dict({})
|
||||||
item_attribute_value_map = frappe._dict({})
|
item_attribute_value_map = frappe._dict({})
|
||||||
|
|
||||||
for row in item_variants_data:
|
for row in item_variants_data:
|
||||||
item_code, attribute, attribute_value = row
|
item_code, attribute, attribute_value = row
|
||||||
|
if item_code in disabled_items:
|
||||||
|
continue
|
||||||
# (attr, value) => [item1, item2]
|
# (attr, value) => [item1, item2]
|
||||||
attribute_value_item_map.setdefault((attribute, attribute_value), []).append(item_code)
|
attribute_value_item_map.setdefault((attribute, attribute_value), []).append(item_code)
|
||||||
# item => {attr1: value1, attr2: value2}
|
# item => {attr1: value1, attr2: value2}
|
||||||
@ -96,7 +100,6 @@ class ItemVariantsCacheManager:
|
|||||||
|
|
||||||
def build_cache(item_code):
|
def build_cache(item_code):
|
||||||
frappe.cache().hset('item_cache_build_in_progress', item_code, 1)
|
frappe.cache().hset('item_cache_build_in_progress', item_code, 1)
|
||||||
print('ItemVariantsCacheManager: Building cache for', item_code)
|
|
||||||
i = ItemVariantsCacheManager(item_code)
|
i = ItemVariantsCacheManager(item_code)
|
||||||
i.build_cache()
|
i.build_cache()
|
||||||
frappe.cache().hset('item_cache_build_in_progress', item_code, 0)
|
frappe.cache().hset('item_cache_build_in_progress', item_code, 0)
|
||||||
|
@ -147,6 +147,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
discount_amount: function(doc, cdt, cdn) {
|
discount_amount: function(doc, cdt, cdn) {
|
||||||
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
|
item.discount_percentage = 0.0;
|
||||||
this.price_list_rate(doc, cdt, cdn);
|
this.price_list_rate(doc, cdt, cdn);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
} else {
|
} else {
|
||||||
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0,
|
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0,
|
||||||
precision("discount_percentage", item));
|
precision("discount_percentage", item));
|
||||||
|
item.discount_amount = flt(item.price_list_rate) - flt(item.rate);
|
||||||
item.margin_type = '';
|
item.margin_type = '';
|
||||||
item.margin_rate_or_amount = 0;
|
item.margin_rate_or_amount = 0;
|
||||||
item.rate_with_margin = 0;
|
item.rate_with_margin = 0;
|
||||||
@ -1199,6 +1200,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
"qty": d.qty,
|
"qty": d.qty,
|
||||||
"stock_qty": d.stock_qty,
|
"stock_qty": d.stock_qty,
|
||||||
"uom": d.uom,
|
"uom": d.uom,
|
||||||
|
"stock_uom": d.stock_uom,
|
||||||
"parenttype": d.parenttype,
|
"parenttype": d.parenttype,
|
||||||
"parent": d.parent,
|
"parent": d.parent,
|
||||||
"pricing_rules": d.pricing_rules,
|
"pricing_rules": d.pricing_rules,
|
||||||
|
8
erpnext/public/js/newsletter.js
Normal file
8
erpnext/public/js/newsletter.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Newsletter', {
|
||||||
|
refresh() {
|
||||||
|
erpnext.toggle_naming_series();
|
||||||
|
}
|
||||||
|
});
|
@ -292,7 +292,7 @@ def prepare_and_attach_invoice(doc, replace=False):
|
|||||||
"content": invoice_xml
|
"content": invoice_xml
|
||||||
})
|
})
|
||||||
_file.save()
|
_file.save()
|
||||||
return file
|
return _file
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def generate_single_invoice(docname):
|
def generate_single_invoice(docname):
|
||||||
|
@ -69,19 +69,19 @@ def get_gl_entries(filters):
|
|||||||
|
|
||||||
gl_entries = frappe.db.sql("""
|
gl_entries = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
gl.posting_date as GlPostDate, gl.name as GlName, gl.account, gl.transaction_date,
|
gl.posting_date as GlPostDate, gl.name as GlName, gl.account, gl.transaction_date,
|
||||||
sum(gl.debit) as debit, sum(gl.credit) as credit,
|
sum(gl.debit) as debit, sum(gl.credit) as credit,
|
||||||
sum(gl.debit_in_account_currency) as debitCurr, sum(gl.credit_in_account_currency) as creditCurr,
|
sum(gl.debit_in_account_currency) as debitCurr, sum(gl.credit_in_account_currency) as creditCurr,
|
||||||
gl.voucher_type, gl.voucher_no, gl.against_voucher_type,
|
gl.voucher_type, gl.voucher_no, gl.against_voucher_type,
|
||||||
gl.against_voucher, gl.account_currency, gl.against,
|
gl.against_voucher, gl.account_currency, gl.against,
|
||||||
gl.party_type, gl.party,
|
gl.party_type, gl.party,
|
||||||
inv.name as InvName, inv.title as InvTitle, inv.posting_date as InvPostDate,
|
inv.name as InvName, inv.title as InvTitle, inv.posting_date as InvPostDate,
|
||||||
pur.name as PurName, pur.title as PurTitle, pur.posting_date as PurPostDate,
|
pur.name as PurName, pur.title as PurTitle, pur.posting_date as PurPostDate,
|
||||||
jnl.cheque_no as JnlRef, jnl.posting_date as JnlPostDate, jnl.title as JnlTitle,
|
jnl.cheque_no as JnlRef, jnl.posting_date as JnlPostDate, jnl.title as JnlTitle,
|
||||||
pay.name as PayName, pay.posting_date as PayPostDate, pay.title as PayTitle,
|
pay.name as PayName, pay.posting_date as PayPostDate, pay.title as PayTitle,
|
||||||
cus.customer_name, cus.name as cusName,
|
cus.customer_name, cus.name as cusName,
|
||||||
sup.supplier_name, sup.name as supName
|
sup.supplier_name, sup.name as supName
|
||||||
|
|
||||||
from `tabGL Entry` gl
|
from `tabGL Entry` gl
|
||||||
left join `tabSales Invoice` inv on gl.voucher_no = inv.name
|
left join `tabSales Invoice` inv on gl.voucher_no = inv.name
|
||||||
left join `tabPurchase Invoice` pur on gl.voucher_no = pur.name
|
left join `tabPurchase Invoice` pur on gl.voucher_no = pur.name
|
||||||
@ -118,7 +118,7 @@ def get_result_as_list(data, filters):
|
|||||||
if account_number[0] is not None:
|
if account_number[0] is not None:
|
||||||
CompteNum = account_number[0]
|
CompteNum = account_number[0]
|
||||||
else:
|
else:
|
||||||
frappe.throw(_("Account number for account {0} is not available.<br> Please setup your Chart of Accounts correctly.").format(account.name))
|
frappe.throw(_("Account number for account {0} is not available.<br> Please setup your Chart of Accounts correctly.").format(d.get("account")))
|
||||||
|
|
||||||
if d.get("party_type") == "Customer":
|
if d.get("party_type") == "Customer":
|
||||||
CompAuxNum = d.get("cusName")
|
CompAuxNum = d.get("cusName")
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -551,7 +551,7 @@ def make_project(source_name, target_doc=None):
|
|||||||
"Sales Order Item": {
|
"Sales Order Item": {
|
||||||
"doctype": "Project Task",
|
"doctype": "Project Task",
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"description": "title",
|
"item_code": "title",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}, target_doc, postprocess)
|
}, target_doc, postprocess)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -145,6 +145,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
discount_amount: function(doc, cdt, cdn) {
|
discount_amount: function(doc, cdt, cdn) {
|
||||||
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
|
item.discount_percentage = 0.0;
|
||||||
this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');
|
this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -492,7 +492,7 @@ def insert_item_price(args):
|
|||||||
def get_item_price(args, item_code, ignore_party=False):
|
def get_item_price(args, item_code, ignore_party=False):
|
||||||
"""
|
"""
|
||||||
Get name, price_list_rate from Item Price based on conditions
|
Get name, price_list_rate from Item Price based on conditions
|
||||||
Check if the Derised qty is within the increment of the packing list.
|
Check if the desired qty is within the increment of the packing list.
|
||||||
:param args: dict (or frappe._dict) with mandatory fields price_list, uom
|
:param args: dict (or frappe._dict) with mandatory fields price_list, uom
|
||||||
optional fields min_qty, transaction_date, customer, supplier
|
optional fields min_qty, transaction_date, customer, supplier
|
||||||
:param item_code: str, Item Doctype field item_code
|
:param item_code: str, Item Doctype field item_code
|
||||||
@ -530,11 +530,11 @@ def get_price_list_rate_for(args, item_code):
|
|||||||
for min_qty 9 and min_qty 20. It returns Item Price Rate for qty 9 as
|
for min_qty 9 and min_qty 20. It returns Item Price Rate for qty 9 as
|
||||||
the best fit in the range of avaliable min_qtyies
|
the best fit in the range of avaliable min_qtyies
|
||||||
|
|
||||||
:param customer: link to Customer DocType
|
:param customer: link to Customer DocType
|
||||||
:param supplier: link to Supplier DocType
|
:param supplier: link to Supplier DocType
|
||||||
:param price_list: str (Standard Buying or Standard Selling)
|
:param price_list: str (Standard Buying or Standard Selling)
|
||||||
:param item_code: str, Item Doctype field item_code
|
:param item_code: str, Item Doctype field item_code
|
||||||
:param qty: Derised Qty
|
:param qty: Desired Qty
|
||||||
:param transaction_date: Date of the price
|
:param transaction_date: Date of the price
|
||||||
"""
|
"""
|
||||||
item_price_args = {
|
item_price_args = {
|
||||||
@ -559,7 +559,7 @@ def get_price_list_rate_for(args, item_code):
|
|||||||
|
|
||||||
general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party"))
|
general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party"))
|
||||||
if not general_price_list_rate and args.get("uom") != args.get("stock_uom"):
|
if not general_price_list_rate and args.get("uom") != args.get("stock_uom"):
|
||||||
item_price_args["args"] = args.get("stock_uom")
|
item_price_args["uom"] = args.get("stock_uom")
|
||||||
general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party"))
|
general_price_list_rate = get_item_price(item_price_args, item_code, ignore_party=args.get("ignore_party"))
|
||||||
|
|
||||||
if general_price_list_rate:
|
if general_price_list_rate:
|
||||||
@ -575,11 +575,11 @@ def get_price_list_rate_for(args, item_code):
|
|||||||
|
|
||||||
def check_packing_list(price_list_rate_name, desired_qty, item_code):
|
def check_packing_list(price_list_rate_name, desired_qty, item_code):
|
||||||
"""
|
"""
|
||||||
Check if the Derised qty is within the increment of the packing list.
|
Check if the desired qty is within the increment of the packing list.
|
||||||
:param price_list_rate_name: Name of Item Price
|
:param price_list_rate_name: Name of Item Price
|
||||||
:param desired_qty: Derised Qt
|
:param desired_qty: Desired Qt
|
||||||
:param item_code: str, Item Doctype field item_code
|
:param item_code: str, Item Doctype field item_code
|
||||||
:param qty: Derised Qt
|
:param qty: Desired Qt
|
||||||
"""
|
"""
|
||||||
|
|
||||||
flag = True
|
flag = True
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"add_total_row": 0,
|
|
||||||
"creation": "2019-04-16 16:05:00.647308",
|
|
||||||
"disable_prepared_report": 0,
|
|
||||||
"disabled": 0,
|
|
||||||
"docstatus": 0,
|
|
||||||
"doctype": "Report",
|
|
||||||
"idx": 0,
|
|
||||||
"is_standard": "Yes",
|
|
||||||
"letter_head": "Test Letter Head 1",
|
|
||||||
"modified": "2019-04-16 16:06:33.630043",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Stock",
|
|
||||||
"name": "Inactive Items",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"prepared_report": 0,
|
|
||||||
"ref_doctype": "Sales Invoice",
|
|
||||||
"report_name": "Inactive Items",
|
|
||||||
"report_type": "Script Report",
|
|
||||||
"roles": [
|
|
||||||
{
|
|
||||||
"role": "Accounts User"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "Accounts Manager"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "Auditor"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user