mirror of
https://github.com/frappe/books.git
synced 2024-11-12 16:36:27 +00:00
Setting read only value to 1 for formula to work (#69)
* Setting read only value to 1 for formula to work * Remove readOnly from tax
This commit is contained in:
parent
b57a301821
commit
41680c82b0
@ -59,14 +59,15 @@ module.exports = {
|
||||
label: 'Net Total',
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getSum('items', 'amount'),
|
||||
disabled: true
|
||||
disabled: true,
|
||||
readOnly: 1
|
||||
},
|
||||
{
|
||||
fieldname: 'taxes',
|
||||
label: 'Taxes',
|
||||
fieldtype: 'Table',
|
||||
childtype: 'TaxSummary',
|
||||
disabled: true,
|
||||
readOnly: 1,
|
||||
template: (doc, row) => {
|
||||
return `<div class='row'>
|
||||
<div class='col-6'></div>
|
||||
@ -86,7 +87,8 @@ module.exports = {
|
||||
label: 'Grand Total',
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getGrandTotal(),
|
||||
disabled: true
|
||||
disabled: true,
|
||||
readOnly: 1
|
||||
},
|
||||
{
|
||||
fieldname: 'terms',
|
||||
|
@ -56,13 +56,15 @@ module.exports = {
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
fieldtype: 'Currency',
|
||||
disabled: 1,
|
||||
readOnly: 1,
|
||||
disabled: true,
|
||||
formula: (row, doc) => row.quantity * row.rate
|
||||
},
|
||||
{
|
||||
fieldname: 'taxAmount',
|
||||
label: 'Tax Amount',
|
||||
hidden: 1,
|
||||
readOnly: 1,
|
||||
fieldtype: 'Text',
|
||||
formula: (row, doc) => doc.getRowTax(row)
|
||||
}
|
||||
|
@ -25,4 +25,4 @@ module.exports = {
|
||||
"required": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user