Skip to content

[Event Request] Report 31012 "Create Sales Adv. Letter CZZ" #29200

Description

@fridrichovsky

Why do you need this change?

We need to add this event so that we can create the advance letter lines ourselves (we need to pre-fill some fields from the advance letter template).
Next, we need to move the global variable SalesAdvLetterHeaderCZZ to protected var.

Describe the request

Pleas add new event

local procedure CreateAdvancePostingBuffer(VATBusPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; AmountIncludingVAT: Decimal; var TempAdvancePostingBufferCZZ: Record "Advance Posting Buffer CZZ" temporary)
    var
      //-------------------------------OnBeforeCreateBuffer:BEGIN
      IsHandled: boolean;
      //-------------------------------OnBeforeCreateBuffer:END
    begin
      //-------------------------------OnBeforeCreateBuffer:BEGIN
      IsHandled := false;
      OnBeforeCreateBuffer(VATBusPostingGroup, VATProdPostingGroup, AmountIncludingVAT, TempAdvancePostingBufferCZZ, IsHandled);
      if IsHandled then 
	  exit();
      //-------------------------------OnBeforeCreateBuffer:END
          TempAdvancePostingBufferCZZ.Init();
          TempAdvancePostingBufferCZZ."VAT Bus. Posting Group" := VATBusPostingGroup;
          TempAdvancePostingBufferCZZ."VAT Prod. Posting Group" := VATProdPostingGroup;
          if TempAdvancePostingBufferCZZ.Find() then begin
              TempAdvancePostingBufferCZZ.Amount += AmountIncludingVAT;
              TempAdvancePostingBufferCZZ.Modify();
          end else begin
              TempAdvancePostingBufferCZZ.Amount := AmountIncludingVAT;
              TempAdvancePostingBufferCZZ.Insert();
          end;
    end;

//-------------------------------OnBeforeCreateBuffer:BEGIN
[IntegrationEvent(false,true)]
local procedure OnBeforeCreateBuffer(VATBusPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; AmountIncludingVAT: Decimal; var TempAdvancePostingBufferCZZ: Record "Advance Posting Buffer CZZ" temporary; var IsHandled: boolean)
//-------------------------------OnBeforeCreateBuffer:END


var
	//-------------------------------SalesAdvLetterHeaderCZZ_Protected:BEGIN
        //SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ";
	//-------------------------------SalesAdvLetterHeaderCZZ_Protected:END
protected var
	//-------------------------------SalesAdvLetterHeaderCZZ_Protected:BEGIN
        SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ";
	//-------------------------------SalesAdvLetterHeaderCZZ_Protected:END


Internal work item: AB#604893

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions