2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/reports/SalesRegister/viewConfig.js
18alantom de7e5ba807 refactor: rename 'frappe' to 'fyo' outside src
- cause now most of it is different from what it was
2022-05-23 16:18:22 +05:30

57 lines
1.4 KiB
JavaScript

const title = 'Sales Register';
import { t } from 'fyo';
export default {
title: title,
method: 'sales-register',
filterFields: [
{
fieldtype: 'Link',
target: 'Party',
label: t`Customer Name`,
size: 'small',
placeholder: t`Customer Name`,
fieldname: 'customer',
getFilters: (query) => {
if (query)
return {
keywords: ['like', query],
customer: 1,
};
return {
customer: 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`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' },
];
},
};