Monday, January 16, 2017

On Hand Opening Qty for item wise and dimension Wise by date

Onhand Opening Qty

// Opening Qty for item wise and dimension Wise

enable flag in InventDimParm

Class -->InventSumFinancial
Class--> InventSettlement

static void Fcc_OnhandOpenQTyTest(Args _args)
    InventDim           inventDimSum;
    InventDimParm       inventDimParm;
    InventSum           inventSum;
    InventSumFinancial  inventSumFinancial;
    TransDate           Start = mkDate(1,1,2016);
    Qty                 balanceQty;
    Amount              totalBal;
    Amount              amount;
    inventDimParm.ItemIdFlag            = NoYes::Yes;
    inventDimParm.InventLocationIdFlag  = NoYes::Yes;
    inventDimParm.InventSiteIdFlag  = NoYes::Yes;
    while select inventSum
            where inventSum.ItemId == "CW-AR-PCB-4CX25MM"
        inventDimSum = inventSum.inventDim();
        inventSumFinancial                  = InventSumFinancial::newSumReport(Start-1, inventSum, inventDimSum, inventDimParm);
        balanceQty                          = inventSumFinancial.qty(); // on hand Physical Qty
        totalBal                            = inventSumFinancial.value(); // On Hand Financial COst Amount Posted
        amount = InventSettlement::dateCostAmountAdjustment(Start -1 ,inventSum.ItemId,inventDimSum,inventDimParm); // Cost Amount Adjustment
        info(strFmt("%1,%2,  %3,%4,%5",inventSum.ItemId,balanceQty,totalBal,inventSum.costPricePcs(),amount));

No comments:

Post a Comment