diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 0db183714..507cc9003 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -259,12 +259,12 @@ "Aplicación bloqueada por el usuario 9": "Aplicación bloqueada por el usuario 9", "Failed to upload file": "Error al subir archivo", "The DOCUWARE PDF document does not exists": "El documento PDF Docuware no existe", - "It is not possible to modify tracked sales": "No es posible modificar líneas de pedido que se hayan empezado a preparar", - "It is not possible to modify sales that their articles are from Floramondo": "No es posible modificar líneas de pedido cuyos artículos sean de Floramondo", - "It is not possible to modify cloned sales": "No es posible modificar líneas de pedido clonadas", + "It is not possible to modify tracked sales": "No es posible modificar líneas de pedido que se hayan empezado a preparar", + "It is not possible to modify sales that their articles are from Floramondo": "No es posible modificar líneas de pedido cuyos artículos sean de Floramondo", + "It is not possible to modify cloned sales": "No es posible modificar líneas de pedido clonadas", "A supplier with the same name already exists. Change the country.": "Un proveedor con el mismo nombre ya existe. Cambie el país.", "There is no assigned email for this client": "No hay correo asignado para este cliente", "This locker has already been assigned": "Esta taquilla ya ha sido asignada", - "Tickets with associated refunds": "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº {{id}}" + "Tickets with associated refunds": "No se pueden borrar tickets con abonos asociados. Este ticket está asociado al abono Nº {{id}}", + "Not exist this branch": "La rama no existe" } - diff --git a/modules/item/front/diary/index.js b/modules/item/front/diary/index.js index 9e104c8e6..03134913f 100644 --- a/modules/item/front/diary/index.js +++ b/modules/item/front/diary/index.js @@ -70,7 +70,8 @@ class Controller extends Section { } $onDestroy() { - this.card.reload(); + if (this.$state.getCurrentPath()[2].state.name === 'item') + this.card.reload(); } } diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index 864a73f52..58fc46abb 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -47,7 +47,16 @@ module.exports = Self => { verb: 'POST' } }); - Self.upload = async(ctx, options) => { + Self.upload = async( + ctx, + appName, + toVersion, + branch, + fromVersion, + description, + unlock, + options + ) => { const models = Self.app.models; const myOptions = {}; const $t = ctx.req.__; // $translate @@ -55,12 +64,6 @@ module.exports = Self => { const AccessContainer = models.AccessContainer; const fileOptions = {}; let tx; - const appName = ctx.args.appName; - const toVersion = ctx.args.toVersion; - const branch = ctx.args.branch; - const fromVersion = ctx.args.fromVersion; - let description = ctx.args.description; - const unlock = ctx.args.unlock; if (typeof options == 'object') Object.assign(myOptions, options); @@ -153,11 +156,14 @@ module.exports = Self => { formatDesc += `*${appName.toUpperCase()}* v.${toVersion} `; const oldVersion = await models.MdbVersionTree.findOne({ - where: {version: fromVersion}, + where: { + version: fromVersion, + app: appName + }, fields: ['branchFk'] }, myOptions); - if (branch == oldVersion.branchFk) + if (!oldVersion || branch == oldVersion.branchFk) formatDesc += `[*${branch}*]: `; else formatDesc += `[*${oldVersion.branchFk}* » *${branch}*]: `; diff --git a/modules/supplier/back/methods/supplier/updateFiscalData.js b/modules/supplier/back/methods/supplier/updateFiscalData.js index 51e02bf94..271ed8769 100644 --- a/modules/supplier/back/methods/supplier/updateFiscalData.js +++ b/modules/supplier/back/methods/supplier/updateFiscalData.js @@ -68,8 +68,11 @@ module.exports = Self => { { arg: 'isVies', type: 'boolean' - } - ], + }, + { + arg: 'isTrucker', + type: 'boolean' + }], returns: { arg: 'res', type: 'string', diff --git a/print/templates/reports/collection-label/collection-label.js b/print/templates/reports/collection-label/collection-label.js index 656dde082..d45ecb2bc 100644 --- a/print/templates/reports/collection-label/collection-label.js +++ b/print/templates/reports/collection-label/collection-label.js @@ -66,8 +66,10 @@ module.exports = { else value = '---'; - if (labelData.routeFk) - value = `${value} [${labelData.routeFk.toString().substring(0, 3)}]`; + if (labelData.routeFk) { + let routeFk = labelData.routeFk.toString(); + value = `${value} [${routeFk.substring(routeFk.length - 3)}]`; + } return value; }, diff --git a/print/templates/reports/collection-label/options.json b/print/templates/reports/collection-label/options.json index a555c5723..ad5ad4750 100644 --- a/print/templates/reports/collection-label/options.json +++ b/print/templates/reports/collection-label/options.json @@ -3,9 +3,9 @@ "height": "4.9cm", "margin": { "top": "0.3cm", - "right": "0.6cm", + "right": "0.3cm", "bottom": "0cm", - "left": "0cm" + "left": "0.2cm" }, "printBackground": true } \ No newline at end of file