I am working on SSRS Report that show the accrual in AX for purchase order.
When going to purchase>Product Receipt->Voucher, I can't find relation between purchase order line and Voucher. Note that Product receipt in VendPackingSlipJour contain purchId and GeneralJournalEntry contain number of voucher.
Kindly, can anyone help me how I can find the relation between the two tables to get the accrual of purchase order.
It goes from VendPackingSlipJour -> VendPackingSlipVersion -> SubledgerVoucherGeneralJournalEntry -> GeneralJournalEntry
It seems there may be more than one VendPackingSlipVersion record per VendPackingSlipJour, then use the VendPackingSlipVersion.findLatest method to find the relevant one.
This paper may be of help regarding the ledger rubbish in AX 2012.
Related
This happens in Accounts Payable -> Journals -> Payments -> Payment Journal.
I choose to see the Lines for a journal and from Functions I select Settlement. I am not sure if this is the same for everyone else.
So, when clicking Settlement, VendOpenTrans opens. I need to iterate over it, and Mark the records according to the invoice of the previously selected LedgerJournalTrans field.
First of all I have to check the VendOpenTrans fields which I am not able to accomplish.
I have added the following piece of code in the init of VendTransOpen:
VendTrans vt;
vt = vendTransOpen_ds.getFirst(true) as VendTrans ;
while (vt)
{
//Do your thing
vt= vendTransOpen_ds.getNext() as VendTrans ;
}
No elements seem to be present in the vendTransOpen_ds..
Can someone give me a hint about this?
Update 1:
Found this :
Understanding the Settlement Mechanism in Microsoft Dynamics AX
and
Automatic mark a Settlement Transactions on a Payment Journal in AX 2012
I didn't think it would be so damn difficult.. I will start digging tomorrow.
Several things are wrong, but probably my #2 is your main problem.
If you place this code in the init method, the query hasn't been executed yet, so nothing will be there. See https://msdn.microsoft.com/en-us/library/aa608211.aspx
Your code will never enter while (vt) because vt will never have a value as written because VendTrans and VendTransOpen are two different tables that don't support inheritance.
The only reason vt = vendTransOpen_ds.getFirst(true) as VendTrans ; doesn't throw an error is because FormDataSource.getFirst()/getNext() returns a Common table record.
What Jan said too.
First off, use getFirst(0) before using getNext().
The zero indicates you want all records rather than marked.
Search, use cross reference tool, or google to get lots of references for the use of these functions.
I've been instructed to create a customization on how the Unit Price (Purchline.PurchPrice) is calculated.
Right now when I'm creating a new purchase order and select an item, it simply pulls from the pricing from the released products for that particular item.
For my customization, I'm going to be using 3 variables to determine the pricing.
1: ItemId
2: Current Session Date
3: Customized Field in the Purchase Header
As such, I'll need access to purchline for the ItemId on the current line, and access to purchtable to access my field in the header.
Right now there is a big process for how the pricing gets pulled from released products, how the system checks for discounts, etc.
My question is, can anyone suggest the best class/location to check and modify where my final PurchPrice field gets set and inserted into purchline?
I need this to be basically the last part of the process of how this PurchPrice gets calculated. I've looked around in the PriceDisc & PriceConvert classes, SalesPurchLine map, the modified method of the ItemId field of the form.
AxPurchline doesn't seem to be triggering at all when I put breakpoints in them and create new purchase order lines.
Any help, insight or advice on where it would be the best to make logic changes for the PurchPrice field would be greatly appreciated.
Thanks in advance!
The table Purchline actually has a method called setPriceDisc where the price agreement is set and the line amount is adjusted.
This seems to be the last place where PurchLine.PurchPrice is set.
In Amazon MWS API, when requesting report of type "_GET_MERCHANT_LISTINGS_DATA_"
What is the difference between the returned attributes:
product-id
listing-id
asin1
I also have tried to find any reference for the tab-delimited report types, but it seems to be scattered all around the web. The best description I found was part of the instructions for the Amazon Inventory Loader. (Note: may require a MWS seller login, the corresponding XLS does not have all columns described on the linked webpage) That page should answer most of your questions.
Since the link above might require a login, here's a short description on what these columns do:
asin1 refers to an item's Amazon Standard Identification Number. Every item on Amazon has such a number, there even is a Wikipedia entry describing what it is.
product-id along with product-id-typerefers to the item's non-Amazon standard identification number, if such a thing exists (otherwise it'll contain a copy of the item's ASIN).
product-id-type=1 -> product-id is ASIN
product-id-type=2 -> product-id is ISBN.
product-id-type=3 -> product-id is UPC
product-id-type=4 -> product-id is EAN (now called GTIN)
sku is your own item identifier such as part number. You created the link between an ASIN and your own SKU by creating the product. (I know you didn't ask for this, but this is for the sake of completeness)
listing-id There does not seem to be a lot of documentation on what theses are. There is a page explaining how to find out an item's listing id. It does not say why you'd ever want to know, though. I assume a listing ID identifies a certain seller's (your) offer for a specific item, but all MWS requests I've ever done either required me to link to a ASIN or my own SKU, but there may be others that require this id.
Sidenote: I find it weird that a single listing-id may relate to more than one ASIN - otherwise, why are there columns named asin2 and asin3?
There is a new feature called Vendor Prepayments in AX 2012. It basically allows a company to prepay a vendor before the receipt of any goods. This was not there in AX 2009. So a user can basically attach a Prepayment record to a Purchase order and then post something called Prepayment invoice. When goods finally arrive, this Prepayment invoice is then applied to the "Real" Vendor invoice and settled. Its pretty straightforward and i guess logical.
My requirement is to do this Prepayment Invoice posting by code in X++.
If i try to use the PurchFormLetter class like below, it will post the Real invoice, which wont be correct as in the case of prepayments, there is no inventory transactions.
purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);
purchFormLetter.update(purchTable,
'8001',
systemDateGet(),
PurchUpdate::All,
AccountOrder::None,
NoYes::No,
NoYes::Yes);
I have looked around in AX Dev Guides, on google, on blogs but no help.
Does anybody know this?
I believe you should look into PurchPrepayTable table logic and PurchPrepayTable form. If you are using a single prepayment for a single purchase order then you can link the prepayment with a purchase using PurchPrepayTable.PurchTable.
If you're willing to accomplish that by calling the X++ code, I would recommend:
Check if any PurchPrepayTable exists for the purchase order;
If it does -- update it (please make sure you run all validations before that);
If it does not -- create a new prepayment (please also refer to PurchPrepayTable table methods to make sure your values in prepayment pass all validations).
AX noob here.
I'd like to change the Customer Aging Report so that in sorts by dollar amount rather than account number. How would I go about this? In the sorting tab, I don't see a value in the Field drop-down that would coincide with the dollar amount columns.
Correct, it is not possible.
There is no table holding the open balance, hence it is not possible to sort on that value.
I think you can use the MorphX auto query tool. Click "Select" on the customer aging report window. Then in the upper section under "Structure" where it shows the customer table. Right click and do 1:N and choose "Customer Transactions (Customer account)" to join to it. Then right click on that newly joined table, and choose 1:N and join "Open customer transactions".
Then on the sorting tab, you should be able to sort by the open transactions.
#Jan B. Kjeldsen, isn't the CustTransOpen table used specifically for this?