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

20 lines
655 B
JavaScript
Raw Normal View History

2023-01-23 12:15:30 +00:00
const vnReport = require('../../../core/mixins/vn-report.js');
2021-03-01 10:25:37 +00:00
module.exports = {
name: 'invoice-incoterms',
2023-01-23 12:15:30 +00:00
mixins: [vnReport],
2021-03-01 10:25:37 +00:00
async serverPrefetch() {
2023-01-23 12:15:30 +00:00
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, this.reference]);
2021-03-01 10:25:37 +00:00
},
props: {
2022-09-29 05:35:20 +00:00
reference: {
2023-04-20 08:43:35 +00:00
type: String,
2022-09-26 11:33:27 +00:00
required: true,
description: 'The invoice ref'
2021-03-01 10:25:37 +00:00
}
}
};