7837-testToMaster_2432 #2834

Merged
alexm merged 161 commits from 7837-testToMaster_2432 into master 2024-08-06 05:52:05 +00:00
3 changed files with 8 additions and 5 deletions
Showing only changes of commit 95b61ae86a - Show all commits

View File

@ -20,13 +20,14 @@ module.exports = Self => {
if (typeof options == 'object')
Object.assign(myOptions, options);
const randStr = Math.random().toString(36).substring(3);
const result = await Self.rawSql(`
CALL vn.collection_assign(?, @vCollectionFk);
SELECT @vCollectionFk collectionFk
`, [userId], myOptions);
SELECT @vCollectionFk ?
`, [userId, randStr], myOptions);
// Por si entra en el SELECT FOR UPDATE y retorna un array más
const collectionFk = result[2]?.[0]?.collectionFk || result[3]?.[0]?.collectionFk;
// Por si entra en SELECT FOR UPDATE una o varias veces
const collectionFk = result.find(item => item[0]?.[randStr] !== undefined)?.[0]?.[randStr];
if (!collectionFk) throw new UserError('There are not picking tickets');
await Self.rawSql('CALL vn.collection_printSticker(?, NULL)', [collectionFk], myOptions);

View File

@ -47,7 +47,7 @@ module.exports = Self => {
co.code countryCode,
c.fi,
c.name clientName,
a.mobile,
IFNULL(a.mobile, c.mobile) mobile,
DATE_FORMAT(t.shipped, '%d/%m/%Y') created,
t.shipped,
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,

View File

@ -0,0 +1,2 @@
ALTER TABLE IF EXISTS vn.itemShelving
MODIFY COLUMN IF EXISTS isSplit tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Este valor cambia al splitar un carro que se ha quedado en holanda';