Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request New Publisher] - codeunit 12 "Gen. Jnl.-Post Line" #27795

Open
djuras2 opened this issue Dec 11, 2024 · 0 comments
Open

[Request New Publisher] - codeunit 12 "Gen. Jnl.-Post Line" #27795

djuras2 opened this issue Dec 11, 2024 · 0 comments
Labels
event-request Request for adding an event Finance GitHub request for Finance area

Comments

@djuras2
Copy link

djuras2 commented Dec 11, 2024

Describe the request

Dear Support,
Could You please add a new publisher into PostFixedAsset function in codeunit 12 - "Gen. Jnl.-Post Line"?

<<<<< Original >>>>>

.
.
if not IsHandled then begin
  InitGLEntry(GenJnlLine, GLEntry, '', GenJnlLine."Amount (LCY)", GenJnlLine."Source Currency Amount", true, GenJnlLine."System-Created Entry");
  GLEntry."Gen. Posting Type" := GenJnlLine."Gen. Posting Type";
  GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
  GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
  InitVAT(GenJnlLine, GLEntry, VATPostingSetup);
  GLEntry2 := GLEntry;
  FAJnlPostLine.GenJnlPostLine(
      GenJnlLine, GLEntry2.Amount, GLEntry2."VAT Amount", NextTransactionNo, NextEntryNo, GLReg."No.");
  ShortcutDim1Code := GenJnlLine."Shortcut Dimension 1 Code";
  ShortcutDim2Code := GenJnlLine."Shortcut Dimension 2 Code";
.
.

<<<<< Modified >>>>>

.
.
if not IsHandled then begin
  InitGLEntry(GenJnlLine, GLEntry, '', GenJnlLine."Amount (LCY)", GenJnlLine."Source Currency Amount", true, GenJnlLine."System-Created Entry");
  GLEntry."Gen. Posting Type" := GenJnlLine."Gen. Posting Type";
  GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
  GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
  InitVAT(GenJnlLine, GLEntry, VATPostingSetup);
  GLEntry2 := GLEntry;
  IsHandled := false;
  OnBeforeGenJnlPostLine(GenJnlLine, GLEntry2, NextTransactionNo, NextEntryNo, GLReg, IsHandled);                 --> NEW PUBLISHER
  if not IsHandled then
    FAJnlPostLine.GenJnlPostLine(
        GenJnlLine, GLEntry2.Amount, GLEntry2."VAT Amount", NextTransactionNo, NextEntryNo, GLReg."No.");
  ShortcutDim1Code := GenJnlLine."Shortcut Dimension 1 Code";
  ShortcutDim2Code := GenJnlLine."Shortcut Dimension 2 Code";
.
.

[IntegrationEvent(false, false)]
local procedure OnBeforeGenJnlPostLine(GenJournalLine: Record "Gen. Journal Line"; GLEntry2: Record "G/L Entry"; NextTransactionNo: Integer; NextGLEntryNo: Integer; GLReg: Record "G/L Register"; var IsHandled: Boolean)
begin
end;

Thank you in advance,

Daniel

Additional context

Due to a customer modification in this field triggers.
Internal work item: AB#560505

@JesperSchulz JesperSchulz added event-request Request for adding an event Finance GitHub request for Finance area labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event Finance GitHub request for Finance area
Projects
None yet
Development

No branches or pull requests

2 participants