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



Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to