Skip to content

Commit

Permalink
Syncing with version 26.0.26183.0 (#27582)
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstrup1 authored Nov 1, 2024
1 parent ea13da4 commit 55a817f
Show file tree
Hide file tree
Showing 39 changed files with 326 additions and 463 deletions.
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.25961.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.26183.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "26.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ codeunit 31247 "Calc. Normal Depr. Handler CZF"
#endregion Use FA Ledger Check

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Depreciation Calculation", 'OnBeforeCalcRounding', '', false, false)]
local procedure RoundUpOnBeforeCalcRounding(DeprBook: Record "Depreciation Book"; var DeprAmount: Decimal; var IsHandled: Boolean)
local procedure RoundUpOnBeforeCalcRounding(DeprBook: Record "Depreciation Book"; OrigDeprAmount: Decimal; var DeprAmount: Decimal; var IsHandled: Boolean)
begin
if DeprBook."Use Rounding in Periodic Depr." then begin
DeprAmount := Round(DeprAmount, 1, '>');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ codeunit 31235 "FA Disposal Handler CZF"
CalculateDisposal.CalcGainLoss(FANo, DeprBookCode, EntryAmounts);
for i := 1 to 14 do
if EntryAmounts[i] <> 0 then begin
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(i);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(i);
FALedgEntry."FA Posting Type" := "FA Ledger Entry FA Posting Type".FromInteger(CalculateDisposal.SetFAPostingType(i));
FALedgEntry.Amount := EntryAmounts[i];
if i = 1 then
Expand Down Expand Up @@ -324,12 +324,12 @@ codeunit 31235 "FA Disposal Handler CZF"
10:
FAPostingType := FAPostingType::BookVal;
end;
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(4);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(4);
FALedgEntry."FA Posting Type" := CalculateDisposal.SetFAPostingType(4);
FALedgEntry.Amount := -EntryAmounts[i];
FAInsertLedgEntry.InsertFA(FALedgEntry);
if i in [3, 5, 6, 10] then begin
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(i);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(i);
FALedgEntry."FA Posting Type" := CalculateDisposal.SetFAPostingType(i);
FALedgEntry.Amount := EntryAmounts[i];
end;
Expand All @@ -345,7 +345,7 @@ codeunit 31235 "FA Disposal Handler CZF"
CalculateDisposal.CalcSecondGainLoss(FANo, DeprBookCode, FALedgEntry.Amount, EntryAmounts);
for i := 1 to 2 do
if EntryAmounts[i] <> 0 then begin
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(i);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(i);
FALedgEntry."FA Posting Type" := "FA Ledger Entry FA Posting Type".FromInteger(CalculateDisposal.SetFAPostingType(i));
FALedgEntry.Amount := EntryAmounts[i];
if i = 1 then
Expand All @@ -372,7 +372,7 @@ codeunit 31235 "FA Disposal Handler CZF"
if EntryNumbers[i] <> 0 then begin
FALedgEntry.Amount := EntryAmounts[i];
FALedgEntry."Entry No." := EntryNumbers[i];
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(i);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(i);
FALedgEntry."FA Posting Type" := "FA Ledger Entry FA Posting Type".FromInteger(CalculateDisposal.SetFAPostingType(i));
if i = 1 then
FALedgEntry."Result on Disposal" := FALedgEntry."Result on Disposal"::Gain;
Expand Down Expand Up @@ -406,13 +406,13 @@ codeunit 31235 "FA Disposal Handler CZF"
10:
FAPostingType := FAPostingType::BookVal;
end;
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(4);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(4);
FALedgEntry."FA Posting Type" := CalculateDisposal.SetFAPostingType(4);
FALedgEntry.Amount := -EntryAmounts[i];
FALedgEntry."Entry No." := EntryNumbers[i] + 1;
FAInsertLedgEntry.InsertFA(FALedgEntry);
if i in [3, 5, 6, 10] then begin
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFAPostingCategory(i);
FALedgEntry."FA Posting Category" := CalculateDisposal.SetFALedgerPostingCategory(i);
FALedgEntry."FA Posting Type" := CalculateDisposal.SetFAPostingType(i);
FALedgEntry.Amount := EntryAmounts[i];
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ codeunit 18017 "GST Tax Configuration"
UseCases.Add('{AFA9BC82-6757-44E3-B5E4-00029DACDA64}', 4);
UseCases.Add('{8EECE1FD-4BDB-4A37-92ED-00380C170CFC}', 3);
UseCases.Add('{38583B1E-682C-4B06-BB69-005849014E82}', 1);
UseCases.Add('{46054EB7-3CE7-421C-B047-00658AC5C150}', 2);
UseCases.Add('{46054EB7-3CE7-421C-B047-00658AC5C150}', 3);
UseCases.Add('{D2457D2F-2B0E-4F56-BF93-007E245C4FF8}', 1);
UseCases.Add('{E9E7486C-DBFB-432C-886F-017AD828CE5E}', 6);
UseCases.Add('{6D031AA1-2009-4D4A-A8E7-01D9116EDC5C}', 3);
Expand All @@ -77,7 +77,7 @@ codeunit 18017 "GST Tax Configuration"
UseCases.Add('{BBD37D0A-E328-4544-B5E1-03FCF65399D5}', 6);
UseCases.Add('{1C2FBFBD-A18B-4A5D-819E-043993E5510C}', 6);
UseCases.Add('{4684DF92-D578-4978-B4EC-04ACC07C8206}', 4);
UseCases.Add('{668C2032-DD90-4A23-8F30-04B69FE7C99E}', 2);
UseCases.Add('{668C2032-DD90-4A23-8F30-04B69FE7C99E}', 3);
UseCases.Add('{C89845E0-C8B1-45B1-9C1B-04EC264B7AC7}', 5);
UseCases.Add('{76F9EC4B-C6F3-4DBE-B1CA-04EFC5AD609E}', 5);
UseCases.Add('{4AC1A712-CC9B-4CB7-91EA-05245C1D7211}', 4);
Expand Down
14 changes: 12 additions & 2 deletions Apps/IN/INGST/app/Translations/India GST.en-GB.xlf

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions Apps/IN/INGST/app/Translations/India GST.en-US.xlf

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ codeunit 10684 "Elec. VAT Create Content"
VATReportHeader: Record "VAT Report Header";
VATReportingCode: Record "VAT Reporting Code";
VATSpecification: Record "VAT Specification";
VATNote: Record "VAT Note";
ElecVATXMLHelper: Codeunit "Elec. VAT XML Helper";
ElecVATDataMgt: Codeunit "Elec. VAT Data Mgt.";
OriginalVATCode: Code[20];
Expand Down Expand Up @@ -106,16 +105,7 @@ codeunit 10684 "Elec. VAT Create Content"
ElecVATXMLHelper.AppendXMLNode('sats', Format(VATReportingCode."VAT Rate For Reporting", 0, '<Integer><Decimals><Comma,,>'));
end;
ElecVATXMLHelper.AppendXMLNode('merverdiavgift', GetAmountTextRounded(GetReportingVATAmountFromVATStatementReportLine(TempVATStatementReportLine, VATReportingCode)));
if (VATReportingCode."VAT Note Code" <> '') or (TempVATStatementReportLine.Note <> '') then begin
ElecVATXMLHelper.AddNewXMLNode('merknad', '');
if VATReportingCode."VAT Note Code" = '' then
ElecVATXMLHelper.AppendXMLNode('beskrivelse', TempVATStatementReportLine.Note)
else begin
VATNote.Get(VATReportingCode."VAT Note Code");
ElecVATXMLHelper.AppendXMLNode('utvalgtMerknad', VATNote."VAT Report Value");
end;
ElecVATXMLHelper.FinalizeXMLNode();
end;
AddNoteToXML(ElecVATXMLHelper, VATReportingCode, TempVATStatementReportLine);
ElecVATXMLHelper.FinalizeXMLNode();
if IsReverseCharge then begin
ElecVATXMLHelper.AddNewXMLNode('mvaSpesifikasjonslinje', '');
Expand All @@ -126,12 +116,7 @@ codeunit 10684 "Elec. VAT Create Content"
end;
ElecVATXMLHelper.AppendXMLNode('mvaKodeRegnskapsystem', TempVATStatementReportLine.Description);
ElecVATXMLHelper.AppendXMLNode('merverdiavgift', GetAmountTextRounded(-TempVATStatementReportLine.Amount));
if VATReportingCode."VAT Note Code" <> '' then begin
VATNote.Get(VATReportingCode."VAT Note Code");
ElecVATXMLHelper.AddNewXMLNode('merknad', '');
ElecVATXMLHelper.AppendXMLNode('utvalgtMerknad', VATNote."VAT Report Value");
ElecVATXMLHelper.FinalizeXMLNode();
end;
AddNoteToXML(ElecVATXMLHelper, VATReportingCode, TempVATStatementReportLine);
ElecVATXMLHelper.FinalizeXMLNode();
end;
until TempVATStatementReportLine.Next() = 0;
Expand Down Expand Up @@ -312,4 +297,20 @@ codeunit 10684 "Elec. VAT Create Content"
exit(VATStatementReportLine.Amount);
exit(VATStatementReportLine.Amount + VATStatementReportLine."Non-Deductible Amount");
end;

local procedure AddNoteToXML(var ElecVATXMLHelper: Codeunit "Elec. VAT XML Helper"; VATReportingCode: Record "VAT Reporting Code"; VATStatementReportLine: Record "VAT Statement Report Line")
var
VATNote: Record "VAT Note";
begin
if (VATReportingCode."VAT Note Code" <> '') or (VATStatementReportLine.Note <> '') then begin
ElecVATXMLHelper.AddNewXMLNode('merknad', '');
if VATReportingCode."VAT Note Code" = '' then
ElecVATXMLHelper.AppendXMLNode('beskrivelse', VATStatementReportLine.Note)
else begin
VATNote.Get(VATReportingCode."VAT Note Code");
ElecVATXMLHelper.AppendXMLNode('utvalgtMerknad', VATNote."VAT Report Value");
end;
ElecVATXMLHelper.FinalizeXMLNode();
end;
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,35 @@ codeunit 148131 "Elec. VAT Submission XML Tests"
VATStatementReportLine.Base + VATStatementReportLine."Non-Deductible Base", VATStatementReportLine.Amount + VATStatementReportLine."Non-Deductible Amount");
end;

[Test]
procedure VATCode81NegativeValueWithNote()
var
VATReportHeader: Record "VAT Report Header";
VATStatementReportLine: Record "VAT Statement Report Line";
TempXMLBuffer: Record "XML Buffer" temporary;
VATReportMediator: Codeunit "VAT Report Mediator";
begin
// [SCENARIO 544346] Stan can report the negative VAT for code 81 with a note in the electronic VAT declaration

Initialize();
SetVATRegNoInCompanyInfo(GetVATRegNoWithLetters());
// [GIVEN] VAT return with "VAT %" = 25, Base = -150, Amount = -35 and Note = "This is correction"
InsertMonthlyElecVATReportHeader(VATReportHeader);
// [GIVEN] VAT Code is 81
LibraryElecVATSubmission.InsertVATStatementReportLineWithBoxNo(VATStatementReportLine, VATReportHeader, GetReverseChargeVATCode());
VATStatementReportLine.Base := -VATStatementReportLine.Base;
VATStatementReportLine.Amount := -VATStatementReportLine.Amount;
VATStatementReportLine.Note := LibraryUtility.GenerateGUID();
VATStatementReportLine.Modify();

// [WHEN] Generate Electronic VAT declaration message
VATReportMediator.Generate(VATReportHeader);

// [THEN] XML message is generated with two mvaSpesifikasjonslinje/merknad/beskrivelse = "This is correction"
LoadFromVATReportSubmissionArchive(TempXMLBuffer, VATReportHeader);
VerifyVATNotesValueInSubmissionMessage(VATReportHeader, VATStatementReportLine.Note);
end;

local procedure Initialize()
begin
LibraryTestInitialize.OnTestInitialize(CODEUNIT::"Elec. VAT Submission XML Tests");
Expand Down Expand Up @@ -716,4 +745,19 @@ codeunit 148131 "Elec. VAT Submission XML Tests"
TempXMLBuffer, 'mvaMeldingDto/skattegrunnlagOgBeregnetSkatt/mvaSpesifikasjonslinje/merknad/utvalgtMerknad');
Assert.RecordCount(TempXMLBuffer, 0);
end;

local procedure VerifyVATNotesValueInSubmissionMessage(VATReportHeader: Record "VAT Report Header"; VATNoteValue: Text)
var
TempXMLBuffer: Record "XML Buffer" temporary;
VATReportMediator: Codeunit "VAT Report Mediator";
begin
VATReportMediator.Generate(VATReportHeader);
LoadFromVATReportSubmissionArchive(TempXMLBuffer, VATReportHeader);
TempXMLBuffer.FindNodesByXPath(
TempXMLBuffer, 'mvaMeldingDto/skattegrunnlagOgBeregnetSkatt/mvaSpesifikasjonslinje/merknad/beskrivelse');
Assert.RecordCount(TempXMLBuffer, 2);
TempXMLBuffer.TestField(Value, VATNoteValue);
TempXMLBuffer.Next();
TempXMLBuffer.TestField(Value, VATNoteValue);
end;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#pragma warning disable AS0072
codeunit 4786 "Company Creation Wizard"
{
Permissions = tabledata "Assisted Company Setup Status" = rm;
ObsoleteTag = '25.0';
ObsoleteReason = 'Changing the way demo data is generated, for more infromation see https://go.microsoft.com/fwlink/?linkid=2288084';
ObsoleteState = Pending;

[EventSubscriber(ObjectType::Page, Page::"Company Creation Wizard", 'OnOpenPageCheckAdditionalDemoData', '', false, false)]
local procedure SetAdditionalDemoDataVisible(var AdditionalDemoDataVisible: Boolean)
Expand Down Expand Up @@ -36,4 +40,5 @@ codeunit 4786 "Company Creation Wizard"
Telemetry: Codeunit Telemetry;
ContosoCoffeeDemoDatasetFeatureNameTok: Label 'ContosoCoffeeDemoDataset', Locked = true;
ContosoCoffeeDemoDatasetInitilizationTok: Label '%1: installation initialized from Company Creation wizard', Locked = true;
}
}
#pragma warning restore AS0072
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
using Microsoft.eServices.EDocument.Service;
using Microsoft.eServices.EDocument.Service.Participant;

permissionset 6103 "E-Doc. Core - Basic"
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
using Microsoft.eServices.EDocument.Service;
using Microsoft.eServices.EDocument.Service.Participant;

permissionset 6102 "E-Doc. Core - Edit"
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using Microsoft.eServices.EDocument.IO;
using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
using Microsoft.EServices.EDocument.OrderMatch.Copilot;
using Microsoft.eServices.EDocument.Service;
using Microsoft.eServices.EDocument.Service.Participant;

permissionset 6100 "E-Doc. Core - Objects"
{
Expand Down Expand Up @@ -69,6 +69,7 @@ permissionset 6100 "E-Doc. Core - Objects"
codeunit "E-Doc. PO AOAI Function" = X,
codeunit "E-Doc. PO Copilot Matching" = X,
codeunit "E-Doc. Attachment Processor" = X,
codeunit "Service Participant" = X,
page "E-Doc. Changes Part" = X,
page "E-Doc. Changes Preview" = X,
page "E-Document Activities" = X,
Expand All @@ -90,5 +91,6 @@ permissionset 6100 "E-Doc. Core - Objects"
page "E-Doc Service Supported Types" = X,
page "E-Doc. PO Copilot Prop" = X,
page "E-Doc. PO Match Prop. Sub" = X,
page "E-Doc. Order Match Act." = X;
page "E-Doc. Order Match Act." = X,
page "Service Participants" = X;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
using Microsoft.eServices.EDocument.Service;
using Microsoft.eServices.EDocument.Service.Participant;

permissionset 6101 "E-Doc. Core - Read"
{
Expand Down
50 changes: 50 additions & 0 deletions Apps/W1/EDocument/app/src/Extensions/EDocCustomerCard.PageExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace Microsoft.eServices.EDocument.Extensions;

using Microsoft.Sales.Customer;
using Microsoft.eServices.EDocument;
using Microsoft.eServices.EDocument.Service.Participant;

/// <summary>
/// A page extension for the Customer Card page to show the E-Document service participation.
/// </summary>
pageextension 6163 "E-Doc. Customer Card" extends "Customer Card"
{
layout
{
addlast(Invoicing)
{
field("E-Document Service Participation Ids"; ParticipantIdCount)
{
ApplicationArea = All;
Caption = 'E-Document Service Participation';
DrillDown = true;
Editable = false;
ToolTip = 'Specifies the customers participation for the E-Document services.';

trigger OnDrillDown()
begin
Rec.TestField("No.");
ServiceParticipant.RunServiceParticipantPage(Enum::"E-Document Source Type"::Customer, Rec."No.");
end;
}
}
}


var
ServiceParticipant: Codeunit "Service Participant";
ParticipantIdCount: Integer;


trigger OnAfterGetCurrRecord()
begin
Rec.TestField("No.");
ParticipantIdCount := ServiceParticipant.GetParticipantIdCount(Enum::"E-Document Source Type"::Customer, Rec."No.");
end;

}
25 changes: 25 additions & 0 deletions Apps/W1/EDocument/app/src/Extensions/EDocVendorPage.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,33 @@ pageextension 6161 "E-Doc. Vendor Page" extends "Vendor Card"
Caption = 'Receive E-Document To';
ToolTip = 'Specifies the default purchase document to be generated from received E-document. Users can select either a Purchase Invoice or Purchase Order. This selection does not affect the creation of corrective documents; in both scenarios, the system will generate a Credit Memo.';
}
field("E-Document Service Participation Ids"; ParticipantIdCount)
{
ApplicationArea = All;
Caption = 'E-Document Service Participation';
DrillDown = true;
Editable = false;
ToolTip = 'Specifies the vendors participation for the E-Document services.';

trigger OnDrillDown()
begin
Rec.TestField("No.");
ServiceParticipant.RunServiceParticipantPage(Enum::"E-Document Source Type"::Vendor, Rec."No.");
end;
}
}
}


var
ServiceParticipant: Codeunit "Service Participant";
ParticipantIdCount: Integer;


trigger OnAfterGetCurrRecord()
begin
Rec.TestField("No.");
ParticipantIdCount := ServiceParticipant.GetParticipantIdCount(Enum::"E-Document Source Type"::Vendor, Rec."No.");
end;

}
Loading

0 comments on commit 55a817f

Please sign in to comment.