2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/reports/SalesRegister/SalesRegisterView.js

32 lines
1.3 KiB
JavaScript
Raw Normal View History

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 }
]
});
this.method = 'sales-register';
}
getColumns() {
return [
{ label: 'SalesInvoice', fieldname: 'name' },
{ label: 'Posting Date', fieldname: 'date' , fieldtype: 'Date' },
{ 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' },
];
}
}