Merge branch 'master' into test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-25 07:24:46 +02:00
commit 3e0e43da2f
3 changed files with 28 additions and 9 deletions

View File

@ -86,8 +86,8 @@ proc: BEGIN
WHERE calc_id = vCalcFk;
UPDATE tmp.itemInventory it
JOIN tItemInventoryCalc iic ON iic.itemFk = it.id
JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
LEFT JOIN tItemInventoryCalc iic ON iic.itemFk = it.id
LEFT JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
SET it.inventory = iic.quantity,
it.visible = ivc.visible,
it.avalaible = iic.quantity,

View File

@ -50,6 +50,7 @@ module.exports = Self => {
'stickers',
'packing',
'grouping',
'packing',
'groupingMode',
'quantity',
'packagingFk',
@ -79,7 +80,9 @@ module.exports = Self => {
fields: [
'id',
'typeFk',
'stems',
'name',
'category',
'subName',
'size',
'minPrice',
@ -95,14 +98,31 @@ module.exports = Self => {
'value9',
'tag10',
'value10',
'groupingMode'
'groupingMode',
'inkFk',
'originFk',
'producerFk'
],
include: {
relation: 'itemType',
scope: {
fields: ['code', 'description']
include: [
{
relation: 'itemType',
scope: {
fields: ['code', 'description']
}
},
{
relation: 'origin',
scope: {
fields: ['code']
}
},
{
relation: 'producer',
scope: {
fields: ['name']
}
}
}
]
}
}]
};

View File

@ -53,7 +53,6 @@ module.exports = Self => {
const deletedExpedition = await models.Expedition.destroyById(expeditionId);
deletedExpeditions.push(deletedExpedition);
} catch (e) {
console.log('e: ', e);
notDeletedExpeditions.push(expeditionId);
}
}