src-db/database/model/triggers/M_TRANSACTION_TRG2.xml
changeset 20997 55c000c91897
parent 20977 21d0baeb6c99
child 20998 8d3f43817c4f
equal deleted inserted replaced
20996:c29367b38105 20997:55c000c91897
    33 BEGIN
    33 BEGIN
    34   IF (AD_isTriggerEnabled() = 'N') THEN RETURN;
    34   IF (AD_isTriggerEnabled() = 'N') THEN RETURN;
    35   END IF;
    35   END IF;
    36 
    36 
    37   IF (INSERTING) THEN
    37   IF (INSERTING) THEN
    38     IF (:NEW.isreservationtriggerdisabled = 'Y') THEN RETURN;
    38     IF (:NEW.isreservationtriggerdisabled = 'Y') THEN
       
    39       RETURN NEW;
    39     END IF;
    40     END IF;
    40     IF (:NEW.movementqty < 0 AND :NEW.m_product_uom_id IS NULL) THEN
    41     IF (:NEW.movementqty < 0 AND :NEW.m_product_uom_id IS NULL) THEN
    41       -- Check reservations. Reserved stock must be released before inserting the transacion.
    42       -- Check reservations. Reserved stock must be released before inserting the transacion.
    42       SELECT count(1) INTO v_count
    43       SELECT count(1) INTO v_count
    43       FROM dual
    44       FROM dual