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
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
namespace Microsoft.Foundation.Address;

using Microsoft.Foundation.Company;

codeunit 31144 "Format Address Handler CZL"
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Format Address", 'OnAfterGeneratePostCodeCity', '', false, false)]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Format Address", OnAfterGeneratePostCodeCity, '', false, false)]
local procedure ClearCountyOnAfterGeneratePostCodeCity(var Country: Record "Country/Region"; var CountyText: Text[50])
begin
ClearCounty(Country, CountyText);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Format Address", OnBeforeGetCompanyAddr, '', false, false)]
local procedure HandleOnBeforeGetCompanyAddr(var CompanyInfo: Record "Company Information"; var CompanyAddr: array[8] of Text[100]; var IsHandled: Boolean)
var
FormatAddress: Codeunit "Format Address";
begin
if CompanyInfo."Report Address Source CZL" = CompanyInfo."Report Address Source CZL"::"Company Information" then begin
FormatAddress.Company(CompanyAddr, CompanyInfo);
IsHandled := true;
end;
end;

local procedure ClearCounty(var Country: Record "Country/Region"; var CountyText: Text[50])
var
IsHandled: Boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Foundation.Address;

enum 11704 "Report Address Source CZL"
{
Extensible = true;

value(0; "Company Information")
{
Caption = 'Company Information';
}
value(1; "Responsibility Center")
{
Caption = 'Responsibility Center';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ pageextension 11700 "Company Information CZL" extends "Company Information"
{
Visible = true;
}
addlast(Communication)
{
field("Report Address Source CZL"; Rec."Report Address Source CZL")
{
ApplicationArea = Basic, Suite;
Importance = Additional;
}
}
}
actions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Microsoft.Foundation.Company;

using Microsoft.Bank.BankAccount;
using Microsoft.Foundation.Address;

tableextension 11747 "Company Information CZL" extends "Company Information"
{
Expand Down Expand Up @@ -56,6 +57,12 @@ tableextension 11747 "Company Information CZL" extends "Company Information"
Caption = 'Tax Registration No.';
DataClassification = CustomerContent;
}
field(11785; "Report Address Source CZL"; Enum "Report Address Source CZL")
{
Caption = 'Report Address Source';
DataClassification = CustomerContent;
ToolTip = 'Specifies whether the address used in reports, such as printed sales and purchase documents, is taken from Company Information or from the Responsibility Center.';
}
}

procedure UpdateBankInfoCZL(BankAccountCode: Code[20]; BankAccountNo: Text[30]; BankBranchNo: Text[20]; BankName: Text[100]; TransitNo: Text[20]; IBANCode: Code[50]; SWIFTCode: Code[20])
Expand Down
Loading