2
0
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:
Faris Ansari 2019-11-20 00:47:23 +05:30
parent b2c5eeb618
commit a182d65057

View File

@ -13,7 +13,8 @@ module.exports = {
{ {
fieldname: 'referenceType', fieldname: 'referenceType',
label: 'Reference Type', label: 'Reference Type',
fieldtype: 'Data', fieldtype: 'AutoComplete',
options: ['SalesInvoice', 'PurchaseInvoice'],
required: 1 required: 1
}, },
{ {
@ -27,8 +28,9 @@ module.exports = {
fieldname: 'amount', fieldname: 'amount',
label: 'Amount', label: 'Amount',
fieldtype: 'Currency', fieldtype: 'Currency',
formula: (row, doc) => formula: (row, doc) => {
doc.getFrom(row.referenceType, row.referenceName, 'grandTotal'), return doc.getFrom(row.referenceType, row.referenceName, 'outstandingAmount');
},
required: 1 required: 1
} }
] ]