Intercompany Invoicing


I came accros this nice feature of NAV while implementing some IC changes for a customer.

I wanted to send a Purchase Order from one company to the other. At the end of the whole IC process I ended up with TWO purchase documents in the first company.

After logging a support call it seemed this behaviour is by design. MS suggests the following solution.

Add a warning message when posting the originating Purchase Order.
Add a warning message when processing the IC inbox.

What you could also do in my opinion, is try and delete the originating purchase order when the invoice creating is completed.

Steps to reproduce in standard CRONUS database.

Open Company A:
Step 1: Create a purchase order in Company A
Step 2: Go to functions > Send IC Purchase Order
Step 3: Go to Financial Management > Intercompany Postings > Outbox Transactions
Step 4: Set the line action to “Send to IC Partner” (F9)
Step 5: Complete the line actions (F11)

Open Company B:
Step 6: Go to Financial Management > Intercompany Postings > Inbox Transactions
Step 7: Set the line action to “Accept” (F9)
Step 8: Complete the line actions (F11)
Step 9: Ship & Invocie the newly created Sales Invoice
Step 10: Go to Financial Management > Intercompany Postings > OutboxTransactions
Step 11: Set the line action to “Send to IC Partner” (F9)
Step 12: Complete the line actions (F11)

Open Company A: 
Step 13: Go to Financial Management > Intercompany Postings > Inbox Transactions
Step 14: Set the line action to “Accept” (F9)
Step 15: Complete the line actions (F11)

Result:
The system now has created a new purchase invoice in company A.
We now have 2 purchase documents in company A and 1 sales document in company B.

Fix from MS:

CodeUnit 90: Putch-Post 
Insert the follwing code in Cod90 function OnRun: 

.............

CopyAndCheckDocDimToTempDocDim;

Vend.GET("Buy-from Vendor No.");
Vend.CheckBlockedVendOnDocs(Vend,TRUE);
IF "Pay-to Vendor No." <> "Buy-from Vendor No." THEN BEGIN
 Vend.GET("Pay-to Vendor No.");
 Vend.CheckBlockedVendOnDocs(Vend,TRUE);
END;

//NEW CODE BEGIN

IF "Send IC Document" AND
  ("IC Direction" = "IC Direction"::Outgoing) AND
  ("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"]) THEN
 IF NOT CONFIRM(Text051) THEN EXIT;

//NEW CODE END

IF Invoice THEN BEGIN
 PurchLine.RESET;
 PurchLine.SETRANGE("Document Type","Document Type"); PurchLine.SETRANGE("Document No.","No.");
 ........

Add the following TextConstant:
Text051:
This is an IC document. If you post this document and the invoice you receive from your IC partner, it will result in duplicate postings.\Are you sure you want to post this document?

In table 418 IC Inbox Transaction
Add the folling code at the end of function InboxCheckAccept:

IF ("Source Type" = "Source Type":: "Purchase Document") AND
  ("Document Type" = "Document Type"::Invoice)
THEN BEGIN
 ICInboxPurchHeader.GET("Transaction No.","IC Partner Code","Transaction Source");
 IF ICInboxPurchHeader."Your Reference" <> '' THEN BEGIN
   PurchHeader.SETRANGE("No.",ICInboxPurchHeader."Your Reference");
   IF PurchHeader.FINDFIRST THEN
     MESSAGE(Text003,ICInboxPurchHeader."IC Transaction No.",ICInboxPurchHeader."Your Reference")
   ELSE BEGIN
     PurchInvHeader.SETCURRENTKEY("Order No.");
     PurchInvHeader.SETRANGE("Order No.",ICInboxPurchHeader."Your Reference");
     IF PurchInvHeader.FINDFIRST THEN
     IF NOT CONFIRM(Text004,TRUE,ICInboxPurchHeader."Your Reference",ICInboxPurchHeader."IC Transaction No.") THEN
       "Line Action" := xRec."Line Action"
   END;
 END;
END;

and add the following text constants:

Text003 :
A purchase order already exists for transaction %1. If you accept and post this document, you should delete the original purchase order %2 to avoid duplicate postings.

Text004:
Purchase invoice %1 has already been posted for transaction %2. If you accept and post this document, you will have duplicate postings.\Are you sure you want to accept the transaction?
Target Files

Advertisements
Tagged with:
Posted in NAV
One comment on “Intercompany Invoicing
  1. Anatoly says:

    Hi,
    I meet the same issue when I run intercomany documents processing in NAV version 2009.
    Is this resolved in NAV 2009?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: