Hi all
I Need to create a Job that is Going to Check the PurchCostprice from the
Inventtablemodule against the Weightedcostprice in the System and then if
different Change the Inventsum.postedvalue to be the true purchcostprice *
the Posted Qty
I have the following but am losing direction. can anyone help
static void doupdate_InventSum_PostValue_Fix(Args _args)
{
Inventsum inventsum;
Inventtablemodule Inventtablemodule;
amount WeightedCost;
amount Actualpurchprice;
amount Actualpostedvaluediff;
ttsbegin;
while select forupdate Inventsum where inventsum.ItemId ==
inventtablemodule.ItemId
{
WeightedCost = inventsum.costPricePcs();
ActualPurchPrice = inventtablemodule.price;
if(Actualpostedvaluediff = weightedcost - ActualPurchprice) ; ????
inventsum.PostedValue = ActualPurchPrice * inventsum.PostedQty;
inventsum.doUpdate();
}
ttscommit;
Thankyou all and everyone have a good Festive break.
Rocco
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor |
Get unlimited calls to U.S./Canada |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.