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;
{
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;
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();
inventsum.doUpdate();
}
ttscommit;
Thankyou all and everyone have a good Festive
break.
Rocco
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.