2018-04-26 10:23:27 +00:00
|
|
|
const RegisterView = require('../Register/RegisterView');
|
|
|
|
const frappe = require('frappejs');
|
|
|
|
const { DateTime } = require('luxon');
|
|
|
|
const { unique } = require('frappejs/utils');
|
|
|
|
|
|
|
|
module.exports = class SalesRegisterView extends RegisterView {
|
|
|
|
constructor() {
|
|
|
|
super({
|
2018-09-07 10:10:39 +00:00
|
|
|
title: frappe._('Sales Register'),
|
|
|
|
filterFields: [
|
|
|
|
{ fieldtype: 'Link', target: 'Party', label: 'Customer Name', fieldname: 'customer' },
|
|
|
|
{ fieldtype: 'Date', fieldname: 'fromDate', label: 'From Date', required: 1 },
|
|
|
|
{ fieldtype: 'Date', fieldname: 'toDate', label: 'To Date', required: 1 }
|
|
|
|
]
|
2018-04-26 10:23:27 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
this.method = 'sales-register';
|
|
|
|
}
|
|
|
|
|
|
|
|
getColumns() {
|
|
|
|
return [
|
2019-08-01 11:52:58 +00:00
|
|
|
{ label: 'SalesInvoice', fieldname: 'name' },
|
2018-09-20 12:53:30 +00:00
|
|
|
{ label: 'Posting Date', fieldname: 'date' , fieldtype: 'Date' },
|
2018-04-26 10:23:27 +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' },
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|