Intercompany sales order payments in Dynamics AX 2012

As I’ve said before, working in New Zealand means that I’m dealing with a lot of organisations that have off-shore subsidiary companies – frequently setup to sell wonderful New Zealand produce to those folk not fortunate enough to live in this beautiful country. Intercompany sales and purchase orders are an efficient and effective way of managing this supply chain – and normally when I’m thinking about processing sales orders I lose interest in the process once the sales order invoice is posted; and on purchase orders I’m usually only interested in getting as far as posting the purchase order invoice (and sometimes, not even that far). But of course there’s a little bit more to the process – we have to process the customer payment and the vendor payment so that the customer and vendor invoice transactions are fully settled. Again, by definition, in intercompany trading we’re bearing the cost of both of those transactions – so we’re going to want to make the process as efficient as possible.

There are two ways that the customer and vendor payment process can be improved.

First let’s demonstrate the problem. I’ve setup the classic, simple intercompany purchase order and intercompany sales order in the standard Dynamics AX 2012 R3 demo image. My intercompany purchase order is in the DEMF company, with a matching intercompany sales order in the USMF company:


I’ve posted both orders through to invoice, and now I can see on the Customer transactions in USMF that I have an un-paid customer invoice:


And on the purchasing side, in the DEMF company my intercompany vendor is showing a purchase order invoice that needs to be paid:


You’ll notice that in the intercompany order process the intercompany sales order invoice number is automatically used as the purchase order invoice number – and you’ll probably also know that in an intercompany environment I prefer to setup number sequences so that a reference to the company is embedded in the number (more info here ).

So – the first way that we can make the payment process more efficient is to eliminate it.

Use a cash payment method and the invoices are automatically settled. In your down-stream selling company (which is buying the product, DEMF in my example) setup a cash payment AP Terms of payment, Accounts payable > Setup > Payment > Terms of payment:


I’ve had to specify a Ledger posting account – that is used when the payment is posted. It’s where the invoice balance will end up so it’s going to be an intercompany debit/credit account.

Now add that Terms of payment to my intercompany vendor:


Same on the upstream, supply company, (USMF in my example), except that in this case, it’s an AR payment term. Accounts receivable > Setup > Payment > Terms of payment:


Same again for the Ledger posting account –it’s an intercompany debit/credit account.

And obviously again I add the Terms of payment to my intercompany customer:


Now I’ll process an intercompany sales order / purchase order pair through to invoice as before, and inspect the customer transactions:


My customer invoice is paid and the payment transaction has been added to the voucher created when I posted the sales order invoice.

And on the intercompany vendor I see that the same process has taken place:


The second way of optimising this process isn’t quite as automatic, and might therefore be used where for instance there’s a delay between the sales order despatch and the receipt in the downstream selling company. Firstly, reset the Terms of payment on the intercompany customer and vendor away from a cash payment term (Net10 is used in the demo data). Then we’re going to use one of the intercompany setup parameters. The intercompany trading relationship is defined either from the customer or the vendor. On the General action tab, click the Setup > Intercompany button:


On the Sales order polices tab we find a ‘Payment journal’ and a ‘Post journal automatically’ checkbox:


The formal Technet help explanation is here. It tells us that with the ‘Post journal automatically’ checkbox ticked, the system assists you keeping your accounts in synchronisation by posting the customer invoice payment journal when the intercompany purchase order invoice payment journal is posted. To make this work in the demo data setup I added a Payment method to the intercompany vendor – this defaults the bank account offset account used when the vendor payment journal, and I also needed to create an Intercompany customer payment journal, because I found that when the customer payment journal is created and posted by the system it wasn’t picking up the offset account from the customer’s Method of payment. So on the intercompany vendor I now have:


So back to our opening case, we have an unpaid customer invoice:


And an unpaid vendor invoice:


I create a payment journal for the invoice (with a little bit of help from one of my finance consultant colleagues), and post it, and I see:


Obviously, the vendor transaction’s been paid:


But so has the customer transaction back in the USMF company:


And here is the customer payment journal that the system created and posted:


 

By the way, this is the customer payment journal I created. General ledger > Setup > Journals > Journal names:


But I am well outside of my comfort zone here, all that should have been required was an AR Method of payment to specify the offset bank account on the customer.

 

I received a comment asking for a view of the GL journals posted at each step. I’ve never tried to update a blog post before, but here goes, hopefully this works.

This is the voucher from the delivery note in the upstream supply company:


And this is the voucher from the purchase order receipt in the downstream selling company:


This is the voucher from the intercompany sales order invoice:


And this is the intercompany purchase order invoice in the downstream company:


Here’s the purchase order payment:


And here’s the sales order payment:


 

Hope this helps – but really the thing to do with these vouchers is to copy them all into a spreadsheet and reconcile them.

What you should see is that the balance ends up in an Intercompany clearing account in each company.

Advertisements

One intercompany sales order, two invoices. Dynamics AX 2012

This one’s really simple, but had me foxed for a few minutes.

The scenario goes like this. You create an intercompany purchase order. The supply company ships and invoices multiple deliveries.

Everything works just fine if you have time to post the purchase order product receipts and invoices before you post the second sales order delivery note / invoice.

As usual I’ve set this up in the Dynamics AX demo hyper-v image. I’ve created and confirmed a simple intercompany purchase order in the DEMF company (the sales order is in the USMF company):

In the supply company I’ve delivered and invoiced the first sales order line.

I need to post a product receipt against the purchase order – and although the Product receipt posting form pre-loads the sales order delivery note number …

… there’s no easy way to set the appropriate partial receipt quantity. I’m just going to use the Lines tab:

Here, I’ve deleted the purchase order line that hasn’t been delivered. Below, I’m just setting the product receipt quantities manually. But I have worked with a company who used intercompany orders extensively and they had a modification on the purchase order that would retrieve a sales order delivery note from the supply company, and set the ‘Receive now’ quantity on the purchase order lines appropriately.

So, now I’m ready to post the purchase order product receipt – and then the invoice:

This [first] purchase order invoice is setup to post correctly – the invoice number, delivery note number, and invoice amounts have all defaulted correctly – all I have to do is click the ‘Post’ button.

I’ll just pop back to the sales order I’ll post the remainder of the sales order delivery, and create another invoice.

When I post the second product receipt on the purchase order the system still defaults the Product receipt delivery note number – and helpfully it’s showing the correct one:

Just to be clear – on the sales order we can see we have two delivery notes:

Anyway – post the purchase order product receipt, and then post the invoice.

Once again the system’s defaulting the Invoice number, Delivery note number and Invoice total:

But as I said in the introduction, the scenario above isn’t actually a realistic one. What happens if you have multiple sales order delivery notes / invoices posted before you receive any products against the purchase order?. In this example I’ve posted three sales order delivery notes:

And three corresponding sales order invoices:

But I haven’t yet done any product receipts on my purchase order. When I start to do product receipts the system defaults one of the delivery note numbers – but it’s not necessarily the one I want:

In this case you have to manually enter the delivery note number (and of course set the appropriate receipt quantities on the Lines tab). Then post the product receipt.

Next we’re going to post the purchase order invoice – and just to reprise, here are the sales order invoices:

Now let’s try to post the invoice for the first sales order delivery note / purchase order product receipt:

Everything has defaulted through correctly – except that the system’s defaulted the wrong sales order invoice number. Posting gives this error:

That’s pretty scary – but fortunately the fix is simplicity itself. All that has gone wrong is that the system’s defaulted the wrong sales order invoice number – let’s try again, and this time, manually set the invoice number to match the quantities / amounts on the purchase order invoice:

Success:

That’s pretty neat.

Intercompany master planning in AX 2012

Intercompany master planning links individual company specific master scheduling master plans. It’s used in a variety of scenarios, for instance, you might have a single manufacturing company that manufactures products which are sold through subsidiary ‘sales’ companies. Here in New Zealand we often see this pattern and most typically the sales company is located overseas. Another common pattern is a head office that performs a consolidated purchasing function for a group – perhaps each branch or subsidiary is setup as a separate Dynamics AX company.

To make this work we need master scheduling setup in each company – and we link the companies by setting up an Intercompany vendor in the downstream ‘selling’ company. The intercompany vendor in the downstream selling company refers to an intercompany customer in the upstream supply company. (At this point, it doesn’t matter whether the upstream supply company is buying or making the products for the downstream company).

An aside: ‘Upstream’ and ‘Downstream’ is APICS terminology that was introduced into intercompany master planning in AX 2012. Moving upstream you’re moving away from the ultimate end customer towards producers and vendors – downstream you’re moving towards your customers.

In the demo data Hyper-V we have a selling company DEMF (Contoso Entertainment Systems Germany) and a supply company USMF (Contoso Entertainment Systems USA). The Intercompany vendor in DEMF is US-001, and the Intercompany setup links this to customer DE-001 in USMF. Procurement and sourcing > Common > Vendors > All vendors > General > Set up > Intercompany:

Let’s just step through the Intercompany setup – the first thing to note is that on the Trading relationship tab (above) the relationship is flagged as ‘Active’ – forgetting to do that is very frustrating.

The Purchase order policies tab lets you define whether you can edit the prices on the intercompany purchase order – mostly I see this being disabled, because the purchase price is set by the upstream selling company (but you have the option of setting the purchase price from the buying trading partner):


The Purchase value mapping tab lets you define whether you’re using the actual values or External codes for some fields that are copied from the intercompany purchase order to the intercompany sales order (or vice versa):


The default value when you create an intercompany trading relationship for these fields (and the Sales value mapping fields) is ‘Not specified’ – but if you leave that set, you’ll get an error when you try to create intercompany sales/purchase orders.

The purchase agreement tab is pretty self-explanatory:


I haven’t come across an intercompany purchasing relationship that uses purchase agreements yet, but I’m sure they’re out there somewhere.

The sales order policies tab is almost the mirror image of the Purchase order policies tab:


But I’d just like to notice a couple of options. The first option is ‘Sales order numbering’. Here, you can specify the numbering of an intercompany sales order created when you create intercompany purchase orders. Next, you have a ‘Unit price equal to cost price’ flag – that sets the sales price to the inventory cost when the sales order is delivered. If you’re running with standard costs, that means that there’s no intercompany sales margin – but if you’re using FIFO or Weighted average you might see some margins generated by inventory cost revaluations.

The other important options here are the ‘Lines > Batch number’, and ‘Lines > Serial number’ flags. With these set the batch numbers (or serial numbers) issued to the intercompany sales order are transferred automatically to the intercompany purchase order. But note that in the case of the batch numbers, the information on the selling company’s Inventory batch master (like manufacturing and expiry dates) isn’t copied into the buying company.

Moving on, we have a Sales value mapping tab:


And a Sales agreement polices tab:


And one final note about the intercompany trading relationship setup – in AX2012 you can perform this setup from either side of the relationship – that is you can be logged into the downstream sales company and setup from the intercompany vendor, or you can be logged into the upstream supply company and do the setup from the intercompany customer.

Let’s check that this setup is working – we need a product which has been released into both companies, in the demo data D0001 fits the bill:


So in the DEMF company let’s create a purchase order for our US-001 vendor:


So far so good – when we create an intercompany purchase order the system creates an intercompany sales order.

Let’s add the item to the purchase order:


The ‘Manage’ tab shows a short-cut button that’ll take us directly to the intercompany sales order. (Incidentally the last two versions of the demo Hyper-V images seem to be a bit reluctant to open sales orders sometimes, so if you’re following this in a demo image and it crashes just re-start Dynamics AX and continue):


As we’d expect, (and shown above) the intercompany sales order demand is seen by master planning in the supply company – but that’s not really intercompany master planning.

Jump back into the buying company and setup a Demand forecast for that item. Product information management > Common > Released products > Plan > Forecast > Demand forecast:


We’ll check that master planning is going to generate planned purchase orders (on the Default order settings):


And set the intercompany vendor as the primary vendor for this item:


One final check – check that the forecast is processed by master planning by updating the item’s net requirements (I’m working in the CU9 demo Hyper-V image and at this point I had to define ‘Working times’ for the Standard calendar in the DEMF company):


Alles in ordnung. In the static master plan, master plan 10, we have our demand forecast generating planned purchase orders.

Two final bits of setup – first we need to check that in the USMF company the master plan we’re going to use is setup to inherit demand from the buying company. Master planning > Setup > Plans > Master plans:


Pretty obvious. We’ve switched on intercompany master planning and linked to the static plan in the DEMF company.

The final bit of setup is an Intercompany planning group. That tells the system which master plans to process, and in which sequence. In our simple example we need to process the master plan in the downstream selling company (to generate our intercompany demands) before we process the upstream supply company. Master planning > Setup > Intercompany planning groups:


Now we are ready to run Intercompany master scheduling (which of course, is normally setup up as a recurring batch job, just like single company master scheduling). Master planning > Periodic > Intercompany master scheduling:


So we’re selecting an Intercompany planning group – no surprise there, but we’re also asked to enter a ‘Number of iterations’. In our current simple example we only need to process each master plan once, so one iteration is sufficient – but I worked with a company which had two factories, and each supplied both finished goods and intermediates to the other factory, so a complete generation of the master plans required two iterations. For the second and subsequent iterations of the plans you’re able to use Net change or Regenerative processing. Net change will be much faster, but if you use Net change, your planners might need to group planned orders before firming them.

After the intercompany master scheduling has run, Net requirements shows the planned intercompany demand in the USMF company – reflecting the planned purchase orders in the DEMF company:


But of course, it’s not just Net requirements that shows the intercompany demands. There’s an inquiry at Master planning > Common > Intercompany supply and demand:


And more specific inquires at Master planning > Inquires > Incoming planned intercompany demand, and Master planning > Inquires > Outbound planned intercompany demand. Finally Multi-level pegging (available from various forms) shows intercompany demands – in a format very similar to Inquires > Explosion: