Описание
Установка зачетного веса (для автоприхода только начальная)
Определение
CREATE TRIGGER "IT_SetWeight" FOR IT
ACTIVE BEFORE INSERT OR UPDATE POSITION 100
as
begin
if ((new.WEIGHT is null) or (new.OPERATIONID in (30,70))
/*or (IT.TRANSPORTTYPEID = 2)*/
or ((new.WEIGHT = old.NET) and (new.OPERATIONID in (1,5,7)))) then
new.WEIGHT = new.NET;
end