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

@ -263,6 +263,6 @@
"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 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 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.", "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); this.receipt.description.push(accountingType.receiptDescription);
if (this.originalDescription) if (this.originalDescription)
this.receipt.description.push(this.originalDescription); this.receipt.description.push(this.originalDescription);
this.receipt.description.join(', '); this.receipt.description = this.receipt.description.join(', ');
} }
this.maxAmount = accountingType && accountingType.maxAmount; 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,6 +70,7 @@ class Controller extends Section {
} }
$onDestroy() { $onDestroy() {
if (this.$state.getCurrentPath()[2].state.name === 'item')
this.card.reload(); this.card.reload();
} }
} }

View File

@ -47,7 +47,16 @@ module.exports = Self => {
verb: 'POST' verb: 'POST'
} }
}); });
Self.upload = async(ctx, options) => { Self.upload = async(
ctx,
appName,
toVersion,
branch,
fromVersion,
description,
unlock,
options
) => {
const models = Self.app.models; const models = Self.app.models;
const myOptions = {}; const myOptions = {};
const $t = ctx.req.__; // $translate const $t = ctx.req.__; // $translate
@ -55,12 +64,6 @@ module.exports = Self => {
const AccessContainer = models.AccessContainer; const AccessContainer = models.AccessContainer;
const fileOptions = {}; const fileOptions = {};
let tx; 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') if (typeof options == 'object')
Object.assign(myOptions, options); Object.assign(myOptions, options);
@ -153,11 +156,14 @@ module.exports = Self => {
formatDesc += `*${appName.toUpperCase()}* v.${toVersion} `; formatDesc += `*${appName.toUpperCase()}* v.${toVersion} `;
const oldVersion = await models.MdbVersionTree.findOne({ const oldVersion = await models.MdbVersionTree.findOne({
where: {version: fromVersion}, where: {
version: fromVersion,
app: appName
},
fields: ['branchFk'] fields: ['branchFk']
}, myOptions); }, myOptions);
if (branch == oldVersion.branchFk) if (!oldVersion || branch == oldVersion.branchFk)
formatDesc += `[*${branch}*]: `; formatDesc += `[*${branch}*]: `;
else else
formatDesc += `[*${oldVersion.branchFk}* » *${branch}*]: `; formatDesc += `[*${oldVersion.branchFk}* » *${branch}*]: `;

View File

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

View File

@ -66,8 +66,10 @@ module.exports = {
else else
value = '---'; value = '---';
if (labelData.routeFk) if (labelData.routeFk) {
value = `${value} [${labelData.routeFk.toString().substring(0, 3)}]`; let routeFk = labelData.routeFk.toString();
value = `${value} [${routeFk.substring(routeFk.length - 3)}]`;
}
return value; return value;
}, },

View File

@ -3,9 +3,9 @@
"height": "4.9cm", "height": "4.9cm",
"margin": { "margin": {
"top": "0.3cm", "top": "0.3cm",
"right": "0.6cm", "right": "0.3cm",
"bottom": "0cm", "bottom": "0cm",
"left": "0cm" "left": "0.2cm"
}, },
"printBackground": true "printBackground": true
} }