2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00
books/reports/SalesRegister/viewConfig.js

57 lines
1.4 KiB
JavaScript
Raw Normal View History

2018-09-07 10:10:39 +00:00
const title = 'Sales Register';
2022-02-16 06:19:16 +00:00
import { t } from 'frappe';
export default {
2018-09-07 10:10:39 +00:00
title: title,
method: 'sales-register',
filterFields: [
{
fieldtype: 'Link',
target: 'Party',
2022-02-16 06:19:16 +00:00
label: t`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',
2022-02-16 06:19:16 +00:00
label: t`From Date`,
required: 1,
},
2019-08-14 07:43:49 +00:00
{
fieldtype: 'Date',
size: 'small',
placeholder: 'To Date',
fieldname: 'toDate',
2022-02-16 06:19:16 +00:00
label: t`To Date`,
required: 1,
},
2018-09-07 10:10:39 +00:00
],
actions: [],
2018-09-07 10:10:39 +00:00
getColumns() {
return [
2022-02-16 06:19:16 +00:00
{ label: t`SalesInvoice`, fieldname: 'name' },
{ label: t`Posting Date`, fieldname: 'date', fieldtype: 'Date' },
{ label: t`Customer`, fieldname: 'customer' },
{ label: t`Receivable 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' },
2018-09-07 10:10:39 +00:00
];
},
2018-09-07 10:10:39 +00:00
};