Fix translate purchase_taxes_and_charges_master.js

This commit is contained in:
Bárbara Perretti 2013-09-30 15:35:08 -03:00
parent 46d2b9a895
commit 1a920c7ce8

View File

@ -60,12 +60,12 @@ cur_frm.pformat.purchase_tax_details= function(doc){
cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.add_deduct_tax){
alert("Please select Category first");
alert(wn._("Please select Category first"));
d.add_deduct_tax = '';
}
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
console.log([d.category, d.add_deduct_tax]);
msgprint("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'");
msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
d.add_deduct_tax = '';
}
@ -74,15 +74,15 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.charge_type){
alert("Please select Category first");
alert(wn._("Please select Category first"));
d.charge_type = '';
}
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
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')){
alert("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")
alert(wn._("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"))
d.charge_type = '';
}
validated = false;
@ -97,16 +97,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
cur_frm.cscript.row_id = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.row_id){
alert("Please select Charge Type first");
alert(wn._("Please select Charge Type first"));
d.row_id = '';
}
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' 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){
alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
d.row_id = '';
}
}
@ -137,7 +137,7 @@ cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_qu
cur_frm.cscript.account_head = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.account_head){
alert("Please select Charge Type first");
alert(wn._("Please select Charge Type first"));
validated = false;
d.account_head = '';
}
@ -151,7 +151,7 @@ cur_frm.cscript.account_head = function(doc, cdt, cdn) {
cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.rate) {
alert("Please select Charge Type first");
alert(wn._("Please select Charge Type first"));
d.rate = '';
}
validated = false;
@ -161,11 +161,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.tax_amount){
alert("Please select Charge Type first");
alert(wn._("Please select Charge Type first"));
d.tax_amount = '';
}
else if(d.charge_type && d.tax_amount) {
alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
d.tax_amount = '';
}
validated = false;