RE: Posting definitions, Posting definitions for purchase order
Hoa,
Posting definitions is an alternative to the posting profiles, and is only available for documents that have implemented the source document/accounting framework. When defining the posting definitions, there are two basic scenarios:
1 - Documents that MAY post to GL - Today in AX this includes the purchase requisition and the purchase order. For most organizations, these documents don't post to GL, but if you are a public sector organization, then you can enable posting of pre-encumbrance (Purch Req) and encumbrance (purch order). When you define the posting definitions for these documents, you have to define BOTH the DR and CR in the Generated entries section. This is because the PR and PO don't post to the actual asset/expense ledger account on the Accounting distributions, but instead is just used as input for how to encumber the amount of the purchase. The posting definition you defined was specifically for the POs posting, and NOT the PO invoice posting. This is why it is failing. You are missing the posting definition setup for the vendor invoice. See my next point for this.
2 - Documents that always post to GL - This includes all your other typical documents, such as invoices that must always post to GL. When you define the posting definitions for these documents, half of the accounting entry will be the ledger account on the accounting distributions (the asset/expense). This ledger account(s) becomes your match criteria in the posting definitions. You need to then define what the generated entry will be, which is the other half of your accounting entry. For the vendor invoice this would be your AP ledger account. In public sector organizations, they may even have an additional two ledger accounts (posting an additional DR/CR for the same amount) in the Generated entries.
Based on this I hope you understand that you need to define a posting definitions specifically for the vendor invoice, NOT the purchase order.
Thanks
Kristi