hotfix itemWaste #1363

Merged
alexandre merged 2 commits from hotfix-itemWaste-openOtherTab into master 2023-03-03 09:01:32 +00:00
9 changed files with 36 additions and 23 deletions
Showing only changes of commit de0e7334df - Show all commits

View File

@ -63,6 +63,6 @@ describe('Ticket index payout path', () => {
const reference = await page.waitToGetProperty(selectors.clientBalance.firstLineReference, 'innerText');
expect(count).toEqual(4);
expect(reference).toContain('Cash,Albaran: 7, 8Payment');
expect(reference).toContain('Cash, Albaran: 7, 8Payment');
});
});

View File

@ -259,10 +259,10 @@
"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"
}
"There is no assigned email for this client": "No hay correo asignado para este cliente",
"Not exist this branch": "La rama no existe"
}

View File

@ -68,7 +68,7 @@ class Controller extends Dialog {
this.receipt.description.push(accountingType.receiptDescription);
if (this.originalDescription)
this.receipt.description.push(this.originalDescription);
this.receipt.description.join(', ');
this.receipt.description = this.receipt.description.join(', ');
}
this.maxAmount = accountingType && accountingType.maxAmount;

View File

@ -38,7 +38,7 @@ describe('Client', () => {
}
};
expect(controller.receipt.description.join(',')).toEqual('Cash,Albaran: 1, 2');
expect(controller.receipt.description).toEqual('Cash, Albaran: 1, 2');
});
});

View File

@ -70,7 +70,8 @@ class Controller extends Section {
}
$onDestroy() {
this.card.reload();
if (this.$state.getCurrentPath()[2].state.name === 'item')
this.card.reload();
}
}

View File

@ -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}*]: `;

View File

@ -64,6 +64,10 @@ module.exports = Self => {
{
arg: 'healthRegister',
type: 'string'
},
{
arg: 'isTrucker',
type: 'boolean'
}],
returns: {
arg: 'res',

View File

@ -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;
},

View File

@ -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
}