Входные параметры
Параметр | Тип | Описание |
---|---|---|
SILAGEPACKID |
INTEGER |
|
INVENTORYID |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
RSLT_INVENTORYID |
INTEGER |
|
Описание
(Нет описания для процедуры SILAGEPACKS_ERASE)
Определение
CREATE PROCEDURE SILAGEPACKS_ERASE(
SILAGEPACKID INTEGER,
INVENTORYID INTEGER)
RETURNS (
RSLT_INVENTORYID INTEGER)
AS
declare variable STORAGEID integer;
begin
if (:INVENTORYID is null) then begin
RSLT_INVENTORYID = gen_id(INVENTORYIDGEN,1);
select SILAGEPACKS.STORAGEID
from SILAGEPACKS
where (SILAGEPACKS.SILAGEPACKID = :SILAGEPACKID)
into :STORAGEID;
insert into IT (INVENTORYID, REGDATE, OPERATIONID, SILAGEID, STORAGEID)
values (:INVENTORYID, current_date, 27, :SILAGEPACKID, :STORAGEID);
end
else RSLT_INVENTORYID = INVENTORYID;
update SILAGEPACKS
set QUALITYID = null,
SILAGEQUALITYID = null,
WEIGHT = null,
HEIGHT = null,
VOLUME = null,
TEMPERATURE = null,
CONSISTENCE = null,
MASS = null
where (SILAGEPACKS.SILAGEPACKID = :SILAGEPACKID);
suspend;
end