You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, in issue 26861, I requested an OnPrepareTempVendLedgEntryOnBeforeTestPositive event in the PrepareTempVendLedgEntry procedure. Unfortunately, you implemented this event in the PrepareTempEmplLedgEntry procedure.
Could you please call the event OnPrepareTempVendLedgEntryOnBeforeTestPositive from procedure PrepareTempVendLedgEntry?
local procedure PrepareTempVendLedgEntry(var GenJnlLine: Record "Gen. Journal Line"; var NewCVLedgEntryBuf: Record "CV Ledger Entry Buffer"; var TempOldVendLedgEntry: Record "Vendor Ledger Entry" temporary; Vend: Record Vendor; var ApplyingDate: Date): Boolean
var
OldVendLedgEntry: Record "Vendor Ledger Entry";
PurchSetup: Record "Purchases & Payables Setup";
GenJnlApply: Codeunit "Gen. Jnl.-Apply";
RemainingAmount: Decimal;
IsHandled: Boolean;
Result: Boolean;
begin
IsHandled := false;
OnBeforePrepareTempVendLedgEntry(GenJnlLine, NewCVLedgEntryBuf, TempOldVendLedgEntry, Vend, ApplyingDate, Result, IsHandled);
if IsHandled then
exit(Result);
if GenJnlLine."Applies-to Doc. No." <> '' then begin
// Find the entry to be applied to
OldVendLedgEntry.Reset();
OldVendLedgEntry.SetLoadFields(Positive, "Posting Date", "Currency Code");
OldVendLedgEntry.SetCurrentKey("Document No.");
OldVendLedgEntry.SetRange("Document No.", GenJnlLine."Applies-to Doc. No.");
OldVendLedgEntry.SetRange("Document Type", GenJnlLine."Applies-to Doc. Type");
OldVendLedgEntry.SetRange("Vendor No.", NewCVLedgEntryBuf."CV No.");
OldVendLedgEntry.SetRange(Open, true);
OnPrepareTempVendLedgEntryOnAfterSetFilters(OldVendLedgEntry, GenJnlLine, NewCVLedgEntryBuf);
OldVendLedgEntry.FindFirst();
IsHandled := false;
OnPrepareTempVendLedgEntryOnBeforeTestPositive(GenJnlLine, IsHandled);
if not IsHandled then
OldVendLedgEntry.TestField(Positive, not NewCVLedgEntryBuf.Positive);
if OldVendLedgEntry."Posting Date" > ApplyingDate then
ApplyingDate := OldVendLedgEntry."Posting Date";
OnPrepareTempVendLedgEntryOnBeforeCheckAgainstApplnCurrencyWithAppliesToDocNo(GenJnlLine, NewCVLedgEntryBuf, OldVendLedgEntry);
GenJnlApply.CheckAgainstApplnCurrency(
NewCVLedgEntryBuf."Currency Code", OldVendLedgEntry."Currency Code", GenJnlLine."Account Type"::Vendor, true);
TempOldVendLedgEntry := OldVendLedgEntry;
Additional context
We would like to run our own check.
The text was updated successfully, but these errors were encountered:
Describe the request
Hello, in issue 26861, I requested an OnPrepareTempVendLedgEntryOnBeforeTestPositive event in the PrepareTempVendLedgEntry procedure. Unfortunately, you implemented this event in the PrepareTempEmplLedgEntry procedure.
Could you please call the event OnPrepareTempVendLedgEntryOnBeforeTestPositive from procedure PrepareTempVendLedgEntry?
Additional context
We would like to run our own check.
The text was updated successfully, but these errors were encountered: