const vnReport = require('../../../core/mixins/vn-report.js');

module.exports = {
    name: 'receipt',
    mixins: [vnReport],
    async serverPrefetch() {
        this.receipt = await this.findOneFromDef('receipt', [this.id]);
        this.checkMainEntity(this.receipt);
        this.client = await this.findOneFromDef('client', [this.id]);
    },
    props: {
        id: {
            type: Number,
            required: true,
            description: 'Receipt id'
        }
    }
};