-
-
Save lxthien/d9354689723d2f419b2c 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
si_std = { | |
print_item_table: function() { | |
var table = print_table( | |
'Journal Voucher', | |
doc.name, | |
'entries', | |
'Journal Voucher Detail', | |
['SR', 'account', 'cost_center', 'debit', 'credit', 'balance'], | |
['Sr', 'Account', 'Cost Center', 'Debit', 'Credit', 'Account Balances'], | |
['5%', '29%', '20%', '13%', '13%', '20%'] | |
); | |
// This code takes care of page breaks | |
if(table.appendChild) { | |
out = table.innerHTML; | |
}else { | |
out = ''; | |
for(var i=0; i < (table.length-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<9; 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'; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment