Входные параметры
Параметр | Тип | Описание |
---|---|---|
AEXPORTACTITEMID |
INTEGER |
|
APARTYID |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
TRANSPORTWEIGHT |
BIGINT |
|
Описание
(Нет описания для процедуры FORWARDER_WEIGHTINV)
Определение
CREATE PROCEDURE FORWARDER_WEIGHTINV(
AEXPORTACTITEMID INTEGER,
APARTYID INTEGER)
RETURNS (
TRANSPORTWEIGHT BIGINT)
AS
BEGIN
FOR
select
(select sum(case
when ((eaiv.operationid = 17 and eaiv.parentitemid = eaimain.exportactitemid)
or (eaiv.operationid = 5))
then -weight
else weight
end)
from exportactitems_view eaiv
where eaiv.state <> 10
and ((eaiv.parentitemid = eaimain.exportactitemid)
or (eaiv.exportactitemid = eaimain.exportactitemid)))
as transportweight
from exportactitems_view eaimain
left join exportacts ea on (eaimain.exportactid = ea.exportactid)
left join it on (eaimain.inventoryid = it.inventoryid)
where eaimain.exportactitemid = :aexportactitemid
and eaimain.operationid in (1,17)
and eaimain.weight > 0
and ea.state >=0
and eaimain.state <> 10
and it.partyid = :apartyid
INTO :transportweight
DO
BEGIN
SUSPEND;
END
END