Question

EDI invoice documents

  • 27 October 2021
  • 5 replies
  • 474 views

Userlevel 5
Badge +8

Hello All,

We have an EDI connection with several customers for sending customer invoices.  (EDI document 810).  

The message set-up for EDI is on the customer record and it appears the configuration would apply to all types of invoices.  (Customer Invoice, manual customer invoice, Instant invoices).  The problem we encounter is whenever a instant invoice or manual customer invoice is created, the system attempts to send the document vis EDI. 

 

We don’t want to send those kind of invoices as they do not have the correct file format needed to exchange with our customers via the integration that was buildt.  

 

So the question - is there a way in IFS to only send normal customer invoices via EDI only and NOT instant invoices or manual invoices for the EDI customer? 


This topic has been closed for comments

5 replies

Userlevel 3
Badge +6

Hi, 

We had a similar issue, I think there is a single setup for the EDI per Customer. The solution we have given is to use the Custom menu option, and use Only Invoice Print. I think the system calls the below package and procedure.

IFSAPP.Outgoing_Invoice_API.Print_Invoice_(

 

Thanks 

L P Reddy 

Userlevel 5
Badge +8

Thank you for the suggestion, do you know how to add the package/procedure in the PS/SQL block portion of the custom menu?

 

 

Userlevel 3
Badge +6

Hi, 

 

We have created a Procedure and And called the Procedure in the Custom menu. 

 

Code for Procedure: 

procedure release_inst_inv(invoice_id_ varchar2, company_id_ varchar2) as
    a_      varchar2(1000) := Null;
    b_      varchar2(1000) := Null;
    c_      varchar2(4000);
    d_      varchar2(100) := Null;
    f_      varchar2(100) := Null;
    Date_   varchar2(100);
    inv_id_ varchar2(4000);
  
    cursor c1 is
      select *
        from instant_invoice t
       where t.company = company_id_
         and t.invoice_id = invoice_id_;
  
  begin
  
    for i in c1 loop
      Date_   := to_char(Sysdate, 'yyyy-mm-dd');
      inv_id_ := 'INVOICE_ID' || CHR(31) || i.invoice_id || CHR(30) ||
                 'END' || CHR(31) || 'END' || CHR(30) || '';
      c_      := 'PRINT_TYPE' || CHR(31) || 'D' || CHR(30) || 'COMPANY' ||
                 CHR(31) || i.company || CHR(30) || 'VOUCHER_DATE' ||
                 CHR(31) || Date_ || CHR(30) || 'VOUCHER_TYPE' || CHR(31) || 'F' ||
                 CHR(30) || 'USER_GROUP' || CHR(31) || 'ME' || CHR(30) ||
                 'ORIGINAL' || CHR(31) || 'TRUE' || CHR(30) || '';
    
      f_ := 'BATCH_TYPE' || CHR(31) || 'ASAP' || CHR(30) || 'BATCH_TYPE' ||
            CHR(31) || 'ASAP' || CHR(30) || 'BATCH_TYPE' || CHR(31) ||
            'ASAP' || CHR(30) || '';
    
      IFSAPP.Outgoing_Invoice_API.Print_Invoice_(a_,
                                                 b_,
                                                 'INSTANT_INVOICE_API',
                                                 inv_id_,
                                                 c_,
                                                 f_,
                                                 d_);
      commit;
    
    end loop;
  
  end;

 

Custom menu 

 

 

&AO.release_inst_inv(&Invoice_Id,&Company);

 

Thanks 

L P Reddy 

 

Userlevel 5
Badge +8

Hello LPREDDY, 

Thank you very much for the information.  One more question, I set-up the process and it seemed to have worked.  It did change the status of the invoice to “Printed”.  Is there a way to also post the invoice so that the status is “PostedAuth”?

Thanks!

Mark

Userlevel 3
Badge +6

HI, 

 

Please check the Voucher Type and the User Group in the procedure. Usually when Customer Invoice Status is Printed that means Invoice has a posting error. Check in the Screen “Customer Invoices with Errors”.

You will get the Errors Mostly because of the User Group if not modified in the script. 

Thanks 

L P Reddy