This commit is contained in:
parent
80b44ccace
commit
f9348b41ea
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue