Changes in print format to hide taxes when using inclusive prices and showing reference rate when discount is to be displayed
This commit is contained in:
parent
4a1da119f9
commit
58455c9d8e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -115,7 +115,8 @@
|
||||
var to_append = ''
|
||||
if(data_row.adj_rate){
|
||||
to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
data_row.description = data_row.description + to_append;
|
||||
}
|
||||
@ -156,12 +157,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -138,7 +138,8 @@
|
||||
var to_append = ''
|
||||
if(data_row.adj_rate){
|
||||
to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
data_row.description = data_row.description + to_append;
|
||||
}
|
||||
@ -179,12 +180,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -137,7 +137,8 @@
|
||||
var to_append = ''
|
||||
if(data_row.adj_rate){
|
||||
to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
data_row.description = data_row.description + to_append;
|
||||
}
|
||||
@ -178,12 +179,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -114,7 +114,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -146,12 +147,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -137,7 +137,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -169,12 +170,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -136,7 +136,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -168,12 +169,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -114,7 +114,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -146,12 +147,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -137,7 +137,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -169,12 +170,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -136,7 +136,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -168,12 +169,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -114,7 +114,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -146,12 +147,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -137,7 +137,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -169,12 +170,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
@ -136,7 +136,8 @@
|
||||
'description' : function(data_row) {
|
||||
if(data_row.adj_rate) {
|
||||
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' +
|
||||
data_row.adj_rate + '%</i></div>';
|
||||
data_row.adj_rate + '% on ' + doc.currency + ' ' +
|
||||
fmt_money(data_row.ref_rate) + '</i></div>';
|
||||
if(data_row.description.indexOf(to_append)==-1) {
|
||||
return data_row.description + to_append;
|
||||
} else { return data_row.description; }
|
||||
@ -168,12 +169,14 @@
|
||||
var oc = getchildren('RV Tax Detail', doc.name, 'other_charges');
|
||||
var rows = '<table width=100%>\n';
|
||||
for(var i=0; i<oc.length; i++) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
if(!oc[i].included_in_print_rate) {
|
||||
rows +=
|
||||
'<tr>\n' +
|
||||
'\t<td>' + oc[i].description + '</td>\n' +
|
||||
'\t<td></td>\n' +
|
||||
'\t<td width=38%>' + fmt_money(oc[i].tax_amount) + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
}
|
||||
return rows + '</table>\n';
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user