...
IntrastatJnlBatch2.SETRANGE("EU Service",TRUE);
IntrastatJnlBatch2.SETRANGE("Corrective Entry",FALSE);
IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
END;
BEGIN
END.
}
RDLDATA
{
...
...
IntrastatJnlBatch2.SETRANGE("EU Service",TRUE);
IntrastatJnlBatch2.SETRANGE("Corrective Entry",FALSE);
IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
END;
// Add the following lines.
LOCAL PROCEDURE CalcTotalItemChargeAmt@1130002();
VAR
ValueEntry2@1130001 : Record 5802;
ActualAmount@1130002 : Decimal;
BEGIN
ValueEntry2.COPYFILTERS(ValueEntry);
ValueEntry2.SETRANGE("Invoiced Quantity",0);
ValueEntry2.SETRANGE("Item Ledger Entry Type",ValueEntry."Item Ledger Entry Type");
ValueEntry2.SETRANGE("Item Ledger Entry No.");
ValueEntry2.SETFILTER("Item Charge No.",'<>%1','');
ValueEntry2.SETRANGE("Document No.",ValueEntry."Document No.");
IF ValueEntry2.FINDSET THEN BEGIN
REPEAT
ActualAmount := GetActualAmount(ValueEntry2);
IF IntrastatJnlBatch."Amounts in Add. Currency" THEN
ActualAmount :=
CurrExchRate.ExchangeAmtLCYToFCY(
ValueEntry2."Posting Date",GLSetup."Additional Reporting Currency",
ActualAmount,AddCurrencyFactor);
TotalAmt := TotalAmt + ActualAmount;
UNTIL ValueEntry2.NEXT = 0;
END;
END;
LOCAL PROCEDURE GetActualAmount@1130001(ValueEntry2@1170000000 : Record 5802) : Decimal;
BEGIN
CASE ValueEntry2."Item Ledger Entry Type" OF
ValueEntry2."Item Ledger Entry Type"::Sale:
EXIT(- ValueEntry2."Sales Amount (Actual)");
ValueEntry2."Item Ledger Entry Type"::Purchase:
EXIT(ValueEntry2."Cost Amount (Actual)");
END;
END;
// End of the added lines.
BEGIN
END.
}
RDLDATA
{
...