Hi,
 
First of all, The system will automatically take wgt.avg.costprice in movemnt 
journal only when the qty is negative. becasue it is going out of Inventory. If 
it is positive qty it will take the base cost price.
 
I have done this thru code .Using code just calculate Costamount alone. Dont 
calculate costprice .
 
Thanks
Manoj

--- On Wed, 6/1/10, SHARZA <hsha...@gmail.com> wrote:


From: SHARZA <hsha...@gmail.com>
Subject: [Axapta-Knowledge-Village] CostPrice Rounding Issue (FYI)
To: Axapta-Knowledge-Village@yahoogroups.com
Cc: huss...@al-jazeerapaints.com
Date: Wednesday, 6 January, 2010, 3:06 PM


  





Dear All,
I find a strange Cost Amount issue which I want to share with you all, 
 
The client want to get the wt.avg. cost price while creating the lines in 
Inventory Journal Movements.
So I add a simple code to resolve the issue.
 
          InventJournalTrans. CostPrice = InventSum::find( InventJournalTra 
ns.ItemId, InventJournalTrans. InventDimId) .costPricePcs( );
          InventJournalTrans. CostAmount= InventJournalTrans. CostPrice * 
InventJournalTrans. CostPrice;
 
But the result was strange 
 
eg. 5.26 (Cost Price) * 165(Quantity) = 867.74 (Cost Amount) where as the value 
should come 867.90 (Cost Amount)
Due to this issue client can't post the movement, info log shows "Invalid 
rounding error " 
 
So unless I change the coding to get the CostAmount directly from a method 
building in AX it didn't work.
          InventJournalTrans. CostPrice = InventSum::find( InventJournalTra 
ns.ItemId, InventJournalTrans. InventDimId) .costPricePcs( );
          InventJournalTrans. CostAmount= InventJournalTra ns.calcCostAmoun t();
But my question is why it so, why the multiplication doesn't give correct 
result when done through code and by not using the standard AX calc method.
 
 
Hussain Sharza
0563884455 (KSA)
 







      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Reply via email to