salix/print/templates/reports/invoice-incoterms/invoice-incoterms.js

20 lines
639 B
JavaScript
Executable File

const vnReport = require('../../../core/mixins/vn-report.js');
module.exports = {
name: 'invoice-incoterms',
mixins: [vnReport],
async serverPrefetch() {
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
this.checkMainEntity(this.invoice);
this.client = await this.findOneFromDef('client', [this.reference]);
this.incoterms = await this.findOneFromDef('incoterms', [this.reference, this.reference, this.reference]);
},
props: {
reference: {
type: String,
required: true,
description: 'The invoice ref'
}
}
};