2019-03-26 13:27:08 +00:00
|
|
|
import ngModule from '../module';
|
2019-11-10 10:08:44 +00:00
|
|
|
import ModuleCard from 'salix/components/module-card';
|
2019-03-26 13:27:08 +00:00
|
|
|
|
2019-11-10 10:08:44 +00:00
|
|
|
class Controller extends ModuleCard {
|
|
|
|
reload() {
|
|
|
|
const filter = {
|
2019-03-26 13:27:08 +00:00
|
|
|
fields: [
|
|
|
|
'id',
|
|
|
|
'ref',
|
|
|
|
'issued',
|
2021-10-25 09:58:23 +00:00
|
|
|
'serial',
|
2019-03-26 13:27:08 +00:00
|
|
|
'amount',
|
|
|
|
'clientFk',
|
2021-10-01 12:31:42 +00:00
|
|
|
'companyFk',
|
|
|
|
'hasPdf'
|
2019-03-26 13:27:08 +00:00
|
|
|
],
|
|
|
|
include: [
|
|
|
|
{
|
|
|
|
relation: 'company',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'code']
|
|
|
|
}
|
2019-03-28 10:55:23 +00:00
|
|
|
}, {
|
2019-03-26 13:27:08 +00:00
|
|
|
relation: 'client',
|
|
|
|
scope: {
|
2021-07-19 10:31:09 +00:00
|
|
|
fields: ['id', 'socialName', 'name', 'email']
|
2019-03-26 13:27:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
2019-11-10 10:08:44 +00:00
|
|
|
this.$http.get(`InvoiceOuts/${this.$params.id}`, {filter})
|
|
|
|
.then(res => this.invoiceOut = res.data);
|
2019-03-26 13:27:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnInvoiceOutCard', {
|
2019-03-26 13:27:08 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|
|
|
|
|