Merge pull request 'refs #6276 hotFix:itemShelving_add' (!2425) from 6276_itemShelving_Add into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2425
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Sergio De la torre 2024-05-09 05:12:57 +00:00
commit 7bcabbf51c
1 changed files with 5 additions and 2 deletions

View File

@ -20,8 +20,11 @@ BEGIN
SELECT barcodeToItem(vBarcode) INTO vItemFk;
SET vPacking = COALESCE(vPacking, GREATEST(vn.itemPacking(vBarcode,vWarehouseFk), 1));
IF vPacking IS NULL
THEN
SET vPacking = itemPacking(vBarcode, vWarehouseFk);
SET vQuantity = vQuantity * vPacking;
END IF;
IF (SELECT COUNT(*) FROM shelving WHERE code = vShelvingFk COLLATE utf8_unicode_ci) = 0 THEN