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',
|
|
|
|
'amount',
|
|
|
|
'clientFk',
|
|
|
|
'companyFk'
|
|
|
|
],
|
|
|
|
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: {
|
2019-04-08 14:53:37 +00:00
|
|
|
fields: ['id', 'socialName', 'name']
|
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
|
|
|
|
});
|
|
|
|
|