2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/reports/PurchaseRegister/viewConfig.js
thefalconx33 86d0ef3d06 - Dashboard
- SearchBar
- Invoice & Bill Rename
2019-08-01 17:22:58 +05:30

43 lines
1.1 KiB
JavaScript

const title = 'Purchase Register';
module.exports = {
title: title,
method: 'purchase-register',
filterFields: [
{
fieldtype: 'Link',
target: 'Party',
label: 'Supplier Name',
fieldname: 'supplier',
getFilters: query => {
if (query)
return {
keywords: ['like', query],
supplier: 1
};
return {
supplier: 1
};
}
},
{
fieldtype: 'Date',
fieldname: 'fromDate',
label: 'From Date',
required: 1
},
{ fieldtype: 'Date', fieldname: 'toDate', label: 'To Date', required: 1 }
],
getColumns() {
return [
{ label: 'PurchaseInvoice', fieldname: 'name' },
{ label: 'Posting Date', fieldname: 'date' },
{ label: 'Supplier', fieldname: 'supplier' },
{ label: 'Payable Account', fieldname: 'account' },
{ label: 'Net Total', fieldname: 'netTotal', fieldtype: 'Currency' },
{ label: 'Total Tax', fieldname: 'totalTax', fieldtype: 'Currency' },
{ label: 'Grand Total', fieldname: 'grandTotal', fieldtype: 'Currency' }
];
}
};