CREATE TRIGGER TTBPDV_CFE_ITEM_B02I FOR TBPDV_CFE_ITEM
ACTIVE BEFORE INSERT POSITION 2
AS
BEGIN
    IF(NEW.ID > 0) THEN
    BEGIN
        INSERT INTO TBPDV_CFE_ITEM_TRATAMENTO (PDV_CFE_ITEM_ID, PEDIDO, ESTOQUE)
            VALUES (NEW.ID, 0, 0);
    END
END;