Skip to main content

Hi, 

My requests concerns IFS V8. 

I would like to create an event preventing users to create a an Advance Supplier Invoices when they choose a specific VAT Code. 

 

The 2 datas are accessible on two different tabs : 

  • Advance Invoice : INVOICE_TAB
  • VAT Code : INVOICE_ITEM_TAB

For now, i didn’t found a way to create an event based on two differents tabs. 

Is it possible, if it’s the case could you give me some details on how to perform it ? 

 

Thanks in advance :)

 

Best Regards, 

Hello;

It is very easy if it is IFS Cloud, but I think you can do it by creating a trigger in PLSQ. Or you can edit the procedure that performs the operation in the relevant API.


@IFSAD since you are monitoring the VAT Code in Invoice Item, I think you could easily throw an error message by creating a Custom Event on INVOICE_ITEM_TAB and monitoring the VAT Code columns for the incorrect values.

BEGIN

Error_SYS.Record_General('InvoiceItem','WrongVATCode: You are not allowed to create an invoice item with this VAT Code.' );

END;

However, I guess this would mean that the Invoice header will be created anyways and then what you are stopping is the invoice line creation. Then if needed and no other invoice lines exist I guess you could call invoice_api.remove_ function to delete the already created invoice header.


@Marcel.Ausan Hi Marcel, 

 

Thanks for your reply, indeed this works but in my case i would like to add a second condition when the flag “Advance Invoice” is flagged in the header of the supplier invoice (TAB “INVOICE_TAB”). 


@IFSAD then before throwing the error message you should define a cursor that would be a select from invoice_tab checking for the advance invoice flag. Then you would open the cursor and if the advance_invoice flag = true then trigger the error, else null.


Reply