Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.45946.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.46297.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "28.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,14 @@ codeunit 11154 "Create Currency Ex. Rate AT"
CurrencyExchangeRate.Validate("Relational Exch. Rate Amount", RelationalExchRateAmount);
CurrencyExchangeRate.Validate("Relational Adjmt Exch Rate Amt", RelationalAdjmtExchRateAmt);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Add. Reporting Currency", OnBeforeGetResidualCurrencyAccounts, '', false, false)]
local procedure GetResidualCurrencyAccountsAT(var FXGainsAccount: Code[20]; var FXLossesAccount: Code[20]; var IsHandled: Boolean)
var
CreateATGLAccount: Codeunit "Create AT GL Account";
begin
FXGainsAccount := CreateATGLAccount.FCYRealizedExchangeGains();
FXLossesAccount := CreateATGLAccount.FCYRealizedExchangeLosses();
IsHandled := true;
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,14 @@ codeunit 11367 "Create Currency Ex. Rate BE"
CurrencyExchangeRate.Validate("Relational Exch. Rate Amount", RelationalExchRateAmount);
CurrencyExchangeRate.Validate("Relational Adjmt Exch Rate Amt", RelationalAdjmtExchRateAmt);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Add. Reporting Currency", OnBeforeGetResidualCurrencyAccounts, '', false, false)]
local procedure GetResidualCurrencyAccountsBE(var FXGainsAccount: Code[20]; var FXLossesAccount: Code[20]; var IsHandled: Boolean)
var
CreateBEGLAccount: Codeunit "Create GL Account BE";
begin
FXGainsAccount := CreateBEGLAccount.RealizedExchRateDiffIncome();
FXLossesAccount := CreateBEGLAccount.RealizedExchRateDiffExpense();
IsHandled := true;
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,30 @@ codeunit 11602 "Create CH Posting Groups"
CreatePostingGroup: Codeunit "Create Posting Groups";
begin
ContosoGenPostingSetup.SetOverwriteData(true);
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.RetailPostingGroup(), '', '', CreateCHGLAccounts.InvChangeCommGoods(), '', '', '', '', '', '', '', CreateCHGLAccounts.InvChangeCommGoods(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.InvChangeCommGoods(), '', '', CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.InvChangeCommGoods(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsDomestic(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.InvChangeFinishedProducts(), '', '', '', CreateCHGLAccounts.ServiceEarningsDomestic(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.InvChangeFinishedProducts(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeEurope(), CreateCHGLAccounts.CostOfCommGoodsEurope(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.InvChangeCommGoods(), '', '', CreateCHGLAccounts.TradeEurope(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsEurope(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.InvChangeCommGoods(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ProdEarningsEurope(), CreateCHGLAccounts.CostOfMaterialsEurope(), CreateCHGLAccounts.InvChangeFinishedProducts(), '', '', '', CreateCHGLAccounts.ProdEarningsEurope(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfMaterialsEurope(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.InvChangeFinishedProducts(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.InvChangeCommGoods(), '', '', CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.InvChangeCommGoods(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.RetailPostingGroup(), '', '', CreateCHGLAccounts.InvChangeCommGoods(), '', '', '', '', '', '', '', '', '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.ServicesPostingGroup(), '', '', CreateCHGLAccounts.InvChangeCommGoods(), '', '', '', '', '', '', '', '', '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.ZeroPostingGroup(), '', '', CreateCHGLAccounts.InvChangeCommGoods(), '', '', '', '', '', '', '', '', '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), '', '', CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsDomestic(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '', CreateCHGLAccounts.ServiceEarningsDomestic(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ZeroPostingGroup(), CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), '', '', CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeEurope(), CreateCHGLAccounts.CostOfCommGoodsEurope(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.CostOfCommGoodsEurope(), '', '', CreateCHGLAccounts.TradeEurope(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsEurope(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.CostOfCommGoodsEurope(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsEurope(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '', CreateCHGLAccounts.ServiceEarningsEurope(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.CostOfCommGoodsIntl(), '', '', CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.CostOfCommGoodsIntl(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsInternat(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '', CreateCHGLAccounts.ServiceEarningsInternat(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.SubcontrOfSpOperations(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ZeroPostingGroup(), CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.InvChangeCommGoods(), CreateCHGLAccounts.CostOfCommGoodsIntl(), '', '', CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.Discounts(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.CostReductionDiscount(), CreateCHGLAccounts.CostOfCommGoodsIntl(), '', '');
ContosoGenPostingSetup.SetOverwriteData(false);

UpdateGeneralPostingSetup('', CreatePostingGroup.RetailPostingGroup(), '', '', CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup('', CreatePostingGroup.ServicesPostingGroup(), '', '', CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup('', CreatePostingGroup.ZeroPostingGroup(), '', '', CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.VendorPrepaymentsVat80Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat80Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsDomestic(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.VendorPrepaymentsVat80Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat80Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ZeroPostingGroup(), CreateCHGLAccounts.TradeDomestic(), CreateCHGLAccounts.CostOfCommGoodsDomestic(), CreateCHGLAccounts.VendorPrepaymentsVat80Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat80Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeEurope(), CreateCHGLAccounts.CostOfCommGoodsEurope(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ProdEarningsEurope(), CreateCHGLAccounts.CostOfMaterialsEurope(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsEurope(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateCHGLAccounts.ServiceEarningsInternat(), CreateCHGLAccounts.SubcontrOfSpOperations(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
UpdateGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ZeroPostingGroup(), CreateCHGLAccounts.TradeInternat(), CreateCHGLAccounts.CostOfCommGoodsIntl(), CreateCHGLAccounts.VendorPrepaymentsVat0Percent(), CreateCHGLAccounts.CustomerPrepaymentsVat0Percent());
end;

local procedure UpdateGeneralPostingSetup(GenBusPostingGroup: Code[20]; GenProdPostingGroup: Code[20]; SalesCreditMemoAccount: Code[20]; PurchCreditMemoAccount: Code[20]; SalesPrepaymentsAccount: Code[20]; PurchPrepaymentsAccount: Code[20])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,14 @@ codeunit 11630 "Create CH Currency Ex. Rate"
CurrencyExchangeRate.Validate("Relational Exch. Rate Amount", RelationalExchRateAmount);
CurrencyExchangeRate.Validate("Relational Adjmt Exch Rate Amt", RelationalAdjmtExchRateAmt);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Add. Reporting Currency", OnBeforeGetResidualCurrencyAccounts, '', false, false)]
local procedure GetResidualCurrencyAccountsCH(var FXGainsAccount: Code[20]; var FXLossesAccount: Code[20]; var IsHandled: Boolean)
var
CreateCHGLAccounts: Codeunit "Create CH GL Accounts";
begin
FXGainsAccount := CreateCHGLAccounts.UnrealizedExchRateAdjmts();
FXLossesAccount := CreateCHGLAccounts.UnrealizedExchRateAdjmts();
IsHandled := true;
end;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AdvancePayments;

using Microsoft.Purchases.Payables;

codeunit 11734 "Update Rel.Vend.Ledg.Entry CZZ"
{
Access = Internal;
EventSubscriberInstance = Manual;
TableNo = "Vendor Ledger Entry";

trigger OnRun()
var
RelatedVendorLedgerEntry: Record "Vendor Ledger Entry";
begin
if IsActivated() then
exit;

Activate();

RelatedVendorLedgerEntry.ReadIsolation(IsolationLevel::UpdLock);
RelatedVendorLedgerEntry.SetCurrentKey("Document No.");
RelatedVendorLedgerEntry.SetRange("Document No.", Rec."Document No.");
RelatedVendorLedgerEntry.SetFilter("Entry No.", '<>%1', Rec."Entry No.");
if RelatedVendorLedgerEntry.FindSet() then
repeat
RelatedVendorLedgerEntry."Specific Symbol CZL" := Rec."Specific Symbol CZL";
RelatedVendorLedgerEntry."Variable Symbol CZL" := Rec."Variable Symbol CZL";
RelatedVendorLedgerEntry."Constant Symbol CZL" := Rec."Constant Symbol CZL";
RelatedVendorLedgerEntry."Bank Account Code CZL" := Rec."Bank Account Code CZL";
RelatedVendorLedgerEntry."Bank Account No. CZL" := Rec."Bank Account No. CZL";
RelatedVendorLedgerEntry."Transit No. CZL" := Rec."Transit No. CZL";
RelatedVendorLedgerEntry."IBAN CZL" := Rec."IBAN CZL";
RelatedVendorLedgerEntry."SWIFT Code CZL" := Rec."SWIFT Code CZL";
RelatedVendorLedgerEntry."VAT Date CZL" := Rec."VAT Date CZL";
RelatedVendorLedgerEntry."External Document No." := Rec."External Document No.";
Codeunit.Run(Codeunit::"Vend. Entry-Edit", RelatedVendorLedgerEntry);
until RelatedVendorLedgerEntry.Next() = 0;

Deactivate();
end;

local procedure Activate()
begin
BindSubscription(this);
end;

local procedure Deactivate()
begin
UnbindSubscription(this);
end;

local procedure IsActivated() Result: Boolean
begin
OnIsActivated(Result);
end;

[IntegrationEvent(false, false)]
local procedure OnIsActivated(var Result: Boolean)
begin
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Update Rel.Vend.Ledg.Entry CZZ", OnIsActivated, '', false, false)]
local procedure SetTrueOnIsActivated(var Result: Boolean)
begin
Result := true;
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,26 @@ codeunit 31061 "Vend. Entry-Edit Handler CZZ"
VendLedgEntry."Advance Letter No. CZZ" := FromVendLedgEntry."Advance Letter No. CZZ";
VendLedgEntry.Prepayment := FromVendLedgEntry.Prepayment;
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Vend. Entry-Edit", 'OnRunOnAfterVendLedgEntryMofidy', '', false, false)]
local procedure UpdateRelatedEntriesOnRunOnAfterVendLedgEntryMofidy(var VendorLedgerEntry: Record "Vendor Ledger Entry")
begin
if VendorLedgerEntry."Advance Letter No. CZZ" <> '' then
UpdateAdvanceLetterEntries(VendorLedgerEntry);
if VendorLedgerEntry."Adv. Letter Template Code CZZ" <> '' then
Codeunit.Run(Codeunit::"Update Rel.Vend.Ledg.Entry CZZ", VendorLedgerEntry);
end;

local procedure UpdateAdvanceLetterEntries(VendorLedgerEntry: Record "Vendor Ledger Entry")
var
PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ";
begin
PurchAdvLetterEntryCZZ.SetRange("Vendor Ledger Entry No.", VendorLedgerEntry."Entry No.");
PurchAdvLetterEntryCZZ.SetLoadFields("External Document No.");
if PurchAdvLetterEntryCZZ.FindSet() then
repeat
PurchAdvLetterEntryCZZ."External Document No." := VendorLedgerEntry."External Document No.";
PurchAdvLetterEntryCZZ.Modify(false);
until PurchAdvLetterEntryCZZ.Next() = 0;
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ permissionset 11752 "CZ Advance Payments - Obj. CZZ"
Codeunit "Sales Post Advance Letter CZZ" = X,
Codeunit "Show Preview Handler CZZ" = X,
Codeunit "Sugg. Wksh. Lines Handler CZZ" = X,
Codeunit "Update Rel.Vend.Ledg.Entry CZZ" = X,
Codeunit "Upgrade Application CZZ" = X,
Codeunit "Upgrade Tag Definitions CZZ" = X,
Codeunit "VAT Entry Handler CZZ" = X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ codeunit 31373 "Gen. Jnl.Post Line Handler CZA"
GLEntryPostApplicationCZA.AutomatedGLEntryApplication(GenJournalLine, GLEntry);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnAfterInitGLEntry', '', false, false)]
local procedure CloseZeroEntryOnAfterInitGLEntry(var GLEntry: Record "G/L Entry")
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnBeforeInsertGLEntryBuffer', '', false, false)]
local procedure CloseZeroEntryOnBeforeInsertGLEntryBuffer(var TempGLEntryBuf: Record "G/L Entry" temporary)
begin
if GLEntry.Amount <> 0 then
if TempGLEntryBuf.Amount <> 0 then
exit;

GLEntry."Closed CZA" := true;
GLEntry."Closed at Date CZA" := GLEntry."Posting Date";
TempGLEntryBuf."Closed CZA" := true;
TempGLEntryBuf."Closed at Date CZA" := TempGLEntryBuf."Posting Date";
end;
}
Loading
Loading