Monday, 8 June 2015

Duplicate Invoice Number With Different Supplier Site allowed (Doc ID 1674300.1)

APPLIES TO:

Oracle Payables - Version 12.0.1 and later
Information in this document applies to any platform.

SYMPTOMS

 The Invoice Workbench is allowing users to enter duplicate invoice numbers as long as the supplier site is different.

CAUSE

As per Doc ID 1282143.1 there was an Enhancement created where you can create invoices using the same invoice number from the same supplier with different supplier sites.  This functionality was provided by Patch 9105666:R12.AP.A/B.

SOLUTION

If you would prefer this was not allowed, a workaround can be setup using the following personalizations, which still allow the duplicate invoice number to be created, but present a warning message letting the user know they created the duplicate invoice number.
Both personalizations below, need to be used for the warning message to appear and they are meant to work when profile option AP: Use Invoice Batch Controls is switched to NO.

PERSONALIZATION 1
--------------------------
Function Name: AP_APXINWKB (system created)
Form Name: APXINWKB (system created)
Debug Mode: Off (system created)

Sequence: 10
Description: XX_DUP_INVOICE_NUM_1
Level: Function
Enabled: Checked

Condition:
Trigger Event: PRE-INSERT          **(If pre-insert is not in your LOV, you can just type it in)
Trigger Object: << leave blank, will be grayed out >>
Condition:

   0 <(select count(*) from ap_invoices_all ai
   where invoice_num =:INV_SUM_FOLDER.INVOICE_NUM
   and vendor_id =:INV_SUM_FOLDER.VENDOR_ID
   and org_id    = :INV_SUM_FOLDER.org_id
   and ((:inv_sum_folder.invoice_id IS NULL) OR :inv_sum_folder.invoice_id <> ai.invoice_id))

Processing Mode: Both

Context: <I would recommend setting this to whatever responsibility you enter invoices>

Actions:
Sequence: 10
Type: Message
Description: <null>
Language: All
Enabled: Checked

Message Type: Warn
Message Text: You have entered duplicate Invoice Number for same Supplier. Please Use Different Invoice Number.


PERSONALIZATION 2
--------------------------

Function Name: AP_APXINWKB (system created)
Form Name: APXINWKB (system created)
Debug Mode: Off (system created)

Sequence: 10
Description: XX_DUP_INVOICE_NUM_2
Level: Function
Enabled: Checked

Condition:
Trigger Event: PRE-UPDATE          **(If pre-insert is not in your LOV, you can just type it in)
Trigger Object: << leave blank, will be grayed out >>
Condition:

   0 <(select count(*) from ap_invoices_all ai
   where invoice_num =:INV_SUM_FOLDER.INVOICE_NUM
   and vendor_id =:INV_SUM_FOLDER.VENDOR_ID
   and org_id    = :INV_SUM_FOLDER.org_id
   and ((:inv_sum_folder.invoice_id IS NULL) OR :inv_sum_folder.invoice_id <> ai.invoice_id))

Processing Mode: Both

Context: <I would recommend setting this to whatever responsibility you enter invoices>

Actions:
Sequence: 10
Type: Message
Description: <null>
Language: All
Enabled: Checked

Message Type: Warn
Message Text: You have entered duplicate Invoice Number for same Supplier. Please Use Different Invoice Number.

4 comments:

  1. Hi.. Its working fine... But the Message is throwing when we are doing an entry in Distributions.... Its should fire only on Header Level (Block: INV_SUM_FOLDER) only

    ReplyDelete
  2. so you can ignore this message as long as its working fine

    ReplyDelete
  3. Hi Ali.. But users not required .. its every time prompting at Line Level and Distribution Level changes...
    Can we restrict to Block level ???

    ReplyDelete
  4. Hi Ali Can I get solution for this? Plz reply possible or not possible...

    ReplyDelete