Table 49 - Invoice Post. Buffer
===============================
New Fields
----------
50000 Posting Description (Text 50)
50001 Line No. (Integer)
CodeUnit 90 - Purch.-Post
=========================
OnRun() Trigger
---------------
....
GenJnlLine.INIT;
GenJnlLine."Posting Date" := "Posting Date";
GenJnlLine."Document Date" := "Document Date";
// *************************************************************************************************
// Following Field Assignment Modified By J.Wareham 21/09/2004 To Post Actual Line Description To GL
IF InvPostingBuffer[1]."Posting Description" <> '' THEN
GenJnlLine.Description := InvPostingBuffer[1]."Posting Description"
ELSE
GenJnlLine.Description := "Posting Description";
// *************************************************************************************************
GenJnlLine."Reason Code" := "Reason Code";
GenJnlLine."Document Type" := GenJnlLineDocType;
GenJnlLine."Document No." := GenJnlLineDocNo;
GenJnlLine."External Document No." := GenJnlLineExtDocNo;
....
FillInvPostingBuffer() Trigger
------------------------------
...
// *************************************************************************************************
// Following Code Added By J.Wareham 21/09/2004 To Pass Actual Line Description Through To GL Entry
IF (PurchLine.Type = PurchLine.Type::"G/L Account") OR (PurchLine.Type = PurchLine.Type::Item) THEN BEGIN
InvPostingBuffer[1]."Posting Description" := PurchLine.Description;
InvPostingBuffer[1]."Line No." := PurchLine."Line No.";
END;
// *************************************************************************************************
TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
TempDocDim.SETRANGE("Line No.","Line No.");
UpdInvPostingBuffer;
END;
CodeUnit 80 - Sales-Post
=========================
OnRun() Trigger
---------------
....
GenJnlLine.INIT;
GenJnlLine."Posting Date" := "Posting Date";
GenJnlLine."Document Date" := "Document Date";
// *************************************************************************************************
// Following Field Assignment Modified By J.Wareham 21/09/2004 To Post Actual Line Description To GL
IF InvPostingBuffer[1]."Posting Description" <> '' THEN
GenJnlLine.Description := InvPostingBuffer[1]."Posting Description"
ELSE
GenJnlLine.Description := "Posting Description";
// *************************************************************************************************
GenJnlLine."Reason Code" := "Reason Code";
GenJnlLine."Document Type" := GenJnlLineDocType;
GenJnlLine."Document No." := GenJnlLineDocNo;
GenJnlLine."External Document No." := GenJnlLineExtDocNo;
....
FillInvPostingBuffer() Trigger
------------------------------
...
// *************************************************************************************************
// Following Code Added By J.Wareham 21/09/2004 To Pass Actual Line Description Through To GL Entry
IF SalesLine.Type = SalesLine.Type::"G/L Account" THEN BEGIN
InvPostingBuffer[1]."Posting Description" := SalesLine.Description;
InvPostingBuffer[1]."Line No." := SalesLine."Line No.";
END;
// *************************************************************************************************
TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
TempDocDim.SETRANGE("Line No.","Line No.");
UpdInvPostingBuffer;
END;