...
{
DataItemIndent=2;
DataItemTable=Table27;
DataItemTableView=SORTING(No.);
PrintOnlyIfDetail=Yes;
// Delete the following line.
OnAfterGetRecord=BEGIN
IF NOT "Inventory Period".Closed THEN BEGIN
...
...
{
DataItemIndent=2;
DataItemTable=Table27;
DataItemTableView=SORTING(No.);
PrintOnlyIfDetail=Yes;
// Add the following lines.
OnAfterGetRecord=VAR
AvgCostEntryPoint@1004 : Record 5804;
BEGIN
// End of the lines.
IF NOT "Inventory Period".Closed THEN BEGIN
...
...
IF NOT "Inventory Period".Closed THEN BEGIN
// Delete the following line.
IF NOT "Cost is Adjusted" THEN
AddError(
STRSUBSTNO(
Text002,FIELDCAPTION("Cost is Adjusted"),TRUE,TABLECAPTION,"No."));
END;
END;
...
...
IF NOT "Inventory Period".Closed THEN BEGIN
// Add the following lines.
AvgCostEntryPoint.RESET;
AvgCostEntryPoint.SETCURRENTKEY("Item No.","Cost Is Adjusted","Valuation Date");
AvgCostEntryPoint.SETRANGE("Item No.","No.");
AvgCostEntryPoint.SETRANGE("Cost Is Adjusted",FALSE);
AvgCostEntryPoint.SETRANGE("Valuation Date",0D,"Inventory Period"."Ending Date");
IF NOT AvgCostEntryPoint.ISEMPTY THEN
// End of the lines.
AddError(
STRSUBSTNO(
Text002,FIELDCAPTION("Cost is Adjusted"),TRUE,TABLECAPTION,"No."));
END;
END;
...