[fix] [minor] check print hide property to show net total and grand total in purchase cycle standard print format

This commit is contained in:
Nabin Hait 2013-11-20 16:24:11 +05:30
parent 458b30b5d3
commit 1d35c444b6

View File

@ -36,7 +36,9 @@ cur_frm.pformat.purchase_tax_details= function(doc){
// main table
out +='<table class="noborder" style="width:100%">'
+make_row('Net Total',convert_rate(doc.net_total),1);
if(!print_hide('net_total')) {
out += make_row('Net Total', convert_rate(doc.net_total), 1);
}
// add rows
if(cl.length){
@ -44,10 +46,11 @@ cur_frm.pformat.purchase_tax_details= function(doc){
out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
}
}
// grand total
out +=make_row('Grand Total',doc.grand_total_import,1)
if(doc.in_words_import){
if(!print_hide('grand_total_import')) {
out += make_row('Grand Total', doc.grand_total_import, 1);
}
if(doc.in_words_import && !print_hide('in_words_import')){
out +='</table></td></tr>';
out += '<tr><td colspan = "2">';
out += '<table><tr><td style="width:25%;"><b>In Words</b></td>';