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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/27.0.33563.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/27.0.36203.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "27.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ codeunit 17131 "AU Contoso Localization"
end;

local procedure InventoryModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level")
var
CreateAUInvPostingSetup: Codeunit "Create AU Inv Posting Setup";
begin
case ContosoDemoDataLevel of
Enum::"Contoso Demo Data Level"::"Setup Data":
Expand All @@ -75,7 +77,10 @@ codeunit 17131 "AU Contoso Localization"
Codeunit.Run(Codeunit::"Create AU Inv Posting Setup");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
Codeunit.Run(Codeunit::"Create AU Item Template");
begin
CreateAUInvPostingSetup.UpdateInventoryPosting();
Codeunit.Run(Codeunit::"Create AU Item Template");
end;
end;
end;

Expand Down Expand Up @@ -159,7 +164,10 @@ codeunit 17131 "AU Contoso Localization"
Codeunit.Run(Codeunit::"Create VAT Setup Post.Grp. AU");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU");
begin
Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU");
Codeunit.Run(Codeunit::"Create Allocation Account AU");
end;
end;
end;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ codeunit 17107 "Create AU GL Accounts"
ContosoGLAccount.InsertGLAccount(CreateGLAccount.PhoneandFax(), CreateGLAccount.PhoneandFaxName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.Postage(), CreateGLAccount.PostageName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);

ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.ConsultantServices(), CreateGLAccount.ConsultantServicesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', CreatePostingGroups.ServicesPostingGroup(), 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.ConsultantServices(), CreateGLAccount.ConsultantServicesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', CreatePostingGroups.ServicesPostingGroup(), 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.OtherComputerExpenses(), CreateGLAccount.OtherComputerExpensesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.Advertising(), CreateGLAccount.AdvertisingName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(CreateGLAccount.EntertainmentandPR(), CreateGLAccount.EntertainmentandPRName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ codeunit 17138 "Create AU Posting Groups"
local procedure UpdateGenProductPostingGroup()
var
GenProductPostingGroup: Record "Gen. Product Posting Group";
GLAccount: Record "G/L Account";
CreatePostingGroups: Codeunit "Create Posting Groups";
CreateAUVATPostingGroups: Codeunit "Create AU VAT Posting Groups";
CreateGLAccount: Codeunit "Create G/L Account";
begin
GenProductPostingGroup.Get(CreatePostingGroups.ServicesPostingGroup());
GenProductPostingGroup.Validate("Def. VAT Prod. Posting Group", CreateAUVATPostingGroups.Gst10());
Expand All @@ -66,6 +68,14 @@ codeunit 17138 "Create AU Posting Groups"
UpdateVATProdPostingGroupOnGLAccount(CreatePostingGroups.ZeroPostingGroup(), '');

UpdateVATProdPostingGroupOnGLAccount(CreatePostingGroups.FreightPostingGroup(), '');

GLAccount.Get(CreateGLAccount.Software());
GLAccount.Validate("VAT Prod. Posting Group", CreateAUVATPostingGroups.Gst10());
GLAccount.Modify(true);

GLAccount.Get(CreateGLAccount.ConsultantServices());
GLAccount.Validate("VAT Prod. Posting Group", CreateAUVATPostingGroups.Gst10());
GLAccount.Modify(true);
end;

local procedure UpdateGenBusinessPostingGroup()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace Microsoft.DemoData.Finance;

using Microsoft.DemoTool.Helpers;
using Microsoft.Finance.AllocationAccount;

codeunit 17180 "Create Allocation Account AU"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

trigger OnRun()
var
AllocationAccount: Record "Allocation Account";
AllocAccountDistribution: Record "Alloc. Account Distribution";
ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
CreateDimensionValue: Codeunit "Create Dimension Value";
CreateGLAccount: Codeunit "Create G/L Account";
begin
ContosoAllocationAccount.InsertAllocationAccount(
Licenses(), YearlyLicenseFeeTok,
AllocationAccount."Account Type"::Fixed, AllocationAccount."Document Lines Split"::"Split Amount");
ContosoAllocationAccount.InsertAllocationAccountDistribution(
Licenses(), 10000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccount.Software(), CreateDimensionValue.AdministrationDepartment(), '');
ContosoAllocationAccount.InsertAllocationAccountDistribution(
Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccount.Software(), CreateDimensionValue.SalesDepartment(), '');
end;

procedure Licenses(): Code[20]
begin
exit(LicensesTok);
end;

var
LicensesTok: Label 'LICENSES', MaxLength = 20;
YearlyLicenseFeeTok: Label 'Yearly license fee, design', MaxLength = 100;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ codeunit 17119 "Create AU Inv Posting Setup"
InherentPermissions = X;

trigger OnRun()
var
ContosoPostingSetup: Codeunit "Contoso Posting Setup";
CreateAUInvPostingGroup: Codeunit "Create AU Inv Posting Group";
CreateAUGLAccounts: Codeunit "Create AU GL Accounts";
CreateGLAccount: Codeunit "Create G/L Account";
begin
ContosoPostingSetup.SetOverwriteData(true);
ContosoPostingSetup.InsertInventoryPostingSetup(BlankLocationLbl, CreateAUInvPostingGroup.Finished(), CreateGLAccount.FinishedGoods(), CreateGLAccount.FinishedGoodsInterim(), CreateAUGLAccounts.WipAccountFinishedGoods(), CreateAUGLAccounts.MaterialVariance(), CreateAUGLAccounts.CapacityVariance(), CreateAUGLAccounts.SubcontractedVariance(), CreateAUGLAccounts.CapOverheadVariance(), CreateAUGLAccounts.MfgOverheadVariance());
ContosoPostingSetup.InsertInventoryPostingSetup(BlankLocationLbl, CreateAUInvPostingGroup.RAWMAT(), CreateGLAccount.RawMaterials(), CreateGLAccount.RawMaterialsInterim(), CreateAUGLAccounts.WipAccountFinishedGoods(), CreateAUGLAccounts.MaterialVariance(), CreateAUGLAccounts.CapacityVariance(), CreateAUGLAccounts.SubcontractedVariance(), CreateAUGLAccounts.CapOverheadVariance(), CreateAUGLAccounts.MfgOverheadVariance());

ContosoPostingSetup.SetOverwriteData(false);
end;

procedure UpdateInventoryPosting()
var
ContosoPostingSetup: Codeunit "Contoso Posting Setup";
CreateAUInvPostingGroup: Codeunit "Create AU Inv Posting Group";
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.DemoData.Localization;

using Microsoft.eServices.EDocument.Format;
using Microsoft.DemoData.Jobs;
using Microsoft.DemoData.Finance;
using Microsoft.Purchases.Document;
using Microsoft.Inventory.Item;
using Microsoft.DemoData.Foundation;

codeunit 17211 "Create EDocs From Resources AU"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;
EventSubscriberInstance = Manual;

var
EDocFromResourceHelper: Codeunit "E-Doc. From Resource Helper";

trigger OnRun()
begin
BindSubscription(this);
EDocFromResourceHelper.CreateEDocumentsFromResources();
UnbindSubscription(this);
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"E-Doc. From Resource Helper", OnGetListOfPDFResources, '', false, false)]
local procedure OnGetListOfPDFResources(var PDFResourcesList: List of [Text]; var IsHandled: Boolean)
begin
PDFResourcesList := NavApp.ListResources('PDFs/*.pdf');
IsHandled := true;
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"E-Doc ADI Handler Mock", OnBeforeGetADIJsonInStream, '', false, false)]
local procedure OnBeforeGetADIJsonInStream(var InStr: InStream; FileName: Text; var IsHandled: Boolean)
begin
NavApp.GetResource('ADIJsons/' + FileName, InStr);
IsHandled := true;
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"E-Doc. From Resource Helper", OnBeforeCreateEDocFromResourceMappings, '', false, false)]
local procedure OnBeforeCreateEDocFromResourceMappings(var IsHandled: Boolean)
var
EDocFromResourceMapping: Record "E-Doc From Resource Mapping";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateGLAccount: Codeunit "Create G/L Account";
CreateJobItem: Codeunit "Create Job Item";
begin
CreateEDocFromResourceMappingForItem(EDocFromResourceMapping, CreateEDocumentMasterData.PrecisionGrindHome());
CreateEDocFromResourceMappingForItem(EDocFromResourceMapping, CreateEDocumentMasterData.SmartGrindHome());
CreateEDocFromResourceMappingForItem(EDocFromResourceMapping, CreateEDocumentMasterData.WholeDecafBeansColombia());
CreateEDocFromResourceMappingForItem(EDocFromResourceMapping, CreateJobItem.ItemConsumable());
CreateEDocFromResourceMappingForItem(EDocFromResourceMapping, CreateJobItem.ItemSupply());

CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: January', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: February', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: March', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: April', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: May', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
CreateEDocFromResourceMapping(EDocFromResourceMapping, 'IT Support Support period: December', Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices());
IsHandled := true;
end;


local procedure CreateEDocFromResourceMappingForItem(var EDocFromResourceMapping: Record "E-Doc From Resource Mapping"; ItemNo: Code[20])
var
Item: Record Item;
CreateUnitOfMeasure: Codeunit "Create Unit of Measure";
begin
Item.Get(ItemNo);
CreateEDocFromResourceMapping(EDocFromResourceMapping, Item.Description, Enum::"Purchase Line Type"::Item, Item."No.", Item."No.", CreateUnitOfMeasure.Piece());
end;

local procedure CreateEDocFromResourceMapping(var EDocFromResourceMapping: Record "E-Doc From Resource Mapping"; Description: Text[100]; Type: Enum "Purchase Line Type"; No: Code[20])
begin
CreateEDocFromResourceMapping(EDocFromResourceMapping, Description, Type, No, '', '');
end;

local procedure CreateEDocFromResourceMapping(var EDocFromResourceMapping: Record "E-Doc From Resource Mapping"; Description: Text[100]; Type: Enum "Purchase Line Type"; No: Code[20]; ProductCode: Text[100]; UnitOfMeasureCode: Code[10])
begin
EDocFromResourceMapping.ID += 1;
EDocFromResourceMapping.Description := Description;
EDocFromResourceMapping.Type := Type;
EDocFromResourceMapping."No." := No;
EDocFromResourceMapping."Product Code" := ProductCode;
EDocFromResourceMapping."Unit of Measure" := UnitOfMeasureCode;
EDocFromResourceMapping.Insert();
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"E-Doc. From Resource Helper", OnGetResourceInStreamWhenImportDocument, '', false, false)]
local procedure OnGetResourceInStreamWhenImportDocument(var InStr: InStream; ResourceName: Text; var IsHandled: Boolean)
begin
NavApp.GetResource(ResourceName, InStr);
IsHandled := true;
end;
}
31 changes: 31 additions & 0 deletions Apps/AU/EDocument_AU/demo data/EDocDemodataAU.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace Microsoft.DemoData.Localization;

using Microsoft.DemoTool;

codeunit 17212 "E-Doc. Demodata AU"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Contoso Demo Tool", 'OnAfterGeneratingDemoData', '', false, false)]
local procedure LocalizationContosoDemoData(Module: Enum "Contoso Demo Data Module"; ContosoDemoDataLevel: Enum "Contoso Demo Data Level")
begin
if Module <> Enum::"Contoso Demo Data Module"::"E-Document Contoso Module" then
exit;
EDocumentModule(ContosoDemoDataLevel);
end;

local procedure EDocumentModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level")
begin
case ContosoDemoDataLevel of
Enum::"Contoso Demo Data Level"::"Transactional Data":
Codeunit.Run(Codeunit::"Create EDocs From Resources AU");
end;
end;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions Apps/AU/EDocument_AU/demo data/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"id": "444799e3-0d2d-4f83-b869-6ba642eb54a3",
"name": "E-Document Core Demo Data (AU)",
"publisher": "Microsoft",
"brief": "The Dynamics 365 Business Central E-Documents module enables different models of electronic invoicing, available for additional localizations.",
"description": "Business Central's E-Documents module is the foundation layer for all e-invoicing standards covering most common processes, but it can be used for other electronic documents. The module is easily extendable with the country-based e-invoicing apps. The E-Documents app covers both sales and purchase processes and can have different lifecycles from standard invoices in Business Central.",
"version": "27.0.0.0",
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://go.microsoft.com/fwlink/?linkid=2204541",
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"logo": "ExtensionLogo.png",
"contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2206603",
"dependencies": [
{
"id": "e1d97edc-c239-46b4-8d84-6368bdf67c8b",
"name": "E-Document Core",
"publisher": "Microsoft",
"version": "27.0.0.0"
},
{
"id": "de0dddf3-9917-430d-8d20-6e7679a08500",
"name": "E-Document Core Demo Data",
"publisher": "Microsoft",
"version": "27.0.0.0"
},
{
"id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
"name": "Contoso Coffee Demo Dataset",
"publisher": "Microsoft",
"version": "27.0.0.0"
},
{
"id": "4b0b41f9-7a13-4231-d521-2465186cfb32",
"name": "Contoso Coffee Demo Dataset (AU)",
"publisher": "Microsoft",
"version": "27.0.0.0"
}
],
"screenshots": [],
"platform": "27.0.0.0",
"idRanges": [
{
"from": 17211,
"to": 17215
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0",
"target": "OnPrem",
"resourceFolders": [
".resources"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ codeunit 27054 "CA Contoso Localization"
end;

local procedure InventoryModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level")
var
CreateCAInvPostingSetup: Codeunit "Create CA Inv. Posting Setup";
begin
case ContosoDemoDataLevel of
Enum::"Contoso Demo Data Level"::"Setup Data":
begin
Codeunit.Run(Codeunit::"Create CA Inv. Posting Group");
Codeunit.Run(Codeunit::"Create CA Inv. Posting Setup");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
CreateCAInvPostingSetup.UpdateInventoryPosting();
end;
end;

Expand Down
Loading
Loading