Skip to content

Commit 64eeaf9

Browse files
authored
Merge branch 'main' into DynamicsSLMigration
2 parents ed3a989 + 07aa6c5 commit 64eeaf9

File tree

2,326 files changed

+258795
-21193
lines changed

Some content is hidden

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

2,326 files changed

+258795
-21193
lines changed

.github/AL-Go-Settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"type": "PTE",
33
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
4-
"bcContainerHelperVersion": "preview",
4+
"bcContainerHelperVersion": "latest",
55
"runs-on": "windows-latest",
66
"cacheImageName": "",
77
"UsePsSession": false,
8-
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.24649.0/base",
8+
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.27052.0/base",
99
"country": "base",
1010
"useProjectDependencies": true,
1111
"repoVersion": "26.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
codeunit 11158 "Create Bank Acc Posting Grp AT"
2+
{
3+
SingleInstance = true;
4+
EventSubscriberInstance = Manual;
5+
InherentEntitlements = X;
6+
InherentPermissions = X;
7+
8+
[EventSubscriber(ObjectType::Table, Database::"Bank Account Posting Group", 'OnBeforeInsertEvent', '', false, false)]
9+
local procedure OnBeforeInsertBankAccPostingGroup(var Rec: Record "Bank Account Posting Group"; RunTrigger: Boolean)
10+
var
11+
CreateBankAccPostingGrp: Codeunit "Create Bank Acc. Posting Grp";
12+
CreateATGLAccount: Codeunit "Create AT GL Account";
13+
CreateGLAccount: Codeunit "Create G/L Account";
14+
begin
15+
case Rec.Code of
16+
CreateBankAccPostingGrp.Checking():
17+
ValidateRecordFields(Rec, CreateGLAccount.BankLcy());
18+
CreateBankAccPostingGrp.Savings(),
19+
CreateBankAccPostingGrp.Operating():
20+
ValidateRecordFields(Rec, CreateGLAccount.GiroAccount());
21+
CreateBankAccPostingGrp.Cash():
22+
ValidateRecordFields(Rec, CreateATGLAccount.BankCurrencies());
23+
end;
24+
end;
25+
26+
local procedure ValidateRecordFields(var BankAccountPostingGroup: Record "Bank Account Posting Group"; GLAccountNo: Code[20])
27+
begin
28+
BankAccountPostingGroup.Validate("G/L Account No.", GLAccountNo);
29+
end;
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
codeunit 11159 "Create Bank ExpImport Setup AT"
2+
{
3+
InherentEntitlements = X;
4+
InherentPermissions = X;
5+
6+
trigger OnRun()
7+
var
8+
ContosoBank: Codeunit "Contoso Bank";
9+
begin
10+
ContosoBank.ContosoBankExportImportSetup(SEPACTAPCT(), SEPACTAPCDescLbl, 0, Codeunit::"SEPA CT APC-Export File", Xmlport::"SEPA CT pain.001.001.03", '', false, Codeunit::"SEPA CT-Check Line");
11+
ContosoBank.ContosoBankExportImportSetup(SEPACTAPC09(), SEPACTAPC09DescLbl, 0, Codeunit::"SEPA CT APC-Export File", Xmlport::"SEPA CT pain.001.001.09", '', false, Codeunit::"SEPA CT-Check Line");
12+
end;
13+
14+
procedure SEPACTAPCT(): Code[20]
15+
begin
16+
exit(SEPACTAPCTok);
17+
end;
18+
19+
procedure SEPACTAPC09(): Code[20]
20+
begin
21+
exit(SEPACTAPC09Tok);
22+
end;
23+
24+
25+
26+
var
27+
SEPACTAPCTok: Label 'SEPACTAPC', MaxLength = 20;
28+
SEPACTAPC09Tok: Label 'SEPACTAPC09', MaxLength = 20;
29+
SEPACTAPCDescLbl: Label 'SEPA Credit Transfer APC', MaxLength = 100;
30+
SEPACTAPC09DescLbl: Label 'SEPA Credit Transfer APC 09', MaxLength = 100;
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
codeunit 11160 "Create Bank Account AT"
2+
{
3+
SingleInstance = true;
4+
EventSubscriberInstance = Manual;
5+
InherentEntitlements = X;
6+
InherentPermissions = X;
7+
8+
[EventSubscriber(ObjectType::Table, Database::"Bank Account", 'OnBeforeInsertEvent', '', false, false)]
9+
local procedure OnBeforeInsertBankAccount(var Rec: Record "Bank Account")
10+
var
11+
ContosoCoffeDemoDataSetup: Record "Contoso Coffee Demo Data Setup";
12+
CreateBankAccount: Codeunit "Create Bank Account";
13+
begin
14+
ContosoCoffeDemoDataSetup.Get();
15+
case Rec."No." of
16+
CreateBankAccount.Checking():
17+
ValidateBankAccount(Rec, CityGrazLbl, -1447200, ContosoCoffeDemoDataSetup."Country/Region Code", PostcodeGrazLbl);
18+
CreateBankAccount.Savings():
19+
ValidateBankAccount(Rec, CityGrazLbl, 0, ContosoCoffeDemoDataSetup."Country/Region Code", PostcodeGrazLbl);
20+
end;
21+
end;
22+
23+
local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccCity: Text[30]; MinBalance: Decimal; CountryRegionCode: Code[10]; PostCode: Code[20])
24+
begin
25+
BankAccount.Validate("Post Code", PostCode);
26+
BankAccount.Validate(City, BankAccCity);
27+
BankAccount.Validate("Min. Balance", MinBalance);
28+
BankAccount.Validate("Country/Region Code", CountryRegionCode);
29+
end;
30+
31+
var
32+
CityGrazLbl: Label 'Graz', MaxLength = 30;
33+
PostcodeGrazLbl: Label '8010', MaxLength = 20;
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
codeunit 11161 "Create Bank Acc. Reco. AT"
2+
{
3+
SingleInstance = true;
4+
EventSubscriberInstance = Manual;
5+
InherentEntitlements = X;
6+
InherentPermissions = X;
7+
8+
trigger OnRun()
9+
begin
10+
UpdateBankAccReconciliation();
11+
end;
12+
13+
local procedure UpdateBankAccReconciliation()
14+
var
15+
BankAccReconciliation: Record "Bank Acc. Reconciliation";
16+
CreateBankAccount: Codeunit "Create Bank Account";
17+
begin
18+
if not BankAccReconciliation.Get(Enum::"Bank Acc. Rec. Stmt. Type"::"Bank Reconciliation", CreateBankAccount.Checking(), '24') then
19+
exit;
20+
21+
BankAccReconciliation.Validate("Statement Ending Balance", 17924.53);
22+
BankAccReconciliation.Modify();
23+
end;
24+
25+
[EventSubscriber(ObjectType::Table, Database::"Bank Acc. Reconciliation Line", 'OnBeforeInsertEvent', '', false, false)]
26+
local procedure OnInsertRecord(var Rec: Record "Bank Acc. Reconciliation Line"; RunTrigger: Boolean)
27+
var
28+
CreateBankAccount: Codeunit "Create Bank Account";
29+
begin
30+
if (Rec."Statement Type" = Rec."Statement Type"::"Bank Reconciliation") then begin
31+
if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = '24') then
32+
case Rec."Statement Line No." of
33+
10000:
34+
ValidateRecordFields(Rec, Rec.Description, 2757.62);
35+
20000:
36+
ValidateRecordFields(Rec, Rec.Description, 4136.43);
37+
30000:
38+
ValidateRecordFields(Rec, DepositToAccountLbl, 11030.48);
39+
end;
40+
end else
41+
if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = 'PREC000') then
42+
case Rec."Statement Line No." of
43+
10000:
44+
ValidateRecordFields(Rec, Rec.Description, -2520);
45+
20000:
46+
ValidateRecordFields(Rec, Rec.Description, -1828);
47+
30000:
48+
ValidateRecordFields(Rec, Rec.Description, -1340.1);
49+
40000:
50+
ValidateRecordFields(Rec, Rec.Description, 929.76);
51+
50000:
52+
ValidateRecordFields(Rec, Rec.Description, 10743.39);
53+
60000:
54+
ValidateRecordFields(Rec, Rec.Description, 3273.72);
55+
end;
56+
end;
57+
58+
local procedure ValidateRecordFields(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; Description: Text[100]; Amount: Decimal)
59+
begin
60+
BankAccReconciliationLine.Validate(Description, Description);
61+
BankAccReconciliationLine.Validate("Transaction Text", Description);
62+
BankAccReconciliationLine.Validate("Statement Amount", Amount);
63+
BankAccReconciliationLine.Validate("Applied Amount", Amount);
64+
end;
65+
66+
var
67+
DepositToAccountLbl: Label 'Deposit to Account 18.01.24', MaxLength = 100;
68+
}

0 commit comments

Comments
 (0)