40 lines
998 B
JavaScript
40 lines
998 B
JavaScript
import ngModule from '../module';
|
|
import ModuleCard from 'salix/components/module-card';
|
|
|
|
class Controller extends ModuleCard {
|
|
reload() {
|
|
const filter = {
|
|
fields: [
|
|
'id',
|
|
'ref',
|
|
'issued',
|
|
'amount',
|
|
'clientFk',
|
|
'companyFk'
|
|
],
|
|
include: [
|
|
{
|
|
relation: 'company',
|
|
scope: {
|
|
fields: ['id', 'code']
|
|
}
|
|
}, {
|
|
relation: 'client',
|
|
scope: {
|
|
fields: ['id', 'socialName', 'name']
|
|
}
|
|
}
|
|
]
|
|
};
|
|
|
|
this.$http.get(`InvoiceOuts/${this.$params.id}`, {filter})
|
|
.then(res => this.invoiceOut = res.data);
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnInvoiceInCard', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|
|
|