web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

failure posting intercompany purchase order through Code

(0) ShareShare
ReportReport
Posted on by 1,330

Hi,

It's all in x++ customization. user imports a list of orders.

I have created  purchase order which in turn creates intercompany sales order

then i m posting sales order invoice and finally i am trying to post the purchase order which throws me below error

Customer tax invoice in company XYZ= 0.00, purchase is updated with 13,080.35.

This error is located in Class PurchInvoiceJournalCreate. I am not sure why CustINvoiceJourLocal.InvoiceAmount is 0.  When i posted sales order , it must have the amount picked up from the corresponding purchase order and used the same in the sales invoice created in CustInvoiceJournal table.

Any help would be appreciated. 

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,284 on at

    When you try to invoice PO it checks if intercompany SO invoice has same value. In your case value is 0 and PO invoice is 13,080.35

    As you said you invoice SO first so why did you post it for 0 ? 

  • mail2vd Profile Picture
    1,330 on at

    what i found is that, when it creates purchase order, it has a line with GST Group as 'FREE' and it means there won't be any sales tax on it.

    but while creating corresponding sales order (standard AX Code), it doesn't keep the same GST Group for the sales Line. and hence the difference in the amount

    I tried to create from AX Client and it has the same behaviour.

    I feel i need to modify the standard ax code which will force ax to use the same GST  between those purchline and salesline.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Just be aware that tax group is company specific so you have to have same group in both companies if you going to change code.

    I think AX takes GST group from item and customer (functional guys will correct me if i'm wrong) so you can change setup instead of changing code.

  • mail2vd Profile Picture
    1,330 on at

    but when i create PO from the AX client,   I select GST myself for a purch line. so that wouldn't be item or company specific. it's as per user's wish. isn't it?

    So when it creates sales order line in intercompany for that PO, it is expected that it follows what's in there for purch line.

  • Mea_ Profile Picture
    60,284 on at

    When you select item in SO line it will take TaxItemGroupId from item. TaxGroup AX inits base on SO header fields. As a user you can change it them manually.

    However they are company specific so if in company A you have group "free' you may not have this group in company B so you cannot simply change code to set same group through intercompany chain

  • mail2vd Profile Picture
    1,330 on at

    what if i have "FREE" TaxGroup in both Company A and B, now how  and where intercompany SO/PO creation process matches them and pick them in the lines?

    I mean how do I resolve my issue then.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans