feat: refs #7644 Requested changes
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-08-05 11:44:20 +02:00
parent ab446b54ed
commit 760a1debca
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,6 @@
const vnReport = require('../../../core/mixins/vn-report.js'); const vnReport = require('../../../core/mixins/vn-report.js');
const {DOMImplementation, XMLSerializer} = require('xmldom'); const {DOMImplementation, XMLSerializer} = require('xmldom');
const {models} = require('vn-loopback/server/server');
const jsBarcode = require('jsbarcode'); const jsBarcode = require('jsbarcode');
const moment = require('moment'); const moment = require('moment');
@ -7,7 +8,6 @@ module.exports = {
name: 'buy-label', name: 'buy-label',
mixins: [vnReport], mixins: [vnReport],
async serverPrefetch() { async serverPrefetch() {
const models = require('vn-loopback/server/server').models;
const buy = await models.Buy.findById(this.id, null); const buy = await models.Buy.findById(this.id, null);
this.buys = await this.rawSqlFromDef('buy', [buy.entryFk, buy.entryFk, buy.entryFk, this.id]); this.buys = await this.rawSqlFromDef('buy', [buy.entryFk, buy.entryFk, buy.entryFk, this.id]);
const date = new Date(); const date = new Date();