Dear Experts,
I am trying to calculate the cost amount of every item based on its quantity in Bin Contents. I want to use this function in "Bin Contents" page.
So, I have developed the function in "Bin Contents" page. The name is 'CalculateCostAmount'
My complete code is for function "CalculateCostAmount"
recValueEntry.RESET;
recValueEntry.SETRANGE("Location Code","Location Code");
recValueEntry.SETRANGE("Variant Code","Variant Code");
recValueEntry.SETRANGE("Item No.","Item No.");
CostAmount :=0;
IF recValueEntry.FINDSET THEN
REPEAT
CostAmount :=(recValueEntry."Cost Amount (Expected)")/(recBinContents.Quantity);
//IF INSERT THEN;
UNTIL recValueEntry.NEXT = 0;
EXIT(CostAmount);
Please give some suggestion.
MKY