mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
const title = 'Purchase Register';
|
|
import { t } from 'frappe';
|
|
|
|
export default {
|
|
title: title,
|
|
method: 'purchase-register',
|
|
filterFields: [
|
|
{
|
|
fieldtype: 'Link',
|
|
target: 'Party',
|
|
label: t`Supplier Name`,
|
|
fieldname: 'supplier',
|
|
size: 'small',
|
|
placeholder: t`Supplier Name`,
|
|
getFilters: (query) => {
|
|
if (query)
|
|
return {
|
|
keywords: ['like', query],
|
|
supplier: 1,
|
|
};
|
|
|
|
return {
|
|
supplier: 1,
|
|
};
|
|
},
|
|
},
|
|
{
|
|
fieldtype: 'Date',
|
|
fieldname: 'fromDate',
|
|
size: 'small',
|
|
placeholder: t`From Date`,
|
|
label: t`From Date`,
|
|
required: 1,
|
|
},
|
|
{
|
|
fieldtype: 'Date',
|
|
size: 'small',
|
|
placeholder: t`To Date`,
|
|
fieldname: 'toDate',
|
|
label: t`To Date`,
|
|
required: 1,
|
|
},
|
|
],
|
|
actions: [],
|
|
getColumns() {
|
|
return [
|
|
{ label: t`PurchaseInvoice`, fieldname: 'name' },
|
|
{ label: t`Posting Date`, fieldname: 'date' },
|
|
{ label: t`Supplier`, fieldname: 'supplier' },
|
|
{ label: t`Payable Account`, fieldname: 'account' },
|
|
{ label: t`Net Total`, fieldname: 'netTotal', fieldtype: 'Currency' },
|
|
{ label: t`Total Tax`, fieldname: 'totalTax', fieldtype: 'Currency' },
|
|
{ label: t`Grand Total`, fieldname: 'grandTotal', fieldtype: 'Currency' },
|
|
];
|
|
},
|
|
};
|