-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'microsoft:main' into main
- Loading branch information
Showing
1,922 changed files
with
261,248 additions
and
13,128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...offeeDemoDatasetAT/app/Demo Data/Bank/1. Setup Data/CreateBankAccPostingGrpAT.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
codeunit 11158 "Create Bank Acc Posting Grp AT" | ||
{ | ||
SingleInstance = true; | ||
EventSubscriberInstance = Manual; | ||
InherentEntitlements = X; | ||
InherentPermissions = X; | ||
|
||
[EventSubscriber(ObjectType::Table, Database::"Bank Account Posting Group", 'OnBeforeInsertEvent', '', false, false)] | ||
local procedure OnBeforeInsertBankAccPostingGroup(var Rec: Record "Bank Account Posting Group"; RunTrigger: Boolean) | ||
var | ||
CreateBankAccPostingGrp: Codeunit "Create Bank Acc. Posting Grp"; | ||
CreateATGLAccount: Codeunit "Create AT GL Account"; | ||
CreateGLAccount: Codeunit "Create G/L Account"; | ||
begin | ||
case Rec.Code of | ||
CreateBankAccPostingGrp.Checking(): | ||
ValidateRecordFields(Rec, CreateGLAccount.BankLcy()); | ||
CreateBankAccPostingGrp.Savings(), | ||
CreateBankAccPostingGrp.Operating(): | ||
ValidateRecordFields(Rec, CreateGLAccount.GiroAccount()); | ||
CreateBankAccPostingGrp.Cash(): | ||
ValidateRecordFields(Rec, CreateATGLAccount.BankCurrencies()); | ||
end; | ||
end; | ||
|
||
local procedure ValidateRecordFields(var BankAccountPostingGroup: Record "Bank Account Posting Group"; GLAccountNo: Code[20]) | ||
begin | ||
BankAccountPostingGroup.Validate("G/L Account No.", GLAccountNo); | ||
end; | ||
} |
31 changes: 31 additions & 0 deletions
31
...ffeeDemoDatasetAT/app/Demo Data/Bank/1. Setup Data/CreateBankExpImportSetupAT.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
codeunit 11159 "Create Bank ExpImport Setup AT" | ||
{ | ||
InherentEntitlements = X; | ||
InherentPermissions = X; | ||
|
||
trigger OnRun() | ||
var | ||
ContosoBank: Codeunit "Contoso Bank"; | ||
begin | ||
ContosoBank.ContosoBankExportImportSetup(SEPACTAPCT(), SEPACTAPCDescLbl, 0, Codeunit::"SEPA CT APC-Export File", Xmlport::"SEPA CT pain.001.001.03", '', false, Codeunit::"SEPA CT-Check Line"); | ||
ContosoBank.ContosoBankExportImportSetup(SEPACTAPC09(), SEPACTAPC09DescLbl, 0, Codeunit::"SEPA CT APC-Export File", Xmlport::"SEPA CT pain.001.001.09", '', false, Codeunit::"SEPA CT-Check Line"); | ||
end; | ||
|
||
procedure SEPACTAPCT(): Code[20] | ||
begin | ||
exit(SEPACTAPCTok); | ||
end; | ||
|
||
procedure SEPACTAPC09(): Code[20] | ||
begin | ||
exit(SEPACTAPC09Tok); | ||
end; | ||
|
||
|
||
|
||
var | ||
SEPACTAPCTok: Label 'SEPACTAPC', MaxLength = 20; | ||
SEPACTAPC09Tok: Label 'SEPACTAPC09', MaxLength = 20; | ||
SEPACTAPCDescLbl: Label 'SEPA Credit Transfer APC', MaxLength = 100; | ||
SEPACTAPC09DescLbl: Label 'SEPA Credit Transfer APC 09', MaxLength = 100; | ||
} |
34 changes: 34 additions & 0 deletions
34
...tosoCoffeeDemoDatasetAT/app/Demo Data/Bank/2. Master Data/CreateBankAccountAT.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
codeunit 11160 "Create Bank Account AT" | ||
{ | ||
SingleInstance = true; | ||
EventSubscriberInstance = Manual; | ||
InherentEntitlements = X; | ||
InherentPermissions = X; | ||
|
||
[EventSubscriber(ObjectType::Table, Database::"Bank Account", 'OnBeforeInsertEvent', '', false, false)] | ||
local procedure OnBeforeInsertBankAccount(var Rec: Record "Bank Account") | ||
var | ||
ContosoCoffeDemoDataSetup: Record "Contoso Coffee Demo Data Setup"; | ||
CreateBankAccount: Codeunit "Create Bank Account"; | ||
begin | ||
ContosoCoffeDemoDataSetup.Get(); | ||
case Rec."No." of | ||
CreateBankAccount.Checking(): | ||
ValidateBankAccount(Rec, CityGrazLbl, -1447200, ContosoCoffeDemoDataSetup."Country/Region Code", PostcodeGrazLbl); | ||
CreateBankAccount.Savings(): | ||
ValidateBankAccount(Rec, CityGrazLbl, 0, ContosoCoffeDemoDataSetup."Country/Region Code", PostcodeGrazLbl); | ||
end; | ||
end; | ||
|
||
local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccCity: Text[30]; MinBalance: Decimal; CountryRegionCode: Code[10]; PostCode: Code[20]) | ||
begin | ||
BankAccount.Validate("Post Code", PostCode); | ||
BankAccount.Validate(City, BankAccCity); | ||
BankAccount.Validate("Min. Balance", MinBalance); | ||
BankAccount.Validate("Country/Region Code", CountryRegionCode); | ||
end; | ||
|
||
var | ||
CityGrazLbl: Label 'Graz', MaxLength = 30; | ||
PostcodeGrazLbl: Label '8010', MaxLength = 20; | ||
} |
68 changes: 68 additions & 0 deletions
68
...CoffeeDemoDatasetAT/app/Demo Data/Bank/4. Historical Data/CreateBankAccRecoAT.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
codeunit 11161 "Create Bank Acc. Reco. AT" | ||
{ | ||
SingleInstance = true; | ||
EventSubscriberInstance = Manual; | ||
InherentEntitlements = X; | ||
InherentPermissions = X; | ||
|
||
trigger OnRun() | ||
begin | ||
UpdateBankAccReconciliation(); | ||
end; | ||
|
||
local procedure UpdateBankAccReconciliation() | ||
var | ||
BankAccReconciliation: Record "Bank Acc. Reconciliation"; | ||
CreateBankAccount: Codeunit "Create Bank Account"; | ||
begin | ||
if not BankAccReconciliation.Get(Enum::"Bank Acc. Rec. Stmt. Type"::"Bank Reconciliation", CreateBankAccount.Checking(), '24') then | ||
exit; | ||
|
||
BankAccReconciliation.Validate("Statement Ending Balance", 17924.53); | ||
BankAccReconciliation.Modify(); | ||
end; | ||
|
||
[EventSubscriber(ObjectType::Table, Database::"Bank Acc. Reconciliation Line", 'OnBeforeInsertEvent', '', false, false)] | ||
local procedure OnInsertRecord(var Rec: Record "Bank Acc. Reconciliation Line"; RunTrigger: Boolean) | ||
var | ||
CreateBankAccount: Codeunit "Create Bank Account"; | ||
begin | ||
if (Rec."Statement Type" = Rec."Statement Type"::"Bank Reconciliation") then begin | ||
if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = '24') then | ||
case Rec."Statement Line No." of | ||
10000: | ||
ValidateRecordFields(Rec, Rec.Description, 2757.62); | ||
20000: | ||
ValidateRecordFields(Rec, Rec.Description, 4136.43); | ||
30000: | ||
ValidateRecordFields(Rec, DepositToAccountLbl, 11030.48); | ||
end; | ||
end else | ||
if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = 'PREC000') then | ||
case Rec."Statement Line No." of | ||
10000: | ||
ValidateRecordFields(Rec, Rec.Description, -2520); | ||
20000: | ||
ValidateRecordFields(Rec, Rec.Description, -1828); | ||
30000: | ||
ValidateRecordFields(Rec, Rec.Description, -1340.1); | ||
40000: | ||
ValidateRecordFields(Rec, Rec.Description, 929.76); | ||
50000: | ||
ValidateRecordFields(Rec, Rec.Description, 10743.39); | ||
60000: | ||
ValidateRecordFields(Rec, Rec.Description, 3273.72); | ||
end; | ||
end; | ||
|
||
local procedure ValidateRecordFields(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; Description: Text[100]; Amount: Decimal) | ||
begin | ||
BankAccReconciliationLine.Validate(Description, Description); | ||
BankAccReconciliationLine.Validate("Transaction Text", Description); | ||
BankAccReconciliationLine.Validate("Statement Amount", Amount); | ||
BankAccReconciliationLine.Validate("Applied Amount", Amount); | ||
end; | ||
|
||
var | ||
DepositToAccountLbl: Label 'Deposit to Account 18.01.24', MaxLength = 100; | ||
} |
Oops, something went wrong.