OnPreReport=BEGIN
CustFilter := Customer.GETFILTERS;
ItemLedgEntryFilter := "Value Entry".GETFILTERS;
PeriodText := "Value Entry".GETFILTER("Posting Date");
IF PrintToExcel THEN
MakeExcelInfo;
END;
OnPreReport=BEGIN
CustFilter := Customer.GETFILTERS;
ItemLedgEntryFilter := "Item Ledger Entry".GETFILTERS;
PeriodText := "Item Ledger Entry".GETFILTER("Posting Date");
IF PrintToExcel THEN
MakeExcelInfo;
END;
{ 10 ;TextBox ;0 ;0 ;18150;423 ;SourceExpr="Value Entry".TABLECAPTION + ': ' + ItemLedgEntryFilter;
DataSetFieldName=Value_Entry__TABLECAPTION__________ItemLedgEntryFilter }
{ 10 ;TextBox ;0 ;0 ;18150;423 ;SourceExpr="Item Ledger Entry".TABLECAPTION + ': ' + ItemLedgEntryFilter;
DataSetFieldName=Value_Entry__TABLECAPTION__________ItemLedgEntryFilter }
DataItemIndent=1;
DataItemTable=Table5802;
DataItemTableView=SORTING(Source Type,Source No.,Item No.,Posting Date)
WHERE(Source Type=CONST(Customer));
OnPreDataItem=BEGIN
ValueEntryBuffer.RESET;
ValueEntryBuffer.DELETEALL;
NextEntryNo := 1;
END;
OnAfterGetRecord=BEGIN
ValueEntryBuffer.SETRANGE("Item No.", "Item No.");
IF NOT ValueEntryBuffer.FIND('-') THEN BEGIN
ValueEntryBuffer.INIT;
ValueEntryBuffer."Entry No." := NextEntryNo;
ValueEntryBuffer."Item No." := "Item No.";
ValueEntryBuffer.INSERT;
NextEntryNo := NextEntryNo + 1;
END;
ValueEntryBuffer."Invoiced Quantity" := ValueEntryBuffer."Invoiced Quantity" + "Invoiced Quantity";
ValueEntryBuffer."Sales Amount (Actual)" := ValueEntryBuffer."Sales Amount (Actual)" + "Sales Amount (Actual)";
ValueEntryBuffer."Cost Amount (Actual)" := ValueEntryBuffer."Cost Amount (Actual)" + "Cost Amount (Actual)";
ValueEntryBuffer."Discount Amount" := ValueEntryBuffer."Discount Amount" + "Value Entry"."Discount Amount";
ValueEntryBuffer."Cost Amount (Non-Invtbl.)" := ValueEntryBuffer."Cost Amount (Non-Invtbl.)" + "Cost Amount (Non-Invtbl.)";
ValueEntryBuffer.MODIFY;
END;
ReqFilterFields=Item No.,Inventory Posting Group,Posting Date;
DataItemLink=Source No.=FIELD(No.),
Posting Date=FIELD(Date Filter),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter);
DataItemIndent=1;
DataItemTable=Table32;
DataItemTableView=SORTING(Source Type,Source No.,Item No.,Variant Code,Posting Date)
WHERE(Source Type=CONST(Customer));
OnPreDataItem=BEGIN
ValueEntryBuffer.RESET;
ValueEntryBuffer.DELETEALL;
NextEntryNo := 1;
END;
OnAfterGetRecord=BEGIN
ValueEntryBuffer.SETRANGE("Item No.", "Item No.");
IF NOT ValueEntryBuffer.FIND('-') THEN BEGIN
ValueEntryBuffer.INIT;
ValueEntryBuffer."Entry No." := NextEntryNo;
ValueEntryBuffer."Item No." := "Item No.";
ValueEntryBuffer.INSERT;
NextEntryNo := NextEntryNo + 1;
END;
CALCFIELDS("Sales Amount (Actual)","Cost Amount (Actual)","Cost Amount (Non-Invtbl.)");
ValueEntryBuffer."Invoiced Quantity" := ValueEntryBuffer."Invoiced Quantity" + "Invoiced Quantity";
ValueEntryBuffer."Sales Amount (Actual)" := ValueEntryBuffer."Sales Amount (Actual)" + "Sales Amount (Actual)";
ValueEntryBuffer."Cost Amount (Actual)" := ValueEntryBuffer."Cost Amount (Actual)" + "Cost Amount (Actual)";
ValueEntry.SETCURRENTKEY("Item Ledger Entry No.");
ValueEntry.SETRANGE("Item Ledger Entry No.","Entry No.");
IF ValueEntry.FINDSET THEN
REPEAT
ValueEntryBuffer."Discount Amount" := ValueEntryBuffer."Discount Amount" + ValueEntry."Discount Amount";
UNTIL ValueEntry.NEXT = 0;
ValueEntryBuffer."Cost Amount (Non-Invtbl.)" := ValueEntryBuffer."Cost Amount (Non-Invtbl.)" + "Cost Amount (Non-Invtbl.)";
ValueEntryBuffer.MODIFY;
END;
ReqFilterFields=Item No.,Posting Date;
DataItemLink=Source No.=FIELD(No.),
Posting Date=FIELD(Date Filter),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter);