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',
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
}
]