2595 - Added invoiceIn module #545
|
@ -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', {
|
||||
|
|
Loading…
Reference in New Issue