Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

AX 2012 R3 CU8. Problem with actual Discount Amount calculation in Purchase Orders

$
0
0

I need to confirm if this is a bug in CU8. In order to reproduce this error, I just create a Purchase Line, and I apply a Line Discount and also a Line Percent Discount. So for example I Line Discount 2 euros and also apply a 10% discount in the same line.

The invoice is correct, net price, etc. However, when I go to see the General Ledger records that have been created, there is a mess, the amounts registered at ledger level are not equivalent to the Invoice Amounts.

We started debugging this issue, and found that in CU8 there has been a total redesign of class "VendorInvoiceLineSourceDocLineItem" method "calculateSourceDocumentAmountMap"

Here we have a variable called a actualDiscountAmount, that is now  (CU8 SYP layer) calculated with this code:

actualDiscountAmount =
                -Currency::amount(
                    (vendInvoiceLineMap.Qty * vendInvoiceLineMap.pdsPurchPrice() * vendInvoiceLineMap.discPercent()) / (100 * (vendInvoiceLineMap.PriceUnit ? vendInvoiceLineMap.PriceUnit : 1.0)),
                    vendInvoiceLineMap.CurrencyCode);

Nothing to do with the calculation in SYS layer.  I think the problem is that LineDisc is not included in this calculation, but would like to confirm with you community members before making changes to the standard code.

Thanks!


Viewing all articles
Browse latest Browse all 72043


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>