...
AdjAmount := AdjAmount + OldAdjAmount;
TempDtldCustLedgEntry."Amount (LCY)" := -OldAdjAmount;
TempDtldCustLedgEntry."Entry Type" := TempDtldCustLedgEntry."Entry Type"::"Unrealized Gain";
HandleCustDebitCredit(
Amount,"Amount (LCY)",Correction,TempDtldCustLedgEntry."Amount (LCY)");
TempDtldCustLedgEntry.INSERT;
NewEntryNo := NewEntryNo + 1;
AdjExchRateBufferUpdate(
"Currency Code",Customer."Customer Posting Group",
// Delete the following line.
0,0,-OldAdjAmount,0,-OldAdjAmount,DimEntryNo,PostingDate2,Customer."IC Partner Code");
Adjust := FALSE;
END;
END;
END;
END;
IF OldAdjAmount < 0 THEN BEGIN
...
...
AdjAmount := AdjAmount + OldAdjAmount;
TempDtldCustLedgEntry."Amount (LCY)" := -OldAdjAmount;
TempDtldCustLedgEntry."Entry Type" := TempDtldCustLedgEntry."Entry Type"::"Unrealized Gain";
HandleCustDebitCredit(
Amount,"Amount (LCY)",Correction,TempDtldCustLedgEntry."Amount (LCY)");
TempDtldCustLedgEntry.INSERT;
NewEntryNo := NewEntryNo + 1;
AdjExchRateBufferUpdate(
"Currency Code",Customer."Customer Posting Group",
// Add the following line.
0,0,-OldAdjAmount,-OldAdjAmount,0,DimEntryNo,PostingDate2,Customer."IC Partner Code");
Adjust := FALSE;
END;
END;
END;
END;
IF OldAdjAmount < 0 THEN BEGIN
...
...
AdjAmount := OldAdjAmount + AdjAmount;
TempDtldCustLedgEntry."Amount (LCY)" := -OldAdjAmount;
TempDtldCustLedgEntry."Entry Type" := TempDtldCustLedgEntry."Entry Type"::"Unrealized Loss";
HandleCustDebitCredit(
Amount,"Amount (LCY)",Correction,TempDtldCustLedgEntry."Amount (LCY)");
TempDtldCustLedgEntry.INSERT;
NewEntryNo := NewEntryNo + 1;
AdjExchRateBufferUpdate(
"Currency Code",Customer."Customer Posting Group",
// Delete the following line.
0,0,-OldAdjAmount,-OldAdjAmount,0,DimEntryNo,PostingDate2,Customer."IC Partner Code");
Adjust := FALSE;
END;
END;
END;
END;
IF NOT Adjust THEN BEGIN
...
...
AdjAmount := OldAdjAmount + AdjAmount;
TempDtldCustLedgEntry."Amount (LCY)" := -OldAdjAmount;
TempDtldCustLedgEntry."Entry Type" := TempDtldCustLedgEntry."Entry Type"::"Unrealized Loss";
HandleCustDebitCredit(
Amount,"Amount (LCY)",Correction,TempDtldCustLedgEntry."Amount (LCY)");
TempDtldCustLedgEntry.INSERT;
NewEntryNo := NewEntryNo + 1;
AdjExchRateBufferUpdate(
"Currency Code",Customer."Customer Posting Group",
// Add the following line.
0,0,-OldAdjAmount,0,-OldAdjAmount,DimEntryNo,PostingDate2,Customer."IC Partner Code");
Adjust := FALSE;
END;
END;
END;
END;
IF NOT Adjust THEN BEGIN
...