Dear Community,
We are using IFS version 8.We are performing Gate out of invoices regularly.While creating invoice through load list user need to create Gate pass request after “Delivered” state of Load list.Many time we have observed that user misses this step and performs Create Invoice step and invoice get created for this load list.
But when this same invoice we are going to Gate Out due to non availability of Gate pass requests Gate out not possible.So Each time we need to search that Load list and create the Gate pass request and confirm it.It takes lot of time of Gate out person.
So can we restrict creation of invoice if Gate pass request is not created for that invoice.
I have tried it by creating the following trigger but its not working.
Requesting help of the exerts(Hero) here…!!!
***************************************************************************************
CREATE TRIGGER LOADLIST
BEFORE INSERT OR UPDATE ON cust_order_load_list_tab
FOR EACH ROW
WHEN (NEW.CONTRACT='PPR01')
DECLARE
CURSOR C1 IS
SELECT COUNT (*) FROM C_GATE_PASS_REQUEST_CO_LL T
WHERE T.contract='PPR01'
AND T.state='Inspected'
AND T.load_id=:NEW.load_id;
cnt_ NUMBER;
BEGIN
OPEN C1;
FETCH C1 INTO cnt_;
CLOSE C1;
IF NVL(CNT_,0) = 0 THEN
ERROR_SYS.RECORD_GENERAL('CGatePassRequest','ERRORLOADLIST: Please create and confirm Gate Pass Request before proceeding . Please check with admin. Error Through trigger INVNETORY_PART_05082020. ',:NEW.PART_NO );
END IF;
END;
***********************************************************************************************
Regards
Deepak Navale