Fix translate sales_taxes_and_charges_master.js

This commit is contained in:
Bárbara Perretti 2013-09-30 15:43:01 -03:00
parent cc0ef52abd
commit dda4e83469

View File

@ -92,7 +92,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')){
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 = ''; d.charge_type = '';
} }
validated = false; validated = false;
@ -105,16 +105,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
cur_frm.cscript.row_id = function(doc, cdt, cdn) { 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){
alert("Please select Charge Type first"); alert(wn._("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) {
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 = ''; 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){
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 = ''; d.row_id = '';
} }
} }
@ -146,7 +146,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f
cur_frm.cscript.account_head = function(doc, cdt, cdn) { cur_frm.cscript.account_head = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(!d.charge_type && d.account_head){ if(!d.charge_type && d.account_head){
alert("Please select Charge Type first"); alert(wn._("Please select Charge Type first"));
validated = false; validated = false;
d.account_head = ''; d.account_head = '';
} }
@ -160,7 +160,7 @@ cur_frm.cscript.account_head = function(doc, cdt, cdn) {
cur_frm.cscript.rate = function(doc, cdt, cdn) { cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(!d.charge_type && d.rate) { if(!d.charge_type && d.rate) {
alert("Please select Charge Type first"); alert(wn._("Please select Charge Type first"));
d.rate = ''; d.rate = '';
} }
validated = false; validated = false;
@ -170,11 +170,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
if(!d.charge_type && d.tax_amount){ if(!d.charge_type && d.tax_amount){
alert("Please select Charge Type first"); alert(wn._("Please select Charge Type first"));
d.tax_amount = ''; d.tax_amount = '';
} }
else if(d.charge_type && 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 = ''; d.tax_amount = '';
} }
validated = false; validated = false;