2
0
mirror of https://github.com/frappe/books.git synced 2025-01-22 22:58:28 +00:00
- Update Tax Template according to VueJS
- Remove formula from tax field for now (debug later)
This commit is contained in:
Faris Ansari 2018-07-09 18:32:18 +05:30
parent 55839d2956
commit 5b77fe1730
2 changed files with 11 additions and 11 deletions

View File

@ -68,16 +68,16 @@ module.exports = {
"disabled": true,
template: (doc, row) => {
return `<div class='row'>
<div class='col-6'><!-- empty left side --></div>
<div class='col-6'>${(doc.taxes || []).map(row => {
return `<div class='row'>
<div class='col-6'>${row.account} (${row.rate}%)</div>
<div class='col-6 text-right'>
${frappe.format(row.amount, 'Currency')}
</div>
</div>`
}).join('')}
</div></div>`;
<div class='col-6'></div>
<div class='col-6'>
<div class='row' v-for="row in value">
<div class='col-6'>{{row.account}} ({{row.rate}}%)</div>
<div class='col-6 text-right'>
{{frappe.format(row.amount, 'Currency')}}
</div>
</div>
</div>
</div>`;
}
},
{

View File

@ -47,7 +47,7 @@ module.exports = {
"label": "Tax",
"fieldtype": "Link",
"target": "Tax",
formula: (row, doc) => doc.getFrom('Item', row.item, 'tax')
// formula: (row, doc) => doc.getFrom('Item', row.item, 'tax')
},
{
"fieldname": "amount",