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 {
exprBuilder(param, value) {
switch (param) {
case 'shipped':
return {'t.shipped': {
case 'issued':
return {'ii.issued': {
between: this.dateRange(value)}
};
case 'id':
@ -13,7 +13,6 @@ export default class Controller extends Section {
case 'supplierRef':
case 'serialNumber':
case 'serial':
case 'issued':
case 'created':
case 'isBooked':
return {[`ii.${param}`]: value};
@ -26,6 +25,15 @@ export default class Controller extends Section {
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', {