-
-
Save lxthien/f407205adc84a5e37f49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
si_std = { | |
print_item_table: function() { | |
var table = print_table( | |
'Journal Voucher', | |
doc.name, | |
'entries', | |
'Journal Entries', | |
[// Here specify the table columns to be displayed | |
'SR', 'account' | |
], | |
[// Here specify the labels of column headings | |
'Sr', 'Account' | |
], | |
[// Here specify the column widths | |
'50%', '50%' | |
], | |
null, | |
null | |
); | |
// This code takes care of page breaks | |
if(table.appendChild) { | |
out = table.innerHTML; | |
} else { | |
out = ''; | |
for(var i=0; i < (10-1); i++) { | |
out += table[i].innerHTML + | |
'<div style = "page-break-after: always;" \ | |
class = "page_break"></div>\ | |
<div class="page-settings"></div>'; | |
} | |
out += table[table.length-1].innerHTML; | |
} | |
return out; | |
}, | |
print_other_charges: function(parent) { | |
var oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges'); | |
var rows = '<table width=100%>\n'; | |
for(var i=0; i<(table.length-1); i++) { | |
if(!oc[i].included_in_print_rate) { | |
rows += | |
'<tr>\n' + | |
'\t<td>thu</td>\n' + | |
'\t<td></td>\n' + | |
'\t<td width=38%>thu</td>\n' + | |
'</tr>\n'; | |
} | |
} | |
return rows + '</table>\n'; | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment