Skip to content

Commit 4d618e5

Browse files
authored
1 parent 3edc0c8 commit 4d618e5

493 files changed

Lines changed: 177445 additions & 726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/AL-Go-Settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"runs-on": "windows-latest",
77
"cacheImageName": "",
88
"UsePsSession": false,
9-
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.48074.0/base",
9+
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.48710.0/base",
1010
"country": "base",
1111
"useProjectDependencies": true,
1212
"repoVersion": "29.0",

Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/ReportSelectionHandlerCZZ.Codeunit.al

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ codeunit 31420 "Report Selection Handler CZZ"
7070
local procedure AddSalesAdvanceReportsOnAfterFilterCustomerUsageReportSelections(var ReportSelections: Record "Report Selections")
7171
begin
7272
ReportSelections.SetFilter(
73-
Usage, '%1|%2|%3|%4|%5|%6|%7|%8|%9|%10',
73+
Usage, '%1|%2|%3|%4|%5|%6|%7|%8|%9|%10|%11',
7474
"Report Selection Usage"::"S.Quote",
7575
"Report Selection Usage"::"S.Order",
7676
"Report Selection Usage"::"S.Invoice",
@@ -79,10 +79,33 @@ codeunit 31420 "Report Selection Handler CZZ"
7979
"Report Selection Usage"::JQ,
8080
"Report Selection Usage"::Reminder,
8181
"Report Selection Usage"::"S.Shipment",
82+
"Report Selection Usage"::"Pro Forma S. Invoice",
8283
"Report Selection Usage"::"Sales Advance Letter CZZ",
8384
"Report Selection Usage"::"Sales Advance VAT Document CZZ");
8485
end;
8586

87+
[EventSubscriber(ObjectType::Page, Page::"Vendor Report Selections", 'OnMapTableUsageValueToPageValueOnCaseElse', '', false, false)]
88+
local procedure AddPurchaseAdvanceReportsOnMapTableUsageValueToPageValueOnCaseElse(var ReportUsage: Enum "Report Selection Usage Vendor"; Rec: Record "Custom Report Selection")
89+
begin
90+
case Rec.Usage of
91+
"Report Selection Usage"::"Purchase Advance Letter CZZ":
92+
ReportUsage := ReportUsage::"Advance Letter CZZ";
93+
"Report Selection Usage"::"Purchase Advance VAT Document CZZ":
94+
ReportUsage := ReportUsage::"Advance VAT Document CZZ";
95+
end;
96+
end;
97+
98+
[EventSubscriber(ObjectType::Page, Page::"Vendor Report Selections", 'OnValidateUsage2OnCaseElse', '', false, false)]
99+
local procedure AddPurchaseAdvanceReportsOnValidateUsage2OnCaseElse(var CustomReportSelection: Record "Custom Report Selection"; ReportUsage: Enum "Report Selection Usage Vendor")
100+
begin
101+
case ReportUsage of
102+
ReportUsage::"Advance Letter CZZ":
103+
CustomReportSelection.Usage := "Report Selection Usage"::"Purchase Advance Letter CZZ";
104+
ReportUsage::"Advance VAT Document CZZ":
105+
CustomReportSelection.Usage := "Report Selection Usage"::"Purchase Advance VAT Document CZZ";
106+
end;
107+
end;
108+
86109
[EventSubscriber(ObjectType::Page, Page::"Vendor Report Selections", 'OnAfterFilterVendorUsageReportSelections', '', false, false)]
87110
local procedure AddPurchaseAdvanceReportsOnAfterFilterVendorUsageReportSelections(var ReportSelections: Record "Report Selections")
88111
begin

Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/VendEntryEditHandlerCZZ.Codeunit.al

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
// ------------------------------------------------------------------------------------------------
55
namespace Microsoft.Finance.AdvancePayments;
66

7+
using Microsoft.Purchases.History;
78
using Microsoft.Purchases.Payables;
8-
using System.Security.User;
99

1010
codeunit 31061 "Vend. Entry-Edit Handler CZZ"
1111
{
1212
Permissions = TableData "Purch. Adv. Letter Entry CZZ" = rm;
1313

1414
var
15+
ExtDocNoChangingCZL: Codeunit "Ext. Doc. No. Changing CZL";
1516
RecursionDepth: Integer;
1617

1718
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Vend. Entry-Edit", 'OnBeforeVendLedgEntryModify', '', false, false)]
@@ -25,7 +26,7 @@ codeunit 31061 "Vend. Entry-Edit Handler CZZ"
2526
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Vend. Entry-Edit", 'OnRunOnAfterVendLedgEntryMofidy', '', false, false)]
2627
local procedure UpdateRelatedEntriesOnRunOnAfterVendLedgEntryMofidy(var VendorLedgerEntry: Record "Vendor Ledger Entry")
2728
begin
28-
if not IsExtDocNoChangingAllowed() then
29+
if not ExtDocNoChangingCZL.IsActivated() then
2930
exit;
3031
if VendorLedgerEntry."Advance Letter No. CZZ" <> '' then
3132
UpdateAdvanceLetterEntries(VendorLedgerEntry);
@@ -66,11 +67,4 @@ codeunit 31061 "Vend. Entry-Edit Handler CZZ"
6667
until RelatedPurchAdvLetterEntryCZZ.Next() = 0;
6768
RecursionDepth -= 1;
6869
end;
69-
70-
local procedure IsExtDocNoChangingAllowed(): Boolean
71-
var
72-
UserSetupAdvManagement: Codeunit "User Setup Adv. Management CZL";
73-
begin
74-
exit(UserSetupAdvManagement.IsExtDocNoChangingAllowed());
75-
end;
7670
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// ------------------------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for license information.
4+
// ------------------------------------------------------------------------------------------------
5+
namespace Microsoft.Finance.AdvancePayments;
6+
7+
using Microsoft.Purchases.Setup;
8+
9+
enumextension 11708 "Report Sel. Usage Vendor CZZ" extends "Report Selection Usage Vendor"
10+
{
11+
value(31020; "Advance Letter CZZ")
12+
{
13+
Caption = 'Advance Letter';
14+
}
15+
value(31021; "Advance VAT Document CZZ")
16+
{
17+
Caption = 'Advance VAT Document';
18+
}
19+
}

Apps/CZ/AdvancePaymentsLocalization/app/Src/Reports/PurchAdvanceLettersVATCZZ.Report.al

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace Microsoft.Finance.AdvancePayments;
66

77
using Microsoft.Finance.GeneralLedger.Setup;
88
using Microsoft.Finance.VAT.Ledger;
9+
using Microsoft.Foundation.AuditCodes;
910
using System.Utilities;
1011

1112
report 31025 "Purch. Advance Letters VAT CZZ"
@@ -111,15 +112,8 @@ report 31025 "Purch. Advance Letters VAT CZZ"
111112
end;
112113

113114
trigger OnAfterGetRecord()
114-
var
115-
VATEntry: Record "VAT Entry";
116115
begin
117-
VATEntry.SetRange("Advance Letter No. CZZ", "Purch. Adv. Letter Entry CZZ"."Purch. Adv. Letter No.");
118-
VATEntry.SetRange("Document No.", "Purch. Adv. Letter Entry CZZ"."Document No.");
119-
VATEntry.SetFilter("Posting Date", '..%1', ToDate);
120-
VATEntry.SetFilter("Non-Deductible VAT %", '<>0');
121-
VATEntry.CalcSums(Amount);
122-
NonDeductVATAmountLCY := VATEntry.Amount;
116+
NonDeductVATAmountLCY := CalcNonDeductVATAmountLCY("Purch. Adv. Letter Entry CZZ");
123117
end;
124118
}
125119

@@ -173,6 +167,12 @@ report 31025 "Purch. Advance Letters VAT CZZ"
173167
ToolTip = 'Specifies if entries will be printed.';
174168
ApplicationArea = Basic, Suite;
175169
}
170+
field(IncludeCoeffCorrectionField; IncludeCoeffCorrection)
171+
{
172+
Caption = 'Include Coefficient Correction';
173+
ToolTip = 'Specifies if coefficient corrections will be included.';
174+
ApplicationArea = Basic, Suite;
175+
}
176176
}
177177
}
178178
}
@@ -202,16 +202,34 @@ report 31025 "Purch. Advance Letters VAT CZZ"
202202
if "Purch. Adv. Letter Header CZZ".GetFilters() <> '' then
203203
ReportFilters := StrSubstNo(FiltersTxt, "Purch. Adv. Letter Header CZZ".TableCaption(), "Purch. Adv. Letter Header CZZ".GetFilters());
204204

205+
SourceCodeSetup.Get();
205206
GeneralLedgerSetup.Get();
206207
AmountsInLCY := StrSubstNo(AmountsInLCYTxt, GeneralLedgerSetup."LCY Code")
207208
end;
208209

209210
var
210211
GeneralLedgerSetup: Record "General Ledger Setup";
212+
SourceCodeSetup: Record "Source Code Setup";
211213
ReportFilters, AmountsInLCY : Text;
212-
ToDate: Date;
213-
OnlyOpen, PrintEntries : Boolean;
214214
NonDeductVATAmountLCY: Decimal;
215215
FiltersTxt: Label 'Filters: %1: %2', Comment = '%1 = Table Caption, %2 = Table Filter';
216216
AmountsInLCYTxt: Label 'All Amounts are in %1.', Comment = '%1 = Currency Code';
217+
218+
protected var
219+
ToDate: Date;
220+
OnlyOpen, PrintEntries, IncludeCoeffCorrection : Boolean;
221+
222+
local procedure CalcNonDeductVATAmountLCY(PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"): Decimal
223+
var
224+
VATEntry: Record "VAT Entry";
225+
begin
226+
VATEntry.SetRange("Advance Letter No. CZZ", PurchAdvLetterEntryCZZ."Purch. Adv. Letter No.");
227+
VATEntry.SetRange("Document No.", PurchAdvLetterEntryCZZ."Document No.");
228+
VATEntry.SetFilter("Posting Date", '..%1', ToDate);
229+
VATEntry.SetFilter("Non-Deductible VAT %", '<>0');
230+
if not IncludeCoeffCorrection then
231+
VATEntry.SetFilter("Source Code", '<>%1', SourceCodeSetup."VAT Coeff. Correction CZL");
232+
VATEntry.CalcSums(Amount);
233+
exit(VATEntry.Amount);
234+
end;
217235
}

Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/ImpLaunchBankStatementCZB.Codeunit.al

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ codeunit 31364 "Imp. Launch Bank Statement CZB"
6868
var
6969
BankAccReconciliation: Record "Bank Acc. Reconciliation";
7070
BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line";
71+
IsHandled: Boolean;
7172
begin
7273
BankAccReconciliation.Init();
7374
BankAccReconciliation."Statement Type" := BankAccReconciliation."Statement Type"::"Payment Application";
@@ -76,6 +77,11 @@ codeunit 31364 "Imp. Launch Bank Statement CZB"
7677
BankAccReconciliation.Insert();
7778
Commit();
7879

80+
IsHandled := false;
81+
OnRunProcessingDataExchDefOnBeforeImportBankStatement(BankAccReconciliation, BankStatementHeaderCZB, IsHandled);
82+
if IsHandled then
83+
exit;
84+
7985
if not ImportBankStatement(BankAccReconciliation) then begin
8086
BankAccReconciliationLine.SetRange("Statement Type", BankAccReconciliation."Statement Type");
8187
BankAccReconciliationLine.SetRange("Bank Account No.", BankAccReconciliation."Bank Account No.");
@@ -107,4 +113,9 @@ codeunit 31364 "Imp. Launch Bank Statement CZB"
107113
local procedure OnRunProcessingXMLPortOnAfterSetFilters(BankExportImportSetup: Record "Bank Export/Import Setup"; BankStatementHeaderCZB: Record "Bank Statement Header CZB"; var BankStatementLineCZB: Record "Bank Statement Line CZB")
108114
begin
109115
end;
116+
117+
[IntegrationEvent(false, false)]
118+
local procedure OnRunProcessingDataExchDefOnBeforeImportBankStatement(var BankAccReconciliation: Record "Bank Acc. Reconciliation"; BankStatementHeaderCZB: Record "Bank Statement Header CZB"; var IsHandled: Boolean)
119+
begin
120+
end;
110121
}

Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentHeaderCZP.Table.al

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ table 11732 "Cash Document Header CZP"
185185
{
186186
CaptionClass = '1,2,1';
187187
Caption = 'Shortcut Dimension 1 Code';
188-
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1));
188+
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1),
189+
Blocked = const(false));
189190
DataClassification = CustomerContent;
190191

191192
trigger OnValidate()
@@ -197,7 +198,8 @@ table 11732 "Cash Document Header CZP"
197198
{
198199
CaptionClass = '1,2,2';
199200
Caption = 'Shortcut Dimension 2 Code';
200-
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2));
201+
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2),
202+
Blocked = const(false));
201203
DataClassification = CustomerContent;
202204

203205
trigger OnValidate()

Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/CompanyBankAccHandlerCZL.Codeunit.al

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ codeunit 31447 "Company Bank Acc. Handler CZL"
224224

225225
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch. Inv. Header - Edit", 'OnBeforePurchInvHeaderModify', '', false, false)]
226226
local procedure PurchInvoiceEditOnBeforePurchInvHeaderModify(var PurchInvHeader: Record "Purch. Inv. Header"; PurchInvHeaderRec: Record "Purch. Inv. Header")
227+
var
228+
ExtDocNoChangingCZL: Codeunit "Ext. Doc. No. Changing CZL";
227229
begin
228-
if PurchInvHeader."Vendor Invoice No." <> PurchInvHeaderRec."Vendor Invoice No." then
229-
PurchInvHeaderRec.CheckAndConfirmExternalDocumentNumber();
230+
ExtDocNoChangingCZL.Init(PurchInvHeaderRec, PurchInvHeader);
230231

231232
PurchInvHeader.Validate("Due Date", PurchInvHeaderRec."Due Date");
232233
PurchInvHeader.Validate("Bank Account Code CZL", PurchInvHeaderRec."Bank Account Code CZL");
233-
PurchInvHeader.Validate("Vendor Invoice No.", PurchInvHeaderRec."Vendor Invoice No.");
234234
PurchInvHeader.Validate("Specific Symbol CZL", PurchInvHeaderRec."Specific Symbol CZL");
235235
PurchInvHeader.Validate("Variable Symbol CZL", PurchInvHeaderRec."Variable Symbol CZL");
236236
PurchInvHeader.Validate("Constant Symbol CZL", PurchInvHeaderRec."Constant Symbol CZL");

Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DataClassEvalHandlerCZL.Codeunit.al

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ codeunit 11710 "Data Class. Eval. Handler CZL"
8686
GenJournalTemplate: Record "Gen. Journal Template";
8787
GLAccount: Record "G/L Account";
8888
#pragma warning disable AL0432
89-
GLAccountNetChange: Record "G/L Account Net Change";
89+
TempGLAccountNetChange: Record "G/L Account Net Change";
9090
#pragma warning restore AL0432
9191
InventoryPostingSetup: Record "Inventory Posting Setup";
9292
InventorySetup: Record "Inventory Setup";
@@ -304,14 +304,14 @@ codeunit 11710 "Data Class. Eval. Handler CZL"
304304
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account", GLAccount.FieldNo("Credit Amount (VAT Date) CZL"));
305305
#if not CLEAN27
306306
#pragma warning disable AL0432
307-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Account Type CZL"));
307+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Account Type CZL"));
308308
#pragma warning restore AL0432
309309
#endif
310-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Acc. Type CZL"));
311-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Account No. CZL"));
312-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Net Change in Jnl. Curr. CZL"));
313-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Balance after Posting Curr.CZL"));
314-
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", GLAccountNetChange.FieldNo("Currency Code CZL"));
310+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Acc. Type CZL"));
311+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Account No. CZL"));
312+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Net Change in Jnl. Curr. CZL"));
313+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Balance after Posting Curr.CZL"));
314+
DataClassificationMgt.SetFieldToNormal(Database::"G/L Account Net Change", TempGLAccountNetChange.FieldNo("Currency Code CZL"));
315315
DataClassificationMgt.SetFieldToNormal(Database::"Inventory Posting Setup", InventoryPostingSetup.FieldNo("Consumption Account CZL"));
316316
DataClassificationMgt.SetFieldToNormal(Database::"Inventory Posting Setup", InventoryPostingSetup.FieldNo("Change In Inv.Of WIP Acc. CZL"));
317317
DataClassificationMgt.SetFieldToNormal(Database::"Inventory Posting Setup", InventoryPostingSetup.FieldNo("Change In Inv.OfProd. Acc. CZL"));

0 commit comments

Comments
 (0)