2595 - Added invoiceIn module #545

Merged
carlosjr merged 11 commits from 2595-invoiceIn-index into dev 2021-03-03 11:47:43 +00:00
1 changed files with 11 additions and 3 deletions
Showing only changes of commit b22f58ae80 - Show all commits

View File

@ -4,8 +4,8 @@ import Section from 'salix/components/section';
export default class Controller extends Section { export default class Controller extends Section {
exprBuilder(param, value) { exprBuilder(param, value) {
switch (param) { switch (param) {
case 'shipped': case 'issued':
return {'t.shipped': { return {'ii.issued': {
between: this.dateRange(value)} between: this.dateRange(value)}
}; };
case 'id': case 'id':
@ -13,7 +13,6 @@ export default class Controller extends Section {
case 'supplierRef': case 'supplierRef':
case 'serialNumber': case 'serialNumber':
case 'serial': case 'serial':
case 'issued':
case 'created': case 'created':
case 'isBooked': case 'isBooked':
return {[`ii.${param}`]: value}; return {[`ii.${param}`]: value};
@ -26,6 +25,15 @@ export default class Controller extends Section {
return {[param]: value}; return {[param]: value};
} }
} }
dateRange(value) {
const minHour = new Date(value);
minHour.setHours(0, 0, 0, 0);
const maxHour = new Date(value);
maxHour.setHours(23, 59, 59, 59);
return [minHour, maxHour];
}
} }
ngModule.vnComponent('vnInvoiceInIndex', { ngModule.vnComponent('vnInvoiceInIndex', {