Skip to content

Commit

Permalink
Syncing with version 25.0.23141.0 (#27112)
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstrup1 authored Aug 22, 2024
1 parent 87b9cba commit 2a768e4
Show file tree
Hide file tree
Showing 277 changed files with 9,020 additions and 1,445 deletions.
120 changes: 60 additions & 60 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
{
"type": "PTE",
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
"bcContainerHelperVersion": "preview",
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.22684.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "25.0",
"cleanModePreprocessorSymbols": [
"CLEAN17",
"CLEAN18",
"CLEAN19",
"CLEAN20",
"CLEAN21",
"CLEAN22",
"CLEAN23",
"CLEAN24"
],
"unusedALGoSystemFiles": [
"AddExistingAppOrTestApp.yaml",
"CreateApp.yaml",
"CreateOnlineDevelopmentEnvironment.yaml",
"CreatePerformanceTestApp.yaml",
"CreateRelease.yaml",
"CreateTestApp.yaml",
"Current.yaml",
"IncrementVersionNumber.yaml",
"NextMajor.yaml",
"NextMinor.yaml",
"PublishToEnvironment.yaml",
"Test Current.settings.json"
],
"excludeEnvironments": [
"Official-Build"
],
"buildModes": [
"Translated"
],
"CICDPushBranches": [
"main"
],
"CICDPullRequestBranches": [
"main"
],
"enableCodeCop": true,
"enableAppSourceCop": true,
"enablePerTenantExtensionCop": true,
"enableUICop": true,
"rulesetFile": "..\\..\\..\\Build\\rulesets\\app.ruleset.json",
"skipUpgrade": true,
"fullBuildPatterns": [
"Build/*",
".github/workflows/PullRequestHandler.yaml",
".github/workflows/_BuildALGoProject.yaml"
],
"UpdateALGoSystemFilesEnvironment": "Official-Build",
"PullRequestTrigger": "pull_request",
"templateSha": "0476547896ebcd3ba5455b3e0e59b48c0d4a26ca"
"type": "PTE",
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
"bcContainerHelperVersion": "preview",
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.23141.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "25.0",
"cleanModePreprocessorSymbols": [
"CLEAN17",
"CLEAN18",
"CLEAN19",
"CLEAN20",
"CLEAN21",
"CLEAN22",
"CLEAN23",
"CLEAN24"
],
"unusedALGoSystemFiles": [
"AddExistingAppOrTestApp.yaml",
"CreateApp.yaml",
"CreateOnlineDevelopmentEnvironment.yaml",
"CreatePerformanceTestApp.yaml",
"CreateRelease.yaml",
"CreateTestApp.yaml",
"Current.yaml",
"IncrementVersionNumber.yaml",
"NextMajor.yaml",
"NextMinor.yaml",
"PublishToEnvironment.yaml",
"Test Current.settings.json"
],
"excludeEnvironments": [
"Official-Build"
],
"buildModes": [
"Translated"
],
"CICDPushBranches": [
"main"
],
"CICDPullRequestBranches": [
"main"
],
"enableCodeCop": true,
"enableAppSourceCop": true,
"enablePerTenantExtensionCop": true,
"enableUICop": true,
"rulesetFile": "..\\..\\..\\Build\\rulesets\\app.ruleset.json",
"skipUpgrade": true,
"fullBuildPatterns": [
"Build/*",
".github/workflows/PullRequestHandler.yaml",
".github/workflows/_BuildALGoProject.yaml"
],
"UpdateALGoSystemFilesEnvironment": "Official-Build",
"PullRequestTrigger": "pull_request",
"templateSha": "0476547896ebcd3ba5455b3e0e59b48c0d4a26ca"
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ codeunit 31390 "Match Bank Payment Handler CZZ"
end;

[EventSubscriber(ObjectType::Table, Database::"Search Rule CZB", 'OnAfterInsertRuleLine', '', false, false)]
local procedure AddAdvanceRuleLineOnAfterInsertRuleLine(SearchRuleLineCZB: Record "Search Rule Line CZB"; var LineNo: Integer; Description: Text)
local procedure AddAdvanceRuleLineOnAfterInsertRuleLine(SearchRuleLineCZB: Record "Search Rule Line CZB"; var LineNo: Integer)
var
AdvanceSearchRuleLineCZB: Record "Search Rule Line CZB";
DescriptionTxt: Label 'Both, Advance, %1', Comment = '%1 = Line Description';
begin
if SearchRuleLineCZB."Banking Transaction Type" <> SearchRuleLineCZB."Banking Transaction Type"::Both then
exit;
Expand All @@ -178,8 +177,7 @@ codeunit 31390 "Match Bank Payment Handler CZZ"
LineNo += 10000;
AdvanceSearchRuleLineCZB := SearchRuleLineCZB;
AdvanceSearchRuleLineCZB."Line No." := LineNo;
AdvanceSearchRuleLineCZB.Validate(Description, CopyStr(StrSubstNo(DescriptionTxt, Description), 1, MaxStrLen(SearchRuleLineCZB.Description)));
AdvanceSearchRuleLineCZB.Validate("Banking Transaction Type", AdvanceSearchRuleLineCZB."Banking Transaction Type"::Both);
AdvanceSearchRuleLineCZB.Description := '';
AdvanceSearchRuleLineCZB.Validate("Search Scope", AdvanceSearchRuleLineCZB."Search Scope"::"Advance CZZ");
AdvanceSearchRuleLineCZB.Insert(true);
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ using Microsoft.Foundation.Enums;
codeunit 31157 "Non-Deductible VAT CZZ"
{
var
NonDeductibleVAT: Codeunit "Non-Deductible VAT";
NonDeductibleVATCZL: Codeunit "Non-Deductible VAT CZL";

procedure IsNonDeductibleVATEnabled(): Boolean
var
VATSetup: Record "VAT Setup";
begin
if not NonDeductibleVAT.IsNonDeductibleVATEnabled() then
if not NonDeductibleVATCZL.IsNonDeductibleVATEnabled() then
exit(false);
VATSetup.Get();
exit(VATSetup."Use For Advances CZZ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ codeunit 31022 "Purch.-Post Handler CZZ"
if (not PurchHeader.Invoice) or (not PurchHeader.IsAdvanceLetterDocTypeCZZ()) then
exit;

PurchInvHeader.CalcFields("Remaining Amount");
if PurchInvHeader."Remaining Amount" = 0 then
exit;

AdvLetterUsageDocTypeCZZ := PurchHeader.GetAdvLetterUsageDocTypeCZZ();

VendorLedgerEntry.Get(PurchInvHeader."Vendor Ledger Entry No.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ codeunit 31008 "Sales-Post Handler CZZ"
if (not SalesHeader.Invoice) or (not SalesHeader.IsAdvanceLetterDocTypeCZZ()) then
exit;

SalesInvoiceHeader.CalcFields("Remaining Amount");
if SalesInvoiceHeader."Remaining Amount" = 0 then
exit;

AdvLetterUsageDocTypeCZZ := SalesHeader.GetAdvLetterUsageDocTypeCZZ();

CustLedgerEntry.Get(SalesInvoiceHeader."Cust. Ledger Entry No.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ using Microsoft.Purchases.Setup;

pageextension 31108 "Purchases & Payables Setup CZZ" extends "Purchases & Payables Setup"
{
layout
{
modify("Posted Prepmt. Inv. Nos.")
{
Visible = false;
}
modify("Posted Prepmt. Cr. Memo Nos.")
{
Visible = false;
}
}
actions
{
addlast(navigation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ using Microsoft.Sales.Setup;

pageextension 31107 "Sales & Receivables Setup CZZ" extends "Sales & Receivables Setup"
{

layout
{
modify("Posted Prepmt. Inv. Nos.")
{
Visible = false;
}
modify("Posted Prepmt. Cr. Memo Nos.")
{
Visible = false;
}
}
actions
{
addlast(navigation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,42 +85,41 @@ table 31250 "Search Rule CZB"
var
SearchRuleLineCZB: Record "Search Rule Line CZB";
LineNo: Integer;
BankAccountVariableSymbolAmountFirstTxt: Label 'Bank Account No., Variable Symbol, Amount, First';
BankAccountVariableSymbolFirstTxt: Label 'Bank Account No., Variable Symbol, First';
VariableSymbolFirstTxt: Label 'Variable Symbol, First';
begin
SearchRuleLineCZB.SetRange("Search Rule Code", Code);
if not SearchRuleLineCZB.IsEmpty() then
exit;

InsertRuleLine(Code, LineNo, BankAccountVariableSymbolAmountFirstTxt, true, true);
InsertRuleLine(Code, LineNo, BankAccountVariableSymbolFirstTxt, true, false);
InsertRuleLine(Code, LineNo, VariableSymbolFirstTxt, false, false);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::"First Created Entry", true, true, true, false);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::"First Created Entry", true, true, false, false);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::"First Created Entry", false, true, true, false);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::Continue, true, false, true, true);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::Continue, false, true, false, true);
InsertRuleLine(Code, LineNo, "Multiple Search Result CZB"::Continue, true, false, false, true);

OnAfterCreateDefaultLines(Code, LineNo);
end;

local procedure InsertRuleLine(Code: Code[10]; var LineNo: Integer; Description: Text; BankAccountNo: Boolean; Amount: Boolean)
local procedure InsertRuleLine(Code: Code[10]; var LineNo: Integer; MultipleSearchResult: Enum "Multiple Search Result CZB"; BankAccountNo: Boolean; VariableSymbol: Boolean; Amount: Boolean; MatchRelatedPartyOnly: Boolean)
var
SearchRuleLineCZB: Record "Search Rule Line CZB";
DescriptionTxt: Label 'Both, Balance, %1', Comment = '%1 = Line Description';
begin
LineNo += 10000;
SearchRuleLineCZB.Init();
SearchRuleLineCZB."Search Rule Code" := Code;
SearchRuleLineCZB."Line No." := LineNo;
SearchRuleLineCZB.Validate(Description, CopyStr(StrSubstNo(DescriptionTxt, Description), 1, MaxStrLen(SearchRuleLineCZB.Description)));
SearchRuleLineCZB.Validate("Banking Transaction Type", SearchRuleLineCZB."Banking Transaction Type"::Both);
SearchRuleLineCZB.Validate("Search Scope", SearchRuleLineCZB."Search Scope"::Balance);
SearchRuleLineCZB.Validate("Bank Account No.", BankAccountNo);
SearchRuleLineCZB.Validate("Variable Symbol", true);
SearchRuleLineCZB.Validate("Variable Symbol", VariableSymbol);
SearchRuleLineCZB.Validate("Constant Symbol", false);
SearchRuleLineCZB.Validate("Specific Symbol", false);
SearchRuleLineCZB.Validate(Amount, Amount);
SearchRuleLineCZB.Validate("Multiple Result", SearchRuleLineCZB."Multiple Result"::"First Created Entry");
SearchRuleLineCZB.Validate("Multiple Result", MultipleSearchResult);
SearchRuleLineCZB.Validate("Match Related Party Only", MatchRelatedPartyOnly);
SearchRuleLineCZB.Insert(true);

OnAfterInsertRuleLine(SearchRuleLineCZB, LineNo, Description);
OnAfterInsertRuleLine(SearchRuleLineCZB, LineNo, '');
end;

[IntegrationEvent(false, false)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.HumanResources.Employee;
using Microsoft.Purchases.Vendor;
using Microsoft.Sales.Customer;
using System.Reflection;

table 31251 "Search Rule Line CZB"
{
Expand Down Expand Up @@ -239,6 +240,12 @@ table 31251 "Search Rule Line CZB"
}
}

trigger OnInsert()
begin
if Description = '' then
Description := BuildDescription();
end;

local procedure CheckSearchRule()
begin
if ("Search Scope" = "Search Scope"::"Account Mapping") then
Expand Down Expand Up @@ -293,4 +300,33 @@ table 31251 "Search Rule Line CZB"
SearchRuleLine.Rename("Search Rule Code", OldLineNo);
Rec.Rename("Search Rule Code", NewLineNo);
end;

local procedure BuildDescription(): Text[100]
var
TypeHelper: Codeunit "Type Helper";
DescriptionBuilder: TextBuilder;
BankAccountNoTxt: Label 'Bank Account No.';
VariableSymbolTxt: Label 'Variable Symbol';
ConstantSymbolTxt: Label 'Constant Symbol';
SpecificSymbolTxt: Label 'Specific Symbol';
AmountTxt: Label 'Amount';
FirstTxt: Label 'First';
SeparatorTok: Label ', ', Locked = true;
begin
DescriptionBuilder.AppendLine(Format("Banking Transaction Type"));
DescriptionBuilder.AppendLine(Format("Search Scope"));
if "Bank Account No." then
DescriptionBuilder.AppendLine(BankAccountNoTxt);
if "Variable Symbol" then
DescriptionBuilder.AppendLine(VariableSymbolTxt);
if "Constant Symbol" then
DescriptionBuilder.AppendLine(ConstantSymbolTxt);
if "Specific Symbol" then
DescriptionBuilder.AppendLine(SpecificSymbolTxt);
if Amount then
DescriptionBuilder.AppendLine(AmountTxt);
if "Multiple Result" = "Multiple Result"::"First Created Entry" then
DescriptionBuilder.AppendLine(FirstTxt);
exit(CopyStr(DescriptionBuilder.ToText().Replace(TypeHelper.CRLFSeparator(), SeparatorTok).TrimEnd(SeparatorTok), 1, 100));
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Microsoft.Finance.CashDesk;

using Microsoft.Bank.BankAccount;
using Microsoft.Finance.AllocationAccount;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.VAT.Setup;
Expand Down Expand Up @@ -91,7 +92,8 @@ table 11746 "Cash Desk Event CZP"
if ("Account Type" = const(Vendor)) Vendor else
if ("Account Type" = const(Employee)) Employee else
if ("Account Type" = const("Bank Account")) "Bank Account" where("Account Type CZP" = const("Bank Account")) else
if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
if ("Account Type" = const("Fixed Asset")) "Fixed Asset" else
if ("Account Type" = const("Allocation Account")) "Allocation Account";
DataClassification = CustomerContent;

trigger OnValidate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ page 31276 "Compensation Proposal CZC"
end;
CompensationsSetupCZC."Compensation Proposal Method"::"Bussiness Relation":
begin
Customer."No." := SourceNo;
ContactBusinessRelation.SetCurrentKey("Link to Table", "No.");
ContactBusinessRelation.SetRange("Link to Table", ContactBusinessRelation."Link to Table"::Customer);
ContactBusinessRelation.SetRange("No.", SourceNo);
Expand Down Expand Up @@ -274,6 +275,7 @@ page 31276 "Compensation Proposal CZC"
end;
CompensationsSetupCZC."Compensation Proposal Method"::"Bussiness Relation":
begin
Vendor."No." := SourceNo;
ContactBusinessRelation.SetCurrentKey("Link to Table", "No.");
ContactBusinessRelation.SetRange("Link to Table", ContactBusinessRelation."Link to Table"::Vendor);
ContactBusinessRelation.SetRange("No.", SourceNo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ codeunit 31212 "Create CZ GL Accounts"
ContosoGLAccount.AddAccountForLocalization(FixedAssetModuleCZ.AppreciationBalSoftwareName(), '041100');
ContosoGLAccount.AddAccountForLocalization(FixedAssetModuleCZ.SalesBalSoftwareName(), '395100');
ContosoGLAccount.AddAccountForLocalization(FixedAssetModuleCZ.BookValueBalonDisposalSoftwareName(), '073100');

ContosoGLAccount.AddAccountForLocalization(FixedAssetModuleCZ.SalesFixedAssetsName(), '641100');
ContosoGLAccount.InsertGLAccount(FixedAssetModuleCZ.SalesFixedAssets(), FixedAssetModuleCZ.SalesFixedAssetsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Income, Enum::"G/L Account Type"::Posting);
ContosoGLAccount.AddAccountForLocalization(FixedAssetModuleCZ.ConsumableMaterialsName(), '501100');
ContosoGLAccount.InsertGLAccount(FixedAssetModuleCZ.ConsumableMaterials(), FixedAssetModuleCZ.ConsumableMaterialsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create HR GL Account", 'OnAfterAddGLAccountsForLocalization', '', false, false)]
Expand Down
Loading

0 comments on commit 2a768e4

Please sign in to comment.