Skip to main content
Solved

Possibility of automatic numbering when uploading external invoices


Dharshankumaar Mahendran
Superhero (Partner)
Forum|alt.badge.img+16

Hi All,

I'm looking for the possibility for the application to pick a next invoice number defined if an invoice number is not defined in the external invoice. I tried defining an invoice number series for the External supplier and customer invoices and the system doesn’t accept the upload file when there is automatic numbering.

Does anyone know how I can define a detail function on external file template or any other alternative to achieve this?

 

Best Regards,

Dharshan.

Best answer by Furkan Zengin

Hello

Invoice number is a key field on external customer/supplier invoice. Therefore you cannot create an invoice without it.

 

I can recommend you 2 step solution

  1. Go to external file template and add a function to assign an invoice number when there is no any. You can use IF_EMPTY function on INVOICE_NO. Parameter should be COLUMN_REF(INVOICE_NO),”XXX”. this will assign XXX as invoice number in case of invoice no is missing
  2. Create a custom event based on external supplier invoice and modify invoice number with next auto number where invoice number is XXX. You can modify based on an invoice series or your own numbering. You must create a deferred call not to face mutating trigger issue. Visit @dsj blog for detailed explanation of deferred call creation.

Alternatively you can also use CURRENT_DATE_TIME function to assign invoice number when creating IF_EMPTY function. 
 

Hope this helps

View original

2 replies

Dharshankumaar Mahendran
Superhero (Partner)
Forum|alt.badge.img+16

Hi @MKG019 @Malgorzata Palatynska @Adam Bereda any insights on this

 


Furkan Zengin
Superhero (Partner)
Forum|alt.badge.img+21
  • Superhero (Partner)
  • 703 replies
  • Answer
  • August 15, 2024

Hello

Invoice number is a key field on external customer/supplier invoice. Therefore you cannot create an invoice without it.

 

I can recommend you 2 step solution

  1. Go to external file template and add a function to assign an invoice number when there is no any. You can use IF_EMPTY function on INVOICE_NO. Parameter should be COLUMN_REF(INVOICE_NO),”XXX”. this will assign XXX as invoice number in case of invoice no is missing
  2. Create a custom event based on external supplier invoice and modify invoice number with next auto number where invoice number is XXX. You can modify based on an invoice series or your own numbering. You must create a deferred call not to face mutating trigger issue. Visit @dsj blog for detailed explanation of deferred call creation.

Alternatively you can also use CURRENT_DATE_TIME function to assign invoice number when creating IF_EMPTY function. 
 

Hope this helps


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings