2023-03-27 12:29:22 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import Section from 'salix/components/section';
|
|
|
|
|
|
|
|
export default class Controller extends Section {
|
|
|
|
constructor($element, $) {
|
|
|
|
super($element, $);
|
|
|
|
}
|
|
|
|
|
2023-03-28 11:45:26 +00:00
|
|
|
goToIndex(daysAgo, serial) {
|
2023-03-28 09:34:14 +00:00
|
|
|
const issued = Date.vnNew();
|
|
|
|
issued.setDate(issued.getDate() - daysAgo);
|
2023-03-28 11:45:26 +00:00
|
|
|
this.$state.go('invoiceIn.index',
|
|
|
|
{q: `{"serial": "${serial}", "isBooked": false, "from": ${issued.getTime()}}`});
|
2023-03-27 12:29:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Controller.$inject = ['$element', '$scope'];
|
|
|
|
|
|
|
|
ngModule.vnComponent('vnInvoiceInSerial', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|