Merge pull request 'feat: #7109 inventoryType' (!2409) from 7109-inventoryType into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2409
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
Javi Gallego 2024-05-06 12:00:14 +00:00
commit 69766bbfeb
1 changed files with 16 additions and 15 deletions

View File

@ -94,15 +94,16 @@ BEGIN
SELECT id INTO vEntryFk
FROM entry
WHERE supplierFk = vInventorySupplierFk
AND travelFk = vTravelFk;
AND travelFk = vTravelFk
AND typeFk = 'inventory';
IF vEntryFk IS NULL THEN
INSERT INTO entry
SET supplierFk = vInventorySupplierFk,
isConfirmed = TRUE,
isOrdered = TRUE,
travelFk = vTravelFk;
travelFk = vTravelFk,
typeFk = 'inventory';
SELECT LAST_INSERT_ID() INTO vEntryFk;
ELSE
DELETE FROM buy WHERE entryFk = vEntryFk;