fix taxes and charges strings and labels

This commit is contained in:
Pratik Vyas 2014-04-15 09:49:40 +05:30
parent b0f279a34e
commit ec9c448ccf
4 changed files with 589 additions and 42 deletions

View File

@ -1,162 +1,431 @@
{ {
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "PVTD.######", "autoname": "PVTD.######",
"creation": "2013-05-21 16:16:04.000000", "change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-05-21 16:16:04",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": null,
"dt_template": null,
"fields": [ "fields": [
{ {
"allow_on_submit": null,
"default": "Valuation and Total", "default": "Valuation and Total",
"depends_on": null,
"description": null,
"fieldname": "category", "fieldname": "category",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0, "in_list_view": 0,
"label": "Consider Tax or Charge for", "label": "Consider Tax or Charge for",
"no_column": null,
"no_copy": null,
"oldfieldname": "category", "oldfieldname": "category",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Valuation and Total\nValuation\nTotal", "options": "Valuation and Total\nValuation\nTotal",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": "Add", "default": "Add",
"depends_on": null,
"description": null,
"fieldname": "add_deduct_tax", "fieldname": "add_deduct_tax",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Add or Deduct", "label": "Add or Deduct",
"no_column": null,
"no_copy": null,
"oldfieldname": "add_deduct_tax", "oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Add\nDeduct", "options": "Add\nDeduct",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type", "fieldname": "charge_type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Type", "label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type", "oldfieldname": "charge_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total", "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id", "fieldname": "row_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Enter Row", "ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id", "oldfieldname": "row_id",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": null,
"permlevel": 0, "permlevel": 0,
"read_only": 0 "print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Description", "label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description", "oldfieldname": "description",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": "300px", "print_width": "300px",
"read_only": 0, "read_only": 0,
"report_hide": null,
"reqd": 1, "reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "300px" "width": "300px"
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break1", "fieldname": "col_break1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"permlevel": 0 "hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head", "fieldname": "account_head",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0, "in_list_view": 0,
"label": "Account Head", "label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head", "oldfieldname": "account_head",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0, "read_only": 0,
"reqd": 1 "report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": ":Company", "default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0, "in_list_view": 0,
"label": "Cost Center", "label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center", "oldfieldname": "cost_center",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Cost Center", "options": "Cost Center",
"permlevel": 0, "permlevel": 0,
"read_only": 0 "print_hide": null,
"print_width": null,
"read_only": 0,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Rate", "label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate", "oldfieldname": "rate",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 0, "read_only": 0,
"reqd": 0 "report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount", "fieldname": "tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Amount", "label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount", "oldfieldname": "tax_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1, "read_only": 1,
"reqd": 0 "report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total", "fieldname": "total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total", "label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total", "oldfieldname": "total",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail", "fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail ", "label": "Item Wise Tax Detail ",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail", "oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"read_only": 1 "print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype", "fieldname": "parenttype",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_restrictions": null,
"in_filter": 1, "in_filter": 1,
"in_list_view": null,
"label": "Parenttype", "label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype", "oldfieldname": "parenttype",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"print_width": null,
"read_only": 0, "read_only": 0,
"search_index": 0 "report_hide": null,
"reqd": null,
"search_index": 0,
"set_only_once": null,
"trigger": null,
"width": null
} }
], ],
"hide_heading": 1, "hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1, "idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1, "istable": 1,
"modified": "2014-02-03 12:36:04.000000", "max_attachments": null,
"menu_index": null,
"modified": "2014-04-15 09:48:45.892548",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Taxes and Charges", "name": "Purchase Taxes and Charges",
"owner": "Administrator" "name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
} }

View File

@ -82,7 +82,7 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
d.add_deduct_tax = ''; d.add_deduct_tax = '';
} }
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') { else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
msgprint(__("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'")); msgprint(__("Cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
d.add_deduct_tax = ''; d.add_deduct_tax = '';
} }
} }
@ -95,11 +95,11 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
d.charge_type = ''; d.charge_type = '';
} }
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) { else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(__("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
d.charge_type = ''; d.charge_type = '';
} }
else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) { else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(__("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total")); msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"));
d.charge_type = ''; d.charge_type = '';
} }
@ -116,16 +116,16 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(!d.charge_type && d.row_id) { if(!d.charge_type && d.row_id) {
msgprint(__("Please select Charge Type first")); msgprint(__("Please select charge type first"));
d.row_id = ''; d.row_id = '';
} }
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
msgprint(__("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); msgprint(__("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"));
d.row_id = ''; d.row_id = '';
} }
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) { else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
if(d.row_id >= d.idx){ if(d.row_id >= d.idx){
msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); msgprint(__("Cannot refer row number greater than or equal to current row number for this Charge type"));
d.row_id = ''; d.row_id = '';
} }
} }
@ -171,7 +171,7 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
d.tax_amount = ''; d.tax_amount = '';
} }
else if(d.charge_type && d.tax_amount) { else if(d.charge_type && d.tax_amount) {
msgprint(__("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); msgprint(__("Cannot directly set amount. For 'Actual' charge type, use the rate field"));
d.tax_amount = ''; d.tax_amount = '';
} }

View File

@ -1,153 +1,431 @@
{ {
"_last_update": null,
"_user_tags": null,
"allow_attach": null,
"allow_copy": null,
"allow_email": null,
"allow_import": null,
"allow_print": null,
"allow_rename": null,
"allow_trash": null,
"autoname": "INVTD.######", "autoname": "INVTD.######",
"creation": "2013-04-24 11:39:32.000000", "change_log": null,
"client_script": null,
"client_script_core": null,
"client_string": null,
"colour": null,
"creation": "2013-04-24 11:39:32",
"custom": null,
"default_print_format": null,
"description": null,
"docstatus": 0, "docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": null,
"dt_template": null,
"fields": [ "fields": [
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "charge_type", "fieldname": "charge_type",
"fieldtype": "Select", "fieldtype": "Select",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Type", "label": "Type",
"no_column": null,
"no_copy": null,
"oldfieldname": "charge_type", "oldfieldname": "charge_type",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total", "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total",
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1",
"description": null,
"fieldname": "row_id", "fieldname": "row_id",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"label": "Enter Row", "ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Reference Row #",
"no_column": null,
"no_copy": null,
"oldfieldname": "row_id", "oldfieldname": "row_id",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0 "options": null,
"permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "description", "fieldname": "description",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Description", "label": "Description",
"no_column": null,
"no_copy": null,
"oldfieldname": "description", "oldfieldname": "description",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": "300px", "print_width": "300px",
"read_only": null,
"report_hide": null,
"reqd": 1, "reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "300px" "width": "300px"
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "col_break_1", "fieldname": "col_break_1",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": null,
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "50%" "width": "50%"
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "account_head", "fieldname": "account_head",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0, "in_list_view": 0,
"label": "Account Head", "label": "Account Head",
"no_column": null,
"no_copy": null,
"oldfieldname": "account_head", "oldfieldname": "account_head",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Account", "options": "Account",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1, "reqd": 1,
"search_index": 1 "search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": ":Company", "default": ":Company",
"depends_on": null,
"description": null,
"fieldname": "cost_center", "fieldname": "cost_center",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 0, "in_list_view": 0,
"label": "Cost Center", "label": "Cost Center",
"no_column": null,
"no_copy": null,
"oldfieldname": "cost_center_other_charges", "oldfieldname": "cost_center_other_charges",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Cost Center", "options": "Cost Center",
"permlevel": 0 "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Float", "fieldtype": "Float",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Rate", "label": "Rate",
"no_column": null,
"no_copy": null,
"oldfieldname": "rate", "oldfieldname": "rate",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": null,
"permlevel": 0, "permlevel": 0,
"reqd": 1 "print_hide": null,
"print_width": null,
"read_only": null,
"report_hide": null,
"reqd": 1,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount", "fieldname": "tax_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": 1, "in_list_view": 1,
"label": "Amount", "label": "Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": "tax_amount", "oldfieldname": "tax_amount",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"print_hide": null,
"print_width": null,
"read_only": 1, "read_only": 1,
"reqd": 0 "report_hide": null,
"reqd": 0,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "total", "fieldname": "total",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Total", "label": "Total",
"no_column": null,
"no_copy": null,
"oldfieldname": "total", "oldfieldname": "total",
"oldfieldtype": "Currency", "oldfieldtype": "Currency",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": 0, "allow_on_submit": 0,
"default": null,
"depends_on": null,
"description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount", "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount",
"fieldname": "included_in_print_rate", "fieldname": "included_in_print_rate",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": null,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Is this Tax included in Basic Rate?", "label": "Is this Tax included in Basic Rate?",
"no_column": null,
"no_copy": 0, "no_copy": 0,
"oldfieldname": null,
"oldfieldtype": null,
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"print_width": "150px", "print_width": "150px",
"read_only": null,
"report_hide": 1, "report_hide": 1,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": "150px" "width": "150px"
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "tax_amount_after_discount_amount", "fieldname": "tax_amount_after_discount_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"hidden": 1, "hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Tax Amount After Discount Amount", "label": "Tax Amount After Discount Amount",
"no_column": null,
"no_copy": null,
"oldfieldname": null,
"oldfieldtype": null,
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "item_wise_tax_detail", "fieldname": "item_wise_tax_detail",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"hidden": 1, "hidden": 1,
"ignore_restrictions": null,
"in_filter": null,
"in_list_view": null,
"label": "Item Wise Tax Detail", "label": "Item Wise Tax Detail",
"no_column": null,
"no_copy": null,
"oldfieldname": "item_wise_tax_detail", "oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text", "oldfieldtype": "Small Text",
"options": null,
"permlevel": 0, "permlevel": 0,
"read_only": 1 "print_hide": null,
"print_width": null,
"read_only": 1,
"report_hide": null,
"reqd": null,
"search_index": null,
"set_only_once": null,
"trigger": null,
"width": null
}, },
{ {
"allow_on_submit": null,
"default": null,
"depends_on": null,
"description": null,
"fieldname": "parenttype", "fieldname": "parenttype",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_restrictions": null,
"in_filter": 1, "in_filter": 1,
"in_list_view": null,
"label": "Parenttype", "label": "Parenttype",
"no_column": null,
"no_copy": null,
"oldfieldname": "parenttype", "oldfieldname": "parenttype",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"options": null,
"permlevel": 0, "permlevel": 0,
"print_hide": 1, "print_hide": 1,
"search_index": 1 "print_width": null,
"read_only": null,
"report_hide": null,
"reqd": null,
"search_index": 1,
"set_only_once": null,
"trigger": null,
"width": null
} }
], ],
"hide_heading": 1, "hide_heading": 1,
"hide_toolbar": null,
"icon": null,
"idx": 1, "idx": 1,
"in_create": null,
"in_dialog": null,
"is_submittable": null,
"is_transaction_doc": null,
"issingle": null,
"istable": 1, "istable": 1,
"modified": "2014-01-03 15:04:25.000000", "max_attachments": null,
"menu_index": null,
"modified": "2014-04-14 18:40:48.450796",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Taxes and Charges", "name": "Sales Taxes and Charges",
"owner": "Administrator" "name_case": null,
"owner": "Administrator",
"parent": null,
"parent_node": null,
"parentfield": null,
"parenttype": null,
"permissions": [],
"plugin": null,
"print_outline": null,
"read_only": null,
"read_only_onload": null,
"search_fields": null,
"section_style": null,
"server_code": null,
"server_code_compiled": null,
"server_code_core": null,
"server_code_error": null,
"show_in_menu": null,
"smallicon": null,
"subject": null,
"tag_fields": null,
"title_field": null,
"use_template": null,
"version": null
} }

View File

@ -100,7 +100,7 @@ cur_frm.pformat.other_charges= function(doc){
cur_frm.cscript.charge_type = function(doc, cdt, cdn) { cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) { if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(__("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); msgprint(__("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
d.charge_type = ''; d.charge_type = '';
} }
validated = false; validated = false;
@ -117,12 +117,12 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
d.row_id = ''; d.row_id = '';
} }
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
msgprint(__("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); msgprint(__("Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"));
d.row_id = ''; d.row_id = '';
} }
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) { else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
if(d.row_id >= d.idx){ if(d.row_id >= d.idx){
msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); msgprint(__("Cannot refer row number greater than or equal to current row number for this Charge type"));
d.row_id = ''; d.row_id = '';
} }
} }
@ -166,9 +166,9 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
d.tax_amount = ''; d.tax_amount = '';
} }
else if(d.charge_type && d.tax_amount) { else if(d.charge_type && d.tax_amount) {
msgprint(__("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); msgprint(__("Cannot directly set amount. For 'Actual' charge type, use the rate field"));
d.tax_amount = ''; d.tax_amount = '';
} }
validated = false; validated = false;
refresh_field('tax_amount', d.name, 'other_charges'); refresh_field('tax_amount', d.name, 'other_charges');
}; };