mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
const title = 'Purchase Register';
|
|
|
|
export default {
|
|
title: title,
|
|
method: 'purchase-register',
|
|
filterFields: [
|
|
{
|
|
fieldtype: 'Link',
|
|
target: 'Party',
|
|
label: 'Supplier Name',
|
|
fieldname: 'supplier',
|
|
size: 'small',
|
|
placeholder: 'Supplier Name',
|
|
getFilters: (query) => {
|
|
if (query)
|
|
return {
|
|
keywords: ['like', query],
|
|
supplier: 1,
|
|
};
|
|
|
|
return {
|
|
supplier: 1,
|
|
};
|
|
},
|
|
},
|
|
{
|
|
fieldtype: 'Date',
|
|
fieldname: 'fromDate',
|
|
size: 'small',
|
|
placeholder: 'From Date',
|
|
label: 'From Date',
|
|
required: 1,
|
|
},
|
|
{
|
|
fieldtype: 'Date',
|
|
size: 'small',
|
|
placeholder: 'To Date',
|
|
fieldname: 'toDate',
|
|
label: 'To Date',
|
|
required: 1,
|
|
},
|
|
],
|
|
actions: [],
|
|
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' },
|
|
];
|
|
},
|
|
};
|