Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#27057 EDocument Connector for Tietoevry #27233

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0ba11c1
Syncing with version 25.0.21703.0 (#26811)
JesperSchulz Jul 9, 2024
096df31
[Shopify] Shopify return location on refunds (#26728)
tinestaric Jul 16, 2024
eb8dd44
[Shopify] Connector - Different shipping charges types (#26708)
aidasberesinevicius Jul 29, 2024
fd23b55
[Shopify] Add items as product variants (#26712)
tinestaric Aug 1, 2024
a1c5986
Update Yavrio in ConnectivityAppDefinitions.Codeunit.al (#26886)
jonathanwentworth Aug 6, 2024
47455bf
Syncing with version 25.0.22639.0 (#26958)
aholstrup1 Aug 7, 2024
785f277
Syncing with version 25.0.22684.0 (#26959)
aholstrup1 Aug 7, 2024
4f72cc9
[Fix] URL maximum length in E-Document Integration (#26730)
pluethi Aug 14, 2024
544e6de
Update InstallSECore.codeunit.al (#26883)
hannib84 Aug 14, 2024
e9be9d9
Update CODEOWNERS with EDocument reviewers (#27067)
aholstrup1 Aug 15, 2024
1690178
GP Updates - July 2024 (#26821)
jaymckinney-enavate Aug 16, 2024
33ead2e
[Shopify][BC Idea]: Enhancing Shopify Connector for Accurate Price Sy…
VijayErpEff Aug 19, 2024
650ec01
[Shopify] Add Translations Export to Products and Variants (#26216)
tinestaric Aug 19, 2024
87b9cba
[Shopify] Add Metafields to Products and Variants (#26185)
tinestaric Aug 20, 2024
2a768e4
Syncing with version 25.0.23141.0 (#27112)
aholstrup1 Aug 22, 2024
7c3fe3e
[Shopify] Connector - Export Posted Sales Invoices to Shopify as Orde…
GediminasGaubys Aug 23, 2024
94f2e55
GP - Update migrations with 1099 data to use the new IRS Forms app. (…
jaymckinney-enavate Aug 26, 2024
d4bfcfc
Tietoevry EDoc-connector
Roglar01 Sep 10, 2024
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 @@ -5,7 +5,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.20906.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.23141.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "25.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ page 11502 "Swiss QR-Bill Create Vend Bank"
TestField(Code);
end;

internal procedure SetDetails(VendorBankAccount: Record "Vendor Bank Account")
procedure SetDetails(VendorBankAccount: Record "Vendor Bank Account")
begin
if Delete() then;
TransferFields(VendorBankAccount);
Insert();
end;

internal procedure GetDetails(var VendorBankAccount: Record "Vendor Bank Account")
procedure GetDetails(var VendorBankAccount: Record "Vendor Bank Account")
begin
VendorBankAccount := Rec;
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ codeunit 31004 "Cust. Ledger Entry Handler CZZ"
IsHandled := true;
end;

[EventSubscriber(ObjectType::Report, Report::"Open Cust. Entries to Date CZL", 'OnBeforeGetReceivablesAccountNo', '', false, false)]
local procedure GetReceivablesAccountNoForOpenCustEntriesToDate(CustLedgerEntry: Record "Cust. Ledger Entry"; var GLAccountNo: Code[20]; var IsHandled: Boolean)
var
AdvanceLetterTemplateCZZ: Record "Advance Letter Template CZZ";
begin
if IsHandled then
exit;

if CustLedgerEntry."Advance Letter No. CZZ" = '' then
exit;

if CustLedgerEntry."Adv. Letter Template Code CZZ" <> '' then begin
AdvanceLetterTemplateCZZ.Get(CustLedgerEntry."Adv. Letter Template Code CZZ");
GLAccountNo := AdvanceLetterTemplateCZZ."Advance Letter G/L Account";
IsHandled := true;
end else begin
GLAccountNo := CustLedgerEntry.GetReceivablesAccNoCZL();
IsHandled := true;
end;
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"CustEntry-Apply Posted Entries", 'OnApplyCustEntryFormEntryOnAfterCheckEntryOpen', '', false, false)]
local procedure CheckAdvanceOnApplyCustEntryFormEntryOnAfterCheckEntryOpen(ApplyingCustLedgEntry: Record "Cust. Ledger Entry")
begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ codeunit 31087 "Install Application CZZ"
AmtToDeduct: Decimal;
Continue: Boolean;
begin
if PurchAdvLetterHeaderCZZ.Status = PurchAdvLetterHeaderCZZ.Status::Closed then
exit;

AdvanceLetterLineRelation.SetRange(Type, AdvanceLetterLineRelation.Type::Purchase);
AdvanceLetterLineRelation.SetRange("Letter No.", PurchAdvLetterHeaderCZZ."No.");
if AdvanceLetterLineRelation.FindSet() then begin
Expand Down Expand Up @@ -857,6 +860,9 @@ codeunit 31087 "Install Application CZZ"
AmtToDeduct: Decimal;
Continue: Boolean;
begin
if SalesAdvLetterHeaderCZZ.Status = SalesAdvLetterHeaderCZZ.Status::Closed then
exit;

AdvanceLetterLineRelation.SetRange(Type, AdvanceLetterLineRelation.Type::Sale);
AdvanceLetterLineRelation.SetRange("Letter No.", SalesAdvLetterHeaderCZZ."No.");
if AdvanceLetterLineRelation.FindSet() then begin
Expand Down
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 @@ -42,8 +42,8 @@ codeunit 31007 "Navigate Handler CZZ"
end;
end;

[EventSubscriber(ObjectType::Page, Page::Navigate, 'OnAfterNavigateShowRecords', '', true, false)]
local procedure NavigateOnAfterNavigateShowRecords(var TempDocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text)
[EventSubscriber(ObjectType::Page, Page::Navigate, 'OnBeforeShowRecords', '', true, false)]
local procedure NavigateOnBeforeShowRecords(var TempDocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text; var IsHandled: Boolean)
var
SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ";
PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ";
Expand All @@ -54,12 +54,14 @@ codeunit 31007 "Navigate Handler CZZ"
SalesAdvLetterEntryCZZ.SetFilter("Document No.", DocNoFilter);
SalesAdvLetterEntryCZZ.SetFilter("Posting Date", PostingDateFilter);
Page.Run(0, SalesAdvLetterEntryCZZ);
IsHandled := true;
end;
Database::"Purch. Adv. Letter Entry CZZ":
begin
PurchAdvLetterEntryCZZ.SetFilter("Document No.", DocNoFilter);
PurchAdvLetterEntryCZZ.SetFilter("Posting Date", PostingDateFilter);
Page.Run(0, PurchAdvLetterEntryCZZ);
IsHandled := true;
end;
end;
end;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AdvancePayments;

using Microsoft.Finance.Currency;
using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Finance.VAT.Calculation;
using Microsoft.Finance.VAT.Setup;
using Microsoft.Foundation.Enums;

codeunit 31157 "Non-Deductible VAT CZZ"
{
var
NonDeductibleVATCZL: Codeunit "Non-Deductible VAT CZL";

procedure IsNonDeductibleVATEnabled(): Boolean
var
VATSetup: Record "VAT Setup";
begin
if not NonDeductibleVATCZL.IsNonDeductibleVATEnabled() then
exit(false);
VATSetup.Get();
exit(VATSetup."Use For Advances CZZ");
end;

internal procedure GetNonDeductibleVATPct(AdvancePostingBuffer: Record "Advance Posting Buffer CZZ"; ToDate: Date): Decimal
begin
exit(GetNonDeductibleVATPct(
AdvancePostingBuffer."VAT Bus. Posting Group",
AdvancePostingBuffer."VAT Prod. Posting Group",
"General Posting Type"::Purchase, ToDate));
end;

procedure GetNonDeductibleVATPct(VATBusPostGroupCode: Code[20]; VATProdPostGroupCode: Code[20]; GeneralPostingType: Enum "General Posting Type"; ToDate: Date): Decimal
begin
if not IsNonDeductibleVATEnabled() then
exit(0);
exit(NonDeductibleVATCZL.GetNonDeductibleVATPct(VATBusPostGroupCode, VATProdPostGroupCode, GeneralPostingType, ToDate));
end;

internal procedure Calculate(var AdvancePostingBufferCZZ: Record "Advance Posting Buffer CZZ")
var
Currency: Record Currency;
begin
if not IsNonDeductibleVATEnabled() then
exit;
Currency.InitRoundingPrecision();
UpdateNonDeductibleAmounts(
AdvancePostingBufferCZZ."Non-Deductible VAT Base", AdvancePostingBufferCZZ."Non-Deductible VAT Amount",
AdvancePostingBufferCZZ."VAT Base Amount", AdvancePostingBufferCZZ."VAT Amount",
AdvancePostingBufferCZZ."Non-Deductible VAT %", Currency."Amount Rounding Precision");
UpdateNonDeductibleAmounts(
AdvancePostingBufferCZZ."Non-Deductible VAT Base ACY", AdvancePostingBufferCZZ."Non-Deductible VAT Amount ACY",
AdvancePostingBufferCZZ."VAT Base Amount (ACY)", AdvancePostingBufferCZZ."VAT Amount (ACY)",
AdvancePostingBufferCZZ."Non-Deductible VAT %", Currency."Amount Rounding Precision");
end;

local procedure UpdateNonDeductibleAmounts(var NonDeductibleBase: Decimal; var NonDeductibleAmount: Decimal; VATBase: Decimal; VATAmount: Decimal; NonDeductibleVATPct: Decimal; AmountRoundingPrecision: Decimal)
begin
if not IsNonDeductibleVATEnabled() then begin
NonDeductibleBase := 0;
NonDeductibleAmount := 0;
exit;
end;
NonDeductibleBase :=
Round(VATBase * NonDeductibleVATPct / 100, AmountRoundingPrecision);
NonDeductibleAmount :=
Round(VATAmount * NonDeductibleVATPct / 100, AmountRoundingPrecision);
end;

internal procedure Copy(var GenJournalLine: Record "Gen. Journal Line"; AdvancePostingBufferCZZ: Record "Advance Posting Buffer CZZ")
begin
GenJournalLine."Non-Deductible VAT %" := AdvancePostingBufferCZZ."Non-Deductible VAT %";
GenJournalLine."Non-Deductible VAT Base" := AdvancePostingBufferCZZ."Non-Deductible VAT Base";
GenJournalLine."Non-Deductible VAT Amount" := AdvancePostingBufferCZZ."Non-Deductible VAT Amount";
GenJournalLine."Non-Deductible VAT Base LCY" := AdvancePostingBufferCZZ."Non-Deductible VAT Base ACY";
GenJournalLine."Non-Deductible VAT Amount LCY" := AdvancePostingBufferCZZ."Non-Deductible VAT Amount ACY";
end;
}
Loading
Loading