2018-09-07 10:10:39 +00:00
|
|
|
const title = 'Sales Register';
|
2022-02-16 06:19:16 +00:00
|
|
|
import { t } from 'frappe';
|
2021-11-04 10:31:26 +00:00
|
|
|
|
|
|
|
export default {
|
2018-09-07 10:10:39 +00:00
|
|
|
title: title,
|
|
|
|
method: 'sales-register',
|
|
|
|
filterFields: [
|
2019-08-01 11:52:58 +00:00
|
|
|
{
|
|
|
|
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',
|
2019-08-01 11:52:58 +00:00
|
|
|
fieldname: 'customer',
|
2021-12-21 06:07:36 +00:00
|
|
|
getFilters: (query) => {
|
2019-08-01 11:52:58 +00:00
|
|
|
if (query)
|
|
|
|
return {
|
|
|
|
keywords: ['like', query],
|
2021-12-21 06:07:36 +00:00
|
|
|
customer: 1,
|
2019-08-01 11:52:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
2021-12-21 06:07:36 +00:00
|
|
|
customer: 1,
|
2019-08-01 11:52:58 +00:00
|
|
|
};
|
2021-12-21 06:07:36 +00:00
|
|
|
},
|
2019-08-01 11:52:58 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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`,
|
2021-12-21 06:07:36 +00:00
|
|
|
required: 1,
|
2019-08-01 11:52:58 +00:00
|
|
|
},
|
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`,
|
2021-12-21 06:07:36 +00:00
|
|
|
required: 1,
|
|
|
|
},
|
2018-09-07 10:10:39 +00:00
|
|
|
],
|
2021-12-21 06:07:36 +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
|
|
|
];
|
2021-12-21 06:07:36 +00:00
|
|
|
},
|
2018-09-07 10:10:39 +00:00
|
|
|
};
|