Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Display Item Cost Price & Resource Process Price Method at ProdCalcTrans

Posted on by 529

Hi All,

I am trying to get the Cost prices for all item\Resource from ProdCalcTrans Table in order to display it in the Cost Estimates and Costing Reports.

I have made I simple code base on other display methods on the same Table but I only get the Resource Process Id cost price (And the actual one) but not the Item cost

I would like to have the Prices at the time the Report As Finished was made (if possible)

this is my code so far:

your help is greatly appreciated!

display CostPrice AKS_ItemCostPrice()
{
    RouteCostCategoryIdProcess  processCatId;
    WrkCtrTable                 wrkCtrTable;
    InventTable                 inventTable;

    if(this.isItemCost())
    {
       return InventTable.costPcsPrice(this.InventDimId,null,null,ProdTable::find(this.TransRefId).StUpDate,false);
    }
    else if(this.isResourceCost())
    {
        select firstonly ProcessCategoryId from wrkCtrTable
            where wrkCtrTable.WrkCtrId == this.Resource;

        return  RouteCostCategory::find(wrkCtrTable.ProcessCategoryId).CostPrice;
    }

    return 0;
}

  • Suggested answer
    CBNestor Profile Picture
    CBNestor 529 on at
    RE: Display Item Cost Price & Resource Process Price Method at ProdCalcTrans

    Hi Gunjan, thanks for reply,

    But you have to remember that the cost amount is a sum of all transactions from cost categories used when workers are startings new jobs and is stored in the ProdRouteTrans. The ecuation is not that straightforward. This for the Resorce part, as for the Item price I think better is CostAmount/ConsumpVariable

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Display Item Cost Price & Resource Process Price Method at ProdCalcTrans

    There is a field available in ProdCalcTrans - CostAmount. To get the cost price of the item in the transaction (Reported as finished, as per your requirement), you can use ProdCalcTrans .CostAmount/ProdCalcTrans.Qty.

  • CBNestor Profile Picture
    CBNestor 529 on at
    RE: Display Item Cost Price & Resource Process Price Method at ProdCalcTrans

    Hi Gunjan, Just Adding a new Display Method to the ProdCalcTrans Table

    \Data Dictionary\Tables\ProdCalcTrans

    pastedimage1597668973390v2.png

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Display Item Cost Price & Resource Process Price Method at ProdCalcTrans

    Nestor,

    Could you please guide me to the form form which you are trying to retrieve the cost price? As it can be setup at multiple places.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans