2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/reports/SalesRegister/viewConfig.js

56 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-09-07 10:10:39 +00:00
const title = 'Sales Register';
export default {
2018-09-07 10:10:39 +00:00
title: title,
method: 'sales-register',
filterFields: [
{
fieldtype: 'Link',
target: 'Party',
label: 'Customer Name',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'Customer Name',
fieldname: 'customer',
getFilters: (query) => {
if (query)
return {
keywords: ['like', query],
customer: 1,
};
return {
customer: 1,
};
},
},
{
fieldtype: 'Date',
fieldname: 'fromDate',
2019-08-14 07:43:49 +00:00
size: 'small',
placeholder: 'From Date',
label: 'From Date',
required: 1,
},
2019-08-14 07:43:49 +00:00
{
fieldtype: 'Date',
size: 'small',
placeholder: 'To Date',
fieldname: 'toDate',
label: 'To Date',
required: 1,
},
2018-09-07 10:10:39 +00:00
],
actions: [],
2018-09-07 10:10:39 +00:00
getColumns() {
return [
{ label: 'SalesInvoice', fieldname: 'name' },
{ label: 'Posting Date', fieldname: 'date', fieldtype: 'Date' },
2018-09-07 10:10:39 +00:00
{ label: 'Customer', fieldname: 'customer' },
{ label: 'Receivable Account', fieldname: 'account' },
{ label: 'Net Total', fieldname: 'netTotal', fieldtype: 'Currency' },
{ label: 'Total Tax', fieldname: 'totalTax', fieldtype: 'Currency' },
{ label: 'Grand Total', fieldname: 'grandTotal', fieldtype: 'Currency' },
2018-09-07 10:10:39 +00:00
];
},
2018-09-07 10:10:39 +00:00
};