mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: Set ReferenceType as AutoComplete in PaymentFor
This commit is contained in:
parent
b2c5eeb618
commit
a182d65057
@ -13,7 +13,8 @@ module.exports = {
|
||||
{
|
||||
fieldname: 'referenceType',
|
||||
label: 'Reference Type',
|
||||
fieldtype: 'Data',
|
||||
fieldtype: 'AutoComplete',
|
||||
options: ['SalesInvoice', 'PurchaseInvoice'],
|
||||
required: 1
|
||||
},
|
||||
{
|
||||
@ -27,8 +28,9 @@ module.exports = {
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
fieldtype: 'Currency',
|
||||
formula: (row, doc) =>
|
||||
doc.getFrom(row.referenceType, row.referenceName, 'grandTotal'),
|
||||
formula: (row, doc) => {
|
||||
return doc.getFrom(row.referenceType, row.referenceName, 'outstandingAmount');
|
||||
},
|
||||
required: 1
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user