Friday, 6 March 2009

Helpful Purchase Order and Sales order info

When working with a client, and doing data imports of their data into the new Ax instance you might have to bring in open purchase orders or sales orders. The great thing about this is that both of these are very similar in how they function, look, act, etc. One of the key things to understand when bringing in, for example, purchase orders is the Quantity tab and the data that lives there. The easiest peice about this is the actual Quantity or Purchase Quantity. The thing to keep in mind here when mapping and filling this field with data, is that in reality it's two fields: QtyOrdered, PurchQtyThis is a key peice of data that you must first fill to build everything in the Quantity tab from. The next field that needs to be explained and understood is the Deliver Remainder field on the Qty tab. This field specifys how much of the purchase qty is left to be delivered to the specified delivery address. As long as there is data in this field then the given purchase order is still marked as Open. This field, is actually two fields in the table: RemainInventPhysical, RemainPurchPhysicalOur next field to look at is the Invoice Remainder. This field tells you how much of the purchase qty, that has been recieved, but not yet been invoiced. This field is actually one field called: RemainPurchFinancial.The next two fields we are going to talk about is the Invoiced and Recieved fields in the tab. These fields are actual not fields in the PurchLine database, but rather are driven from Display methods off of the PurchLine Table itself. These display methods are called: Recieved = PurchLine.receivedInTotal(), Invoiced = PurchLine.invoicedInTotal(). What you need to keep in mind here is that these fields are acutally built off of the vendPackingSlipTrans table (Recieved) and the vendInvoiceTrans table (Invoiced). These tables must have values in them, as they represent actual receiving actions doen to the given purchase order line, and invoicing done. This is something that can be tricky, and must be done correctly, as if done wrong you can have incorrect data in these two tables that can cause reports to be off, etc. A lot of people / companies at this point decide to back out of the recieved and invoiced values and then for each open PO, redo these actions from within axapta in order to make sure all reporting and values are accurate and percise to maintain data integrity. The last field we will review, which happens to be the first field in the tab is the Recieve Now field. This field, when supplied with a value, can be used to mark a given qty for the specified line, during a packing slip update to be marked as recieved. Now we can go further into the details of this and how each field pertains to different actions, etc. What most important to understand is this base knowledge though and from there build upon that during your use of Ax. To Re-cap below is a list of these Field names, and then there actual field name in the table. Also I have included the logic for how Ax determines the status of a given PO or SO:1. Quantity = PurchLine.QtyOrdered, PurchLine.PurchQty2. Deliver Remainder = PurchLine.RemainInventPhysical, PurchLine.RemainPurchPhysical3. Invoice Remainder = PurchLine.RemainPurchFinancial4. Invoiced = PurchLine.invoicedinTotal() [Display Method]5. Recieved = PurchLine.recievedInTotal() [Display Method]Status Logic:If anything exists in the Deliver Remainder then the PO is open.If Nothing exsists in the Deliver Remainder, and all Qty Ordered exist in the Recieved then the PO is recievedIf all qty has been recieved, and all has been invoiced, then the PO is invoiced.

P/S: There is a bug in Axapta which will be fixed if you know above useful information!!!