diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json
index 2532f32177..293252e5ff 100644
--- a/.github/AL-Go-Settings.json
+++ b/.github/AL-Go-Settings.json
@@ -6,7 +6,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
- "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.44491.0/base",
+ "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/28.0.45539.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "28.0",
diff --git a/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml b/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml
index 64560cae49..eb1df24bea 100644
--- a/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml
+++ b/Apps/AT/IntrastatAT/app/AppResources/AT_DataExchDefMap.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al
index e810f58034..177db861e4 100644
--- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al
+++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/AUContosoLocalization.Codeunit.al
@@ -153,10 +153,7 @@ codeunit 17131 "AU Contoso Localization"
Codeunit.Run(Codeunit::"Create VAT Setup Post.Grp. AU");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
- begin
- Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU");
- Codeunit.Run(Codeunit::"Create Allocation Account AU");
- end;
+ Codeunit.Run(Codeunit::"Create Currency Ex. Rate AU");
end;
end;
diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al
index b83b8ae3dd..1b64c48ccb 100644
--- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al
+++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAllocationAccountAU.Codeunit.al
@@ -1,3 +1,4 @@
+#if not CLEAN28
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
@@ -12,6 +13,9 @@ codeunit 17180 "Create Allocation Account AU"
{
InherentEntitlements = X;
InherentPermissions = X;
+ ObsoleteState = Pending;
+ ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset';
+ ObsoleteTag = '28.0';
trigger OnRun()
var
@@ -45,4 +49,5 @@ codeunit 17180 "Create Allocation Account AU"
var
LicensesTok: Label 'LICENSES', MaxLength = 20;
YearlyLicenseFeeTok: Label 'Yearly license fee', MaxLength = 100;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al
index 742746c292..808770ac28 100644
--- a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al
+++ b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateDemoEDocsAU.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 17213 "Create Demo EDocs AU"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 17213 "Create Demo EDocs AU"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountAU: Codeunit "Create Allocation Account AU";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
CreateGLAccount: Codeunit "Create G/L Account";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
@@ -49,44 +49,48 @@ codeunit 17213 "Create Demo EDocs AU"
ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245');
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245');
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountAU.Licenses(), '',
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '',
6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -98,7 +102,7 @@ codeunit 17213 "Create Demo EDocs AU"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -106,6 +110,7 @@ codeunit 17213 "Create Demo EDocs AU"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al
index b641f94b22..4a18fc0581 100644
--- a/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al
+++ b/Apps/AU/EDocument_AU/demo data/3.Transactions/CreateEDocSampleInvAU.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 17214 "Create E-Doc Sample Inv. AU"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsAU: Codeunit "Create Demo EDocs AU";
- CreateAllocationAccountAU: Codeunit "Create Allocation Account AU";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 17214 "Create E-Doc Sample Inv. AU"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108244', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountAU.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al
new file mode 100644
index 0000000000..78687d1ffd
--- /dev/null
+++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateDeferralTemplateBE.Codeunit.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// 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;
+
+codeunit 11455 "Create Deferral Template BE"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ trigger OnRun()
+ var
+ FinanceModuleSetup: Record "Finance Module Setup";
+ CreateGLAccountBE: Codeunit "Create GL Account BE";
+ begin
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Deferral Account No." := CreateGLAccountBE.Transfers();
+ FinanceModuleSetup.Modify();
+ end;
+}
\ No newline at end of file
diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al
index 67966fd3bd..335a1d1554 100644
--- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al
+++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreateGLAccountBE.Codeunit.al
@@ -412,6 +412,8 @@ codeunit 11357 "Create GL Account BE"
UpdateGLAccountVatSetup(PostAccount(), '', '', false, 0);
UpdateGLAccountVatSetup(CreateGLAccount.Cash(), '', '', false, 0);
GLAccountIndent.Indent();
+
+ Codeunit.Run(Codeunit::"Create Deferral Template BE");
end;
local procedure UpdateGLAccountVatSetup(GLAccountNo: Code[20]; VATBusPostingGroup: Code[20]; VATProdPostingGroup: Code[20]; PrintDetails: Boolean; NonDeductibleVAT: Decimal)
diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al
index 33ce36cdd0..0d88c7b649 100644
--- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al
+++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/DemoData/Finance/1. Setup Data/CreatePostingGroupBE.Codeunit.al
@@ -69,16 +69,20 @@ codeunit 11364 "Create Posting Group BE"
ContosoGenPostingSetup.InsertGeneralPostingSetup('', NoVATPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.RetailPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.ServicesPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup('', CreatePostingGroup.MiscPostingGroup(), '', '', CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', '', '', '', '', CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateGLAccount.SalesResourcesDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateBEGLAccount.InventAdjRetailInt());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.DomesticPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateBEGLAccount.PurchasesRetailEu(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.EUPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateBEGLAccount.PurchasesRetailEu(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.RetailPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.ServicesPostingGroup(), CreateGLAccount.SalesResourcesExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateBEGLAccount.InventAdjRetailInt());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroup.ExportPostingGroup(), CreatePostingGroup.MiscPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateBEGLAccount.PurchasesRetailExport(), CreateBEGLAccount.InventAdjRetail(), CreateBEGLAccount.Goods(), '', '', CreateBEGLAccount.PaymentDiscReceived(), CreateBEGLAccount.PaymentDiscReceived(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateBEGLAccount.PurchaseCostsRetail(), CreateBEGLAccount.PurchaseCostsInterim(), CreateGLAccount.VATPayable());
ContosoGenPostingSetup.SetOverwriteData(false);
UpdatePmtDiscAccounts(CreatePostingGroup.DomesticPostingGroup(), NoVATPostingGroup(), CreateGLAccount.SalesRetailDom(), CreateBEGLAccount.PurchasesRetailDom());
diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json
index ea231d7dd9..c84fb879a8 100644
--- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json
+++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json
@@ -25,7 +25,7 @@
"idRanges": [
{
"from": 11345,
- "to": 11450
+ "to": 11455
}
],
"resourceExposurePolicy": {
diff --git a/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al
new file mode 100644
index 0000000000..96c2964c55
--- /dev/null
+++ b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateDemoEDocsBE.Codeunit.al
@@ -0,0 +1,115 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11451 "Create Demo EDocs BE"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ ContosoInboundEDocument: Codeunit "Contoso Inbound E-Document";
+
+ trigger OnRun()
+ begin
+ GenerateContosoInboundEDocuments();
+ end;
+
+ procedure GetShipmentDHLInvoiceDescription(): Text[100]
+ var
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
+ begin
+ exit(ShipmentDHLLbl);
+ end;
+
+ local procedure GenerateContosoInboundEDocuments()
+ var
+ CreateVendor: Codeunit "Create Vendor";
+ CreateGLAccountBE: Codeunit "Create GL Account BE";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+ CreateDeferralTemplate: Codeunit "Create Deferral Template";
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
+ AccountingServicesFebruaryLbl: Label 'Accounting support period: February', MaxLength = 100;
+ AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
+ AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
+ AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
+ begin
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 252);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(),
+ AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 798);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(),
+ AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 84);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(),
+ AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 672);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(),
+ AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 294);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.LawyersAndAccountants(),
+ AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
+ '', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(),
+ '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccountBE.TranspCostsPurchRetail(),
+ GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8368.5);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
+ '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
+ '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
+ end;
+
+}
diff --git a/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al
new file mode 100644
index 0000000000..56277cab38
--- /dev/null
+++ b/Apps/BE/EDocument_BE/demo data/3.Transactions/CreateEDocSampleInvBE.Codeunit.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11452 "Create E-Doc Sample Inv. BE"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ CreateVendor: Codeunit "Create Vendor";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateDemoEDocsBE: Codeunit "Create Demo EDocs BE";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+
+ trigger OnRun()
+ var
+ YearlyLicenstCostLbl: Label 'Yearly license cost mapped to a G/L account';
+ BasicCoffeeEquipmentLbl: Label 'Basic coffee equipment mapped to vendor''s Item References';
+ CoffeeBeansAndPartsLbl: Label 'Coffee beans and parts with shipping cost that needs human intervention';
+ begin
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.ExportFabrikam(), '108239', CoffeeBeansAndPartsLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 180, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateDemoEDocsBE.GetShipmentDHLInvoiceDescription(), 1, 60, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.DomesticWorldImporter(), '108240', BasicCoffeeEquipmentLbl, 8368.5);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+ end;
+}
diff --git a/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al b/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al
new file mode 100644
index 0000000000..d5aa4779f0
--- /dev/null
+++ b/Apps/BE/EDocument_BE/demo data/EDocDemodataBE.Codeunit.al
@@ -0,0 +1,34 @@
+// ------------------------------------------------------------------------------------------------
+// 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 11454 "E-Doc. Demodata BE"
+{
+ 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":
+ begin
+ Codeunit.Run(Codeunit::"Create Demo EDocs BE");
+ Codeunit.Run(Codeunit::"Create E-Doc Sample Inv. BE");
+ end;
+ end;
+ end;
+}
diff --git a/Apps/BE/EDocument_BE/demo data/ExtensionLogo.png b/Apps/BE/EDocument_BE/demo data/ExtensionLogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/BE/EDocument_BE/demo data/ExtensionLogo.png differ
diff --git a/Apps/BE/EDocument_BE/demo data/app.json b/Apps/BE/EDocument_BE/demo data/app.json
new file mode 100644
index 0000000000..0dd5f096c4
--- /dev/null
+++ b/Apps/BE/EDocument_BE/demo data/app.json
@@ -0,0 +1,58 @@
+{
+ "id": "c9d5e8f0-6a78-5c34-0d9e-5f9a7b3e1c4d",
+ "name": "E-Document Core Demo Data (BE)",
+ "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 apps covers both sales and purchase processes and can have different lifecycles from standard invoices in Business Central.",
+ "version": "28.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": "28.0.0.0"
+ },
+ {
+ "id": "de0dddf3-9917-430d-8d20-6e7679a08500",
+ "name": "E-Document Core Demo Data",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
+ "name": "Contoso Coffee Demo Dataset",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5b0b41a1-7b42-4123-a521-2265186cfb33",
+ "name": "Contoso Coffee Demo Dataset (BE)",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 11451,
+ "to": 11456
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "application": "28.0.0.0",
+ "target": "OnPrem",
+ "features": [
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml b/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml
index 2b05c0758d..9ea4127180 100644
--- a/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml
+++ b/Apps/BE/IntrastatBE/app/AppResources/BE_DataExchDefMapRcptE.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al
index 23c4988bcc..82ea0e6d3c 100644
--- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al
+++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/CAContosoLocalization.Codeunit.al
@@ -97,7 +97,6 @@ codeunit 27054 "CA Contoso Localization"
Codeunit.Run(Codeunit::"Create CA Column Layout");
CreateCATaxArea.UpdateTaxAreaOnCompanyInformation();
CreateCAGeneralLedgerSetup.UpdateMaxVATDifferenceAllowedOnGeneralLedgerSetup();
- Codeunit.Run(Codeunit::"Create Allocation Account CA");
end;
end;
end;
@@ -204,6 +203,8 @@ codeunit 27054 "CA Contoso Localization"
BindSubscription(CreateCANoSeriesLine);
Enum::"Contoso Demo Data Module"::Finance:
begin
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account CA");
BindSubscription(CreateCAGenJournalTemplate);
BindSubscription(CreateCACurrency);
BindSubscription(CreateCACurrExchRate);
diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al
index 5fab51273a..41fb154fdc 100644
--- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al
+++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/1.Setup Data/CreateCAGLAccounts.Codeunit.al
@@ -302,7 +302,6 @@ codeunit 27009 "Create CA GL Accounts"
//BlankGL
ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.BALANCESHEETName(), '');
ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.AccumDepreciationBuildingsName(), '');
- ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.EmployeesPayableName(), '');
ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.IncreasesduringtheYearBuildingsName(), '');
ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.DecreasesduringtheYearBuildingsName(), '');
ContosoGLAccount.AddAccountForLocalization(CreateGLAccount.IncreasesduringtheYearOperEquipName(), '');
@@ -2450,7 +2449,7 @@ codeunit 27009 "Create CA GL Accounts"
PaymentDiscountsGrantedCOGSTok: Label 'Payment Discounts Granted, COGS', MaxLength = 100;
RepairsandMaintenanceExpensesTok: Label 'Repairs and Maintenance, Expenses', MaxLength = 100;
AccumDepreciationBuildingsTok: Label 'Accum. Depreciation, Building', MaxLength = 100;
- EmployeesPayableTok: Label 'Employee Payable', MaxLength = 100;
+ EmployeesPayableTok: Label 'Employees Payable', MaxLength = 100;
CostofGoodsSoldTok: Label 'Cost of Goods Sold', MaxLength = 80;
MiscellaneousTok: Label 'Miscellaneous.', MaxLength = 100;
}
diff --git a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al
index 71979fd990..89474845ad 100644
--- a/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al
+++ b/Apps/CA/ContosoCoffeeDemoDatasetCA/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCA.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 27095 "Create Allocation Account CA"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 27095 "Create Allocation Account CA"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateGLAccount: Codeunit "Create G/L Account";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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.OtherComputerExpenses(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccount.OtherComputerExpenses();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al
index 6245a390e4..9bb23589ae 100644
--- a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al
+++ b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateDemoEDocsCA.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 11506 "Create Demo EDocs CA"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 11506 "Create Demo EDocs CA"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountCA: Codeunit "Create Allocation Account CA";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 11506 "Create Demo EDocs CA"
ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 390);
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 390);
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountCA.Licenses(),
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
'', 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 156);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 156);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(),
ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 494);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 494);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(),
ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 52);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 52);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(),
ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 182);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 182);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(),
ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 416);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 416);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.OtherComputerExpenses(),
ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 7.8);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 7.8);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 11506 "Create Demo EDocs CA"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 11506 "Create Demo EDocs CA"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al
index 1e653167cd..b457d5461d 100644
--- a/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al
+++ b/Apps/CA/EDocument_CA/demo data/3.Transactions/CreateEDocSampleInvCA.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 11507 "Create E-Doc Sample Inv. CA"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsCA: Codeunit "Create Demo EDocs CA";
- CreateAllocationAccountCA: Codeunit "Create Allocation Account CA";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 11507 "Create E-Doc Sample Inv. CA"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108427', YearlyLicenstCostLbl, 390);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountCA.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al
new file mode 100644
index 0000000000..2e3249ff6c
--- /dev/null
+++ b/Apps/CH/ContosoCoffeeDemoDatasetCH/app/DemoData/Finance/2.Master Data/CreateAllocationAccountCH.Codeunit.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// 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;
+
+codeunit 11636 "Create Allocation Account CH"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ trigger OnRun()
+ var
+ FinanceModuleSetup: Record "Finance Module Setup";
+ CreateCHGLAccounts: Codeunit "Create CH GL Accounts";
+ begin
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateCHGLAccounts.ItHardwareAndSoftware();
+ FinanceModuleSetup.Modify();
+ end;
+}
diff --git a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al
index 2ac775568b..24eaeb21e2 100644
--- a/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al
+++ b/Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/DemoData/Finance/1. Setup Data/CreateGLAccountCZ.Codeunit.al
@@ -49,7 +49,7 @@ codeunit 31182 "Create G/L Account CZ"
SubCategory := Format(GLAccountCategoryMgtCZL.GetBI1IntangibleResultsofResearchandDevelopment(), 80);
ContosoGLAccount.InsertGLAccount(Intangibleresultsofresearchanddevelopment(), IntangibleresultsofresearchanddevelopmentName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
SubCategory := Format(GLAccountCategoryMgtCZL.GetBI21Software(), 80);
- ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
+ ContosoGLAccount.InsertGLAccount(CreateGLAccount.Software(), CreateGLAccount.SoftwareName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false);
SubCategory := Format(GLAccountCategoryMgtCZL.GetBI22OtherValuableRights(), 80);
ContosoGLAccount.InsertGLAccount(Valuablerights(), ValuablerightsName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Assets, SubCategory, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
SubCategory := Format(GLAccountCategoryMgtCZL.GetBI3Goodwill(), 80);
diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al
index f2970e286e..6bc47fc55c 100644
--- a/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al
+++ b/Apps/CZ/CoreLocalizationPack/app/Src/PageExtensions/UserSetupCZL.PageExt.al
@@ -17,6 +17,11 @@ pageextension 11721 "User Setup CZL" extends "User Setup"
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the connectivity between User ID and employee number.';
}
+ field("User Name CZL"; Rec."User Name CZL")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the short name for the user.';
+ }
}
addlast(Control1)
{
@@ -80,11 +85,6 @@ pageextension 11721 "User Setup CZL" extends "User Setup"
ToolTip = 'Specifies the possibillity to allow or not allow complete job.';
Visible = IsUserChecksAllowed;
}
- field("User Name CZL"; Rec."User Name CZL")
- {
- ApplicationArea = Basic, Suite;
- ToolTip = 'Specifies the short name for the user.';
- }
field("Check Location Code CZL"; Rec."Check Location Code CZL")
{
ApplicationArea = Basic, Suite;
diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al
index f2b22af493..5ad4d71105 100644
--- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al
+++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/UserSetupCZL.TableExt.al
@@ -79,6 +79,20 @@ tableextension 11717 "User Setup CZL" extends "User Setup"
Caption = 'Employee No.';
TableRelation = Employee;
DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ var
+ Employee: Record Employee;
+ begin
+ if ("Employee No. CZL" = '') or ("Employee No. CZL" = xRec."Employee No. CZL") then
+ exit;
+
+ if Employee.Get("Employee No. CZL") then begin
+ "User Name CZL" := Employee.FullName();
+ "Phone No." := Employee."Phone No.";
+ "E-Mail" := Employee."Company E-Mail";
+ end;
+ end;
}
field(11782; "User Name CZL"; Text[100])
{
@@ -147,6 +161,7 @@ tableextension 11717 "User Setup CZL" extends "User Setup"
UserSetup.Init();
UserSetup := Rec;
+ UserSetup."Salespers./Purch. Code" := OldUserSetup."Salespers./Purch. Code";
UserSetup."Employee No. CZL" := OldUserSetup."Employee No. CZL";
UserSetup."Phone No." := OldUserSetup."Phone No.";
UserSetup."E-Mail" := OldUserSetup."E-Mail";
diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al
index a6ece8e24f..10d1c0860d 100644
--- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al
+++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/DEContosoLocalization.Codeunit.al
@@ -97,10 +97,7 @@ codeunit 11113 "DE Contoso Localization"
Codeunit.Run(Codeunit::"Create DE Data Export Record");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
- begin
- Codeunit.Run(Codeunit::"Create DE Currency Ex. Rate");
- Codeunit.Run(Codeunit::"Create Allocation Account DE");
- end;
+ Codeunit.Run(Codeunit::"Create DE Currency Ex. Rate");
end;
end;
@@ -140,6 +137,8 @@ codeunit 11113 "DE Contoso Localization"
FinanceModuleSetup.InitRecord();
CreateDEVatPostingGroup.InsertVATProductPostingGroup();
end;
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account DE");
BindSubscription(CreateDEAccScheduleLine);
BindSubscription(CreateDEAnalysisView);
BindSubscription(CreateDECurrencyExRate);
diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al
index 9888ed80a2..1de0c4716b 100644
--- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al
+++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateAllocationAccountDE.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 11386 "Create Allocation Account DE"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 11386 "Create Allocation Account DE"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateGLAccDE: Codeunit "Create DE GL Acc.";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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", CreateGLAccDE.Softwareandsubscriptionfees(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDE.Softwareandsubscriptionfees(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccDE.Softwareandsubscriptionfees();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al
index 2500cf84c3..54c911b064 100644
--- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al
+++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/ExportZUGFeRDDocument.Codeunit.al
@@ -101,13 +101,12 @@ codeunit 13917 "Export ZUGFeRD Document"
local procedure AddXMLAttachmentToRenderingPayload(var XmlAttachmentTempBlob: Codeunit "Temp Blob"; var RenderingPayload: JsonObject)
var
+ PDFDocument: Codeunit "PDF Document";
+ DataType: Enum "PDF Attach. Data Relationship";
XmlInStream: InStream;
- XmlOutStream: OutStream;
Name: Text;
MimeType: Text;
Description: Text;
- DataType: Enum "PDF Attach. Data Relationship";
- PDFDocument: Codeunit "PDF Document";
begin
PDFDocument.Initialize();
Name := 'factur-x.xml';
diff --git a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al
index 378df13cf3..a2a27eaef7 100644
--- a/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al
+++ b/Apps/DE/EDocumentDE/app/src/ZUGFeRD/PostedSalesInvoice.ReportExt.al
@@ -5,8 +5,6 @@
namespace Microsoft.eServices.EDocument.Formats;
using Microsoft.Sales.History;
-using System.IO;
-using System.Utilities;
reportextension 13918 "Posted Sales Invoice" extends "Standard Sales - Invoice"
{
diff --git a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al
index d6a2f76754..f168eea383 100644
--- a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al
+++ b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateDemoEDocsDE.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 11370 "Create Demo EDocs DE"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 11370 "Create Demo EDocs DE"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountDE: Codeunit "Create Allocation Account DE";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 11370 "Create Demo EDocs DE"
AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 0);
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountDE.Licenses(),
- CreateAllocationAccountDE.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 84);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 84);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(),
AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 266);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 266);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(),
AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 28);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 28);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(),
AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 224);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 224);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(),
AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 98);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 98);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDE.LegalFeesandAttorneyServices(),
AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 0);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 11370 "Create Demo EDocs DE"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 7571.5);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 7571.5);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 11370 "Create Demo EDocs DE"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al
index cc9f38b94b..2a4fc75f47 100644
--- a/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al
+++ b/Apps/DE/EDocumentDE/demo data/3.Transactions/CreateEDocSampleInvDE.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 11371 "Create E-Doc Sample Inv. DE"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsDE: Codeunit "Create Demo EDocs DE";
- CreateAllocationAccountDE: Codeunit "Create Allocation Account DE";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 11371 "Create E-Doc Sample Inv. DE"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountDE.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al b/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al
index bd95edcc5e..0f0b2b77e2 100644
--- a/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al
+++ b/Apps/DE/EDocumentDE/test/src/ZUGFeRDCustomSalesInvoice.Report.al
@@ -53,5 +53,4 @@ report 13918 "ZUGFeRD Custom Sales Invoice"
ExportZUGFeRDDocument.CreateAndAddXMLAttachmentToRenderingPayload(Header, RenderingPayload);
end;
-
}
\ No newline at end of file
diff --git a/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml b/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml
index 03e0c8fd82..163643202a 100644
--- a/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml
+++ b/Apps/DE/IntrastatDE/app/AppResources/DE_DataExchDefMap.xml
@@ -140,7 +140,7 @@
-
+
diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al
index b1e76137f4..4463b1b7f0 100644
--- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al
+++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/DKContosoLocalization.Codeunit.al
@@ -86,10 +86,7 @@ codeunit 13750 "DK Contoso Localization"
Codeunit.Run(Codeunit::"Create VAT Setup Post.Grp. DK");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
- begin
- Codeunit.Run(Codeunit::"Create Currency Ex. Rate DK");
- Codeunit.Run(Codeunit::"Create Allocation Account DK");
- end;
+ Codeunit.Run(Codeunit::"Create Currency Ex. Rate DK");
end;
end;
@@ -177,6 +174,8 @@ codeunit 13750 "DK Contoso Localization"
Codeunit.Run(Codeunit::"Create Vat Posting Groups DK");
CreatePostingGroupsDK.InsertGenPostingGroup();
end;
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account DK");
BindSubscription(CreatePostingGroupsDK);
BindSubscription(CreateAnalysisViewDK);
BindSubscription(CreateAccScheduleLineDK);
diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al
index 03e4791f0d..65adf174ea 100644
--- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al
+++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateDK.Codeunit.al
@@ -10,11 +10,13 @@ codeunit 13735 "Create Deferral Template DK"
InherentEntitlements = X;
InherentPermissions = X;
- [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Deferral Template", OnDefineDeferralAccountNo, '', false, false)]
- local procedure OnDefineDeferralAccountNo(var DeferralAccountNo: Code[20])
+ trigger OnRun()
var
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateGLAccDK: Codeunit "Create GL Acc. DK";
begin
- DeferralAccountNo := CreateGLAccDK.Deferrals();
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Deferral Account No." := CreateGLAccDK.Deferrals();
+ FinanceModuleSetup.Modify();
end;
}
\ No newline at end of file
diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al
index 855cbdcfbb..82a84d2621 100644
--- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al
+++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/1.Setup Data/CreateGLAccDK.Codeunit.al
@@ -385,6 +385,8 @@ codeunit 13721 "Create GL Acc. DK"
ContosoGLAccount.InsertGLAccount(Resultbeforetax(), ResultbeforetaxName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Total, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(Periodearnings(), PeriodearningsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Total, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(Balance(), BalanceName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::" ", Enum::"G/L Account Type"::Heading, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false);
+
+ Codeunit.Run(Codeunit::"Create Deferral Template DK");
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create G/L Account", 'OnAfterAddGLAccountsForLocalization', '', false, false)]
diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al
index 41a5f128bb..de3dd469ed 100644
--- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al
+++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/DemoData/Finance/2.Master Data/CreateAllocationAccountDK.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 13805 "Create Allocation Account DK"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 13805 "Create Allocation Account DK"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateGLAccDK: Codeunit "Create GL Acc. DK";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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", CreateGLAccDK.Itexpenses(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGLAccDK.Itexpenses(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGLAccDK.Itexpenses();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al
index 25bf527685..f1d4316a16 100644
--- a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al
+++ b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateDemoEDocsDK.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 13670 "Create Demo EDocs DK"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 13670 "Create Demo EDocs DK"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountDK: Codeunit "Create Allocation Account DK";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 13670 "Create Demo EDocs DK"
AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 750);
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 750);
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountDK.Licenses(),
- CreateAllocationAccountDK.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 300);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 300);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(),
AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 950);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 950);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(),
AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 100);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 100);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(),
AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 800);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 800);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(),
AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 350);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 350);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccDK.Auditingaccountingassistance(),
AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 890);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 890);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 13670 "Create Demo EDocs DK"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 0);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 13670 "Create Demo EDocs DK"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al
index 75c98cf654..71e28b1a8a 100644
--- a/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al
+++ b/Apps/DK/EDocument_DK/demo data/3.Transactions/CreateEDocSampleInvDK.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 13671 "Create E-Doc Sample Inv. DK"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsDK: Codeunit "Create Demo EDocs DK";
- CreateAllocationAccountDK: Codeunit "Create Allocation Account DK";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 13671 "Create E-Doc Sample Inv. DK"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl, 1250);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountDK.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al
index de6e9eccc6..e7bb4896af 100644
--- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al
+++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/ESContosoLocalization.Codeunit.al
@@ -142,7 +142,6 @@ codeunit 10824 "ES Contoso Localization"
begin
Codeunit.Run(Codeunit::"Create ES Column Layout");
Codeunit.Run(Codeunit::"Create ES Currency Exch");
- Codeunit.Run(Codeunit::"Create Allocation Account ES");
end;
end;
end;
@@ -186,6 +185,8 @@ codeunit 10824 "ES Contoso Localization"
FinanceModuleSetup.InitRecord();
Codeunit.Run(Codeunit::"Create ES VAT Posting Groups");
end;
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account ES");
BindSubscription(CreateESResource);
BindSubscription(CreateESAnalysisView);
BindSubscription(CreateESAccScheduleLine);
diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al
index a1a5060198..b6d21198ec 100644
--- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al
+++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateDeferralTemplateES.Codeunit.al
@@ -10,11 +10,13 @@ codeunit 10885 "Create Deferral Template ES"
InherentEntitlements = X;
InherentPermissions = X;
- [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Deferral Template", OnDefineDeferralAccountNo, '', false, false)]
- local procedure OnDefineDeferralAccountNo(var DeferralAccountNo: Code[20])
+ trigger OnRun()
var
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateESGLAccounts: Codeunit "Create ES GL Accounts";
begin
- DeferralAccountNo := CreateESGLAccounts.OtherCreditors();
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Deferral Account No." := CreateESGLAccounts.OtherCreditors();
+ FinanceModuleSetup.Modify();
end;
}
\ No newline at end of file
diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al
index 8c388bb1c6..58cee10578 100644
--- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al
+++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESGLAccounts.Codeunit.al
@@ -2642,6 +2642,8 @@ codeunit 10780 "Create ES GL Accounts"
ContosoGLAccount.SetOverwriteData(false);
UpdateIncomeStatmentBalanceAccount();
UpdateAPIAccountTypeToGLAccount();
+
+ Codeunit.Run(Codeunit::"Create Deferral Template ES");
end;
local procedure UpdateIncomeStatmentBalanceAccount()
diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al
index 724beb7d15..7a47953251 100644
--- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al
+++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateAllocationAccountES.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 10884 "Create Allocation Account ES"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 10884 "Create Allocation Account ES"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateESGLAccounts: Codeunit "Create ES GL Accounts";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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", CreateESGLAccounts.OtherServices(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateESGLAccounts.OtherServices(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateESGLAccounts.OtherServices();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al
index 34feb2ed7b..d5694080d3 100644
--- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al
+++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Core/VerifactuExport.Codeunit.al
@@ -23,7 +23,13 @@ codeunit 10778 "Verifactu Export"
InherentPermissions = X;
Permissions = tabledata "E-Document" = rimd,
tabledata "E-Document Log" = rimd,
- tabledata "E-Doc. Data Storage" = rimd;
+ tabledata "E-Doc. Data Storage" = rimd,
+ tabledata "Sales Invoice Header" = rm,
+ tabledata "Sales Invoice Line" = rm,
+ tabledata "Sales Cr.Memo Header" = rm,
+ tabledata "Sales Cr.Memo Line" = rm,
+ tabledata "Service Invoice Header" = rm,
+ tabledata "Service Invoice Line" = rm;
var
CompanyInformation: Record "Company Information";
diff --git a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al
index d0fa0474e7..939c993f24 100644
--- a/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al
+++ b/Apps/ES/EDocumentFormats/DocumentRegistration/app/src/Data/VerifactuSetup.Table.al
@@ -5,6 +5,7 @@
namespace Microsoft.EServices.EDocument.Verifactu;
using Microsoft.EServices.EDocument;
+using System.Environment;
using System.Privacy;
using System.Security.Encryption;
using System.Utilities;
@@ -108,6 +109,7 @@ table 10777 "Verifactu Setup"
var
UrlHelper: Codeunit "Url Helper";
+ EnvironmentInformation: Codeunit "Environment Information";
CannotEnableWithoutCertificateErr: Label 'The setup cannot be enabled without a valid certificate.';
DisableSIIQst: Label 'SII setup will be disabled. Do you want to proceed?';
DocumentSubmissionEndpointUrlTxt: Label 'https://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP', Locked = true;
@@ -125,7 +127,7 @@ table 10777 "Verifactu Setup"
internal procedure GetQRCodeValidationEndpointUrl(): Text
begin
- if UrlHelper.IsPPE() then
+ if UrlHelper.IsPPE() or EnvironmentInformation.IsSandbox() then
exit(QRCodeValidationSandboxEndpointUrlTxt);
exit(QRCodeValidationEndpointUrlTxt);
@@ -133,7 +135,7 @@ table 10777 "Verifactu Setup"
internal procedure GetDocumentSubmissionEndpointUrl(): Text
begin
- if UrlHelper.IsPPE() then
+ if UrlHelper.IsPPE() or EnvironmentInformation.IsSandbox() then
exit(DocumentSubmissionSandboxEndpointUrlTxt);
exit(DocumentSubmissionEndpointUrlTxt);
diff --git a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al
index a20af0db72..ed87c31c3d 100644
--- a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al
+++ b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateDemoEDocsES.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 10886 "Create Demo EDocs ES"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 10886 "Create Demo EDocs ES"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountES: Codeunit "Create Allocation Account ES";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 10886 "Create Demo EDocs ES"
AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245');
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245');
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountES.Licenses(),
- CreateAllocationAccountES.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 252);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 252);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(),
AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 798);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 798);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(),
AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 84);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 84);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(),
AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 672);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 672);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(),
AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 294);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 294);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateESGLAccounts.ProfessionalAdvisoryServices(),
AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 10886 "Create Demo EDocs ES"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 8368.5);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8368.5);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 10886 "Create Demo EDocs ES"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al
index 1223aaccf6..c4f73e9289 100644
--- a/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al
+++ b/Apps/ES/EDocument_ES/demo data/3.Transactions/CreateEDocSampleInvES.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 10887 "Create E-Doc Sample Inv. ES"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsES: Codeunit "Create Demo EDocs ES";
- CreateAllocationAccountES: Codeunit "Create Allocation Account ES";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 10887 "Create E-Doc Sample Inv. ES"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountES.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml b/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml
index 8ef32911ba..5693464b7b 100644
--- a/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml
+++ b/Apps/ES/IntrastatES/app/AppResources/ES_DataExchDefMap.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al
new file mode 100644
index 0000000000..8d9d3c8170
--- /dev/null
+++ b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/DemoData/Finance/2.Master Data/CreateAllocationAccountFI.Codeunit.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// 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;
+
+codeunit 13457 "Create Allocation Account FI"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ trigger OnRun()
+ var
+ FinanceModuleSetup: Record "Finance Module Setup";
+ CreateFIGLAccounts: Codeunit "Create FI GL Accounts";
+ begin
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateFIGLAccounts.ITservices();
+ FinanceModuleSetup.Modify();
+ end;
+}
diff --git a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml
index fe2f09184e..7b88ec20ec 100644
--- a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml
+++ b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapRcpt.xml
@@ -20,7 +20,7 @@
-
+
TRIMALL
diff --git a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml
index a093af55cf..63417a693e 100644
--- a/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml
+++ b/Apps/FI/IntrastatFI/app/AppResources/FI_DataExchDefMapShpt.xml
@@ -20,7 +20,7 @@
-
+
TRIMALL
diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al
index 52225cad14..d034cead08 100644
--- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al
+++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Bank/2. Master Data/CreateBankAccountFR.Codeunit.al
@@ -24,27 +24,43 @@ codeunit 10874 "Create Bank Account FR"
ContosoCoffeDemoDataSetup.Get();
case Rec."No." of
CreateBankAccount.Checking():
+#if not CLEAN28
ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, -1447200, AgencyCodeLbl, 72, true);
+#else
+ ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, -1447200);
+#endif
CreateBankAccount.Savings():
+#if not CLEAN28
ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, 0, AgencyCodeLbl, 72, true);
+#else
+ ValidateBankAccount(Rec, '98765432105', CityParisLbl, PostcodeParisLbl, CheckingBankBranchNoLbl, 0);
+#endif
end;
end;
+#if not CLEAN28
local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccountNo: Text[30]; BankAccCity: Text[30]; PostCode: Code[20]; BankBranchNo: Text[30]; MinBalance: Decimal; AgencyCode: Text[5]; RibKey: Integer; RibChecked: Boolean)
+#else
+ local procedure ValidateBankAccount(var BankAccount: Record "Bank Account"; BankAccountNo: Text[30]; BankAccCity: Text[30]; PostCode: Code[20]; BankBranchNo: Text[30]; MinBalance: Decimal)
+#endif
begin
BankAccount.Validate(City, BankAccCity);
BankAccount.Validate("Post Code", PostCode);
BankAccount.Validate("Bank Branch No.", BankBranchNo);
BankAccount.Validate("Bank Account No.", BankAccountNo);
BankAccount.Validate("Min. Balance", MinBalance);
+#if not CLEAN28
BankAccount.Validate("Agency Code", AgencyCode);
BankAccount.Validate("RIB Key", RibKey);
BankAccount.Validate("RIB Checked", RibChecked);
+#endif
end;
var
CityParisLbl: Label 'Paris', MaxLength = 30;
PostcodeParisLbl: Label '75015', MaxLength = 20;
CheckingBankBranchNoLbl: Label '00987', MaxLength = 20;
+#if not CLEAN28
AgencyCodeLbl: Label '12356', MaxLength = 5;
+#endif
}
diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al
index 0fea8b4efa..a037931047 100644
--- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al
+++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/ContosoFRLocalization.Codeunit.al
@@ -88,7 +88,6 @@ codeunit 10864 "Contoso FR Localization"
begin
Codeunit.Run(Codeunit::"Create Currency Exc. Rate FR");
Codeunit.Run(Codeunit::"Create Column Layout FR");
- Codeunit.Run(Codeunit::"Create Allocation Account FR");
end;
end;
end;
diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al
index 0c1334eb4d..9800f5a914 100644
--- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al
+++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/DemoData/Finance/2. Master Data/CreateAllocationAccountFR.Codeunit.al
@@ -1,3 +1,4 @@
+#if not CLEAN28
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
@@ -12,6 +13,9 @@ codeunit 10950 "Create Allocation Account FR"
{
InherentEntitlements = X;
InherentPermissions = X;
+ ObsoleteState = Pending;
+ ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset';
+ ObsoleteTag = '28.0';
trigger OnRun()
var
@@ -46,3 +50,4 @@ codeunit 10950 "Create Allocation Account FR"
LicensesTok: Label 'LICENSES', MaxLength = 20;
YearlyLicenseFeeTok: Label 'Yearly license fee, design software', MaxLength = 100;
}
+#endif
diff --git a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al
index 70a60bcda6..9a6aa6c7ff 100644
--- a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al
+++ b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateDemoEDocsFR.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 10911 "Create Demo EDocs FR"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -41,7 +41,7 @@ codeunit 10911 "Create Demo EDocs FR"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountFR: Codeunit "Create Allocation Account FR";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
@@ -49,44 +49,48 @@ codeunit 10911 "Create Demo EDocs FR"
AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 0);
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountFR.Licenses(),
- CreateAllocationAccountFR.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 240);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 240);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(),
AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 760);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 760);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(),
AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 80);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 80);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(),
AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 640);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 640);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(),
AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 280);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 280);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.LegalAndAccountingServices(),
AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 0);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -98,7 +102,7 @@ codeunit 10911 "Create Demo EDocs FR"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 7970);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 7970);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -106,6 +110,7 @@ codeunit 10911 "Create Demo EDocs FR"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al
index ce4421299e..dd40a81d97 100644
--- a/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al
+++ b/Apps/FR/EDocument_FR/demo data/3.Transactions/CreateEDocSampleInvFR.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 10912 "Create E-Doc Sample Inv. FR"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsFR: Codeunit "Create Demo EDocs FR";
- CreateAllocationAccountFR: Codeunit "Create Allocation Account FR";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 10912 "Create E-Doc Sample Inv. FR"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountFR.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al b/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al
index b666da8fdd..e5dfd0d1dd 100644
--- a/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al
+++ b/Apps/FR/FECAuditFile/app/src/ExportEngine/GenerateFileFEC.Codeunit.al
@@ -6,7 +6,6 @@ namespace Microsoft.Finance.AuditFileExport;
using Microsoft.Bank.BankAccount;
using Microsoft.Bank.Ledger;
-using Microsoft.Finance.Currency;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Finance.GeneralLedger.Ledger;
@@ -827,32 +826,11 @@ codeunit 10826 "Generate File FEC"
TextLine: Text;
BlobOutStream: OutStream;
begin
- TempBlob.CreateOutStream(BlobOutStream);
+ TempBlob.CreateOutStream(BlobOutStream, TextEncoding::UTF8);
foreach TextLine in LinesList do
BlobOutStream.WriteText(TextLine);
end;
- local procedure GetCustomerReceivablesAccount(CustomerNo: Code[20]): Code[20]
- var
- DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry";
- CustomerPostingGroup: Record "Customer Posting Group";
- begin
- DetailedCustLedgEntry.SetRange("Customer No.", CustomerNo);
- DetailedCustLedgEntry.FindFirst();
- CustomerPostingGroup.Get(DetailedCustLedgEntry."Posting Group");
- exit(CustomerPostingGroup."Receivables Account");
- end;
-
- local procedure GetVendorPayablesAccount(VendorNo: Code[20]): Code[20]
- var
- Vendor: Record Vendor;
- VendorPostingGroup: Record "Vendor Posting Group";
- begin
- Vendor.Get(VendorNo);
- VendorPostingGroup.Get(Vendor."Vendor Posting Group");
- exit(VendorPostingGroup."Payables Account");
- end;
-
local procedure AllowMultiplePosting(var PartyNo: Code[20]; var PartyName: Text[100]; GLEntry: Record "G/L Entry"; Customer: Record Customer)
var
AltCustPostGroup: Record "Alt. Customer Posting Group";
@@ -877,16 +855,4 @@ codeunit 10826 "Generate File FEC"
end;
until AltCustPostGroup.Next() = 0;
end;
-
- [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAfterInitDtldCustLedgerEntry', '', false, false)]
- local procedure UpdateDtldCustLedgerEntryCurrAdjmtAccNo(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")
- begin
- DetailedCustLedgEntry."Curr. Adjmt. G/L Account No." := GetCustomerReceivablesAccount(DetailedCustLedgEntry."Customer No.");
- end;
-
- [EventSubscriber(ObjectType::Codeunit, Codeunit::"Exch. Rate Adjmt. Process", 'OnAfterInitDtldVendLedgerEntry', '', false, false)]
- local procedure UpdateDtldVendLedgerEntryCurrAdjmtAccNo(var DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry")
- begin
- DetailedVendorLedgEntry."Curr. Adjmt. G/L Account No." := GetVendorPayablesAccount(DetailedVendorLedgEntry."Vendor No.");
- end;
}
diff --git a/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al b/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al
index e92a0ff2eb..20e6fc74a6 100644
--- a/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al
+++ b/Apps/FR/FECAuditFile/test/src/FECAuditFileExportTests.Codeunit.al
@@ -2321,6 +2321,30 @@ codeunit 148017 "FEC Audit File Export Tests"
VerifyDateLetFieldReport(GLRegister, AuditFile, VendorPostingGroup."Payables Account", InvoiceDocNo, "Gen. Journal Document Type"::Payment, Today);
end;
+ [Test]
+ [HandlerFunctions('ConfirmHandlerYes')]
+ procedure VerifyAccentedCharactersFromTestExportGLEntries()
+ var
+ BankAccount: Record "Bank Account";
+ GLRegister: Record "G/L Register";
+ AuditFile: Record "Audit File";
+ StartingDate: Date;
+ begin
+ // [SCENARIO 617634] Using the audit file export some accented characters are replaced by other characters which makes the file unreadable in French localisation.
+ Initialize();
+
+ // [GIVEN] Gen. Journal Line is posted for Bank Account.
+ StartingDate := GetStartingDate();
+ CreateAndPostBankGenJnlLineFAC(BankAccount, "Gen. Journal Account Type"::"Bank Account", StartingDate);
+
+ // [WHEN] Export Tax Audit report.
+ RunFECExport(AuditFile, '', StartingDate, StartingDate, false);
+
+ // [THEN] Verify Accented characters are correctly exported.
+ GLRegister.FindLast();
+ VerifyExportGLEntriesReport(GLRegister, AuditFile, '', BankAccount."No.", BankAccount.Name);
+ end;
+
local procedure Initialize()
begin
LibrarySetupStorage.Restore();
@@ -2360,7 +2384,7 @@ codeunit 148017 "FEC Audit File Export Tests"
local procedure CreateReadStream(var FileInStream: InStream; var AuditFile: Record "Audit File")
begin
AuditFile.CalcFields("File Content");
- AuditFile."File Content".CreateInStream(FileInStream);
+ AuditFile."File Content".CreateInStream(FileInStream, TextEncoding::UTF8);
end;
local procedure RunFECExport(var AuditFile: Record "Audit File"; GLAccountNoFilter: Text; StartDate: Date; EndDate: Date; IncludeOpeningBalances: Boolean)
@@ -3636,6 +3660,15 @@ codeunit 148017 "FEC Audit File Export Tests"
until GLEntry.Next() = 0;
end;
+ local procedure CreateAndPostBankGenJnlLineFAC(var BankAccount: Record "Bank Account"; DocumentType: Enum "Gen. Journal Document Type"; PostingDate: Date)
+ begin
+ CreateBankAccount(BankAccount);
+ BankAccount.Validate(Name, 'Banque Société Généraleà Â');
+ BankAccount.Modify(true);
+ CreateAndPostGenJnlLine(
+ "Gen. Journal Account Type"::"Bank Account", BankAccount."No.", DocumentType, PostingDate, -LibraryRandom.RandDecInRange(100, 200, 2));
+ end;
+
[ConfirmHandler]
procedure ConfirmHandlerYes(Question: Text[1024]; var Reply: Boolean)
begin
diff --git a/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al b/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al
index b7079a76a4..09dade31e0 100644
--- a/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al
+++ b/Apps/FR/Onprem Permissions FR/app/Permissions/frpms.permissionset.al
@@ -10,7 +10,9 @@ permissionset 10800 "FR-PMS"
Assignable = true;
Caption = 'FR Payment Management System';
- Permissions = tabledata "Bank Account Buffer" = RIMD,
+ Permissions =
+#if not CLEAN28
+ tabledata "Bank Account Buffer" = RIMD,
tabledata "Payment Address" = RIMD,
tabledata "Payment Class" = RIMD,
tabledata "Payment Header" = RIMD,
@@ -21,5 +23,6 @@ permissionset 10800 "FR-PMS"
tabledata "Payment Status" = RIMD,
tabledata "Payment Step" = RIMD,
tabledata "Payment Step Ledger" = RIMD,
+#endif
tabledata "Unreal. CV Ledg. Entry Buffer" = RIMD;
}
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al
new file mode 100644
index 0000000000..fd22d05e17
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICISVPaymentManagementFR.PermissionSetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10837 "D365 BASIC ISV - Payment Management FR" extends "D365 BASIC ISV"
+{
+ IncludedPermissionSets = "Payment Management FR - Full";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al
new file mode 100644
index 0000000000..4c6fc8d3b9
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365BASICPaymentManagementFR.PermissionSetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10838 "D365 BASIC - Payment Management FR" extends "D365 BASIC"
+{
+ IncludedPermissionSets = "Payment Management FR - Full";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al
new file mode 100644
index 0000000000..de0d639581
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365READPaymentManagementFR.PermissionSetExt.al
@@ -0,0 +1,13 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10833 "D365 READ - Payment Management FR" extends "D365 READ"
+{
+ IncludedPermissionSets = "Payment Management FR - Read",
+ "Payment Mgt FR - Objects X";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al
new file mode 100644
index 0000000000..8cf07cc9ae
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/D365TEAMMEMBERPaymentManagementFR.PermissionSetExt.al
@@ -0,0 +1,13 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10834 "D365 TEAM MEMBER - Payment Management FR" extends "D365 TEAM MEMBER"
+{
+ IncludedPermissionSets = "Payment Management FR - RM",
+ "Payment Mgt FR - Objects X";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al
new file mode 100644
index 0000000000..31f34083a7
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/Local.PermissionSetExt.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10835 LOCAL extends LOCAL
+{
+ Permissions = tabledata "Bank Account Buffer FR" = RIMD,
+ tabledata "Payment Address FR" = RIMD,
+ tabledata "Payment Class FR" = RIMD,
+ tabledata "Payment Header FR" = RIMD,
+ tabledata "Payment Header Archive FR" = RIMD,
+ tabledata "Payment Line FR" = RIMD,
+ tabledata "Payment Line Archive FR" = RIMD,
+ tabledata "Payment Post. Buffer FR" = RIMD,
+ tabledata "Payment Status FR" = RIMD,
+ tabledata "Payment Step FR" = RIMD,
+ tabledata "Payment Step Ledger FR" = RIMD;
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al b/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al
new file mode 100644
index 0000000000..ca97fe4ded
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/LocalRead.PermissionSetExt.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Security.AccessControl;
+
+permissionsetextension 10836 "LOCAL READ" extends "LOCAL READ"
+{
+ Permissions = tabledata "Bank Account Buffer FR" = R,
+ tabledata "Payment Address FR" = RIMD,
+ tabledata "Payment Class FR" = R,
+ tabledata "Payment Header FR" = R,
+ tabledata "Payment Header Archive FR" = R,
+ tabledata "Payment Line FR" = R,
+ tabledata "Payment Line Archive FR" = R,
+ tabledata "Payment Post. Buffer FR" = R,
+ tabledata "Payment Status FR" = R,
+ tabledata "Payment Step FR" = R,
+ tabledata "Payment Step Ledger FR" = R;
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al
new file mode 100644
index 0000000000..90c24cbc19
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRFull.PermissionSet.al
@@ -0,0 +1,25 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+permissionset 10837 "Payment Management FR - Full"
+{
+ Access = Internal;
+ Assignable = false;
+
+ IncludedPermissionSets = "Payment Management FR - RM";
+
+ Permissions = tabledata "Bank Account Buffer FR" = ID,
+ tabledata "Payment Address FR" = ID,
+ tabledata "Payment Class FR" = ID,
+ tabledata "Payment Header Archive FR" = ID,
+ tabledata "Payment Header FR" = ID,
+ tabledata "Payment Line Archive FR" = ID,
+ tabledata "Payment Line FR" = ID,
+ tabledata "Payment Post. Buffer FR" = ID,
+ tabledata "Payment Status FR" = ID,
+ tabledata "Payment Step FR" = ID,
+ tabledata "Payment Step Ledger FR" = ID;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al
new file mode 100644
index 0000000000..9bce088261
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRM.PermissionSet.al
@@ -0,0 +1,25 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+permissionset 10840 "Payment Management FR - RM"
+{
+ Access = Internal;
+ Assignable = false;
+
+ IncludedPermissionSets = "Payment Management FR - Read";
+
+ Permissions = tabledata "Bank Account Buffer FR" = RM,
+ tabledata "Payment Address FR" = RM,
+ tabledata "Payment Class FR" = RM,
+ tabledata "Payment Header Archive FR" = RM,
+ tabledata "Payment Header FR" = RM,
+ tabledata "Payment Line Archive FR" = RM,
+ tabledata "Payment Line FR" = RM,
+ tabledata "Payment Post. Buffer FR" = RM,
+ tabledata "Payment Status FR" = RM,
+ tabledata "Payment Step FR" = RM,
+ tabledata "Payment Step Ledger FR" = RM;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al
new file mode 100644
index 0000000000..06c76d849b
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentManagementFRRead.PermissionSet.al
@@ -0,0 +1,23 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+permissionset 10839 "Payment Management FR - Read"
+{
+ Access = Internal;
+ Assignable = false;
+
+ Permissions = tabledata "Bank Account Buffer FR" = R,
+ tabledata "Payment Address FR" = R,
+ tabledata "Payment Class FR" = R,
+ tabledata "Payment Header Archive FR" = R,
+ tabledata "Payment Header FR" = R,
+ tabledata "Payment Line Archive FR" = R,
+ tabledata "Payment Line FR" = R,
+ tabledata "Payment Post. Buffer FR" = R,
+ tabledata "Payment Status FR" = R,
+ tabledata "Payment Step FR" = R,
+ tabledata "Payment Step Ledger FR" = R;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al
new file mode 100644
index 0000000000..84e13777c0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/Permissions/PaymentMgtFRObjectsX.PermissionSet.al
@@ -0,0 +1,59 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Foundation.Navigate;
+
+permissionset 10838 "Payment Mgt FR - Objects X"
+{
+ Access = Internal;
+ Assignable = false;
+ Permissions = codeunit "Local Navigate Handler FR" = X,
+ codeunit "Payment Management FR" = X,
+ codeunit "Payment-Apply FR" = X,
+ codeunit "RIB Key FR" = X,
+ page "Payment Addresses FR" = X,
+ page "Payment Bank FR" = X,
+ page "Payment Bank Archive FR" = X,
+ page "Payment Class FR" = X,
+ page "Payment Class List FR" = X,
+ page "Payment Line Modification FR" = X,
+ page "Payment Lines Archive List FR" = X,
+ page "Payment Lines List FR" = X,
+ page "Payment Report FR" = X,
+ page "Payment Slip FR" = X,
+ page "Payment Slip Archive FR" = X,
+ page "Payment Slip List FR" = X,
+ page "Payment Slip List Archive FR" = X,
+ page "Payment Slip Subform FR" = X,
+ page "Payment Slip Subform ArchiveFR" = X,
+ page "Payment Status FR" = X,
+ page "Payment Status List FR" = X,
+ page "Payment Step Card FR" = X,
+ page "Payment Step Ledger FR" = X,
+ page "Payment Step Ledger List FR" = X,
+ page "Payment Steps FR" = X,
+ page "Payment Steps List FR" = X,
+ page "View/Edit Payment Line FR" = X,
+ xmlport "Import/Export Parameters FR" = X,
+ report "Archive Payment Slips FR" = X,
+ report "Bill FR" = X,
+ report "Draft FR" = X,
+ report "Draft notice FR" = X,
+ report "Draft recapitulation FR" = X,
+ report "Duplicate parameter FR" = X,
+ report "GL/Cust Ledger Reconciliation" = X,
+ report "GL/Vend Ledger Reconciliation" = X,
+ report "ETEBAC Files FR" = X,
+ report "Payment List FR" = X,
+ report "Remittance FR" = X,
+ report "SEPA ISO20022 FR" = X,
+ report "Suggest Cust. Payments" = X,
+ report "Suggest Vend. Payments" = X,
+ report "Withdraw FR" = X,
+ report "Withdraw notice FR" = X,
+ report "Withdraw recapitulation FR" = X,
+ report "Recapitulation Form FR" = X;
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/app.json b/Apps/FR/PaymentManagementFR/app/app.json
new file mode 100644
index 0000000000..6908e00dbc
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/app.json
@@ -0,0 +1,41 @@
+{
+ "id": "24f54185-e697-4e03-bae0-f134f2d69673",
+ "name": "Payment Management FR",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0",
+ "brief": "First-party app for FR localization that provides French payment functionality in Business Central.",
+ "description": "Implements payment functionality for Business Central under the France localization, including support for domestic payment methods, SEPA formats, and other France-specific financial processes.",
+ "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
+ "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
+ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/france/how-to-export-general-ledger-entries-for-tax-audits",
+ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541",
+ "url": "https://go.microsoft.com/fwlink/?LinkId=724011",
+ "logo": "ExtensionLogo.png",
+ "application": "28.0.0.0",
+ "dependencies": [],
+ "internalsVisibleTo": [
+ {
+ "id": "ed0f7522-50bb-4838-a1ed-a9f4d1b3d9d7",
+ "name": "Payment Management FR-Tests",
+ "publisher": "Microsoft"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "target": "OnPrem",
+ "idRanges": [
+ {
+ "from": 10831,
+ "to": 10857
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "features": [
+ "NoImplicitWith",
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/FR/PaymentManagementFR/app/extensionlogo.png b/Apps/FR/PaymentManagementFR/app/extensionlogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/FR/PaymentManagementFR/app/extensionlogo.png differ
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al
new file mode 100644
index 0000000000..6c8f3529a8
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/FeaturePaymentMgtFR.Codeunit.al
@@ -0,0 +1,301 @@
+#if not CLEAN28
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Foundation.Navigate;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.Environment.Configuration;
+using System.Upgrade;
+
+codeunit 10831 "Feature - PaymentMgt FR" implements "Feature Data Update"
+{
+ Access = Internal;
+ Permissions = TableData "Feature Data Update Status" = rm;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+ ObsoleteReason = 'Feature Payment Management will be enabled by default in version 28.0.';
+ ObsoleteState = Pending;
+ ObsoleteTag = '28.0';
+
+ var
+ TempDocumentEntry: Record "Document Entry" temporary;
+ DescriptionTxt: Label 'Existing records in GB BaseApp fields will be copied to Payment App fields';
+
+ procedure IsDataUpdateRequired(): Boolean;
+ begin
+ CountRecords();
+ if TempDocumentEntry.IsEmpty() then begin
+ SetUpgradeTag(false);
+ exit(false);
+ end;
+ exit(true);
+ end;
+
+ procedure ReviewData();
+ var
+ DataUpgradeOverview: Page "Data Upgrade Overview";
+ begin
+ Commit();
+ Clear(DataUpgradeOverview);
+ DataUpgradeOverview.Set(TempDocumentEntry);
+ DataUpgradeOverview.RunModal();
+ end;
+
+ procedure AfterUpdate(FeatureDataUpdateStatus: Record "Feature Data Update Status")
+ var
+ UpdateFeatureDataUpdateStatus: Record "Feature Data Update Status";
+ begin
+ UpdateFeatureDataUpdateStatus.SetRange("Feature Key", FeatureDataUpdateStatus."Feature Key");
+ UpdateFeatureDataUpdateStatus.SetFilter("Company Name", '<>%1', FeatureDataUpdateStatus."Company Name");
+ UpdateFeatureDataUpdateStatus.ModifyAll("Feature Status", FeatureDataUpdateStatus."Feature Status");
+
+ SetUpgradeTag(true);
+ end;
+
+ procedure UpdateData(FeatureDataUpdateStatus: Record "Feature Data Update Status");
+ var
+ FeatureDataUpdateMgt: Codeunit "Feature Data Update Mgt.";
+ StartDateTime: DateTime;
+ EndDateTime: DateTime;
+ begin
+ StartDateTime := CurrentDateTime;
+ FeatureDataUpdateMgt.LogTask(FeatureDataUpdateStatus, 'Upgrade Payment', StartDateTime);
+ UpgradePayment();
+ EndDateTime := CurrentDateTime;
+ FeatureDataUpdateMgt.LogTask(FeatureDataUpdateStatus, 'Upgrade Payment', EndDateTime);
+ end;
+
+ procedure GetTaskDescription() TaskDescription: Text;
+ begin
+ TaskDescription := DescriptionTxt;
+ end;
+
+ local procedure CountRecords()
+ var
+ BankAccount: Record "Bank Account";
+ VendorBankAccount: Record "Vendor Bank Account";
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ TempDocumentEntry.Reset();
+ TempDocumentEntry.DeleteAll();
+
+ InsertDocumentEntry(Database::"Bank Account", BankAccount.TableCaption, BankAccount.Count());
+ InsertDocumentEntry(Database::"Vendor Bank Account", VendorBankAccount.TableCaption, VendorBankAccount.Count());
+ InsertDocumentEntry(Database::"Customer Bank Account", CustomerBankAccount.TableCaption, CustomerBankAccount.Count());
+ end;
+
+ local procedure InsertDocumentEntry(TableID: Integer; TableName: Text; RecordCount: Integer)
+ begin
+ if RecordCount = 0 then
+ exit;
+
+ TempDocumentEntry.Init();
+ TempDocumentEntry."Entry No." += 1;
+ TempDocumentEntry."Table ID" := TableID;
+ TempDocumentEntry."Table Name" := CopyStr(TableName, 1, MaxStrLen(TempDocumentEntry."Table Name"));
+ TempDocumentEntry."No. of Records" := RecordCount;
+ TempDocumentEntry.Insert();
+ end;
+
+ local procedure UpgradeBankAccountBuffer()
+ var
+ BankAccountBufferFR: Record "Bank Account Buffer FR";
+ BankAccountBuffer: Record "Bank Account Buffer";
+ begin
+ if BankAccountBuffer.FindSet() then
+ repeat
+ BankAccountBufferFR.TransferFields(BankAccountBuffer);
+ BankAccountBufferFR.Insert();
+ until BankAccountBuffer.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentClass()
+ var
+ PaymentClassFR: Record "Payment Class FR";
+ PaymentClass: Record "Payment Class";
+ begin
+ if PaymentClass.FindSet() then
+ repeat
+ PaymentClassFR.TransferFields(PaymentClass);
+ PaymentClassFR.Insert();
+ until PaymentClass.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentHeader()
+ var
+ PaymentHeaderFR: Record "Payment Header FR";
+ PaymentHeader: Record "Payment Header";
+ begin
+ if PaymentHeader.FindSet() then
+ repeat
+ PaymentHeaderFR.TransferFields(PaymentHeader);
+ PaymentHeaderFR.Insert();
+ until PaymentHeader.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentLine()
+ var
+ PaymentLineFR: Record "Payment Line FR";
+ PaymentLine: Record "Payment Line";
+ begin
+ if PaymentLine.FindSet() then
+ repeat
+ PaymentLineFR.TransferFields(PaymentLine);
+ PaymentLineFR.Insert();
+ until PaymentLine.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentHeaderArchive()
+ var
+ PaymentHeaderArchiveFR: Record "Payment Header Archive FR";
+ PaymentHeaderArchive: Record "Payment Header Archive";
+ begin
+ if PaymentHeaderArchive.FindSet() then
+ repeat
+ PaymentHeaderArchiveFR.TransferFields(PaymentHeaderArchive);
+ PaymentHeaderArchiveFR.Insert();
+ until PaymentHeaderArchive.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentLineArchive()
+ var
+ PaymentLineArchiveFR: Record "Payment Line Archive FR";
+ PaymentLineArchive: Record "Payment Line Archive";
+ begin
+ if PaymentLineArchive.FindSet() then
+ repeat
+ PaymentLineArchiveFR.TransferFields(PaymentLineArchive);
+ PaymentLineArchiveFR.Insert();
+ until PaymentLineArchive.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentPostBuffer()
+ var
+ PaymentPostBufferFR: Record "Payment Post. Buffer FR";
+ PaymentPostBuffer: Record "Payment Post. Buffer";
+ begin
+ if PaymentPostBuffer.FindSet() then
+ repeat
+ PaymentPostBufferFR.TransferFields(PaymentPostBuffer);
+ PaymentPostBufferFR.Insert();
+ until PaymentPostBuffer.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentStatus()
+ var
+ PaymentStatusFR: Record "Payment Status FR";
+ PaymentStatus: Record "Payment Status";
+ begin
+ if PaymentStatus.FindSet() then
+ repeat
+ PaymentStatusFR.TransferFields(PaymentStatus);
+ PaymentStatusFR.Insert();
+ until PaymentStatus.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentStep()
+ var
+ PaymentStepFR: Record "Payment Step FR";
+ PaymentStep: Record "Payment Step";
+ begin
+ if PaymentStep.FindSet() then
+ repeat
+ PaymentStepFR.TransferFields(PaymentStep);
+ PaymentStepFR.Insert();
+ until PaymentStep.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentStepLedger()
+ var
+ PaymentStepLedgerFR: Record "Payment Step Ledger FR";
+ PaymentStepLedger: Record "Payment Step Ledger";
+ begin
+ if PaymentStepLedger.FindSet() then
+ repeat
+ PaymentStepLedgerFR.TransferFields(PaymentStepLedger);
+ PaymentStepLedgerFR.Insert();
+ until PaymentStepLedger.Next() = 0;
+ end;
+
+ local procedure UpgradePaymentAddress()
+ var
+ PaymentAddressFR: Record "Payment Address FR";
+ PaymentAddress: Record "Payment Address";
+ begin
+ if PaymentAddress.FindSet() then
+ repeat
+ PaymentAddressFR.TransferFields(PaymentAddress);
+ PaymentAddressFR.Insert();
+ until PaymentAddress.Next() = 0;
+ end;
+
+ local procedure UpgradePayment()
+ var
+ BankAccount: Record "Bank Account";
+ VendorBankAccount: Record "Vendor Bank Account";
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ UpgradeBankAccountBuffer();
+ UpgradePaymentClass();
+ UpgradePaymentHeader();
+ UpgradePaymentHeaderArchive();
+ UpgradePaymentLine();
+ UpgradePaymentLineArchive();
+ UpgradePaymentPostBuffer();
+ UpgradePaymentStatus();
+ UpgradePaymentStep();
+ UpgradePaymentStepLedger();
+ UpgradePaymentAddress();
+
+ if BankAccount.FindSet() then
+ repeat
+#pragma warning disable AL0432
+ BankAccount."Agency Code FR" := BankAccount."Agency Code";
+ BankAccount."RIB Key FR" := BankAccount."RIB Key";
+ BankAccount."RIB Checked FR" := BankAccount."RIB Checked";
+#pragma warning restore AL0432
+ BankAccount.Modify();
+ until BankAccount.Next() = 0;
+
+ if VendorBankAccount.FindSet() then
+ repeat
+#pragma warning disable AL0432
+ VendorBankAccount."Agency Code FR" := VendorBankAccount."Agency Code";
+ VendorBankAccount."RIB Key FR" := VendorBankAccount."RIB Key";
+ VendorBankAccount."RIB Checked FR" := VendorBankAccount."RIB Checked";
+#pragma warning restore AL0432
+ VendorBankAccount.Modify();
+ until VendorBankAccount.Next() = 0;
+
+ if CustomerBankAccount.FindSet() then
+ repeat
+#pragma warning disable AL0432
+ CustomerBankAccount."Agency Code FR" := CustomerBankAccount."Agency Code";
+ CustomerBankAccount."RIB Key FR" := CustomerBankAccount."RIB Key";
+ CustomerBankAccount."RIB Checked FR" := CustomerBankAccount."RIB Checked";
+#pragma warning restore AL0432
+ CustomerBankAccount.Modify();
+ until CustomerBankAccount.Next() = 0;
+ end;
+
+ local procedure SetUpgradeTag(DataUpgradeExecuted: Boolean)
+ var
+ UpgradeTag: Codeunit "Upgrade Tag";
+ UpgTagPayment: Codeunit "Upg. Tag Payment Management FR";
+ begin
+ // Set the upgrade tag to indicate that the data update is executed/skipped and the feature is enabled.
+ // This is needed when the feature is enabled by default in a future version, to skip the data upgrade.
+ if UpgradeTag.HasUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()) then
+ exit;
+
+ UpgradeTag.SetUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag());
+ if not DataUpgradeExecuted then
+ UpgradeTag.SetSkippedUpgrade(UpgTagPayment.GetPaymentUpgradeTag(), true);
+ end;
+}
+#endif
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al
new file mode 100644
index 0000000000..c38e7813bd
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/LocalNavigateHandlerFR.Codeunit.al
@@ -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.Foundation.Navigate;
+
+using Microsoft.Bank.Payment;
+
+codeunit 10833 "Local Navigate Handler FR"
+{
+ var
+ [SecurityFiltering(SecurityFilter::Filtered)]
+ PaymentHeader: Record "Payment Header FR";
+ [SecurityFiltering(SecurityFilter::Filtered)]
+ PaymentHeaderArchive: Record "Payment Header Archive FR";
+ [SecurityFiltering(SecurityFilter::Filtered)]
+ PaymentLine: Record "Payment Line FR";
+ [SecurityFiltering(SecurityFilter::Filtered)]
+ PaymentLineArchive: Record "Payment Line Archive FR";
+
+ [EventSubscriber(ObjectType::Page, Page::Navigate, 'OnAfterNavigateFindRecords', '', false, false)]
+ local procedure OnAfterNavigateFindRecords(var DocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text)
+ begin
+ if PaymentHeader.ReadPermission then begin
+ SetPaymentHeaderFilters(DocNoFilter, PostingDateFilter);
+ DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Header FR", PaymentHeader.TableCaption(), PaymentHeader.Count);
+ end;
+ if PaymentLine.ReadPermission then begin
+ SetPaymentLineFilters(DocNoFilter, PostingDateFilter);
+ DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Line FR", PaymentLine.TableCaption(), PaymentLine.Count);
+ end;
+ if PaymentHeaderArchive.ReadPermission then begin
+ SetPaymentHeaderArchiveFilters(DocNoFilter, PostingDateFilter);
+ DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Header Archive FR", PaymentHeaderArchive.TableCaption(), PaymentHeaderArchive.Count);
+ end;
+ if PaymentLineArchive.ReadPermission then begin
+ SetPaymentLineArchiveFilters(DocNoFilter, PostingDateFilter);
+ DocumentEntry.InsertIntoDocEntry(DATABASE::"Payment Line Archive FR", PaymentLineArchive.TableCaption(), PaymentLineArchive.Count);
+ end;
+ end;
+
+ [EventSubscriber(ObjectType::Page, Page::Navigate, 'OnBeforeShowRecords', '', false, false)]
+ local procedure OnBeforeShowRecords(var TempDocumentEntry: Record "Document Entry"; DocNoFilter: Text; PostingDateFilter: Text; var IsHandled: Boolean; ContactNo: Code[250])
+ begin
+ case TempDocumentEntry."Table ID" of
+ DATABASE::"Payment Header FR":
+ begin
+ SetPaymentHeaderFilters(DocNoFilter, PostingDateFilter);
+ PAGE.Run(0, PaymentHeader);
+ end;
+ DATABASE::"Payment Line FR":
+ begin
+ SetPaymentLineFilters(DocNoFilter, PostingDateFilter);
+ PAGE.Run(0, PaymentLine);
+ end;
+ DATABASE::"Payment Header Archive FR":
+ begin
+ SetPaymentHeaderArchiveFilters(DocNoFilter, PostingDateFilter);
+ PAGE.Run(0, PaymentHeaderArchive);
+ end;
+ DATABASE::"Payment Line Archive FR":
+ begin
+ SetPaymentLineArchiveFilters(DocNoFilter, PostingDateFilter);
+ PAGE.Run(0, PaymentLineArchive)
+ end;
+ end;
+ end;
+
+ local procedure SetPaymentHeaderFilters(DocNoFilter: Text; PostingDateFilter: Text)
+ begin
+ PaymentHeader.Reset();
+ PaymentHeader.SetCurrentKey("Posting Date");
+ PaymentHeader.SetFilter("No.", DocNoFilter);
+ PaymentHeader.SetFilter("Posting Date", PostingDateFilter);
+ end;
+
+ local procedure SetPaymentLineFilters(DocNoFilter: Text; PostingDateFilter: Text)
+ begin
+ PaymentLine.Reset();
+ PaymentLine.SetCurrentKey("Posting Date");
+ PaymentLine.SetFilter("Document No.", DocNoFilter);
+ PaymentLine.SetFilter("Posting Date", PostingDateFilter);
+ end;
+
+ local procedure SetPaymentHeaderArchiveFilters(DocNoFilter: Text; PostingDateFilter: Text)
+ begin
+ PaymentHeaderArchive.Reset();
+ PaymentHeaderArchive.SetCurrentKey("Posting Date");
+ PaymentHeaderArchive.SetFilter("No.", DocNoFilter);
+ PaymentHeaderArchive.SetFilter("Posting Date", PostingDateFilter);
+ end;
+
+ local procedure SetPaymentLineArchiveFilters(DocNoFilter: Text; PostingDateFilter: Text)
+ begin
+ PaymentLineArchive.Reset();
+ PaymentLineArchive.SetCurrentKey("Posting Date");
+ PaymentLineArchive.SetFilter("No.", DocNoFilter);
+ PaymentLineArchive.SetFilter("Posting Date", PostingDateFilter);
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al
new file mode 100644
index 0000000000..2151358a2f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentApplyFR.Codeunit.al
@@ -0,0 +1,450 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Finance.ReceivablesPayables;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Setup;
+using Microsoft.Sales.Receivables;
+using Microsoft.Sales.Setup;
+
+codeunit 10834 "Payment-Apply FR"
+{
+ Permissions = TableData "Cust. Ledger Entry" = rm,
+ TableData "Vendor Ledger Entry" = rm;
+ TableNo = "Payment Line FR";
+
+ trigger OnRun()
+ begin
+ Apply(Rec);
+ end;
+
+ local procedure Apply(var PaymentLine: Record "Payment Line FR")
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentToleranceMgt: Codeunit "Payment Tolerance Management";
+ IsHandled: Boolean;
+ begin
+ PaymentHeader.Get(PaymentLine."No.");
+
+ GenJnlLine."Account Type" := PaymentLine."Account Type";
+ GenJnlLine."Account No." := PaymentLine."Account No.";
+ GenJnlLine.Amount := PaymentLine.Amount;
+ GenJnlLine."Amount (LCY)" := PaymentLine."Amount (LCY)";
+ GenJnlLine."Currency Code" := PaymentLine."Currency Code";
+ GenJnlLine."Posting Date" := PaymentHeader."Posting Date";
+ GenJnlLine."Document Type" := GenJnlLine."Document Type"::Payment;
+ GenJnlLine."Applies-to ID" := PaymentLine."Applies-to ID";
+ GenJnlLine."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No.";
+ GenJnlLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type";
+
+ PaymentLine.GetCurrency();
+ AccType := GenJnlLine."Account Type";
+ AccNo := GenJnlLine."Account No.";
+ case AccType of
+ AccType::Customer:
+ begin
+ OnApplyOnBeforeApplyCustomer(PaymentLine, GenJnlLine);
+ if ApplyCustomer(PaymentLine) then
+ exit;
+ if PaymentLine.Amount <> 0 then
+ if not PaymentToleranceMgt.PmtTolGenJnl(GenJnlLine) then
+ exit;
+ end;
+ AccType::Vendor:
+ begin
+ OnApplyOnBeforeApplyVendor(PaymentLine, GenJnlLine);
+ if ApplyVendor(PaymentLine) then
+ exit;
+ if PaymentLine.Amount <> 0 then
+ if not PaymentToleranceMgt.PmtTolGenJnl(GenJnlLine) then
+ exit;
+ end;
+ else begin
+ IsHandled := false;
+ OnApplyOnElseCase(PaymentLine, GenJnlLine, IsHandled);
+ if not IsHandled then
+ Error(
+ Text005Lbl,
+ GenJnlLine.FieldCaption("Account Type"), GenJnlLine.FieldCaption("Bal. Account Type"));
+ end;
+ end;
+
+ PaymentLine."Applies-to Doc. Type" := GenJnlLine."Applies-to Doc. Type";
+ PaymentLine."Applies-to Doc. No." := GenJnlLine."Applies-to Doc. No.";
+ PaymentLine."Applies-to ID" := GenJnlLine."Applies-to ID";
+ PaymentLine."Due Date" := GenJnlLine."Due Date";
+ PaymentLine.Amount := GenJnlLine.Amount;
+ PaymentLine."Amount (LCY)" := GenJnlLine."Amount (LCY)";
+ PaymentLine.Validate(Amount);
+ PaymentLine.Validate("Amount (LCY)");
+ if (PaymentLine."Direct Debit Mandate ID" = '') and (GenJnlLine."Direct Debit Mandate ID" <> '') then
+ PaymentLine.Validate("Direct Debit Mandate ID", GenJnlLine."Direct Debit Mandate ID");
+
+ OnAfterApply(GenJnlLine);
+ end;
+
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ GLSetup: Record "General Ledger Setup";
+ Currency: Record Currency;
+ CurrExchRate: Record "Currency Exchange Rate";
+ ApplyCustEntries: Page "Apply Customer Entries";
+ ApplyVendEntries: Page "Apply Vendor Entries";
+ AccType: Enum "Gen. Journal Account Type";
+ AccNo: Code[20];
+ CurrencyCode2: Code[10];
+ OK: Boolean;
+ Text001Lbl: Label 'The %1 in the %2 will be changed from %3 to %4.\', Comment = '%1 = Currency Code, %2 = Gen. Journal Line, %3 = Currency Code, %4 = Currency Code in Cust. Ledger Entry';
+ Text002Lbl: Label 'Do you wish to continue?';
+ Text003Lbl: Label 'The update has been interrupted to respect the warning.';
+ Text005Lbl: Label 'The %1 or %2 must be Customer or Vendor.', Comment = '%1 = Account Type, %2 = Bal. Account Type';
+ Text006Lbl: Label 'All entries in one application must be in the same currency.';
+ Text007Lbl: Label 'All entries in one application must be in the same currency or one or more of the EMU currencies.';
+
+
+ local procedure ApplyCustomer(PaymentLine: Record "Payment Line FR"): Boolean
+ begin
+ CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive);
+ CustLedgEntry.SetRange("Customer No.", AccNo);
+ CustLedgEntry.SetRange(Open, true);
+ GenJnlLine."Applies-to ID" := GetAppliesToID(GenJnlLine."Applies-to ID", PaymentLine);
+ ApplyCustEntries.SetGenJnlLine(GenJnlLine, GenJnlLine.FieldNo("Applies-to ID"));
+ ApplyCustEntries.SetRecord(CustLedgEntry);
+ ApplyCustEntries.SetTableView(CustLedgEntry);
+ ApplyCustEntries.LookupMode(true);
+ OK := ApplyCustEntries.RunModal() = ACTION::LookupOK;
+ Clear(ApplyCustEntries);
+ if not OK then
+ exit(true);
+ CustLedgEntry.Reset();
+ CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive);
+ CustLedgEntry.SetRange("Customer No.", AccNo);
+ CustLedgEntry.SetRange(Open, true);
+ CustLedgEntry.SetRange("Applies-to ID", GenJnlLine."Applies-to ID");
+ if CustLedgEntry.Find('-') then begin
+ CurrencyCode2 := CustLedgEntry."Currency Code";
+ if GenJnlLine.Amount = 0 then begin
+ repeat
+ CheckAgainstApplnCurrency(CurrencyCode2, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger(), true);
+ CustLedgEntry.CalcFields("Remaining Amount");
+ CustLedgEntry."Remaining Amount" :=
+ CurrExchRate.ExchangeAmount(
+ CustLedgEntry."Remaining Amount",
+ CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ CustLedgEntry."Remaining Amount" :=
+ Round(CustLedgEntry."Remaining Amount", Currency."Amount Rounding Precision");
+ CustLedgEntry."Remaining Pmt. Disc. Possible" :=
+ CurrExchRate.ExchangeAmount(
+ CustLedgEntry."Remaining Pmt. Disc. Possible",
+ CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ CustLedgEntry."Remaining Pmt. Disc. Possible" :=
+ Round(CustLedgEntry."Remaining Pmt. Disc. Possible", Currency."Amount Rounding Precision");
+ CustLedgEntry."Amount to Apply" :=
+ CurrExchRate.ExchangeAmount(
+ CustLedgEntry."Amount to Apply",
+ CustLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ CustLedgEntry."Amount to Apply" :=
+ Round(CustLedgEntry."Amount to Apply", Currency."Amount Rounding Precision");
+ if ((CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::"Credit Memo") and
+ (CustLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or
+ (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Invoice)) and
+ (GenJnlLine."Posting Date" <= CustLedgEntry."Pmt. Discount Date")
+ then
+ GenJnlLine.Amount := GenJnlLine.Amount - (CustLedgEntry."Amount to Apply" - CustLedgEntry."Remaining Pmt. Disc. Possible")
+ else
+ GenJnlLine.Amount := GenJnlLine.Amount - CustLedgEntry."Amount to Apply";
+ until CustLedgEntry.Next() = 0;
+ GenJnlLine."Amount (LCY)" := GenJnlLine.Amount;
+ GenJnlLine."Currency Factor" := 1;
+ if (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Customer) or
+ (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Vendor)
+ then begin
+ GenJnlLine.Amount := -GenJnlLine.Amount;
+ GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)";
+ end;
+ GenJnlLine.Validate(Amount);
+ GenJnlLine.Validate("Amount (LCY)");
+ end else
+ repeat
+ CheckAgainstApplnCurrency(CurrencyCode2, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger(), true);
+ until CustLedgEntry.Next() = 0;
+ ConfirmAndCheckApplnCurrency(GenJnlLine, Text001Lbl + Text002Lbl, CustLedgEntry."Currency Code", "Gen. Journal Account Type"::Customer.AsInteger());
+ end else
+ GenJnlLine."Applies-to ID" := '';
+ GenJnlLine."Due Date" := CustLedgEntry."Due Date";
+ GenJnlLine."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID";
+
+ OnAfterApplyCustomer(CustLedgEntry, GenJnlLine);
+ end;
+
+ local procedure ApplyVendor(PaymentLine: Record "Payment Line FR"): Boolean
+ begin
+ VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive);
+ VendLedgEntry.SetRange("Vendor No.", AccNo);
+ VendLedgEntry.SetRange(Open, true);
+ GenJnlLine."Applies-to ID" := GetAppliesToID(GenJnlLine."Applies-to ID", PaymentLine);
+ ApplyVendEntries.SetGenJnlLine(GenJnlLine, GenJnlLine.FieldNo("Applies-to ID"));
+ ApplyVendEntries.SetRecord(VendLedgEntry);
+ ApplyVendEntries.SetTableView(VendLedgEntry);
+ ApplyVendEntries.LookupMode(true);
+ OK := ApplyVendEntries.RunModal() = ACTION::LookupOK;
+ Clear(ApplyVendEntries);
+ if not OK then
+ exit(true);
+ VendLedgEntry.Reset();
+ VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive);
+ VendLedgEntry.SetRange("Vendor No.", AccNo);
+ VendLedgEntry.SetRange(Open, true);
+ VendLedgEntry.SetRange("Applies-to ID", GenJnlLine."Applies-to ID");
+ if VendLedgEntry.Find('+') then begin
+ CurrencyCode2 := VendLedgEntry."Currency Code";
+ if GenJnlLine.Amount = 0 then begin
+ repeat
+ CheckAgainstApplnCurrency(CurrencyCode2, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger(), true);
+ VendLedgEntry.CalcFields("Remaining Amount");
+ VendLedgEntry."Remaining Amount" :=
+ CurrExchRate.ExchangeAmount(
+ VendLedgEntry."Remaining Amount",
+ VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ VendLedgEntry."Remaining Amount" :=
+ Round(VendLedgEntry."Remaining Amount", Currency."Amount Rounding Precision");
+ VendLedgEntry."Remaining Pmt. Disc. Possible" :=
+ CurrExchRate.ExchangeAmount(
+ VendLedgEntry."Remaining Pmt. Disc. Possible",
+ VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ VendLedgEntry."Remaining Pmt. Disc. Possible" :=
+ Round(VendLedgEntry."Remaining Pmt. Disc. Possible", Currency."Amount Rounding Precision");
+ VendLedgEntry."Amount to Apply" :=
+ CurrExchRate.ExchangeAmount(
+ VendLedgEntry."Amount to Apply",
+ VendLedgEntry."Currency Code", GenJnlLine."Currency Code", GenJnlLine."Posting Date");
+ VendLedgEntry."Amount to Apply" :=
+ Round(VendLedgEntry."Amount to Apply", Currency."Amount Rounding Precision");
+ if ((VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::"Credit Memo") and
+ (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or
+ (VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Invoice)) and
+ (GenJnlLine."Posting Date" <= VendLedgEntry."Pmt. Discount Date")
+ then
+ GenJnlLine.Amount := GenJnlLine.Amount - (VendLedgEntry."Amount to Apply" - VendLedgEntry."Remaining Pmt. Disc. Possible")
+ else
+ GenJnlLine.Amount := GenJnlLine.Amount - VendLedgEntry."Amount to Apply";
+ until VendLedgEntry.Next(-1) = 0;
+ GenJnlLine."Amount (LCY)" := GenJnlLine.Amount;
+ GenJnlLine."Currency Factor" := 1;
+ if (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Customer) or
+ (GenJnlLine."Bal. Account Type" = GenJnlLine."Bal. Account Type"::Vendor)
+ then begin
+ GenJnlLine.Amount := -GenJnlLine.Amount;
+ GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)";
+ end;
+ GenJnlLine.Validate(Amount);
+ GenJnlLine.Validate("Amount (LCY)");
+ end else
+ repeat
+ CheckAgainstApplnCurrency(CurrencyCode2, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger(), true);
+ until VendLedgEntry.Next(-1) = 0;
+ ConfirmAndCheckApplnCurrency(GenJnlLine, Text001Lbl + Text002Lbl, VendLedgEntry."Currency Code", "Gen. Journal Account Type"::Vendor.AsInteger());
+ end else
+ GenJnlLine."Applies-to ID" := '';
+ GenJnlLine."Due Date" := VendLedgEntry."Due Date";
+
+ OnAfterApplyVendor(VendLedgEntry, GenJnlLine);
+ end;
+
+ procedure CheckAgainstApplnCurrency(ApplnCurrencyCode: Code[10]; CompareCurrencyCode: Code[10]; Acc_Type: Option "G/L Account",Customer,Vendor,"Bank Account","Fixed Asset"; Message: Boolean): Boolean
+ var
+ Currency2: Record Currency;
+ SalesSetup: Record "Sales & Receivables Setup";
+ PurchSetup: Record "Purchases & Payables Setup";
+ CurrencyAppln: Option No,EMU,All;
+ begin
+ if ApplnCurrencyCode = CompareCurrencyCode then
+ exit(true);
+
+ case Acc_Type of
+ Acc_Type::Customer:
+ begin
+ SalesSetup.Get();
+ CurrencyAppln := SalesSetup."Appln. between Currencies";
+ case CurrencyAppln of
+ CurrencyAppln::No:
+ begin
+ if ApplnCurrencyCode <> CompareCurrencyCode then
+ if Message then
+ Error(Text006Lbl);
+
+ exit(false);
+ end;
+ CurrencyAppln::EMU:
+ begin
+ GLSetup.Get();
+ if not Currency.Get(ApplnCurrencyCode) then
+ Currency."EMU Currency" := GLSetup."EMU Currency";
+ if not Currency2.Get(CompareCurrencyCode) then
+ Currency2."EMU Currency" := GLSetup."EMU Currency";
+ if not Currency."EMU Currency" or not Currency2."EMU Currency" then
+ if Message then
+ Error(Text007Lbl);
+
+ exit(false);
+ end;
+ end;
+ end;
+ Acc_Type::Vendor:
+ begin
+ PurchSetup.Get();
+ CurrencyAppln := PurchSetup."Appln. between Currencies";
+ case CurrencyAppln of
+ CurrencyAppln::No:
+ begin
+ if ApplnCurrencyCode <> CompareCurrencyCode then
+ if Message then
+ Error(Text006Lbl);
+
+ exit(false);
+ end;
+ CurrencyAppln::EMU:
+ begin
+ GLSetup.Get();
+ if not Currency.Get(ApplnCurrencyCode) then
+ Currency."EMU Currency" := GLSetup."EMU Currency";
+ if not Currency2.Get(CompareCurrencyCode) then
+ Currency2."EMU Currency" := GLSetup."EMU Currency";
+ if not Currency."EMU Currency" or not Currency2."EMU Currency" then
+ if Message then
+ Error(Text007Lbl);
+
+ exit(false);
+ end;
+ end;
+ end;
+ end;
+
+ exit(true);
+ end;
+
+ procedure GetCurrency()
+ begin
+ if GenJnlLine."Currency Code" = '' then
+ Currency.InitRoundingPrecision()
+ else begin
+ Currency.Get(GenJnlLine."Currency Code");
+ Currency.TestField("Amount Rounding Precision");
+ end;
+ end;
+
+ procedure DeleteApply(Rec: Record "Payment Line FR")
+ var
+ IsHandled: Boolean;
+ begin
+ IsHandled := false;
+ OnBeforeDeleteApply(Rec, CustLedgEntry, VendLedgEntry, IsHandled);
+ if IsHandled then
+ exit;
+
+ if Rec."Applies-to ID" = '' then
+ exit;
+
+ case Rec."Account Type" of
+ Rec."Account Type"::Customer:
+ begin
+ CustLedgEntry.Init();
+ CustLedgEntry.SetCurrentKey("Applies-to ID");
+ if Rec."Applies-to Doc. No." <> '' then begin
+ CustLedgEntry.SetRange("Document No.", Rec."Applies-to Doc. No.");
+ CustLedgEntry.SetRange("Document Type", Rec."Applies-to Doc. Type");
+ end;
+ CustLedgEntry.SetRange("Applies-to ID", Rec."Applies-to ID");
+ OnDeleteApplyOnBeforeCustLedgEntryModifyAll(Rec, CustLedgEntry);
+ CustLedgEntry.ModifyAll("Applies-to ID", '');
+ end;
+ Rec."Account Type"::Vendor:
+ begin
+ VendLedgEntry.Init();
+ VendLedgEntry.SetCurrentKey("Applies-to ID");
+ if Rec."Applies-to Doc. No." <> '' then begin
+ VendLedgEntry.SetRange("Document No.", Rec."Applies-to Doc. No.");
+ VendLedgEntry.SetRange("Document Type", Rec."Applies-to Doc. Type");
+ end;
+ VendLedgEntry.SetRange("Applies-to ID", Rec."Applies-to ID");
+ OnDeleteApplyOnBeforeVendLedgEntryModifyAll(Rec, VendLedgEntry);
+ VendLedgEntry.ModifyAll("Applies-to ID", '');
+ end;
+ end;
+ end;
+
+ local procedure ConfirmAndCheckApplnCurrency(var GenJournalLine: Record "Gen. Journal Line"; Question: Text; CurrencyCode: Code[10]; AccountType: Option)
+ begin
+ if GenJournalLine."Currency Code" <> CurrencyCode2 then
+ if GenJournalLine.Amount = 0 then begin
+ if not Confirm(Question, true, GenJournalLine.FieldCaption("Currency Code"), GenJournalLine.TableCaption(), GenJournalLine."Currency Code", CurrencyCode) then
+ Error(Text003Lbl);
+ GenJournalLine."Currency Code" := CurrencyCode
+ end else
+ CheckAgainstApplnCurrency(GenJournalLine."Currency Code", CurrencyCode, AccountType, true);
+ end;
+
+ local procedure GetAppliesToID(AppliesToID: Code[50]; PaymentLine: Record "Payment Line FR"): Code[50]
+ begin
+ if AppliesToID = '' then
+ if PaymentLine."Document No." <> '' then
+ AppliesToID := PaymentLine."No." + '/' + PaymentLine."Document No."
+ else
+ AppliesToID := PaymentLine."No." + '/' + Format(PaymentLine."Line No.");
+ exit(AppliesToID);
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterApply(GenJnlLine: Record "Gen. Journal Line")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterApplyCustomer(CustLedgEntry: Record "Cust. Ledger Entry"; GenJnlLine: Record "Gen. Journal Line")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterApplyVendor(VendLedgEntry: Record "Vendor Ledger Entry"; GenJnlLine: Record "Gen. Journal Line")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeDeleteApply(Rec: Record "Payment Line FR"; CustLedgEntry: Record "Cust. Ledger Entry"; VendLedgEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnDeleteApplyOnBeforeCustLedgEntryModifyAll(PaymentLine: Record "Payment Line FR"; var CustLedgEntry: Record "Cust. Ledger Entry")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnDeleteApplyOnBeforeVendLedgEntryModifyAll(PaymentLine: Record "Payment Line FR"; var VendLedgEntry: Record "Vendor Ledger Entry")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnApplyOnElseCase(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnApplyOnBeforeApplyCustomer(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnApplyOnBeforeApplyVendor(var PaymentLine: Record "Payment Line FR"; var GenJnlLine: Record "Gen. Journal Line")
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al
new file mode 100644
index 0000000000..d47ccce6a4
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFR.Codeunit.al
@@ -0,0 +1,1179 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Finance.GeneralLedger.Posting;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+
+codeunit 10837 "Payment Management FR"
+{
+ Permissions = TableData "Cust. Ledger Entry" = rm,
+ TableData "Vendor Ledger Entry" = rm;
+
+ trigger OnRun()
+ begin
+ CreatePaymentHeaders();
+ end;
+
+ var
+ InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary;
+ CustomerPostingGroup: Record "Customer Posting Group";
+ VendorPostingGroup: Record "Vendor Posting Group";
+ Customer: Record Customer;
+ Vendor: Record Vendor;
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ GenJnlLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ OldPaymentLine: Record "Payment Line FR";
+ StepLedger: Record "Payment Step Ledger FR";
+ Step: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentClass: Record "Payment Class FR";
+ GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line";
+ DimMgt: Codeunit DimensionManagement;
+ N: Integer;
+ Suffix: Text;
+ EntryTypeDebit: Enum "Gen. Journal Account Type";
+ EntryNoAccountDebit: Code[20];
+ EntryPostGroupDebit: Code[20];
+ EntryTypeCredit: Enum "Gen. Journal Account Type";
+ EntryNoAccountCredit: Code[20];
+ EntryPostGroupCredit: Code[20];
+ GLEntryNoTmp: Integer;
+ HeaderAccountUsedGlobally: Boolean;
+ Text002Lbl: Label 'One or more acceptation codes are No.';
+ Text003Lbl: Label 'One or more lines have an incorrect RIB code.';
+ Text004Lbl: Label 'There is no Payment Header to create.';
+ Text005Lbl: Label 'Ledger Posting';
+ Text006Lbl: Label 'One or more due dates are not specified.';
+ Text007Lbl: Label 'The action has been canceled.';
+ Text008Lbl: Label 'The header RIB is not correct.';
+ Text009Lbl: Label 'The combination of dimensions used in Payment Header %1 is blocked. %2.', Comment = '%1 - payment header no, %2 - dimension error';
+ Text010Lbl: Label 'The combination of dimensions used in Payment Header %1, line no. %2 is blocked. %3.', Comment = '%1 - payment header no, %2 - payment line no, %3 - dimension error';
+ Text011Lbl: Label 'XX';
+ Text012Lbl: Label 'Customer Posting Group %1 does not exist.', Comment = '%1 = Posting Group';
+ Text014Lbl: Label 'You must enter a G/L account for customer posting group %1.', Comment = '%1 = Posting Group';
+ Text016Lbl: Label 'A posted line cannot be deleted.';
+ Text017Lbl: Label 'Source Code %1 does not exist.', Comment = '%1 = code';
+ Text018Lbl: Label 'You must specify a debit account number for step %1 of payment type %2.', Comment = '%1 = Name, %2 = Class Name';
+ Text019Lbl: Label 'You must specify a credit account number for step %1 of payment type %2.', Comment = '%1 = Name, %2 = Class Name';
+ Text020Lbl: Label 'You must specify an account number in the payment header.';
+ Text022Lbl: Label 'The status of document %1 does not authorize archiving.', Comment = '%1 = No.';
+ CheckDimVauePostingLineErr: Label 'A dimension used in %1 %2 %3 has caused an error. %4', Comment = '%1=Payment Header No., %2=tablecaption, %3=Payment Line No., %4=Error text';
+ CheckDimVauePostingHeaderErr: Label 'A dimension used in %1 has caused an error. %2', Comment = '%1=Payment Header No., %2=Error text';
+ Text100Lbl: Label 'Rounding on %1', Comment = '%1 = Description';
+
+ local procedure ProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR")
+ var
+ PaymentStatus: Record "Payment Status FR";
+ ActionValidated: Boolean;
+ begin
+ OnBeforeProcessPaymentStep(PaymentHeaderNo, PaymentStep, PaymentLine);
+
+ PaymentHeader.Get(PaymentHeaderNo);
+ PaymentHeader.SetRange("No.", PaymentHeader."No.");
+
+ if PaymentStep."Verify Header RIB" and not PaymentHeader."RIB Checked" then
+ Error(Text008Lbl);
+
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.SetRange("Copied To No.", '');
+
+ if PaymentStep."Acceptation Code<>No" then begin
+ PaymentLine.SetRange("Acceptation Code", PaymentLine."Acceptation Code"::No);
+ if PaymentLine.Find('-') then
+ Error(Text002Lbl);
+ PaymentLine.SetRange("Acceptation Code");
+ end;
+
+ if PaymentStep."Verify Lines RIB" then begin
+ PaymentLine.SetRange("RIB Checked", false);
+ if PaymentLine.Find('-') then
+ Error(Text003Lbl);
+ PaymentLine.SetRange("RIB Checked");
+ end;
+
+ if PaymentStep."Verify Due Date" then begin
+ PaymentLine.SetRange("Due Date", 0D);
+ if PaymentLine.Find('-') then
+ Error(Text006Lbl);
+ PaymentLine.SetRange("Due Date");
+ end;
+ OnProcessPaymentStepOnAfterCheckPaymentStep(PaymentStep, PaymentHeader, PaymentLine);
+
+ Step.Get(PaymentStep."Payment Class", PaymentStep.Line);
+
+ ActionValidated := ProcessPaymentStepByActionType();
+
+ if ActionValidated then begin
+ PaymentHeader.Validate("Status No.", Step."Next Status");
+ PaymentHeader.Modify();
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.ModifyAll("Status No.", Step."Next Status");
+ PaymentStatus.Get(PaymentHeader."Payment Class", Step."Next Status");
+ PaymentLine.ModifyAll("Payment in Progress", PaymentStatus."Payment in Progress");
+ end else
+ Message(Text007Lbl);
+
+ OnAfterProcessPaymentStep(PaymentHeaderNo, PaymentStep);
+ end;
+
+ local procedure ProcessPaymentStepByActionType() ActionValidated: Boolean
+ var
+ Window: Dialog;
+ IsHandled: Boolean;
+ begin
+ IsHandled := false;
+ OnBeforeProcessPaymentStepByActionType(PaymentLine, Step, ActionValidated, IsHandled);
+ if IsHandled then
+ exit(ActionValidated);
+
+ case Step."Action Type" of
+ Step."Action Type"::None:
+ exit(true);
+ Step."Action Type"::"Cancel File":
+ begin
+ PaymentHeader."File Export Completed" := false;
+ PaymentHeader.Modify();
+ exit(true);
+ end;
+ Step."Action Type"::File:
+ begin
+ PaymentHeader."File Export Completed" := false;
+ PaymentHeader.Modify();
+ Commit();
+
+ case Step."Export Type" of
+ Step."Export Type"::Report:
+ REPORT.RunModal(Step."Export No.", true, false, PaymentHeader);
+ Step."Export Type"::XMLport:
+ RunXmlPortExport(Step."Export No.", PaymentHeader);
+ end;
+
+ PaymentHeader.Find();
+ exit(PaymentHeader."File Export Completed");
+ end;
+ Step."Action Type"::Report:
+ begin
+ REPORT.RunModal(Step."Report No.", true, true, PaymentLine);
+ exit(true);
+ end;
+ Step."Action Type"::Ledger:
+ begin
+ InvPostingBuffer[1].DeleteAll();
+ CheckDim();
+ Window.Open(
+ '#1#################################\\' +
+ Text005Lbl);
+ if PaymentLine.Find('-') then
+ repeat
+ Window.Update(1, Text005Lbl + ' ' + PaymentLine."No." + ' ' + Format(PaymentLine."Line No."));
+ OldPaymentLine := PaymentLine;
+ HeaderAccountUsedGlobally := false;
+ GenerInvPostingBuffer();
+ PaymentLine."Acc. Type Last Entry Debit" := EntryTypeDebit;
+ PaymentLine."Acc. No. Last Entry Debit" := EntryNoAccountDebit;
+ PaymentLine."P. Group Last Entry Debit" := EntryPostGroupDebit;
+ PaymentLine."Acc. Type Last Entry Credit" := EntryTypeCredit;
+ PaymentLine."Acc. No. Last Entry Credit" := EntryNoAccountCredit;
+ PaymentLine."P. Group Last Entry Credit" := EntryPostGroupCredit;
+ PaymentLine.Validate("Status No.", Step."Next Status");
+ PaymentLine.Posted := true;
+ PaymentLine.Modify();
+ until PaymentLine.Next() = 0;
+ Window.Close();
+ GenerEntries();
+ exit(true);
+ end;
+ else
+ OnProcessPaymentStepOnCaseElse(Step, PaymentLine, ActionValidated, PaymentHeader);
+ end;
+ end;
+
+ procedure UpdtBuffer()
+ var
+ CurrExchRate: Record "Currency Exchange Rate";
+ begin
+ InvPostingBuffer[2] := InvPostingBuffer[1];
+ if InvPostingBuffer[2].Find() then begin
+ InvPostingBuffer[2].Validate(Amount, InvPostingBuffer[2].Amount + InvPostingBuffer[1].Amount);
+ InvPostingBuffer[2]."Amount (LCY)" := Round(CurrExchRate.ExchangeAmtFCYToLCY(PaymentHeader."Posting Date",
+ PaymentHeader."Currency Code", InvPostingBuffer[2].Amount, PaymentHeader."Currency Factor"));
+ InvPostingBuffer[2]."VAT Amount" :=
+ InvPostingBuffer[2]."VAT Amount" + InvPostingBuffer[1]."VAT Amount";
+ InvPostingBuffer[2]."Line Discount Amount" :=
+ InvPostingBuffer[2]."Line Discount Amount" + InvPostingBuffer[1]."Line Discount Amount";
+ if InvPostingBuffer[1]."Line Discount Account" <> '' then
+ InvPostingBuffer[2]."Line Discount Account" := InvPostingBuffer[1]."Line Discount Account";
+ InvPostingBuffer[2]."Inv. Discount Amount" :=
+ InvPostingBuffer[2]."Inv. Discount Amount" + InvPostingBuffer[1]."Inv. Discount Amount";
+ if InvPostingBuffer[1]."Inv. Discount Account" <> '' then
+ InvPostingBuffer[2]."Inv. Discount Account" := InvPostingBuffer[1]."Inv. Discount Account";
+ InvPostingBuffer[2]."VAT Base Amount" :=
+ InvPostingBuffer[2]."VAT Base Amount" + InvPostingBuffer[1]."VAT Base Amount";
+ InvPostingBuffer[2]."Amount (ACY)" :=
+ InvPostingBuffer[2]."Amount (ACY)" + InvPostingBuffer[1]."Amount (ACY)";
+ InvPostingBuffer[2]."VAT Amount (ACY)" :=
+ InvPostingBuffer[2]."VAT Amount (ACY)" + InvPostingBuffer[1]."VAT Amount (ACY)";
+ InvPostingBuffer[2]."VAT Difference" :=
+ InvPostingBuffer[2]."VAT Difference" + InvPostingBuffer[1]."VAT Difference";
+ InvPostingBuffer[2]."Line Discount Amt. (ACY)" :=
+ InvPostingBuffer[2]."Line Discount Amt. (ACY)" +
+ InvPostingBuffer[1]."Line Discount Amt. (ACY)";
+ InvPostingBuffer[2]."Inv. Discount Amt. (ACY)" :=
+ InvPostingBuffer[2]."Inv. Discount Amt. (ACY)" +
+ InvPostingBuffer[1]."Inv. Discount Amt. (ACY)";
+ InvPostingBuffer[2]."VAT Base Amount (ACY)" :=
+ InvPostingBuffer[2]."VAT Base Amount (ACY)" +
+ InvPostingBuffer[1]."VAT Base Amount (ACY)";
+ InvPostingBuffer[2].Quantity :=
+ InvPostingBuffer[2].Quantity + InvPostingBuffer[1].Quantity;
+ if not InvPostingBuffer[1]."System-Created Entry" then
+ InvPostingBuffer[2]."System-Created Entry" := false;
+ InvPostingBuffer[2].Modify();
+ end else begin
+ GLEntryNoTmp += 1;
+ InvPostingBuffer[1]."GL Entry No." := GLEntryNoTmp;
+ InvPostingBuffer[1].Insert();
+ end;
+ end;
+
+ procedure CopyLigBor(var FromPaymentLine: Record "Payment Line FR"; NewStep: Integer; var PayNum: Code[20])
+ var
+ ToBord: Record "Payment Header FR";
+ ToPaymentLine: Record "Payment Line FR";
+ PaymentStep: Record "Payment Step FR";
+ Process: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ NoSeries: Codeunit "No. Series";
+ i: Integer;
+ begin
+ if FromPaymentLine.Find('-') then begin
+ PaymentStep.Get(FromPaymentLine."Payment Class", NewStep);
+ Process.Get(FromPaymentLine."Payment Class");
+ if PayNum = '' then begin
+ i := 10000;
+ ToBord."No. Series" := PaymentStep."Header Nos. Series";
+ ToBord."No." := NoSeries.GetNextNo(ToBord."No. Series");
+ ToBord."Payment Class" := FromPaymentLine."Payment Class";
+ ToBord."Status No." := PaymentStep."Next Status";
+ PaymentStatus.Get(ToBord."Payment Class", ToBord."Status No.");
+ ToBord."Archiving Authorized" := PaymentStatus."Archiving Authorized";
+ ToBord."Currency Code" := FromPaymentLine."Currency Code";
+ ToBord."Currency Factor" := FromPaymentLine."Currency Factor";
+ OnCopyLigBorOnBeforeInitHeader(ToBord, Process, i);
+ ToBord.InitHeader();
+ ToBord.Insert();
+ end else begin
+ ToBord.Get(PayNum);
+ ToPaymentLine.SetRange("No.", PayNum);
+ if ToPaymentLine.FindLast() then
+ i := ToPaymentLine."Line No." + 10000
+ else
+ i := 10000;
+ end;
+ repeat
+ ToPaymentLine.Copy(FromPaymentLine);
+ ToPaymentLine."No." := ToBord."No.";
+ ToPaymentLine."Line No." := i;
+ ToPaymentLine.IsCopy := true;
+ ToPaymentLine."Status No." := PaymentStep."Next Status";
+ ToPaymentLine."Copied To No." := '';
+ ToPaymentLine."Copied To Line" := 0;
+ ToPaymentLine.Posted := false;
+ ToPaymentLine."Created from No." := FromPaymentLine."No.";
+ ToPaymentLine."Dimension Set ID" := FromPaymentLine."Dimension Set ID";
+ OnCopyLigBorOnBeforeToPaymentLineInsert(ToPaymentLine, Process);
+ ToPaymentLine.Insert(true);
+ FromPaymentLine."Copied To No." := ToPaymentLine."No.";
+ FromPaymentLine."Copied To Line" := ToPaymentLine."Line No.";
+ FromPaymentLine.Modify();
+ i += 10000;
+ until FromPaymentLine.Next() = 0;
+ PayNum := ToBord."No.";
+ end;
+ end;
+
+ procedure DeleteLigBorCopy(var FromPaymentLine: Record "Payment Line FR")
+ var
+ ToPaymentLine: Record "Payment Line FR";
+ begin
+ ToPaymentLine.SetCurrentKey("Copied To No.", "Copied To Line");
+
+ if FromPaymentLine.Find('-') then
+ if FromPaymentLine.Posted then
+ Message(Text016Lbl)
+ else
+ repeat
+ ToPaymentLine.SetRange("Copied To No.", FromPaymentLine."No.");
+ ToPaymentLine.SetRange("Copied To Line", FromPaymentLine."Line No.");
+ ToPaymentLine.FindFirst();
+ ToPaymentLine."Copied To No." := '';
+ ToPaymentLine."Copied To Line" := 0;
+ ToPaymentLine.Modify();
+ FromPaymentLine.Delete(true);
+ until FromPaymentLine.Next() = 0;
+ end;
+
+ procedure GenerInvPostingBuffer()
+ var
+ PaymentClassFR: Record "Payment Class FR";
+ NoSeriesBatch: Codeunit "No. Series - Batch";
+ Description: Text[98];
+ begin
+ StepLedger.SetRange("Payment Class", Step."Payment Class");
+ StepLedger.SetRange(Line, Step.Line);
+
+ if StepLedger.Find('-') then begin
+ repeat
+ Clear(InvPostingBuffer[1]);
+ SetPostingGroup();
+ SetAccountNo();
+ InvPostingBuffer[1]."System-Created Entry" := true;
+ if StepLedger.Sign = StepLedger.Sign::Debit then begin
+ InvPostingBuffer[1].Validate(Amount, Abs(PaymentLine.Amount));
+ InvPostingBuffer[1].Validate("Amount (LCY)", Abs(PaymentLine."Amount (LCY)"));
+ end else begin
+ InvPostingBuffer[1].Validate(Amount, Abs(PaymentLine.Amount) * -1);
+ InvPostingBuffer[1].Validate("Amount (LCY)", Abs(PaymentLine."Amount (LCY)") * -1);
+ end;
+ InvPostingBuffer[1]."Currency Code" := PaymentLine."Currency Code";
+ InvPostingBuffer[1]."Currency Factor" := PaymentLine."Currency Factor";
+ InvPostingBuffer[1].Correction := PaymentLine.Correction xor Step.Correction;
+ if StepLedger."Detail Level" = StepLedger."Detail Level"::Line then
+ InvPostingBuffer[1]."Payment Line No." := PaymentLine."Line No."
+ else
+ if StepLedger."Detail Level" = StepLedger."Detail Level"::"Due Date" then
+ InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date";
+
+ InvPostingBuffer[1]."Document Type" := StepLedger."Document Type";
+ if StepLedger."Document No." = StepLedger."Document No."::"Header No." then
+ InvPostingBuffer[1]."Document No." := PaymentHeader."No."
+ else begin
+ if (InvPostingBuffer[1].Sign = InvPostingBuffer[1].Sign::Positive) and
+ (PaymentLine."Entry No. Debit" = 0) and (PaymentLine."Entry No. Credit" = 0)
+ then
+ PaymentLine.TestField("Document No.");
+ InvPostingBuffer[1]."Document No." := PaymentLine."Document No.";
+ end;
+ InvPostingBuffer[1]."Header Document No." := PaymentHeader."No.";
+ if StepLedger.Sign = StepLedger.Sign::Debit then begin
+ EntryTypeDebit := InvPostingBuffer[1]."Account Type";
+ EntryNoAccountDebit := InvPostingBuffer[1]."Account No.";
+ EntryPostGroupDebit := InvPostingBuffer[1]."Posting Group";
+ end else begin
+ EntryTypeCredit := InvPostingBuffer[1]."Account Type";
+ EntryNoAccountCredit := InvPostingBuffer[1]."Account No.";
+ EntryPostGroupCredit := InvPostingBuffer[1]."Posting Group";
+ end;
+ InvPostingBuffer[1]."System-Created Entry" := true;
+ Application();
+ PaymentClassFR.Get(PaymentHeader."Payment Class");
+ if (PaymentClassFR."Unrealized VAT Reversal" = PaymentClassFR."Unrealized VAT Reversal"::Delayed) and
+ Step."Realize VAT"
+ then begin
+ InvPostingBuffer[1]."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type";
+ InvPostingBuffer[1]."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No.";
+ if InvPostingBuffer[1]."Applies-to ID" = '' then
+ InvPostingBuffer[1]."Applies-to ID" := PaymentLine."Applies-to ID";
+ InvPostingBuffer[1]."Created from No." := PaymentLine."Created from No.";
+ end;
+ Description := GetDescriptionForInvPostingBuffer();
+ OnGenerInvPostingBufferOnAfterGetDescriptionForInvPostingBuffer(StepLedger, PaymentHeader, PaymentLine, Description);
+ InvPostingBuffer[1].Description := CopyStr(Description, 1, 50);
+ InvPostingBuffer[1]."Source Type" := PaymentLine."Account Type";
+ InvPostingBuffer[1]."Source No." := PaymentLine."Account No.";
+ InvPostingBuffer[1]."External Document No." := PaymentLine."External Document No.";
+ InvPostingBuffer[1]."Dimension Set ID" := PaymentLine."Dimension Set ID";
+ OnGenerInvPostingBufferOnBeforeUpdtBuffer(InvPostingBuffer, PaymentLine, StepLedger);
+ UpdtBuffer();
+ if (InvPostingBuffer[1].Amount >= 0) xor InvPostingBuffer[1].Correction then
+ PaymentLine."Entry No. Debit" := InvPostingBuffer[1]."GL Entry No."
+ else
+ PaymentLine."Entry No. Credit" := InvPostingBuffer[1]."GL Entry No.";
+ until StepLedger.Next() = 0;
+ NoSeriesBatch.SaveState();
+ end;
+ end;
+
+ local procedure GetDescriptionForInvPostingBuffer() Description: Text[98]
+ begin
+ Description :=
+ StrSubstNo(StepLedger.Description, PaymentLine."Due Date", PaymentLine."Account No.", PaymentLine."Document No.");
+
+ OnAfterGetDescriptionForInvPostingBuffer(StepLedger, PaymentLine, Description);
+ end;
+
+ procedure SetPostingGroup()
+ var
+ PostingGroup: Code[20];
+ begin
+ if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then
+ if ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Payment Line Account") or
+ (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Associated G/L Account") or
+ (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Header Payment Account") or
+ ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Setup Account") and
+ (StepLedger."Account Type" = StepLedger."Account Type"::Customer)))
+ then begin
+ if PaymentLine."Posting Group" <> '' then
+ PostingGroup := PaymentLine."Posting Group"
+ else
+ if StepLedger."Customer Posting Group" <> '' then
+ PostingGroup := StepLedger."Customer Posting Group"
+ else begin
+ Customer.Get(PaymentLine."Account No.");
+ PostingGroup := Customer."Customer Posting Group";
+ end;
+ OnSetPostingGroupOnBeforeCheckPostingGroup(PaymentLine, StepLedger, PostingGroup);
+ if not CustomerPostingGroup.Get(PostingGroup) then
+ Error(Text012Lbl, PostingGroup);
+ if CustomerPostingGroup."Receivables Account" = '' then
+ Error(Text014Lbl, PostingGroup);
+ end;
+
+ if PaymentLine."Account Type" = PaymentLine."Account Type"::Vendor then
+ if ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Payment Line Account") or
+ (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Associated G/L Account") or
+ (StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Header Payment Account") or
+ ((StepLedger."Accounting Type" = StepLedger."Accounting Type"::"Setup Account") and
+ (StepLedger."Account Type" = StepLedger."Account Type"::Vendor)))
+ then begin
+ if PaymentLine."Posting Group" <> '' then
+ PostingGroup := PaymentLine."Posting Group"
+ else
+ if StepLedger."Vendor Posting Group" <> '' then
+ PostingGroup := StepLedger."Vendor Posting Group"
+ else begin
+ Vendor.Get(PaymentLine."Account No.");
+ PostingGroup := Vendor."Vendor Posting Group";
+ end;
+ if not VendorPostingGroup.Get(PostingGroup) then
+ Error(Text012Lbl, PostingGroup);
+ if VendorPostingGroup."Payables Account" = '' then
+ Error(Text014Lbl, PostingGroup);
+ end;
+ end;
+
+ procedure SetAccountNo()
+ begin
+ case StepLedger."Accounting Type" of
+ StepLedger."Accounting Type"::"Payment Line Account":
+ begin
+ InvPostingBuffer[1]."Account Type" := PaymentLine."Account Type";
+ InvPostingBuffer[1]."Account No." := PaymentLine."Account No.";
+ if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then
+ InvPostingBuffer[1]."Posting Group" := CustomerPostingGroup.Code;
+ if PaymentLine."Account Type" = PaymentLine."Account Type"::Vendor then
+ InvPostingBuffer[1]."Posting Group" := VendorPostingGroup.Code;
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ DimMgt.UpdateGlobalDimFromDimSetID(PaymentLine."Dimension Set ID",
+ InvPostingBuffer[1]."Global Dimension 1 Code", InvPostingBuffer[1]."Global Dimension 2 Code");
+ end;
+ StepLedger."Accounting Type"::"Associated G/L Account":
+ begin
+ InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account";
+ if PaymentLine."Account Type" = PaymentLine."Account Type"::Customer then
+ InvPostingBuffer[1]."Account No." := CustomerPostingGroup."Receivables Account"
+ else
+ InvPostingBuffer[1]."Account No." := VendorPostingGroup."Payables Account";
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ end;
+ StepLedger."Accounting Type"::"Setup Account":
+ begin
+ InvPostingBuffer[1]."Account Type" := StepLedger."Account Type";
+ InvPostingBuffer[1]."Account No." := StepLedger."Account No.";
+ if StepLedger."Account No." = '' then begin
+ PaymentHeader.CalcFields("Payment Class Name");
+ if StepLedger.Sign = StepLedger.Sign::Debit then
+ Error(Text018Lbl, Step.Name, PaymentHeader."Payment Class Name");
+
+ Error(Text019Lbl, Step.Name, PaymentHeader."Payment Class Name");
+ end;
+ if StepLedger."Account Type" = StepLedger."Account Type"::Customer then
+ InvPostingBuffer[1]."Posting Group" := StepLedger."Customer Posting Group"
+ else
+ InvPostingBuffer[1]."Posting Group" := StepLedger."Vendor Posting Group";
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ end;
+ StepLedger."Accounting Type"::"G/L Account / Month":
+ begin
+ InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account";
+ N := Date2DMY(PaymentLine."Due Date", 2);
+ if N < 10 then
+ Suffix := '0' + Format(N)
+ else
+ Suffix := Format(N);
+ InvPostingBuffer[1]."Account No." := CopyStr(StepLedger.Root + Suffix, 1, MaxStrLen(InvPostingBuffer[1]."Account No."));
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ end;
+ StepLedger."Accounting Type"::"G/L Account / Week":
+ begin
+ InvPostingBuffer[1]."Account Type" := InvPostingBuffer[1]."Account Type"::"G/L Account";
+ N := Date2DWY(PaymentLine."Due Date", 2);
+ if N < 10 then
+ Suffix := '0' + Format(N)
+ else
+ Suffix := Format(N);
+ InvPostingBuffer[1]."Account No." := CopyStr(StepLedger.Root + Suffix, 1, MaxStrLen(InvPostingBuffer[1]."Account No."));
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ end;
+ StepLedger."Accounting Type"::"Bal. Account Previous Entry":
+ begin
+ if (StepLedger.Sign = StepLedger.Sign::Debit) and not (PaymentLine.Correction xor Step.Correction) then begin
+ InvPostingBuffer[1]."Account Type" := PaymentLine."Acc. Type Last Entry Credit";
+ InvPostingBuffer[1]."Account No." := PaymentLine."Acc. No. Last Entry Credit";
+ InvPostingBuffer[1]."Posting Group" := PaymentLine."P. Group Last Entry Credit";
+ end else begin
+ InvPostingBuffer[1]."Account Type" := PaymentLine."Acc. Type Last Entry Debit";
+ InvPostingBuffer[1]."Account No." := PaymentLine."Acc. No. Last Entry Debit";
+ InvPostingBuffer[1]."Posting Group" := PaymentLine."P. Group Last Entry Debit";
+ end;
+ InvPostingBuffer[1]."Line No." := PaymentLine."Line No.";
+ end;
+ StepLedger."Accounting Type"::"Header Payment Account":
+ begin
+ InvPostingBuffer[1]."Account Type" := PaymentHeader."Account Type";
+ InvPostingBuffer[1]."Account No." := PaymentHeader."Account No.";
+ if PaymentHeader."Account No." = '' then
+ Error(Text020Lbl);
+ if StepLedger."Detail Level" = StepLedger."Detail Level"::Account then
+ HeaderAccountUsedGlobally := true;
+ InvPostingBuffer[1]."Line No." := 0;
+ DimMgt.UpdateGlobalDimFromDimSetID(PaymentHeader."Dimension Set ID",
+ InvPostingBuffer[1]."Global Dimension 1 Code", InvPostingBuffer[1]."Global Dimension 2 Code");
+ end;
+ end;
+ end;
+
+ procedure Application()
+ begin
+ if StepLedger.Application <> StepLedger.Application::None then
+ case StepLedger.Application of
+ StepLedger.Application::"Applied Entry":
+ begin
+ InvPostingBuffer[1]."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type";
+ InvPostingBuffer[1]."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No.";
+ InvPostingBuffer[1]."Applies-to ID" := PaymentLine."Applies-to ID";
+ end;
+
+ StepLedger.Application::"Entry Previous Step":
+ begin
+ InvPostingBuffer[1]."Applies-to ID" := PaymentLine."No." + '/' + Format(PaymentLine."Line No.") + Text011Lbl;
+
+ if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer then begin
+ if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then
+ CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit")
+ else
+ CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit");
+
+ if CustLedgerEntry.FindFirst() then begin
+ CustLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ CustLedgerEntry.Validate("Amount to Apply", CustLedgerEntry."Remaining Amount");
+ CustLedgerEntry.Modify();
+ end;
+ end
+ else
+ if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor then begin
+ if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then
+ VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit")
+ else
+ VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit");
+
+ if VendorLedgerEntry.FindFirst() then begin
+ VendorLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID";
+ VendorLedgerEntry.CalcFields("Remaining Amount");
+ VendorLedgerEntry.Validate("Amount to Apply", VendorLedgerEntry."Remaining Amount");
+ VendorLedgerEntry.Modify();
+ end;
+ end;
+ end;
+
+ StepLedger.Application::"Memorized Entry":
+ begin
+ InvPostingBuffer[1]."Applies-to ID" := PaymentLine."No." + '/' + Format(PaymentLine."Line No.") + Text011Lbl;
+
+ if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer then begin
+ CustLedgerEntry.Reset();
+ if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then
+ CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit Memo")
+ else
+ CustLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit Memo");
+
+ if CustLedgerEntry.FindFirst() then begin
+ CustLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ CustLedgerEntry.Validate("Amount to Apply", CustLedgerEntry."Remaining Amount");
+ CustLedgerEntry.Modify();
+ end;
+ end
+ else
+ if InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor then begin
+ if (InvPostingBuffer[1].Amount < 0) xor InvPostingBuffer[1].Correction then
+ VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Debit Memo")
+ else
+ VendorLedgerEntry.SetRange("Entry No.", OldPaymentLine."Entry No. Credit Memo");
+
+ if VendorLedgerEntry.FindFirst() then begin
+ VendorLedgerEntry."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID";
+ VendorLedgerEntry.CalcFields("Remaining Amount");
+ VendorLedgerEntry.Validate("Amount to Apply", VendorLedgerEntry."Remaining Amount");
+ VendorLedgerEntry.Modify();
+ end;
+ end;
+ end;
+ end;
+
+ // Detail Level logic
+ if StepLedger."Detail Level" = StepLedger."Detail Level"::Account then begin
+ if (InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Vendor) or
+ (InvPostingBuffer[1]."Account Type" = InvPostingBuffer[1]."Account Type"::Customer) then
+ InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date";
+ end else
+ InvPostingBuffer[1]."Due Date" := PaymentLine."Due Date";
+
+ OnAfterApplication(StepLedger, InvPostingBuffer, PaymentHeader, PaymentLine);
+ end;
+
+
+ procedure GenerEntries()
+ var
+ Currency: Record Currency;
+ Difference: Decimal;
+ TotalDebit: Decimal;
+ TotalCredit: Decimal;
+ LastGLEntryNo: Integer;
+ begin
+ if InvPostingBuffer[1].Find('+') then
+ repeat
+ LastGLEntryNo := PostInvPostingBuffer();
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.SetRange("Line No.");
+ if GenJnlLine.Amount >= 0 then begin
+ TotalDebit := TotalDebit + GenJnlLine."Amount (LCY)";
+ StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Debit);
+ PaymentLine.SetRange("Entry No. Debit", InvPostingBuffer[1]."GL Entry No.");
+ if StepLedger."Memorize Entry" then
+ PaymentLine.ModifyAll(PaymentLine."Entry No. Debit Memo", LastGLEntryNo);
+ PaymentLine.ModifyAll("Entry No. Debit", LastGLEntryNo);
+ PaymentLine.SetRange("Entry No. Debit");
+ end else begin
+ TotalCredit := TotalCredit + Abs(GenJnlLine."Amount (LCY)");
+ StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Credit);
+ PaymentLine.SetRange("Entry No. Credit", InvPostingBuffer[1]."GL Entry No.");
+ if StepLedger."Memorize Entry" then
+ PaymentLine.ModifyAll(PaymentLine."Entry No. Credit Memo", LastGLEntryNo);
+ PaymentLine.ModifyAll("Entry No. Credit", LastGLEntryNo);
+ PaymentLine.SetRange("Entry No. Credit");
+ end;
+ until InvPostingBuffer[1].Next(-1) = 0;
+
+ if HeaderAccountUsedGlobally then begin
+ Difference := TotalDebit - TotalCredit;
+ if Difference <> 0 then begin
+ GenJnlLine.Init();
+ GenJnlLine."Account Type" := GenJnlLine."Account Type"::"G/L Account";
+ Currency.Get(PaymentHeader."Currency Code");
+ if Difference < 0 then begin
+ GenJnlLine."Account No." := Currency."Unrealized Losses Acc.";
+ StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Debit);
+ GenJnlLine.Validate("Debit Amount", -Difference);
+ end else begin
+ GenJnlLine."Account No." := Currency."Unrealized Gains Acc.";
+ StepLedger.Get(Step."Payment Class", Step.Line, StepLedger.Sign::Credit);
+ GenJnlLine.Validate("Credit Amount", Difference);
+ end;
+ GenJnlLine."Posting Date" := PaymentHeader."Posting Date";
+ GenJnlLine."Document No." := PaymentHeader."No.";
+ GenJnlLine.Description := StrSubstNo(
+ Text100Lbl, StrSubstNo(StepLedger.Description, PaymentHeader."Document Date", '', PaymentHeader."No."));
+ GenJnlLine."Shortcut Dimension 1 Code" := PaymentHeader."Shortcut Dimension 1 Code";
+ GenJnlLine."Shortcut Dimension 2 Code" := PaymentHeader."Shortcut Dimension 2 Code";
+ GenJnlLine."Dimension Set ID" := PaymentHeader."Dimension Set ID";
+ GenJnlLine."Source Code" := PaymentHeader."Source Code";
+ GenJnlLine."Reason Code" := Step."Reason Code";
+ GenJnlLine."Document Date" := PaymentHeader."Document Date";
+ OnGenerEntriesOnBeforeGenJnlPostLineRunWithCheck(GenJnlLine, PaymentHeader, StepLedger);
+ GenJnlPostLine.RunWithCheck(GenJnlLine);
+ end;
+ end;
+
+ InvPostingBuffer[1].DeleteAll();
+ end;
+
+ procedure CreatePaymentHeaders()
+ begin
+ Step.SetRange("Action Type", Step."Action Type"::"Create New Document");
+
+ if StepSelect('', -1, Step, true) then
+ ExecuteCreatePaymtHead(Step);
+ end;
+
+ procedure ExecuteCreatePaymtHead(PaymtStep: Record "Payment Step FR"): Code[20]
+ var
+ Bor: Record "Payment Header FR";
+ StatementForm: Page "Payment Slip FR";
+ InserForm: Page "Payment Lines List FR";
+ PayNum: Code[20];
+ begin
+ PaymentLine.SetRange("Payment Class", PaymtStep."Payment Class");
+ PaymentLine.SetRange("Status No.", PaymtStep."Previous Status");
+ PaymentLine.SetRange("Copied To No.", '');
+ PaymentLine.FilterGroup(2);
+ InserForm.SetSteps(PaymtStep.Line);
+ InserForm.SetTableView(PaymentLine);
+ InserForm.LookupMode(true);
+ InserForm.RunModal();
+ PayNum := InserForm.GetNumBor();
+ if Bor.Get(PayNum) then begin
+ StatementForm.SetRecord(Bor);
+ StatementForm.Run();
+ end else
+ Error(Text004Lbl);
+ exit(PayNum);
+ end;
+
+ procedure LinesInsert(HeaderNumber: Code[20])
+ var
+ Header: Record "Payment Header FR";
+ PaymentLineFR: Record "Payment Line FR";
+ PaymentStepFR: Record "Payment Step FR";
+ InserForm: Page "Payment Lines List FR";
+ begin
+ Header.Get(HeaderNumber);
+ if StepSelect(Header."Payment Class", Header."Status No.", PaymentStepFR, false) then begin
+ PaymentLineFR.SetRange("Payment Class", Header."Payment Class");
+ PaymentLineFR.SetRange("Copied To No.", '');
+ PaymentLineFR.SetFilter("Status No.", Format(PaymentStepFR."Previous Status"));
+ PaymentLineFR.SetRange("Currency Code", Header."Currency Code");
+ PaymentLineFR.FilterGroup(2);
+ InserForm.SetSteps(PaymentStepFR.Line);
+ InserForm.SetNumBor(Header."No.");
+ InserForm.SetTableView(PaymentLineFR);
+ InserForm.LookupMode(true);
+ InserForm.RunModal();
+ end;
+ end;
+
+ procedure StepSelect(Process: Text[30]; NextStatus: Integer; var PaymentStep: Record "Payment Step FR"; CreateDocumentFilter: Boolean) OK: Boolean
+ var
+ PaymentClassFR: Record "Payment Class FR";
+ Options: Text;
+ Choice: Integer;
+ i: Integer;
+ begin
+ OK := false;
+ i := 0;
+ if Process = '' then begin
+ PaymentClassFR.SetRange(Enable, true);
+ if CreateDocumentFilter then
+ PaymentClassFR.SetRange("Is Create Document", true);
+ if PaymentClassFR.Find('-') then
+ repeat
+ i += 1;
+ if Options = '' then
+ Options := PaymentClassFR.Code
+ else
+ Options := Options + ',' + PaymentClassFR.Code;
+ until PaymentClassFR.Next() = 0;
+ if i > 0 then
+ Choice := StrMenu(Options, 1);
+ i := 1;
+ if Choice > 0 then begin
+ PaymentClassFR.Find('-');
+ while Choice > i do begin
+ i += 1;
+ PaymentClassFR.Next();
+ end;
+ end;
+ end else begin
+ PaymentClassFR.Get(Process);
+ Choice := 1;
+ end;
+ if Choice > 0 then begin
+ Options := '';
+ PaymentStep.SetRange("Payment Class", PaymentClassFR.Code);
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::"Create New Document");
+ if NextStatus > -1 then
+ PaymentStep.SetRange("Next Status", NextStatus);
+ i := 0;
+ if PaymentStep.Find('-') then begin
+ i += 1;
+ repeat
+ if Options = '' then
+ Options := PaymentStep.Name
+ else
+ Options := Options + ',' + PaymentStep.Name;
+ until PaymentStep.Next() = 0;
+ if i > 0 then begin
+ Choice := StrMenu(Options, 1);
+ i := 1;
+ if Choice > 0 then begin
+ PaymentStep.Find('-');
+ while Choice > i do begin
+ i += 1;
+ PaymentStep.Next();
+ end;
+ OK := true;
+ end;
+ end;
+ end;
+ end;
+ end;
+
+ local procedure CheckDimCombAndValue(PaymentLine2: Record "Payment Line FR")
+ var
+ TableID: array[10] of Integer;
+ No: array[10] of Code[20];
+ begin
+ if PaymentLine."Line No." = 0 then begin
+ if not DimMgt.CheckDimIDComb(PaymentHeader."Dimension Set ID") then
+ Error(
+ Text009Lbl,
+ PaymentHeader."No.", DimMgt.GetDimCombErr());
+ TableID[1] := DATABASE::"Payment Header FR";
+ No[1] := PaymentHeader."No.";
+ if not DimMgt.CheckDimValuePosting(TableID, No, PaymentHeader."Dimension Set ID") then
+ ThrowPmtPostError(PaymentLine2, CheckDimVauePostingHeaderErr, DimMgt.GetDimValuePostingErr());
+ end;
+
+ if PaymentLine."Line No." <> 0 then begin
+ if not DimMgt.CheckDimIDComb(PaymentLine2."Dimension Set ID") then
+ Error(
+ Text010Lbl,
+ PaymentHeader."No.", PaymentLine2."Line No.", DimMgt.GetDimCombErr());
+ TableID[1] := TypeToTableID(PaymentLine2."Account Type".AsInteger());
+ No[1] := PaymentLine2."Account No.";
+ if not DimMgt.CheckDimValuePosting(TableID, No, PaymentLine2."Dimension Set ID") then
+ ThrowPmtPostError(PaymentLine2, CheckDimVauePostingLineErr, DimMgt.GetDimValuePostingErr());
+ end;
+ end;
+
+ local procedure CheckDim()
+ begin
+ PaymentLine."Line No." := 0;
+ CheckDimCombAndValue(PaymentLine);
+
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ if PaymentLine.FindSet() then
+ repeat
+ CheckDimCombAndValue(PaymentLine);
+ until PaymentLine.Next() = 0;
+ end;
+
+ local procedure TypeToTableID(Type: Option "G/L Account",Customer,Vendor,"Bank Account","Fixed Asset"): Integer
+ begin
+ case Type of
+ Type::"G/L Account":
+ exit(DATABASE::"G/L Account");
+ Type::Customer:
+ exit(DATABASE::Customer);
+ Type::Vendor:
+ exit(DATABASE::Vendor);
+ Type::"Bank Account":
+ exit(DATABASE::"Bank Account");
+ Type::"Fixed Asset":
+ exit(DATABASE::"Fixed Asset");
+ end;
+ end;
+
+ local procedure ThrowPmtPostError(ReceivedPaymentLine: Record "Payment Line FR"; ErrorTemplate: Text; ErrorText: Text)
+ begin
+ if ReceivedPaymentLine."Line No." <> 0 then
+ Error(
+ ErrorTemplate, PaymentHeader."No.", ReceivedPaymentLine.TableCaption(), ReceivedPaymentLine."Line No.", ErrorText);
+ Error(ErrorTemplate, PaymentHeader."No.", ErrorText);
+ end;
+
+ procedure TestSourceCode("Code": Code[10])
+ var
+ SourceCode: Record "Source Code";
+ begin
+ if not SourceCode.Get(Code) then
+ Error(Text017Lbl, Code);
+ end;
+
+ procedure PaymentAddr(var AddrArray: array[8] of Text[100]; PaymentAddress: Record "Payment Address FR")
+ var
+ FormatAddress: Codeunit "Format Address";
+ begin
+ FormatAddress.FormatAddr(
+ AddrArray, PaymentAddress.Name, PaymentAddress."Name 2", PaymentAddress.Contact, PaymentAddress.Address, PaymentAddress."Address 2",
+ PaymentAddress.City, PaymentAddress."Post Code", PaymentAddress.County, PaymentAddress."Country/Region Code");
+ end;
+
+ procedure PaymentBankAcc(var AddrArray: array[8] of Text[100]; BankAcc: Record "Payment Header FR")
+ var
+ FormatAddress: Codeunit "Format Address";
+ begin
+ FormatAddress.FormatAddr(
+ AddrArray, BankAcc."Bank Name", BankAcc."Bank Name 2", BankAcc."Bank Contact", BankAcc."Bank Address", BankAcc."Bank Address 2",
+ BankAcc."Bank City", BankAcc."Bank Post Code", BankAcc."Bank County", BankAcc."Bank Country/Region Code");
+ end;
+
+ procedure ArchiveDocument(Document: Record "Payment Header FR")
+ var
+ ArchiveHeader: Record "Payment Header Archive FR";
+ ArchiveLine: Record "Payment Line Archive FR";
+ PaymentLineFR: Record "Payment Line FR";
+ begin
+ Document.CalcFields("Archiving Authorized");
+ if not Document."Archiving Authorized" then
+ Error(Text022Lbl, Document."No.");
+ ArchiveHeader.TransferFields(Document);
+ ArchiveHeader.Insert();
+ Document.Delete();
+ PaymentLineFR.SetRange("No.", Document."No.");
+ if PaymentLineFR.Find('-') then
+ repeat
+ ArchiveLine.TransferFields(PaymentLineFR);
+ ArchiveLine.Insert();
+ PaymentLineFR.Delete();
+ until PaymentLineFR.Next() = 0;
+ end;
+
+ procedure PickPaymentStep(PaymentHeaderFR: Record "Payment Header FR"; var PaymentStep: Record "Payment Step FR"): Boolean
+ var
+ PaymentSteps: Page "Payment Steps FR";
+ begin
+ PaymentStep.FilterGroup(2);
+ // Filter on "Action Type" is passed with PaymentStep
+ PaymentStep.SetRange("Payment Class", PaymentHeaderFR."Payment Class");
+ PaymentStep.SetRange("Previous Status", PaymentHeaderFR."Status No.");
+ PaymentStep.FilterGroup(0);
+ if PaymentStep.IsEmpty() then
+ exit(false);
+
+ if PaymentStep.Count = 1 then begin
+ PaymentStep.FindFirst();
+ exit(Confirm(PaymentStep.Name, true));
+ end;
+
+ PaymentStep.FindSet();
+ PaymentSteps.LookupMode(true);
+ PaymentSteps.SetTableView(PaymentStep);
+ PaymentSteps.SetRecord(PaymentStep);
+ PaymentSteps.Editable(false);
+ if PaymentSteps.RunModal() = ACTION::LookupOK then begin
+ PaymentSteps.GetRecord(PaymentStep);
+ exit(true);
+ end;
+ exit(false);
+ end;
+
+ procedure ProcessPaymentSteps(PaymentHeaderFR: Record "Payment Header FR"; var PaymentStep: Record "Payment Step FR")
+ begin
+ PaymentHeaderFR.TestNbOfLines();
+ if PickPaymentStep(PaymentHeaderFR, PaymentStep) then
+ ProcessPaymentStep(PaymentHeaderFR."No.", PaymentStep);
+ end;
+
+ local procedure RunXmlPortExport(XMLPortID: Integer; var PaymentHeaderFR: Record "Payment Header FR")
+ begin
+ PaymentClass.Get(PaymentHeaderFR."Payment Class");
+ case PaymentClass."SEPA Transfer Type" of
+ PaymentClass."SEPA Transfer Type"::"Credit Transfer":
+ ExportSEPACreditTransfer(XMLPortID, PaymentHeaderFR);
+ PaymentClass."SEPA Transfer Type"::"Direct Debit":
+ ExportSEPADirectDebit(PaymentHeaderFR);
+ else
+ XMLPORT.Run(XMLPortID, false, false, PaymentHeaderFR);
+ end;
+ end;
+
+ local procedure ExportSEPACreditTransfer(XMLPortId: Integer; var PaymentHeaderFR: Record "Payment Header FR")
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ SEPACTExportFile: Codeunit "SEPA CT-Export File";
+ begin
+ GenJournalLine.SetRange("Journal Template Name", '');
+ GenJournalLine.SetRange("Journal Batch Name", '');
+ GenJournalLine.SetRange("Document No.", PaymentHeaderFR."No.");
+ OnExportSEPACreditTransferOnAfterGenJnlLineSetFilters(GenJournalLine, XMLPortId, PaymentHeaderFR);
+ if SEPACTExportFile.Export(GenJournalLine, XMLPortId) then begin
+ PaymentHeaderFR."File Export Completed" := true;
+ PaymentHeaderFR.Modify();
+ end;
+ end;
+
+ local procedure ExportSEPADirectDebit(var PaymentHeaderFR: Record "Payment Header FR")
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ DirectDebitCollectionEntry: Record "Direct Debit Collection Entry";
+ LastError: Text;
+ begin
+ PaymentHeaderFR.TestField("Account Type", PaymentHeaderFR."Account Type"::"Bank Account");
+ DirectDebitCollection.CreateRecord(PaymentHeaderFR."No.", PaymentHeaderFR."Account No.", PaymentHeaderFR."Partner Type");
+ DirectDebitCollection."Source Table ID" := DATABASE::"Payment Header FR";
+ DirectDebitCollection.Modify();
+ DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No.");
+ Commit();
+ ClearLastError();
+ if CODEUNIT.Run(CODEUNIT::"SEPA DD-Export File", DirectDebitCollectionEntry) then begin
+ DeleteDirectDebitCollection(DirectDebitCollection."No.");
+ PaymentHeaderFR."File Export Completed" := true;
+ PaymentHeaderFR.Modify();
+ exit;
+ end;
+
+ LastError := GetLastErrorText;
+ DeleteDirectDebitCollection(DirectDebitCollection."No.");
+ Commit();
+ Error(LastError);
+ end;
+
+ local procedure DeleteDirectDebitCollection(DirectDebitCollectionNo: Integer)
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ begin
+ if DirectDebitCollection.Get(DirectDebitCollectionNo) then
+ DirectDebitCollection.Delete(true);
+ end;
+
+ local procedure PostInvPostingBuffer(): Integer
+ var
+ GLEntry: Record "G/L Entry";
+ begin
+ GenJnlLine.Init();
+ GenJnlLine."Posting Date" := PaymentHeader."Posting Date";
+ GenJnlLine."Document Date" := PaymentHeader."Document Date";
+ GenJnlLine.Description := InvPostingBuffer[1].Description;
+ GenJnlLine."Reason Code" := Step."Reason Code";
+ PaymentClass.Get(PaymentHeader."Payment Class");
+ GenJnlLine."Delayed Unrealized VAT" :=
+ (PaymentClass."Unrealized VAT Reversal" = PaymentClass."Unrealized VAT Reversal"::Delayed);
+ GenJnlLine."Realize VAT" := Step."Realize VAT";
+ GenJnlLine."Created from No." := InvPostingBuffer[1]."Created from No.";
+ GenJnlLine."Document Type" := InvPostingBuffer[1]."Document Type";
+ GenJnlLine."Document No." := InvPostingBuffer[1]."Document No.";
+ GenJnlLine."Account Type" := InvPostingBuffer[1]."Account Type";
+ GenJnlLine."Account No." := InvPostingBuffer[1]."Account No.";
+ GenJnlLine."System-Created Entry" := InvPostingBuffer[1]."System-Created Entry";
+ GenJnlLine."Currency Code" := InvPostingBuffer[1]."Currency Code";
+ GenJnlLine."Currency Factor" := InvPostingBuffer[1]."Currency Factor";
+ GenJnlLine.Validate(Amount, InvPostingBuffer[1].Amount);
+ GenJnlLine.Correction := InvPostingBuffer[1].Correction;
+ if PaymentHeader."Source Code" <> '' then begin
+ TestSourceCode(PaymentHeader."Source Code");
+ GenJnlLine."Source Code" := PaymentHeader."Source Code";
+ end else begin
+ Step.TestField("Source Code");
+ TestSourceCode(Step."Source Code");
+ GenJnlLine."Source Code" := Step."Source Code";
+ end;
+ GenJnlLine."Applies-to ID" := InvPostingBuffer[1]."Applies-to ID";
+ if GenJnlLine."Applies-to ID" = '' then begin
+ GenJnlLine."Applies-to Doc. Type" := InvPostingBuffer[1]."Applies-to Doc. Type";
+ GenJnlLine."Applies-to Doc. No." := InvPostingBuffer[1]."Applies-to Doc. No.";
+ end;
+ GenJnlLine."Posting Group" := InvPostingBuffer[1]."Posting Group";
+ GenJnlLine."Source Type" := InvPostingBuffer[1]."Source Type";
+ GenJnlLine."Source No." := InvPostingBuffer[1]."Source No.";
+ GenJnlLine."External Document No." := InvPostingBuffer[1]."External Document No.";
+ GenJnlLine."Due Date" := InvPostingBuffer[1]."Due Date";
+ GenJnlLine."Shortcut Dimension 1 Code" := InvPostingBuffer[1]."Global Dimension 1 Code";
+ GenJnlLine."Shortcut Dimension 2 Code" := InvPostingBuffer[1]."Global Dimension 2 Code";
+ GenJnlLine."Dimension Set ID" := InvPostingBuffer[1]."Dimension Set ID";
+
+ OnPostInvPostingBufferOnBeforeGenJnlPostLineRunWithCheck(GenJnlLine, PaymentHeader, PaymentClass, PaymentLine);
+ GenJnlPostLine.RunWithCheck(GenJnlLine);
+ GLEntry.SetRange("Document Type", GenJnlLine."Document Type");
+ GLEntry.SetRange("Document No.", GenJnlLine."Document No.");
+ if GLEntry.FindLast() then
+ exit(GLEntry."Entry No.");
+ exit(0);
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterApplication(StepLedger: Record "Payment Step Ledger FR"; var InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary; PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterGetDescriptionForInvPostingBuffer(var StepLedger: Record "Payment Step Ledger FR"; var PaymentLine: Record "Payment Line FR"; var Description: Text[98])
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR"; PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeProcessPaymentStepByActionType(var PaymentLine: Record "Payment Line FR"; PaymentStep: Record "Payment Step FR"; var ActionValidated: Boolean; var IsHandled: Boolean)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnCopyLigBorOnBeforeInitHeader(var ToBord: Record "Payment Header FR"; var Process: Record "Payment Class FR"; var i: Integer)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnCopyLigBorOnBeforeToPaymentLineInsert(var ToPaymentLine: Record "Payment Line FR"; var Process: Record "Payment Class FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterProcessPaymentStep(PaymentHeaderNo: Code[20]; PaymentStep: Record "Payment Step FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnGenerEntriesOnBeforeGenJnlPostLineRunWithCheck(var GenJnlLine: Record "Gen. Journal Line"; PaymentHeader: Record "Payment Header FR"; StepLedger: Record "Payment Step Ledger FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnExportSEPACreditTransferOnAfterGenJnlLineSetFilters(var GenJnlLine: Record "Gen. Journal Line"; var XMLPortId: Integer; var PaymentHeader: Record "Payment Header FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnGenerInvPostingBufferOnBeforeUpdtBuffer(var InvPostingBuffer: array[2] of Record "Payment Post. Buffer FR" temporary; PaymentLine: Record "Payment Line FR"; StepLedger: Record "Payment Step Ledger FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnGenerInvPostingBufferOnAfterGetDescriptionForInvPostingBuffer(var StepLedger: record "Payment Step Ledger FR"; var PaymentHeader: record "Payment Header FR"; var PaymentLine: Record "Payment Line FR"; var Description: Text[98])
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnPostInvPostingBufferOnBeforeGenJnlPostLineRunWithCheck(var GenJnlLine: Record "Gen. Journal Line"; var PaymentHeader: Record "Payment Header FR"; var PaymentClass: Record "Payment Class FR"; PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnProcessPaymentStepOnCaseElse(var Step: Record "Payment Step FR"; var PaymentLine: Record "Payment Line FR"; var ActionValidated: Boolean; var PaymentHeader: Record "Payment Header FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnProcessPaymentStepOnAfterCheckPaymentStep(var PaymentStep: Record "Payment Step FR"; var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnSetPostingGroupOnBeforeCheckPostingGroup(var PaymentLine: Record "Payment Line FR"; var StepLedger: record "Payment Step Ledger FR"; var PostingGroup: Code[20])
+ begin
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al
new file mode 100644
index 0000000000..2a610dc62e
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentManagementFeatureFR.Codeunit.al
@@ -0,0 +1,37 @@
+#if not CLEAN28
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Environment.Configuration;
+
+codeunit 10835 "Payment Management Feature FR"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ FeatureKeyIdTok: Label 'PaymentManagementFR', Locked = true;
+
+ procedure IsEnabled() Enabled: Boolean
+ var
+ FeatureManagementFacade: Codeunit "Feature Management Facade";
+ begin
+ Enabled := FeatureManagementFacade.IsEnabled(FeatureKeyIdTok);
+ OnAfterCheckFeatureEnabled(Enabled);
+ end;
+
+ procedure GetFeatureKeyId(): Text
+ begin
+ exit(FeatureKeyIdTok);
+ end;
+
+ [IntegrationEvent(true, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ end;
+}
+#endif
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al
new file mode 100644
index 0000000000..86e2eff2f0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/PaymentMgtSubscribersFR.Codeunit.al
@@ -0,0 +1,531 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+#pragma warning disable AA0228
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Finance.GeneralLedger.Posting;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Finance.ReceivablesPayables;
+using Microsoft.Finance.VAT.Ledger;
+using Microsoft.Purchases.Payables;
+using Microsoft.Sales.Receivables;
+
+codeunit 10838 "PaymentMgt Subscribers FR"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+ Access = Internal;
+
+ var
+ UnrealCVLedgEntryBuffer: Record "Unreal. CV Ledg. Entry Buffer";
+ PaymentToleranceMgt: Codeunit "Payment Tolerance Management";
+ GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line";
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"SEPA CT-Prepare Source", 'OnBeforeCreateTempJnlLines', '', false, false)]
+ local procedure OnBeforeCreateTempJnlLines(var FromGenJnlLine: Record "Gen. Journal Line"; var TempGenJnlLine: Record "Gen. Journal Line" temporary; var IsHandled: Boolean)
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+#if not CLEAN28
+ Payment: Codeunit "Payment Management Feature FR";
+#endif
+ PaymentDocNo: Code[20];
+ AppliedDocNoList: Text;
+ DescriptionLen: Integer;
+ begin
+#if not CLEAN28
+ if not Payment.IsEnabled() then
+ exit;
+#endif
+ IsHandled := true;
+
+ PaymentDocNo := CopyStr(FromGenJnlLine.GetFilter("Document No."), 1, MaxStrLen(PaymentDocNo));
+ PaymentHeader.Get(PaymentDocNo);
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ if PaymentLine.FindSet() then
+ repeat
+ TempGenJnlLine.Init();
+ TempGenJnlLine."Journal Template Name" := '';
+ TempGenJnlLine."Journal Batch Name" := Format(DATABASE::"Payment Header FR");
+ TempGenJnlLine."Document No." := PaymentHeader."No.";
+ TempGenJnlLine."Line No." := PaymentLine."Line No.";
+ TempGenJnlLine."Account No." := PaymentLine."Account No.";
+ TempGenJnlLine."Account Type" := PaymentLine."Account Type";
+ case PaymentLine."Account Type" of
+ PaymentLine."Account Type"::Vendor:
+ TempGenJnlLine."Document Type" := TempGenJnlLine."Document Type"::Payment;
+ PaymentLine."Account Type"::Customer:
+ TempGenJnlLine."Document Type" := TempGenJnlLine."Document Type"::Refund;
+ end;
+ TempGenJnlLine.Amount := PaymentLine.Amount;
+ TempGenJnlLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type";
+ TempGenJnlLine."Applies-to Doc. No." := PaymentLine."Applies-to Doc. No.";
+ TempGenJnlLine."Applies-to ID" := PaymentLine."Applies-to ID";
+ TempGenJnlLine."Bal. Account Type" := PaymentHeader."Account Type";
+ TempGenJnlLine."Bal. Account No." := PaymentHeader."Account No.";
+ TempGenJnlLine."Currency Code" := PaymentLine."Currency Code";
+ TempGenJnlLine."Posting Date" := PaymentLine."Posting Date";
+ TempGenJnlLine."Recipient Bank Account" := PaymentLine."Bank Account Code";
+
+ DescriptionLen := MaxStrLen(TempGenJnlLine.Description);
+ AppliedDocNoList := PaymentLine.GetAppliedDocNoList(DescriptionLen);
+ TempGenJnlLine.Description := CopyStr(AppliedDocNoList, 1, MaxStrLen(TempGenJnlLine.Description));
+ if StrLen(AppliedDocNoList) > DescriptionLen then
+ TempGenJnlLine."Message to Recipient" :=
+ CopyStr(AppliedDocNoList, DescriptionLen + 1, MaxStrLen(TempGenJnlLine."Message to Recipient"));
+ OnCreateTempJnlLinesOnBeforeInsertTempGenJnlLine(TempGenJnlLine, PaymentLine);
+ TempGenJnlLine.Insert();
+ until PaymentLine.Next() = 0;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"SEPA DD-Prepare Source", 'OnBeforeCreateTempCollectionEntries', '', false, false)]
+ local procedure OnBeforeCreateTempCollectionEntries(var FromDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var ToDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var isHandled: Boolean)
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+#if not CLEAN28
+ Payment: Codeunit "Payment Management Feature FR";
+#endif
+ SEPADDCheckLine: Codeunit "SEPA DD-Check Line";
+ AppliesToEntryNo: Integer;
+ HasErrorsErr: Label 'The file export has one or more errors. For each of the lines to be exported, resolve any errors that are displayed in the File Export Errors FactBox.';
+ begin
+#if not CLEAN28
+ if not Payment.IsEnabled() then
+ exit;
+#endif
+ IsHandled := true;
+
+ ToDirectDebitCollectionEntry.Reset();
+ DirectDebitCollection.Get(FromDirectDebitCollectionEntry.GetRangeMin("Direct Debit Collection No."));
+ PaymentHeader.Get(DirectDebitCollection.Identifier);
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ if PaymentLine.FindSet() then
+ repeat
+ ToDirectDebitCollectionEntry.Init();
+ ToDirectDebitCollectionEntry."Entry No." := PaymentLine."Line No.";
+ ToDirectDebitCollectionEntry."Direct Debit Collection No." := DirectDebitCollection."No.";
+ ToDirectDebitCollectionEntry.DeletePaymentFileErrors();
+ if CheckPaymentLine(ToDirectDebitCollectionEntry, PaymentLine, AppliesToEntryNo) then begin
+ ToDirectDebitCollectionEntry.Validate("Customer No.", PaymentLine."Account No.");
+ ToDirectDebitCollectionEntry.Validate("Applies-to Entry No.", AppliesToEntryNo);
+ ToDirectDebitCollectionEntry."Transfer Date" := PaymentHeader."Posting Date";
+ ToDirectDebitCollectionEntry."Currency Code" := PaymentLine."Currency Code";
+ ToDirectDebitCollectionEntry.Validate("Transfer Amount", PaymentLine."Credit Amount");
+ ToDirectDebitCollectionEntry.Validate("Mandate ID", PaymentLine."Direct Debit Mandate ID");
+ OnCreateTempCollectionEntriesOnBeforeInsert(ToDirectDebitCollectionEntry, PaymentHeader, PaymentLine);
+ ToDirectDebitCollectionEntry.Insert();
+ SEPADDCheckLine.CheckCollectionEntry(ToDirectDebitCollectionEntry);
+ end;
+ until PaymentLine.Next() = 0;
+
+ if DirectDebitCollection.HasPaymentFileErrors() then begin
+ Commit();
+ Error(HasErrorsErr);
+ end;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnBeforeInitGLEntryForGLAcc', '', false, false)]
+ local procedure OnPostGLAccOnBeforeInitGLEntry(GenJnlLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry"; var TaxAmount: Decimal; var TaxAmountLCY: Decimal; var IsHandled: Boolean)
+ var
+#if not CLEAN28
+ Payment: Codeunit "Payment Management Feature FR";
+#endif
+ begin
+#if not CLEAN28
+ if not Payment.IsEnabled() then
+ exit;
+#endif
+
+ RealizeDelayedUnrealizedVAT(GenJnlLine);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnPostBankAccOnBeforeCheckCurrencyCode', '', false, false)]
+ local procedure OnPostBankAccOnBeforeCheckCurrencyCode(var GenJournalLine: Record "Gen. Journal Line"; BankAccount: Record "Bank Account"; var IsHandled: Boolean)
+#if not CLEAN28
+ var
+ Payment: Codeunit "Payment Management Feature FR";
+#endif
+ begin
+#if not CLEAN28
+ if not Payment.IsEnabled() then
+ exit;
+#endif
+ RealizeDelayedUnrealizedVAT(GenJournalLine);
+ end;
+
+ local procedure SetTransactionNo(GenJnlLine: Record "Gen. Journal Line")
+ var
+ AppliedCustLedgEntry: Record "Cust. Ledger Entry";
+ AppliedVendLedgEntry: Record "Vendor Ledger Entry";
+ begin
+ case GenJnlLine."Source Type" of
+ GenJnlLine."Source Type"::Customer:
+ begin
+ AppliedCustLedgEntry.Reset();
+ AppliedCustLedgEntry.SetCurrentKey("Document No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ AppliedCustLedgEntry.SetRange("Document No.", GenJnlLine."Created from No.")
+ else
+ AppliedCustLedgEntry.SetRange("Document No.", GenJnlLine."Document No.");
+ AppliedCustLedgEntry.SetRange("Document Type", AppliedCustLedgEntry."Document Type"::" ");
+ AppliedCustLedgEntry.SetRange("Customer No.", GenJnlLine."Source No.");
+ end;
+ GenJnlLine."Source Type"::Vendor:
+ begin
+ AppliedVendLedgEntry.Reset();
+ AppliedVendLedgEntry.SetCurrentKey("Document No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ AppliedVendLedgEntry.SetRange("Document No.", GenJnlLine."Created from No.")
+ else
+ AppliedVendLedgEntry.SetRange("Document No.", GenJnlLine."Document No.");
+ AppliedVendLedgEntry.SetRange("Document Type", AppliedVendLedgEntry."Document Type"::" ");
+ AppliedVendLedgEntry.SetRange("Vendor No.", GenJnlLine."Source No.");
+ end;
+ end;
+ end;
+
+ local procedure CheckHeaderNo(DocNo: Code[20]): Boolean
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", DocNo);
+ exit(not PaymentLine.IsEmpty());
+ end;
+
+ procedure PmtTolPaymentLine(var NewPaymentLine: Record "Payment Line FR"): Boolean
+ var
+ GLSetup: Record "General Ledger Setup";
+ TempPaymentLine: Record "Payment Line FR" temporary;
+ NewCustLedgEntry: Record "Cust. Ledger Entry";
+ NewVendLedgEntry: Record "Vendor Ledger Entry";
+ AppliedAmount: Decimal;
+ ApplyingAmount: Decimal;
+ AmounttoApply: Decimal;
+ PmtDiscAmount: Decimal;
+ MaxPmtTolAmount: Decimal;
+ GenJnlLineApplID: Code[50];
+ ApplnRoundingPrecision: Decimal;
+ begin
+ MaxPmtTolAmount := 0;
+ PmtDiscAmount := 0;
+ AppliedAmount := 0;
+ ApplyingAmount := 0;
+ AmounttoApply := 0;
+ TempPaymentLine := NewPaymentLine;
+
+ GLSetup.Get();
+ if TempPaymentLine."Applies-to Doc. No." = '' then
+ if TempPaymentLine."Applies-to ID" <> '' then
+ GenJnlLineApplID := TempPaymentLine."Applies-to ID";
+
+ if (TempPaymentLine."Account Type" = TempPaymentLine."Account Type"::Customer) then begin
+ NewCustLedgEntry."Posting Date" := TempPaymentLine."Posting Date";
+ NewCustLedgEntry."Document No." := TempPaymentLine."Document No.";
+ NewCustLedgEntry."Customer No." := TempPaymentLine."Account No.";
+ NewCustLedgEntry."Currency Code" := TempPaymentLine."Currency Code";
+ if TempPaymentLine."Applies-to Doc. No." <> '' then
+ NewCustLedgEntry."Applies-to Doc. No." := TempPaymentLine."Applies-to Doc. No.";
+ PaymentToleranceMgt.DelCustPmtTolAcc(NewCustLedgEntry, GenJnlLineApplID);
+ NewCustLedgEntry.Amount := TempPaymentLine.Amount;
+ NewCustLedgEntry."Remaining Amount" := TempPaymentLine.Amount;
+ NewCustLedgEntry."Document Type" := TempPaymentLine."Applies-to Doc. Type"::Payment;
+ PaymentToleranceMgt.CalcCustApplnAmount(
+ NewCustLedgEntry, GLSetup, AppliedAmount, ApplyingAmount, AmounttoApply, PmtDiscAmount,
+ MaxPmtTolAmount, GenJnlLineApplID, ApplnRoundingPrecision);
+ end else begin
+ NewVendLedgEntry."Posting Date" := TempPaymentLine."Posting Date";
+ NewVendLedgEntry."Document No." := TempPaymentLine."Document No.";
+ NewVendLedgEntry."Vendor No." := TempPaymentLine."Account No.";
+ NewVendLedgEntry."Currency Code" := TempPaymentLine."Currency Code";
+ if TempPaymentLine."Applies-to Doc. No." <> '' then
+ NewVendLedgEntry."Applies-to Doc. No." := TempPaymentLine."Applies-to Doc. No.";
+ PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID);
+ NewVendLedgEntry.Amount := TempPaymentLine.Amount;
+ NewVendLedgEntry."Remaining Amount" := TempPaymentLine.Amount;
+ NewVendLedgEntry."Document Type" := TempPaymentLine."Applies-to Doc. Type"::Payment;
+ PaymentToleranceMgt.CalcVendApplnAmount(
+ NewVendLedgEntry, GLSetup, AppliedAmount, ApplyingAmount, AmounttoApply, PmtDiscAmount,
+ MaxPmtTolAmount, GenJnlLineApplID,
+ ApplnRoundingPrecision);
+ end;
+
+ if GLSetup."Pmt. Disc. Tolerance Warning" then
+ case TempPaymentLine."Account Type" of
+ TempPaymentLine."Account Type"::Customer:
+ if not PaymentToleranceMgt.ManagePaymentDiscToleranceWarningCustomer(
+ NewCustLedgEntry, GenJnlLineApplID, AppliedAmount, AmounttoApply, TempPaymentLine."Applies-to Doc. No.")
+ then
+ exit(false);
+ TempPaymentLine."Account Type"::Vendor:
+ if not PaymentToleranceMgt.ManagePaymentDiscToleranceWarningVendor(
+ NewVendLedgEntry, GenJnlLineApplID, AppliedAmount, AmounttoApply, TempPaymentLine."Applies-to Doc. No.")
+ then
+ exit(false);
+ end;
+
+ if Abs(AmounttoApply) >= Abs(AppliedAmount - PmtDiscAmount - MaxPmtTolAmount) then begin
+ AppliedAmount := AppliedAmount - PmtDiscAmount;
+ if Abs(AppliedAmount) > Abs(AmounttoApply) then
+ AppliedAmount := AmounttoApply;
+
+ if ((Abs(AppliedAmount + ApplyingAmount) - ApplnRoundingPrecision) <= Abs(MaxPmtTolAmount)) and
+ (MaxPmtTolAmount <> 0) and ((Abs(AppliedAmount + ApplyingAmount) - ApplnRoundingPrecision) <> 0) and
+ ((Abs(AppliedAmount + ApplyingAmount) > ApplnRoundingPrecision))
+ then
+ if TempPaymentLine."Account Type" = TempPaymentLine."Account Type"::Customer then begin
+ if GLSetup."Payment Tolerance Warning" then begin
+ if PaymentToleranceMgt.CallPmtTolWarning(
+ TempPaymentLine."Posting Date", TempPaymentLine."Account No.", TempPaymentLine."Document No.",
+ TempPaymentLine."Currency Code", ApplyingAmount, AppliedAmount, "Payment Tolerance Account Type"::Customer)
+ then begin
+ if (AppliedAmount <> 0) and (ApplyingAmount <> 0) then
+ PaymentToleranceMgt.PutCustPmtTolAmount(NewCustLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID)
+ else
+ PaymentToleranceMgt.DelCustPmtTolAcc(NewCustLedgEntry, GenJnlLineApplID);
+ end else
+ exit(false);
+ end else
+ PaymentToleranceMgt.PutCustPmtTolAmount(NewCustLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID);
+ end else
+ if GLSetup."Payment Tolerance Warning" then begin
+ if PaymentToleranceMgt.CallPmtTolWarning(
+ TempPaymentLine."Posting Date", TempPaymentLine."Account No.", TempPaymentLine."Document No.",
+ TempPaymentLine."Currency Code", ApplyingAmount, AppliedAmount, "Payment Tolerance Account Type"::Vendor)
+ then begin
+ if (AppliedAmount <> 0) and (ApplyingAmount <> 0) then
+ PaymentToleranceMgt.PutVendPmtTolAmount(NewVendLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID)
+ else
+ PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID);
+ end else begin
+ PaymentToleranceMgt.DelVendPmtTolAcc(NewVendLedgEntry, GenJnlLineApplID);
+ exit(false);
+ end;
+ end else
+ PaymentToleranceMgt.PutVendPmtTolAmount(NewVendLedgEntry, ApplyingAmount, AppliedAmount, GenJnlLineApplID);
+
+ end;
+ exit(true);
+ end;
+
+ local procedure CheckPaymentLine(DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; PaymentLine: Record "Payment Line FR"; var AppliesToEntryNo: Integer) Result: Boolean
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SummarizeNotAllowedErr: Label 'You cannot export a SEPA customer payment that is applied to multiple documents. Make sure that the Summarize per field in the Suggest Customer Payments window is blank.';
+ UnappliedLinesNotAllowedErr: Label 'Payment slip line %1 must be applied to a customer invoice.', Comment = '%1 = No.';
+ AccTypeErr: Label 'Only customer transactions are allowed.';
+ BankAccErr: Label 'You must use customer bank account, %1, which you specified in the selected direct debit mandate.', Comment = '%1 = code';
+ IsHandled: Boolean;
+ begin
+ IsHandled := false;
+ OnBeforeCheckPaymentLine(DirectDebitCollectionEntry, PaymentLine, Result, IsHandled);
+ if IsHandled then
+ exit(Result);
+
+ if PaymentLine."Account Type" <> PaymentLine."Account Type"::Customer then
+ DirectDebitCollectionEntry.InsertPaymentFileError(AccTypeErr);
+
+ if SEPADirectDebitMandate.Get(PaymentLine."Direct Debit Mandate ID") then
+ if SEPADirectDebitMandate."Customer Bank Account Code" <> PaymentLine."Bank Account Code" then
+ DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(BankAccErr, SEPADirectDebitMandate."Customer Bank Account Code"));
+
+ if (PaymentLine."Applies-to Doc. No." = '') and (PaymentLine."Applies-to ID" = '') then
+ DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No."))
+ else begin
+ PaymentLine.GetAppliesToDocCustLedgEntry(CustLedgerEntry);
+ if CustLedgerEntry.Count > 1 then
+ DirectDebitCollectionEntry.InsertPaymentFileError(SummarizeNotAllowedErr);
+ CustLedgerEntry.FindFirst();
+ if CustLedgerEntry."Document Type" <> CustLedgerEntry."Document Type"::Invoice then
+ DirectDebitCollectionEntry.InsertPaymentFileError(StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No."));
+ AppliesToEntryNo := CustLedgerEntry."Entry No.";
+ end;
+
+ exit(not DirectDebitCollectionEntry.HasPaymentFileErrors());
+ end;
+
+ local procedure PostDelayedUnrealizedVAT(GenJnlLine: Record "Gen. Journal Line")
+ var
+ OldCustLedgEntry: Record "Cust. Ledger Entry";
+ OldVendLedgEntry: Record "Vendor Ledger Entry";
+ begin
+ case GenJnlLine."Source Type" of
+ GenJnlLine."Source Type"::Customer:
+ if GenJnlLine."Applies-to Doc. No." <> '' then begin
+ // Find original entry based on Applies-to Doc. No.
+ OldCustLedgEntry.Reset();
+ OldCustLedgEntry.SetCurrentKey("Document No.");
+ OldCustLedgEntry.SetRange("Document No.", GenJnlLine."Applies-to Doc. No.");
+ OldCustLedgEntry.SetRange("Document Type", GenJnlLine."Applies-to Doc. Type");
+ OldCustLedgEntry.SetRange("Customer No.", GenJnlLine."Source No.");
+ OldCustLedgEntry.FindFirst();
+ OldCustLedgEntry.CalcFields(
+ Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)",
+ "Original Amount", "Original Amt. (LCY)");
+ SetTransactionNo(GenJnlLine);
+ UnrealCVLedgEntryBuffer.Reset();
+ UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Customer);
+ UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.")
+ else
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No.");
+ UnrealCVLedgEntryBuffer.FindFirst();
+ GenJnlPostLine.CustUnrealizedVAT(GenJnlLine, OldCustLedgEntry, GenJnlLine.Amount);
+ UnrealCVLedgEntryBuffer.Realized := true;
+ UnrealCVLedgEntryBuffer.Modify();
+ UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldCustLedgEntry."Transaction No.");
+ end else begin
+ // Find original entry from buffer table
+ UnrealCVLedgEntryBuffer.Reset();
+ UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Customer);
+ UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.")
+ else
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No.");
+ UnrealCVLedgEntryBuffer.SetRange("Applies-to ID", GenJnlLine."Applies-to ID");
+#pragma warning disable AL0667
+ if UnrealCVLedgEntryBuffer.FindSet(true, false) then
+#pragma warning restore AL0667
+ repeat
+ OldCustLedgEntry.Get(UnrealCVLedgEntryBuffer."Entry No.");
+ OldCustLedgEntry.CalcFields(
+ Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)",
+ "Original Amount", "Original Amt. (LCY)");
+ SetTransactionNo(GenJnlLine);
+ GenJnlPostLine.CustUnrealizedVAT(GenJnlLine, OldCustLedgEntry, UnrealCVLedgEntryBuffer."Applied Amount");
+ UnrealCVLedgEntryBuffer.Realized := true;
+ UnrealCVLedgEntryBuffer.Modify();
+ UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldCustLedgEntry."Transaction No.");
+ until UnrealCVLedgEntryBuffer.Next() = 0;
+ end;
+ GenJnlLine."Source Type"::Vendor:
+ if GenJnlLine."Applies-to Doc. No." <> '' then begin
+ // Find original entry based on Applies-to Doc. No.
+ OldVendLedgEntry.Reset();
+ OldVendLedgEntry.SetCurrentKey("Document No.");
+ OldVendLedgEntry.SetRange("Document No.", GenJnlLine."Applies-to Doc. No.");
+ OldVendLedgEntry.SetRange("Document Type", GenJnlLine."Applies-to Doc. Type");
+ OldVendLedgEntry.SetRange("Vendor No.", GenJnlLine."Source No.");
+ OldVendLedgEntry.FindFirst();
+ OldVendLedgEntry.CalcFields(
+ Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)",
+ "Original Amount", "Original Amt. (LCY)");
+ SetTransactionNo(GenJnlLine);
+ UnrealCVLedgEntryBuffer.Reset();
+ UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Vendor);
+ UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.")
+ else
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No.");
+ UnrealCVLedgEntryBuffer.FindFirst();
+ GenJnlPostLine.VendUnrealizedVAT(GenJnlLine, OldVendLedgEntry, GenJnlLine.Amount);
+ UnrealCVLedgEntryBuffer.Realized := true;
+ UnrealCVLedgEntryBuffer.Modify();
+ UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldVendLedgEntry."Transaction No.");
+ end else begin
+ // Find original entry from buffer table
+ UnrealCVLedgEntryBuffer.Reset();
+ UnrealCVLedgEntryBuffer.SetRange("Account Type", UnrealCVLedgEntryBuffer."Account Type"::Vendor);
+ UnrealCVLedgEntryBuffer.SetRange("Account No.", GenJnlLine."Source No.");
+ if CheckHeaderNo(GenJnlLine."Document No.") then
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Created from No.")
+ else
+ UnrealCVLedgEntryBuffer.SetRange("Payment Slip No.", GenJnlLine."Document No.");
+ UnrealCVLedgEntryBuffer.SetRange("Applies-to ID", GenJnlLine."Applies-to ID");
+#pragma warning disable AL0667
+ if UnrealCVLedgEntryBuffer.FindSet(true, false) then
+#pragma warning restore AL0667
+ repeat
+ OldVendLedgEntry.Get(UnrealCVLedgEntryBuffer."Entry No.");
+ OldVendLedgEntry.CalcFields(
+ Amount, "Amount (LCY)", "Remaining Amount", "Remaining Amt. (LCY)",
+ "Original Amount", "Original Amt. (LCY)");
+ SetTransactionNo(GenJnlLine);
+ GenJnlPostLine.VendUnrealizedVAT(GenJnlLine, OldVendLedgEntry, UnrealCVLedgEntryBuffer."Applied Amount");
+ UnrealCVLedgEntryBuffer.Realized := true;
+ UnrealCVLedgEntryBuffer.Modify();
+ UpdateUnrealCVLedgEntryBuffer(GenJnlLine, OldVendLedgEntry."Transaction No.");
+ until UnrealCVLedgEntryBuffer.Next() = 0;
+ end;
+ end;
+ end;
+
+ local procedure UpdateUnrealCVLedgEntryBuffer(GenJnlLine: Record "Gen. Journal Line"; TransactionNo: Integer)
+ var
+ VATEntry2: Record "VAT Entry";
+ UnrealCVLedgEntryBuffer2: Record "Unreal. CV Ledg. Entry Buffer";
+ TotalUnrealVATAmount: Decimal;
+ begin
+ VATEntry2.Reset();
+ VATEntry2.SetCurrentKey("Transaction No.");
+ VATEntry2.SetRange("Transaction No.", TransactionNo);
+ if VATEntry2.FindSet() then
+ repeat
+ TotalUnrealVATAmount := TotalUnrealVATAmount - VATEntry2."Remaining Unrealized Amount";
+ until VATEntry2.Next() = 0;
+ if TotalUnrealVATAmount = 0 then begin
+ UnrealCVLedgEntryBuffer2.Reset();
+ if GenJnlLine."Source Type" = GenJnlLine."Source Type"::Customer then
+ UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Customer)
+ else
+ UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Vendor);
+ UnrealCVLedgEntryBuffer2.SetRange("Entry No.", UnrealCVLedgEntryBuffer."Entry No.");
+ UnrealCVLedgEntryBuffer2.SetRange(Realized, true);
+ UnrealCVLedgEntryBuffer2.DeleteAll();
+ end;
+ end;
+
+ procedure CalcPaidAmount(GenJnlLine: Record "Gen. Journal Line"): Decimal
+ var
+ UnrealCVLedgEntryBuffer2: Record "Unreal. CV Ledg. Entry Buffer";
+ PaidAmount: Decimal;
+ begin
+ UnrealCVLedgEntryBuffer2.Reset();
+ if GenJnlLine."Source Type" = GenJnlLine."Source Type"::Customer then
+ UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Customer)
+ else
+ UnrealCVLedgEntryBuffer2.SetRange("Account Type", UnrealCVLedgEntryBuffer2."Account Type"::Vendor);
+ UnrealCVLedgEntryBuffer2.SetRange("Entry No.", UnrealCVLedgEntryBuffer."Entry No.");
+ UnrealCVLedgEntryBuffer2.SetRange(Realized, true);
+ if UnrealCVLedgEntryBuffer2.FindSet() then
+ repeat
+ PaidAmount := PaidAmount - UnrealCVLedgEntryBuffer2."Applied Amount";
+ until UnrealCVLedgEntryBuffer2.Next() = 0;
+ exit(Abs(PaidAmount));
+ end;
+
+ local procedure RealizeDelayedUnrealizedVAT(GenJnlLine: Record "Gen. Journal Line")
+ begin
+ if GenJnlLine."Delayed Unrealized VAT" and GenJnlLine."Realize VAT" then
+ if (GenJnlLine."Applies-to Doc. No." <> '') or (GenJnlLine."Applies-to ID" <> '') then
+ PostDelayedUnrealizedVAT(GenJnlLine);
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnCreateTempJnlLinesOnBeforeInsertTempGenJnlLine(var TempGenJnlLine: Record "Gen. Journal Line" temporary; var PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnCreateTempCollectionEntriesOnBeforeInsert(var ToDirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeCheckPaymentLine(var DirectDebitCollectionEntry: Record "Direct Debit Collection Entry"; var PaymentLine: Record "Payment Line FR"; var Result: Boolean; var IsHandled: Boolean)
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al
new file mode 100644
index 0000000000..0148c11930
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/RIBKeyFR.Codeunit.al
@@ -0,0 +1,62 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+codeunit 10839 "RIB Key FR"
+{
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ CodingLbl: Label 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+#pragma warning disable AA0240
+ UncodingLbl: Label '12345678912345678923456789';
+#pragma warning restore AA0240
+
+ procedure Check(Bank: Text; Agency: Text; Account: Text; RIBKey: Integer) Result: Boolean
+ var
+ LongAccountNum: Code[30];
+ Index: Integer;
+ Remaining: Integer;
+ IsHandled: Boolean;
+ begin
+ IsHandled := false;
+ OnBeforeCheck(Bank, Agency, Account, RIBKey, Result, IsHandled);
+ if IsHandled then
+ exit(Result);
+
+ if not ((StrLen(Bank) = 5) and
+ (StrLen(Agency) = 5) and
+ (StrLen(Account) = 11) and
+ (RIBKey < 100))
+ then
+ exit(false);
+
+ LongAccountNum :=
+ CopyStr(Bank + Agency + Account + ConvertStr(Format(RIBKey, 2), ' ', '0'), 1, MaxStrLen(LongAccountNum));
+ LongAccountNum := ConvertStr(LongAccountNum, CodingLbl, UncodingLbl);
+
+ Remaining := 0;
+ for Index := 1 to 23 do
+ Remaining := (Remaining * 10 + (LongAccountNum[Index] - '0')) mod 97;
+
+ OnAfterCheck(Remaining);
+
+ exit(Remaining = 0);
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterCheck(Remaining: Integer)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeCheck(Bank: Text; Agency: Text; Account: Text; RIBKey: Integer; var Result: Boolean; var IsHandled: Boolean)
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al
new file mode 100644
index 0000000000..4a631aaf3b
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgTagPaymentManagementFR.Codeunit.al
@@ -0,0 +1,23 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Upgrade;
+
+codeunit 10841 "Upg. Tag Payment Management FR"
+{
+ Access = Internal;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Upgrade Tag", 'OnGetPerCompanyUpgradeTags', '', false, false)]
+ local procedure RegisterPerCompanyTags(var PerCompanyUpgradeTags: List of [Code[250]])
+ begin
+ PerCompanyUpgradeTags.Add(GetPaymentUpgradeTag());
+ end;
+
+ internal procedure GetPaymentUpgradeTag(): Code[250]
+ begin
+ exit('MS-581204-PaymentManagementUpgradeTag-20250918');
+ end;
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al
new file mode 100644
index 0000000000..f19b251fe2
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Codeunits/UpgradePaymentManagementFR.Codeunit.al
@@ -0,0 +1,116 @@
+#if CLEAN28
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.Reflection;
+using System.Upgrade;
+
+codeunit 10840 "Upgrade Payment Management FR"
+{
+ Access = Internal;
+ Subtype = Upgrade;
+
+ var
+ UpgradeTag: Codeunit "Upgrade Tag";
+ UpgTagPayment: Codeunit "Upg. Tag Payment Management FR";
+
+ trigger OnUpgradePerCompany()
+ var
+ CurrentModuleInfo: ModuleInfo;
+ begin
+ NavApp.GetCurrentModuleInfo(CurrentModuleInfo);
+ if CurrentModuleInfo.AppVersion().Major() < 31 then
+ exit;
+
+ UpgradePayment();
+ end;
+
+ local procedure UpgradePayment()
+ begin
+ if UpgradeTag.HasUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag()) then
+ exit;
+
+ TransferFields(Database::"Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR";
+ TransferFields(Database::"Bank Account", 10806, 10852); // 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR";
+ TransferFields(Database::"Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR",;
+ TransferFields(Database::"Customer Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR",;
+ TransferFields(Database::"Customer Bank Account", 10806, 10852); //, 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR";
+ TransferFields(Database::"Customer Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR";
+ TransferFields(Database::"Vendor Bank Account", 10805, 10851); // 10805 - the existing field "Agency Code", 10851 - the new field "Agency Code FR";
+ TransferFields(Database::"Vendor Bank Account", 10806, 10852); // 10806 - the existing field "RIB Key", 10852 - the new field "RIB Key FR";
+ TransferFields(Database::"Vendor Bank Account", 10807, 10853); // 10807 - the existing field "RIB Checked", 10853 - the new field "RIB Checked FR";
+ TransferRecords(Database::"Bank Account Buffer", Database::"Bank Account Buffer FR");
+ TransferRecords(Database::"Payment Class", Database::"Payment Class FR");
+ TransferRecords(Database::"Payment Header", Database::"Payment Header FR");
+ TransferRecords(Database::"Payment Header Archive", Database::"Payment Header Archive FR");
+ TransferRecords(Database::"Payment Line", Database::"Payment Line FR");
+ TransferRecords(Database::"Payment Line Archive", Database::"Payment Line Archive FR");
+ TransferRecords(Database::"Payment Post. Buffer", Database::"Payment Post. Buffer FR");
+ TransferRecords(Database::"Payment Status", Database::"Payment Status FR");
+ TransferRecords(Database::"Payment Step", Database::"Payment Step FR");
+ TransferRecords(Database::"Payment Step Ledger", Database::"Payment Step Ledger FR");
+ TransferRecords(Database::"Payment Address", Database::"Payment Address FR");
+
+ UpgradeTag.SetUpgradeTag(UpgTagPayment.GetPaymentUpgradeTag());
+ end;
+
+ procedure TransferRecords(SourceTableId: Integer; TargetTableId: Integer)
+ var
+ SourceField: Record Field;
+ SourceRecRef: RecordRef;
+ TargetRecRef: RecordRef;
+ TargetFieldRef: FieldRef;
+ SourceFieldRef: FieldRef;
+ SourceFieldRefNo: Integer;
+ begin
+ SourceRecRef.Open(SourceTableId, false);
+ TargetRecRef.Open(TargetTableId, false);
+
+ if SourceRecRef.IsEmpty() then
+ exit;
+
+ SourceRecRef.FindSet();
+
+ repeat
+ Clear(SourceField);
+ SourceField.SetRange(TableNo, SourceTableId);
+ SourceField.SetRange(Class, SourceField.Class::Normal);
+ SourceField.SetRange(Enabled, true);
+ if SourceField.Findset() then
+ repeat
+ SourceFieldRefNo := SourceField."No.";
+ SourceFieldRef := SourceRecRef.Field(SourceFieldRefNo);
+ TargetFieldRef := TargetRecRef.Field(SourceFieldRefNo);
+ TargetFieldRef.VALUE := SourceFieldRef.VALUE;
+ until SourceField.Next() = 0;
+ TargetRecRef.Insert();
+ until SourceRecRef.Next() = 0;
+ SourceRecRef.Close();
+ TargetRecRef.Close();
+ end;
+
+ procedure TransferFields(TableId: Integer; SourceFieldNo: Integer; TargetFieldNo: Integer)
+ var
+ RecRef: RecordRef;
+ TargetFieldRef: FieldRef;
+ SourceFieldRef: FieldRef;
+ begin
+ RecRef.Open(TableId, false);
+ SourceFieldRef := RecRef.Field(SourceFieldNo);
+ SourceFieldRef.SetFilter('<>%1', '');
+
+ if RecRef.FindSet() then
+ repeat
+ TargetFieldRef := RecRef.Field(TargetFieldNo);
+ TargetFieldRef.VALUE := SourceFieldRef.VALUE;
+ RecRef.Modify(false);
+ until RecRef.Next() = 0;
+ end;
+}
+#endif
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al b/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al
new file mode 100644
index 0000000000..e611ee1e80
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Enum/PaymentStepActionTypeFR.Enum.al
@@ -0,0 +1,18 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+enum 10831 "Payment Step Action Type FR"
+{
+ Extensible = true;
+ AssignmentCompatibility = true;
+
+ value(0; "None") { Caption = 'None'; }
+ value(1; "Ledger") { Caption = 'Ledger'; }
+ value(2; "Report") { Caption = 'Report'; }
+ value(3; "File") { Caption = 'File'; }
+ value(4; "Create New Document") { Caption = 'Create New Document'; }
+ value(5; "Cancel File") { Caption = 'Cancel File'; }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al b/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al
new file mode 100644
index 0000000000..ac347c93d0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/EnumExtensions/FeaturePaymentMgtFR.EnumExt.al
@@ -0,0 +1,21 @@
+#if not CLEAN28
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Setup;
+
+using Microsoft.Bank.Payment;
+using System.Environment.Configuration;
+
+enumextension 10831 "Feature - PaymentMgt FR" extends "Feature To Update"
+{
+ value(10831; Payment)
+ {
+ Implementation = "Feature Data Update" = "Feature - PaymentMgt FR";
+ ObsoleteState = Pending;
+ ObsoleteReason = 'Feature Payment Management will be enabled by default in version 31.0.';
+ ObsoleteTag = '28.0';
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al
new file mode 100644
index 0000000000..e7be2cc661
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccPayablesCoordinatorRC.PageExt.al
@@ -0,0 +1,95 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.RoleCenters;
+
+pageextension 10832 "Acc. Payables Coordinator RC" extends "Acc. Payables Coordinator RC"
+{
+ actions
+ {
+ addafter(Action1120006)
+ {
+ action("Payments Lists FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payments Lists';
+ Image = "Report";
+ RunObject = Report "Payment List FR";
+ ToolTip = 'View a list of payments.';
+ }
+ action("GL/Vend. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Vend Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.';
+ }
+ }
+ addafter(PaymentJournals)
+ {
+ action("Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = Page "Payment Slip List FR";
+ ToolTip = 'View a list of payment slips.';
+ }
+ }
+ addafter("G/L Registers")
+ {
+ action("Payment Slip List Archives FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip List Archives';
+ RunObject = Page "Payment Slip List Archive FR";
+ ToolTip = 'View a list of payment slips that have been posted and archived.';
+ }
+ }
+ addafter("Payment &Journal")
+ {
+ action("Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip';
+ RunObject = Page "Payment Slip FR";
+ ToolTip = 'Use payment slips to manage customer and vendor payments. ';
+ }
+ action("Look/Edit Payment Line FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Look/Edit Payment Line';
+ RunObject = Page "View/Edit Payment Line FR";
+ ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. ';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = Page "Payment Report FR";
+ ToolTip = 'View all payment documents that belong to a payment class and have the same status.';
+ }
+ }
+ addafter(VendorPayments)
+ {
+ action("Archive Payment Journals FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Journals';
+ Image = "Report";
+ RunObject = Report "Archive Payment Slips FR";
+ ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.';
+ }
+ action("Create Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slip';
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al
new file mode 100644
index 0000000000..74c185a7b9
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccReceivablesAdmRC.PageExt.al
@@ -0,0 +1,92 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.RoleCenters;
+
+pageextension 10833 "Acc. Receivables Adm. RC" extends "Acc. Receivables Adm. RC"
+{
+ actions
+ {
+ addafter(Action1120005)
+ {
+ action("Payments Lists FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payments Lists';
+ Image = "Report";
+ RunObject = Report "Payment List FR";
+ ToolTip = 'View a list of payments.';
+ }
+ action("GL/Cust. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Cust Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.';
+ }
+ }
+ addafter(CashReceiptJournals)
+ {
+ action("Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = Page "Payment Slip List FR";
+ ToolTip = 'View a list of payment slips.';
+ }
+ }
+ addafter("G/L Registers")
+ {
+ action("Payment Slip List Archives FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip List Archives';
+ RunObject = Page "Payment Slip List Archive FR";
+ ToolTip = 'View a list of payment slips that have been posted and archived.';
+ }
+ }
+ addafter("Cash Receipt &Journal")
+ {
+ action("Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip';
+ RunObject = Page "Payment Slip FR";
+ ToolTip = 'Use payment slips to manage customer and vendor payments. ';
+ }
+ action("Look/Edit Payment Line FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Look/Edit Payment Line';
+ RunObject = Page "View/Edit Payment Line FR";
+ ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. ';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = Page "Payment Report FR";
+ ToolTip = 'View all payment documents that belong to a payment class and have the same status.';
+ }
+ action("Archive Payment Journals FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Journals';
+ Image = "Report";
+ RunObject = Report "Archive Payment Slips FR";
+ ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.';
+ }
+ action("Create Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slip';
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al
new file mode 100644
index 0000000000..ccde08da3d
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/AccountingManagerRoleCenter.PageExt.al
@@ -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.Bank.Payment;
+
+using Microsoft.Finance.RoleCenters;
+
+pageextension 10831 "Accounting Manager Role Center" extends "Accounting Manager Role Center"
+{
+ actions
+ {
+ addafter(Action1120013)
+ {
+ action("Payments Lists FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payments Lists';
+ Image = "Report";
+ RunObject = Report "Payment List FR";
+ ToolTip = 'View a list of payments.';
+ }
+ action("GL/Cust. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Cust Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.';
+ }
+ action("GL/Vend. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Vend Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.';
+ }
+ }
+ addafter(GeneralJournals)
+ {
+ action("Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = Page "Payment Slip List FR";
+ ToolTip = 'View a list of payment slips.';
+ }
+ }
+ addafter("Cost Accounting Budget Registers")
+ {
+ action("Payment Slip List Archives FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip List Archives';
+ RunObject = Page "Payment Slip List Archive FR";
+ ToolTip = 'View a list of payment slips that have been posted and archived.';
+ }
+ }
+ addafter("Pa&yment Journal")
+ {
+ action("Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip';
+ RunObject = Page "Payment Slip FR";
+ ToolTip = 'Use payment slips to manage customer and vendor payments. ';
+ }
+ action("Look/Edit Payment Line FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Look/Edit Payment Line';
+ RunObject = Page "View/Edit Payment Line FR";
+ ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. ';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = Page "Payment Report FR";
+ ToolTip = 'View all payment documents that belong to a payment class and have the same status.';
+ }
+ action("Archive Payment Journals FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Journals';
+ Image = "Report";
+ RunObject = Report "Archive Payment Slips FR";
+ ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.';
+ }
+ action("Create Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slips';
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al
new file mode 100644
index 0000000000..8e37775b64
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BankAccountCard.PageExt.al
@@ -0,0 +1,88 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.BankAccount;
+#if not CLEAN28
+using Microsoft.Bank.Payment;
+#endif
+
+pageextension 10834 "Bank Account Card" extends "Bank Account Card"
+{
+ layout
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify(" R.I.B")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter(Transfer)
+ {
+ group("R.I.B FR")
+ {
+ Caption = ' R.I.B';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ field("Bank Branch No.3 FR"; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of your bank.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("Agency Code FR"; Rec."Agency Code FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("Bank Account No.3 FR"; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the bank account number.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("RIB Key FR"; Rec."RIB Key FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("RIB Checked FR"; Rec."RIB Checked FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+#if CLEAN28
+ moveafter("RIB Checked FR"; "Bank Statement Import Format", "Payment Export Format", CheckTransmitted, "Positive Pay Export Code")
+#endif
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al
new file mode 100644
index 0000000000..825fc86860
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/BookkeeperRoleCenter.PageExt.al
@@ -0,0 +1,90 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.RoleCenters;
+
+pageextension 10835 "Bookkeeper Role Center" extends "Bookkeeper Role Center"
+{
+ actions
+ {
+ addafter(Action1120013)
+ {
+ action("Payments Lists FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payments Lists';
+ Image = "Report";
+ RunObject = Report "Payment List FR";
+ ToolTip = 'View a list of payments.';
+ }
+ action("GL/Cust. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Cust Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.';
+ }
+ action("GL/Vend. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Vend Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.';
+ }
+ }
+ addafter("G/L Registers")
+ {
+ action("Payment Slip List Archives FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip List Archives';
+ RunObject = Page "Payment Slip List Archive FR";
+ ToolTip = 'View a list of payment slips that have been posted and archived.';
+ }
+ }
+ addafter("Payment &Journal")
+ {
+ action("Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip';
+ RunObject = Page "Payment Slip FR";
+ ToolTip = 'Use payment slips to manage customer and vendor payments. ';
+ }
+ action("Look/Edit Payment Line FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Look/Edit Payment Line';
+ RunObject = Page "View/Edit Payment Line FR";
+ ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. ';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = Page "Payment Report FR";
+ ToolTip = 'View all payment documents that belong to a payment class and have the same status.';
+ }
+ action("Archive Payment Journals FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Journals';
+ Image = "Report";
+ RunObject = Report "Archive Payment Slips FR";
+ ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.';
+ }
+ action("Create Payment Slip FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slip';
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al
new file mode 100644
index 0000000000..b2fe4b2581
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CashReceiptJournal.PageExt.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// 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.GeneralLedger.Journal;
+using Microsoft.Bank.Payment;
+
+pageextension 10836 "Cash Receipt Journal" extends "Cash Receipt Journal"
+{
+ actions
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify(PrintCheckRemittanceReport)
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter("Insert Conv. LCY Rndg. Lines")
+ {
+ separator(Action1120000FR)
+ {
+ }
+ action(PrintCheckRemittanceReportFR)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Print Check Remittance Report';
+ Image = PrintCheck;
+ ToolTip = 'View a list of checks remitted to the bank. The header shows the names and addresses of the company and bank. The body shows the list of checks. The footer shows the total of the remittance and the number of checks. Typically, you give this report to your bank with the checks at remittance.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ trigger OnAction()
+ var
+ RecapitulationForm: Report "Recapitulation Form FR";
+ begin
+ RecapitulationForm.SetTableView(Rec);
+ RecapitulationForm.RunModal();
+ Clear(RecapitulationForm);
+ end;
+ }
+ }
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al
new file mode 100644
index 0000000000..c79d01afbb
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerBankAccountCard.PageExt.al
@@ -0,0 +1,73 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Sales.Customer;
+#if not CLEAN28
+using Microsoft.Bank.Payment;
+#endif
+
+pageextension 10837 "Customer Bank Account Card" extends "Customer Bank Account Card"
+{
+ layout
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("Agency Code")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("RIB Key")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("RIB Checked")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter("Bank Branch No.")
+ {
+ field("Agency Code FR"; Rec."Agency Code FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ addafter("Bank Account No.")
+ {
+ field("RIB Key FR"; Rec."RIB Key FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("RIB Checked FR"; Rec."RIB Checked FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al
new file mode 100644
index 0000000000..835e70b13c
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/CustomerCard.PageExt.al
@@ -0,0 +1,90 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Sales.Customer;
+
+pageextension 10838 "Customer Card" extends "Customer Card"
+{
+ layout
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("Payment in progress (LCY)")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("""Balance (LCY)"" - ""Payment in progress (LCY)""")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter("Payment Balance (LCY)")
+ {
+ field("Payment in progress (LCY) FR"; Rec."Payment in progress (LCY) FR")
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ ToolTip = 'Specifies the customer''s payments in progress.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("Net amount (LCY)"; Rec."Balance (LCY)" - Rec."Payment in progress (LCY) FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Net amount (LCY)';
+ Editable = false;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ ToolTip = 'Specifies the net amount in local currency.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+ actions
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("&Payment Addresses")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter(Contact)
+ {
+ action("&Payment Addresses FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = '&Payment Addresses';
+ Image = Addresses;
+ RunObject = Page "Payment Addresses FR";
+ RunPageLink = "Account Type" = const(Customer),
+ "Account No." = field("No.");
+ ToolTip = 'View payment addresses for the customer.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al
new file mode 100644
index 0000000000..1760924faa
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/FinanceManagerRoleCenter.PageExt.al
@@ -0,0 +1,99 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.RoleCenters;
+
+pageextension 10839 "Finance Manager Role Center" extends "Finance Manager Role Center"
+{
+ actions
+ {
+ addafter("Bank Account Journal")
+ {
+ action("GL/Cust. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ RunObject = report "GL/Cust Ledger Reconciliation";
+ Tooltip = 'Run the GL/Cust Ledger Reconciliation report.';
+ }
+ action("GL/Vend. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ RunObject = report "GL/Vend Ledger Reconciliation";
+ Tooltip = 'Run the GL/Vend Ledger Reconciliation report.';
+ }
+ }
+ addafter("Payment Registration")
+ {
+ action("Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = page "Payment Slip List FR";
+ Tooltip = 'Open the Payment Slip List page.';
+ }
+ }
+ addafter(Group15)
+ {
+ group("Group62 FR")
+ {
+ Caption = 'Payment Slip';
+ action("View/Edit Payment Lines FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'View/Edit Payment Lines';
+ RunObject = page "View/Edit Payment Line FR";
+ Tooltip = 'Open the View/Edit Payment Line page.';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = page "Payment Report FR";
+ Tooltip = 'Open the Payment Report page.';
+ }
+ action("Archive Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Slips';
+ RunObject = report "Archive Payment Slips FR";
+ Tooltip = 'Run the Archive Payment Slips report.';
+ }
+ }
+ }
+ addafter("Cash Flow Ledger Entries1")
+ {
+ action("Payment Slip Archive FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip Archive';
+ RunObject = page "Payment Slip List Archive FR";
+ Tooltip = 'Open the Payment Slip List page.';
+ }
+ }
+ addafter("Direct Debit Collections")
+ {
+ action("Payment Slips1 FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = page "Payment Slip List FR";
+ Tooltip = 'Open the Payment Slip List page.';
+ }
+ }
+ addafter("Credit Memos1")
+ {
+ action("Payment Slips2 FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = page "Payment Slip List FR";
+ Tooltip = 'Open the Payment Slip List page.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al
new file mode 100644
index 0000000000..ccc3a9c074
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/SmallBusinessOwnerRC.PageExt.al
@@ -0,0 +1,103 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.RoleCenters;
+
+pageextension 10840 "Small Business Owner RC" extends "Small Business Owner RC"
+{
+ actions
+ {
+ addafter(Action1120008)
+ {
+ action("Payments Lists FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payments Lists';
+ Image = "Report";
+ RunObject = Report "Payment List FR";
+ ToolTip = 'View a list of payments.';
+ }
+ action("GL/Cust. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Cust Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each customer that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with customer ledger entries.';
+ }
+ action("GL/Vend. Ledger Reconciliation FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ Image = "Report";
+ RunObject = Report "GL/Vend Ledger Reconciliation";
+ ToolTip = 'View or print a separate page for each vendor that sums up amounts from general ledger transactions based on payments and posted invoices. This is useful when you want to reconcile general ledger entries with vendor ledger entries.';
+ }
+ }
+ addafter(VendorsBalance)
+ {
+ action("Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = Page "Payment Slip List FR";
+ ToolTip = 'View a list of payment slips.';
+ }
+ }
+ addafter(PaymentJournals)
+ {
+ action(Action1120016_FR)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ RunObject = Page "Payment Slip List FR";
+ ToolTip = 'View a list of payment slips.';
+ }
+ }
+ addafter("Issued Fin. Charge Memos")
+ {
+ action("Payment Slip List Archives FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip List Archives';
+ RunObject = Page "Payment Slip List Archive FR";
+ ToolTip = 'View a list of payment slips that have been posted and archived.';
+ }
+ }
+ addafter("Vendor Pa&yment Journal")
+ {
+ action("Archive Payment Journals FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Journals';
+ Image = "Report";
+ RunObject = Report "Archive Payment Slips FR";
+ ToolTip = 'Archive payment journals to separate them from active journals. You can enter criteria to specify the journals to archive.';
+ }
+ action("Create Payment Slips FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slips';
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ action("Look/Edit Payment Line FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Look/Edit Payment Line';
+ RunObject = Page "View/Edit Payment Line FR";
+ ToolTip = 'View and edit all payment lines that belong to a payment class. The window shows a line for each payment status. ';
+ }
+ action("Payment Report FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Report';
+ RunObject = Page "Payment Report FR";
+ ToolTip = 'View all payment documents that belong to a payment class and have the same status.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al
new file mode 100644
index 0000000000..1d22353e78
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorBankAccountCard.PageExt.al
@@ -0,0 +1,73 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Purchases.Vendor;
+#if not CLEAN28
+using Microsoft.Bank.Payment;
+#endif
+
+pageextension 10841 "Vendor Bank Account Card" extends "Vendor Bank Account Card"
+{
+ layout
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("Agency Code")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("RIB Key")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("RIB Checked")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter("Bank Branch No.")
+ {
+ field("Agency Code FR"; Rec."Agency Code FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the five-number code of the agency of the bank, for example, 00300.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ addafter("Bank Account No.")
+ {
+ field("RIB Key FR"; Rec."RIB Key FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("RIB Checked FR"; Rec."RIB Checked FR")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the Bank Account No. has been verified against the RIB Key.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al
new file mode 100644
index 0000000000..11b9062a73
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/PageExtensions/VendorCard.PageExt.al
@@ -0,0 +1,90 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Purchases.Vendor;
+
+pageextension 10842 "Vendor Card" extends "Vendor Card"
+{
+ layout
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("Payment in progress (LCY)")
+ {
+ Visible = not FeatureEnabled;
+ }
+ modify("""Balance (LCY)"" - ""Payment in progress (LCY)""")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter("Payment Balance (LCY)")
+ {
+ field("Payment in progress (LCY) FR"; Rec."Payment in progress (LCY) FR")
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ ToolTip = 'Specifies the vendor''s payments in progress.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ field("Net amount (LCY)"; Rec."Balance (LCY)" - Rec."Payment in progress (LCY) FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Net amount (LCY)';
+ Editable = false;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ ToolTip = 'Specifies the net amount in local currency.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+ actions
+ {
+#if not CLEAN28
+#pragma warning disable AL0432
+ modify("&Payment Addresses")
+ {
+ Visible = not FeatureEnabled;
+ }
+#pragma warning restore AL0432
+#endif
+ addafter(Attachments)
+ {
+ action("&Payment Addresses FR")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = '&Payment Addresses';
+ Image = Addresses;
+ RunObject = Page "Payment Addresses FR";
+ RunPageLink = "Account Type" = const(Vendor),
+ "Account No." = field("No.");
+ ToolTip = 'View payment addresses for the vendor.';
+#if not CLEAN28
+ Visible = FeatureEnabled;
+#endif
+ }
+ }
+ }
+
+#if not CLEAN28
+ trigger OnOpenPage()
+ var
+ PaymentFeatureFR: Codeunit "Payment Management Feature FR";
+ begin
+ FeatureEnabled := PaymentFeatureFR.IsEnabled();
+ end;
+
+ var
+ FeatureEnabled: Boolean;
+#endif
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al
new file mode 100644
index 0000000000..4355752a6c
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentAddressesFR.Page.al
@@ -0,0 +1,120 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+page 10831 "Payment Addresses FR"
+{
+ Caption = 'Payment Address';
+ DataCaptionExpression = Legend;
+ PageType = List;
+ SourceTable = "Payment Address FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1120000)
+ {
+ ShowCaption = false;
+ field("Code"; Rec.Code)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies a payment address code.';
+ }
+ field("Default Value"; Rec."Default Value")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies if this address is the default payment address.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the name associated with the payment address.';
+ }
+ field("Search Name"; Rec."Search Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a search name.';
+ }
+ field("Name 2"; Rec."Name 2")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an additional part of the name associated with the payment address.';
+ }
+ field(Address; Rec.Address)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment address.';
+ }
+ field("Address 2"; Rec."Address 2")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an additional part of the payment address.';
+ }
+ field("Post Code"; Rec."Post Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payer''s post code.';
+ }
+ field(City; Rec.City)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the city of the payment address.';
+ }
+ field(Contact; Rec.Contact)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the name of the person you contact about payments to this address.';
+ }
+ field("Country/Region Code"; Rec."Country/Region Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payer''s country/region code.';
+ }
+ field(County; Rec.County)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payer''s county name.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ AfterGetCurrentRecord();
+ end;
+
+ trigger OnNewRecord(BelowxRec: Boolean)
+ begin
+ AfterGetCurrentRecord();
+ end;
+
+ var
+ Cust: Record Customer;
+ Vend: Record Vendor;
+ Text001Lbl: Label 'Customer';
+ Text002Lbl: Label 'Vendor';
+ Legend: Text[250];
+
+ local procedure AfterGetCurrentRecord()
+ begin
+ xRec := Rec;
+ if Rec."Account Type" = Rec."Account Type"::Customer then begin
+ Cust.Get(Rec."Account No.");
+ Legend := Text001Lbl + ' ' + Format(Rec."Account No.") + ' ' + Cust.Name;
+ end else begin
+ Vend.Get(Rec."Account No.");
+ Legend := Text002Lbl + ' ' + Format(Rec."Account No.") + ' ' + Vend.Name;
+ end;
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al
new file mode 100644
index 0000000000..fb3e9f329a
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankArchiveFR.Page.al
@@ -0,0 +1,120 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10832 "Payment Bank Archive FR"
+{
+ Caption = 'Bank Account Card';
+ Editable = false;
+ PageType = Card;
+ SourceTable = "Payment Header Archive FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(General)
+ {
+ Caption = 'General';
+ field("Bank Name"; Rec."Bank Name")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the name of your bank.';
+ }
+ field("Bank Address"; Rec."Bank Address")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the address of your bank.';
+ }
+ field("Bank Address 2"; Rec."Bank Address 2")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an additional part of the address of your bank.';
+ }
+ field("Bank Post Code"; Rec."Bank Post Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Post Code/City';
+ ToolTip = 'Specifies the postal code of your bank.';
+ }
+ field("Bank City"; Rec."Bank City")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the city of your bank.';
+ }
+ field("Bank Country/Region Code"; Rec."Bank Country/Region Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the country/region code of your bank.';
+ }
+ field("Bank Contact"; Rec."Bank Contact")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the contact of your bank.';
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of your bank.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the company''s account number at your bank.';
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ }
+ group("R.I.B.")
+ {
+ Caption = 'R.I.B.';
+ field("Bank Branch No.2"; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of your bank.';
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of your bank.';
+ }
+ field("Bank Account No.2"; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the company''s account number at your bank.';
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ }
+ field("RIB Checked"; Rec."RIB Checked")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the key entered in the RIB Key field is correct.';
+ }
+ field("National Issuer No."; Rec."National Issuer No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment authorization number.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al
new file mode 100644
index 0000000000..3a3be3d876
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentBankFR.Page.al
@@ -0,0 +1,118 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10833 "Payment Bank FR"
+{
+ Caption = 'Bank Account Card';
+ PageType = Card;
+ SourceTable = "Payment Header FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(General)
+ {
+ Caption = 'General';
+ field("Bank Name"; Rec."Bank Name")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the name of the bank selected in the Account No. field, if Account Type is Bank.';
+ }
+ field("Bank Address"; Rec."Bank Address")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the address of the bank.';
+ }
+ field("Bank Address 2"; Rec."Bank Address 2")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an additional part of the address of the bank.';
+ }
+ field("Bank Post Code"; Rec."Bank Post Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Post Code/City';
+ ToolTip = 'Specifies the postal code of the bank.';
+ }
+ field("Bank City"; Rec."Bank City")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the city of the bank.';
+ }
+ field("Bank Country/Region Code"; Rec."Bank Country/Region Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the country/region code of the bank.';
+ }
+ field("Bank Contact"; Rec."Bank Contact")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the contact at the bank.';
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the company''s account at the bank.';
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number associated with the payment header.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ }
+ group("R.I.B.")
+ {
+ Caption = 'R.I.B.';
+ field("Bank Branch No.2"; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank.';
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of the bank.';
+ }
+ field("Bank Account No.2"; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the company''s account at the bank.';
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ }
+ field("RIB Checked"; Rec."RIB Checked")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the key entered in the RIB Key field is correct.';
+ }
+ field("National Issuer No."; Rec."National Issuer No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment authorization number.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al
new file mode 100644
index 0000000000..bd4a7708a5
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassFR.Page.al
@@ -0,0 +1,184 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.IO;
+
+page 10834 "Payment Class FR"
+{
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip Setup';
+ DelayedInsert = true;
+ PageType = List;
+ SourceTable = "Payment Class FR";
+ UsageCategory = Administration;
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field(Enable; Rec.Enable)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the user is allowed to use this payment class.';
+ }
+ field("Code"; Rec.Code)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies a payment class code.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment class.';
+ }
+ field("Header No. Series"; Rec."Header No. Series")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number series code used to assign numbers to the header of a payment slip.';
+ }
+ field("Line No. Series"; Rec."Line No. Series")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number series code used to assign numbers to the lines of a payment slip.';
+ }
+ field(Suggestions; Rec.Suggestions)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies what kind of payments proposals are allowed to be created automatically on a payment slip.';
+ }
+ field("Unrealized VAT Reversal"; Rec."Unrealized VAT Reversal")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies how unrealized VAT should be handled.';
+ }
+ field("SEPA Transfer Type"; Rec."SEPA Transfer Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type, if the payment class is used to export payments according to the SEPA standard.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(processing)
+ {
+ group("F&unctions")
+ {
+ Caption = 'F&unctions';
+ Image = "Action";
+ action(DuplicateParameter)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Duplicate Parameter';
+ Image = CopySerialNo;
+ ToolTip = 'Create a new payment class based on an existing payment class.';
+
+ trigger OnAction()
+ var
+ PaymentClass: Record "Payment Class FR";
+ DuplicateParameter: Report "Duplicate parameter FR";
+ begin
+ if Rec.Code <> '' then begin
+ PaymentClass.SetRange(Code, Rec.Code);
+ DuplicateParameter.SetTableView(PaymentClass);
+ DuplicateParameter.InitParameter(Rec.Code);
+ DuplicateParameter.RunModal();
+ end;
+ end;
+ }
+ action("Import Parameters")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Import Parameters';
+ Image = Import;
+ ToolTip = 'Import payment management parameters. You can use the following formats: ETEBAC (XMLport 10860) to create a bill of exchange remittance. Withdraw (XMLport 10861) to create a customer payment withdrawal (direct debit). Transfer (XMLport 10862) to create a vendor payment transfer (credit transfer). You choose these formats when you set up the payment status for your payment class.';
+
+ trigger OnAction()
+ var
+ Instream: InStream;
+ ImportFile: File;
+ ToFile: Text;
+ begin
+ Upload('', '', '', '', ToFile);
+ ImportFile.Open(ToFile);
+ ImportFile.CreateInStream(Instream);
+ XMLPORT.Import(XMLPORT::"Import/Export Parameters FR", Instream);
+ ImportFile.Close();
+ end;
+ }
+ action("Export Parameters")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Export Parameters';
+ Image = Export;
+ ToolTip = 'Import or export parameters for your payment management setup.';
+
+ trigger OnAction()
+ var
+ RBAutoMgt: Codeunit "File Management";
+ ServerFile: File;
+ Fileoutstream: OutStream;
+ ToFile: Text;
+ ServerFileName: Text;
+ begin
+ ServerFileName := RBAutoMgt.ServerTempFileName(Text002Lbl);
+
+ ServerFile.Create(ServerFileName);
+ ServerFile.CreateOutStream(Fileoutstream);
+ XMLPORT.Export(XMLPORT::"Import/Export Parameters FR", Fileoutstream);
+ ServerFile.Close();
+
+ ToFile := Text003Lbl;
+ Download(ServerFileName, '', '', '', ToFile);
+ Erase(ServerFileName);
+ end;
+ }
+ }
+ action(Status)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'St&atus';
+ Image = "Report";
+ RunObject = Page "Payment Status FR";
+ RunPageLink = "Payment Class" = field(Code);
+ ToolTip = 'Manage a series of states that indicate the progress of a payment document.';
+ }
+ action(Steps)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Ste&ps';
+ Image = MoveToNextPeriod;
+ RunObject = Page "Payment Steps FR";
+ RunPageLink = "Payment Class" = field(Code);
+ ToolTip = 'Manage the steps that must be performed for this status in order to move to the next.';
+ }
+ }
+ area(Promoted)
+ {
+ group(Category_Process)
+ {
+ Caption = 'Process';
+
+ actionref(Status_Promoted; Status)
+ {
+ }
+ actionref(Steps_Promoted; Steps)
+ {
+ }
+ }
+ }
+ }
+
+ var
+ Text002Lbl: Label '''txt''';
+ Text003Lbl: Label 'Import_Export Parameters.txt';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al
new file mode 100644
index 0000000000..e5d77bed88
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentClassListFR.Page.al
@@ -0,0 +1,40 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10835 "Payment Class List FR"
+{
+ Caption = 'Payment Class List';
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Class FR";
+ SourceTableView = where(Enable = const(true));
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Code"; Rec.Code)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies a payment class code.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment class.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al
new file mode 100644
index 0000000000..8af71ca1d1
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLineModificationFR.Page.al
@@ -0,0 +1,96 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10836 "Payment Line Modification FR"
+{
+ Caption = 'Payment Line Modification';
+ DeleteAllowed = false;
+ InsertAllowed = false;
+ PageType = Card;
+ RefreshOnActivate = true;
+ SourceTable = "Payment Line FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(Control1)
+ {
+ ShowCaption = false;
+ field("External Document No."; Rec."External Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.';
+ }
+ field("Drawee Reference"; Rec."Drawee Reference")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.';
+ }
+ field("Due Date"; Rec."Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the due date on the entry.';
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an acceptation code for the payment line.';
+ }
+ field("Bank Account Code"; Rec."Bank Account Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the code of the customer or vendor bank account that you want to perform the payment to, or collection from.';
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank account.';
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of the bank account.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.';
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ }
+ field("RIB Checked"; Rec."RIB Checked")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the key entered in the RIB Key field is correct.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnInit()
+ begin
+ CurrPage.LookupMode := true;
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al
new file mode 100644
index 0000000000..b6a20b0a21
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesArchiveListFR.Page.al
@@ -0,0 +1,177 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10839 "Payment Lines Archive List FR"
+{
+ Caption = 'Payment Lines Archive List';
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Line Archive FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the number of the archived payment.';
+ }
+ field("Line No."; Rec."Line No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the archived payment line''s entry number.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the document number of the archived payment line.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code of the archived payment line.';
+ Visible = false;
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the amount (including VAT) of the archived payment line.';
+ }
+ field("Amount (LCY)"; Rec."Amount (LCY)")
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the amount in LCY of the archived payment line.';
+ Visible = false;
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the account type of the archived payment line.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the account number of the archived payment line.';
+ }
+ field("Due Date"; Rec."Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the due date of the archived payment line.';
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class of the archived payment line.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status of the archived payment.';
+ }
+ field("Status No."; Rec."Status No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the archived status line entry number.';
+ Visible = false;
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the acception code of the archived payment.';
+ }
+ field("Drawee Reference"; Rec."Drawee Reference")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the file reference which has been used in the electronic payment (ETEBAC) file.';
+ }
+ field("Bank Account Name"; Rec."Bank Account Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the name of the bank account, as entered in the Bank Account field.';
+ Visible = false;
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank account as entered in the Bank Account field.';
+ Visible = false;
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of the bank account as entered in the Bank Account field.';
+ Visible = false;
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number of the customer or vendor bank account of the archived payment.';
+ Visible = false;
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ Visible = false;
+ }
+ field("Payment in Progress"; Rec."Payment in Progress")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies whether the payment line was taken into account for the customer or vendor payments in progress.';
+ Visible = false;
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(navigation)
+ {
+ group(Functions)
+ {
+ Caption = '&Payment';
+ action(Card)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Card';
+ Image = EditLines;
+ ShortCutKey = 'Shift+F7';
+ ToolTip = 'Open the card for the entity on the selected line to view more details.';
+
+ trigger OnAction()
+ var
+ Statement: Record "Payment Header Archive FR";
+ StatementForm: Page "Payment Slip Archive FR";
+ begin
+ if Statement.Get(Rec."No.") then begin
+ Statement.SetRange("No.", Rec."No.");
+ StatementForm.SetTableView(Statement);
+ StatementForm.Run();
+ end;
+ end;
+ }
+ }
+ }
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al
new file mode 100644
index 0000000000..e29cf5b023
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentLinesListFR.Page.al
@@ -0,0 +1,245 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10840 "Payment Lines List FR"
+{
+ Caption = 'Payment Lines List';
+ DeleteAllowed = false;
+ Editable = false;
+ InsertAllowed = false;
+ ModifyAllowed = false;
+ PageType = List;
+ SourceTable = "Payment Line FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the number of the payment.';
+ }
+ field("Line No."; Rec."Line No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment line''s entry number.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a document number for the payment line.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code for the amount on this line.';
+ Visible = false;
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the total amount (including VAT) of the payment line.';
+ }
+ field("Amount (LCY)"; Rec."Amount (LCY)")
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the total amount on the payment line in LCY.';
+ Visible = false;
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of account that the payment line will be posted to.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number of the account that the entry on the journal line will be posted to.';
+ }
+ field("Due Date"; Rec."Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the due date on the entry.';
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class used when creating this payment slip line.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status of the payment.';
+ }
+ field("Status No."; Rec."Status No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status line entry number.';
+ Visible = false;
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies an acceptation code for the payment line.';
+ }
+ field("Drawee Reference"; Rec."Drawee Reference")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.';
+ }
+ field("Bank Account Name"; Rec."Bank Account Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the name of the bank account as entered in the Bank Account Code field.';
+ Visible = false;
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank account.';
+ Visible = false;
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of the bank account.';
+ Visible = false;
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.';
+ Visible = false;
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ Visible = false;
+ }
+ field("Payment in Progress"; Rec."Payment in Progress")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies whether the payment line is taken into account for the customer or vendor payments in progress.';
+ Visible = false;
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(navigation)
+ {
+ group("F&unctions")
+ {
+ Caption = '&Payment';
+ action(Card)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Card';
+ Image = EditLines;
+ ShortCutKey = 'Shift+F7';
+ ToolTip = 'Open the card for the entity on the selected line to view more details.';
+
+ trigger OnAction()
+ var
+ Statement: Record "Payment Header FR";
+ StatementForm: Page "Payment Slip FR";
+ begin
+ if Statement.Get(Rec."No.") then begin
+ Statement.SetRange("No.", Rec."No.");
+ StatementForm.SetTableView(Statement);
+ StatementForm.Run();
+ end;
+ end;
+ }
+ }
+ }
+ area(processing)
+ {
+ group("F&unctions2")
+ {
+ Caption = 'F&unctions';
+ Image = "Action";
+ action(Modify)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Modify';
+ Image = EditFilter;
+ ToolTip = 'View and edit line information for payments and collections.';
+
+ trigger OnAction()
+ var
+ PaymentLine: Record "Payment Line FR";
+ Consult: Page "Payment Line Modification FR";
+ begin
+ PaymentLine.Copy(Rec);
+ PaymentLine.SetRange("No.", Rec."No.");
+ PaymentLine.SetRange("Line No.", Rec."Line No.");
+ Consult.SetTableView(PaymentLine);
+ Consult.RunModal();
+ end;
+ }
+ }
+ }
+ }
+
+ trigger OnQueryClosePage(CloseAction: Action): Boolean
+ begin
+ if CloseAction = ACTION::LookupOK then
+ LookupOKOnPush();
+ end;
+
+ var
+ Steps: Integer;
+ PayNum: Code[20];
+
+
+ procedure SetSteps(Step: Integer)
+ begin
+ Steps := Step;
+ end;
+
+
+ procedure SetNumBor(N: Code[20])
+ begin
+ PayNum := N;
+ end;
+
+
+ procedure GetNumBor() N: Code[20]
+ begin
+ N := PayNum;
+ end;
+
+ local procedure LookupOKOnPush()
+ var
+ StatementLine: Record "Payment Line FR";
+ PostingStatement: Codeunit "Payment Management FR";
+ begin
+ CurrPage.SetSelectionFilter(StatementLine);
+ PostingStatement.CopyLigBor(StatementLine, Steps, PayNum);
+ CurrPage.Close();
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al
new file mode 100644
index 0000000000..6040dc4b40
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentReportFR.Page.al
@@ -0,0 +1,71 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10841 "Payment Report FR"
+{
+ Caption = 'Payment Report';
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Status FR";
+ SourceTableView = where(ReportMenu = const(true));
+ UsageCategory = Lists;
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment status.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(processing)
+ {
+ action(OK)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = '&Print';
+ Image = Print;
+ ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
+
+ trigger OnAction()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("Payment Class", Rec."Payment Class");
+ PaymentLine.SetRange("Status No.", Rec.Line);
+ REPORT.RunModal(REPORT::"Payment List FR", true, true, PaymentLine);
+ end;
+ }
+ }
+ area(Promoted)
+ {
+ group(Category_Process)
+ {
+ Caption = 'Process';
+
+ actionref(OK_Promoted; OK)
+ {
+ }
+ }
+ }
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al
new file mode 100644
index 0000000000..0320bf801c
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipArchiveFR.Page.al
@@ -0,0 +1,188 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Foundation.Navigate;
+
+page 10842 "Payment Slip Archive FR"
+{
+ Caption = 'Payment Slip Archive';
+ Editable = false;
+ PageType = Document;
+ SourceTable = "Payment Header Archive FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(General)
+ {
+ Caption = 'General';
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = All;
+ AssistEdit = false;
+ ToolTip = 'Specifies the number of the payment slip.';
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ Lookup = false;
+ ToolTip = 'Specifies the payment class used when creating this payment slip.';
+ }
+ field("Payment Class Name"; Rec."Payment Class Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Importance = Promoted;
+ ToolTip = 'Specifies the name of the payment class used.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Importance = Promoted;
+ ToolTip = 'Specifies the status of the payment.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code of the payment.';
+ }
+ field("Posting Date"; Rec."Posting Date")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the date when the payment slip was posted.';
+ }
+ field("Document Date"; Rec."Document Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the date when the payment slip was created.';
+
+ trigger OnValidate()
+ begin
+ DocumentDateOnAfterValidate();
+ end;
+ }
+ field("Amount (LCY)"; Rec."Amount (LCY)")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the sum of the amounts in the Amount (LCY) fields on the associated lines.';
+ }
+ }
+ part(Lines; "Payment Slip Subform ArchiveFR")
+ {
+ ApplicationArea = Basic, Suite;
+ SubPageLink = "No." = field("No.");
+ }
+ group(Posting)
+ {
+ Caption = 'Posting';
+ field("Source Code"; Rec."Source Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the source of the entry.';
+ }
+ field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the dimension value code with which the payment is associated.';
+ }
+ field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the dimension value code with which the invoice is associated.';
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the type of the account that the payments have been transferred to/from.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the number of the account that the payments have been transferred to/from.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(navigation)
+ {
+ group("&Header")
+ {
+ Caption = '&Header';
+ Image = DepositSlip;
+ action(Dimensions)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Dimensions';
+ Image = Dimensions;
+ ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.';
+
+ trigger OnAction()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ action("Header RIB")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Header RIB';
+ Image = Check;
+ RunObject = Page "Payment Bank Archive FR";
+ RunPageLink = "No." = field("No.");
+ ToolTip = 'View the RIB key that is associated with the bank account.';
+ }
+ }
+ group("&Navigate")
+ {
+ Caption = '&Navigate';
+ action(Header)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Header';
+ Image = DepositSlip;
+ ToolTip = 'View general information about archived payments or collections, for example, to and from customers and vendors. A payment header has one or more payment lines assigned to it. The lines contain information such as the amount, the bank details, and the due date.';
+
+ trigger OnAction()
+ begin
+ Navigate.SetDoc(Rec."Posting Date", Rec."No.");
+ Navigate.Run();
+ end;
+ }
+ action(Line)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Line';
+ Image = Line;
+ ToolTip = 'View the ledger entry line information for the archived payment slips.';
+
+ trigger OnAction()
+ begin
+ CurrPage.Lines.PAGE.NavigateLine(Rec."Posting Date");
+ end;
+ }
+ }
+ }
+ }
+
+ var
+ Navigate: Page Navigate;
+
+ local procedure DocumentDateOnAfterValidate()
+ begin
+ CurrPage.Update();
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al
new file mode 100644
index 0000000000..8d5a675952
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipFR.Page.al
@@ -0,0 +1,396 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Currency;
+using Microsoft.Foundation.Navigate;
+using Microsoft.Sales.Customer;
+using System.Telemetry;
+
+page 10843 "Payment Slip FR"
+{
+ Caption = 'Payment Slip';
+ PageType = Document;
+ RefreshOnActivate = true;
+ SourceTable = "Payment Header FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(General)
+ {
+ Caption = 'General';
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = Basic, Suite;
+ AssistEdit = false;
+ ToolTip = 'Specifies the number of the payment header.';
+
+ trigger OnAssistEdit()
+ begin
+ if Rec.AssistEdit(xRec) then
+ CurrPage.Update();
+ end;
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = false;
+ Lookup = false;
+ ToolTip = 'Specifies the payment class used when creating this payment slip.';
+ }
+ field("Payment Class Name"; Rec."Payment Class Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Editable = false;
+ Importance = Promoted;
+ ToolTip = 'Specifies the name of the payment class used.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Editable = false;
+ Importance = Promoted;
+ ToolTip = 'Specifies the status the payment is in.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code to be used on the payment lines.';
+
+ trigger OnAssistEdit()
+ begin
+ ChangeExchangeRate.SetParameter(Rec."Currency Code", Rec."Currency Factor", Rec."Posting Date");
+ if ChangeExchangeRate.RunModal() = ACTION::OK then begin
+ Rec.Validate("Currency Factor", ChangeExchangeRate.GetParameter());
+ CurrPage.Update();
+ end;
+ Clear(ChangeExchangeRate);
+ end;
+ }
+ field("Posting Date"; Rec."Posting Date")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the date when the payment slip should be posted.';
+ }
+ field("Document Date"; Rec."Document Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the date when you create the payment slip.';
+
+ trigger OnValidate()
+ begin
+ DocumentDateOnAfterValidate();
+ end;
+ }
+ field("Amount (LCY)"; Rec."Amount (LCY)")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the sum of the amounts in the Amount (LCY) fields on the associated lines.';
+ }
+ field("Partner Type"; Rec."Partner Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies if the payment slip is a person or company.';
+ }
+ }
+ part(Lines; "Payment Slip Subform FR")
+ {
+ ApplicationArea = Basic, Suite;
+ SubPageLink = "No." = field("No.");
+ }
+ group(Posting)
+ {
+ Caption = 'Posting';
+ field("Source Code"; Rec."Source Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the source of the payment slip.';
+ }
+ field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the dimension value code that the payment header will be associated with.';
+ }
+ field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the dimension value code associated with the payment header.';
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the type of account that payments will be transferred to/from.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Importance = Promoted;
+ ToolTip = 'Specifies the number of the account that the payments will be transferred to/from.';
+ }
+ }
+ }
+ area(factboxes)
+ {
+ part("Payment Journal Errors"; "Payment Journal Errors Part")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'File Export Errors';
+ Provider = Lines;
+ SubPageLink = "Document No." = field("No."),
+ "Journal Line No." = field("Line No."),
+ "Journal Template Name" = const(''),
+ "Journal Batch Name" = const('10865');
+ }
+ }
+ }
+
+ actions
+ {
+ area(navigation)
+ {
+ group("&Header")
+ {
+ Caption = '&Header';
+ Image = DepositSlip;
+ action(Dimensions)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Dimensions';
+ Image = Dimensions;
+ ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.';
+
+ trigger OnAction()
+ begin
+ Rec.ShowDocDim();
+ CurrPage.SaveRecord();
+ end;
+ }
+ action("Header RIB")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Header RIB';
+ Image = Check;
+ RunObject = Page "Payment Bank FR";
+ RunPageLink = "No." = field("No.");
+ ToolTip = 'View the RIB key that is associated with the bank account.';
+ }
+ }
+ group("&Navigate")
+ {
+ Caption = '&Navigate';
+ action(Header)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Header';
+ Image = DepositSlip;
+ ToolTip = 'View general information about payments or collections, for example, to and from customers and vendors. A payment header has one or more payment lines assigned to it. The lines contain information such as the amount, the bank details, and the due date.';
+
+ trigger OnAction()
+ begin
+ Navigate.SetDoc(Rec."Posting Date", Rec."No.");
+ Navigate.Run();
+ end;
+ }
+ action(Line)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Line';
+ Image = Line;
+ ToolTip = 'Create a new payment line for the payment slip.';
+
+ trigger OnAction()
+ begin
+ CurrPage.Lines.PAGE.NavigateLine(Rec."Posting Date");
+ end;
+ }
+ }
+ }
+ area(processing)
+ {
+ group("F&unctions")
+ {
+ Caption = 'F&unctions';
+ Image = "Action";
+ action(SuggestVendorPayments)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Suggest &Vendor Payments';
+ Image = SuggestVendorPayments;
+ ToolTip = 'Process open vendor ledger entries (entries that result from posting invoices, finance charge memos, credit memos, and payments) to create a payment suggestion as lines in a payment slip. ';
+
+ trigger OnAction()
+ var
+ PaymentClass: Record "Payment Class FR";
+ CreateVendorPmtSuggestion: Report "Suggest Vend. Payments";
+ begin
+ if Rec."Status No." <> 0 then
+ Message(Text003Lbl)
+ else
+ if PaymentClass.Get(Rec."Payment Class") then
+ if PaymentClass.Suggestions = PaymentClass.Suggestions::Vendor then begin
+ CreateVendorPmtSuggestion.SetGenPayLine(Rec);
+ CreateVendorPmtSuggestion.RunModal();
+ Clear(CreateVendorPmtSuggestion);
+ end else
+ Message(Text001Lbl);
+ end;
+ }
+ action(SuggestCustomerPayments)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Suggest &Customer Payments';
+ Image = SuggestCustomerPayments;
+ ToolTip = 'Process open customer ledger entries (entries that result from posting invoices, finance charge memos, credit memos, and payments) to create a payment suggestion as lines in a payment slip.';
+
+ trigger OnAction()
+ var
+ Customer: Record Customer;
+ PaymentClass: Record "Payment Class FR";
+ CreateCustomerPmtSuggestion: Report "Suggest Cust. Payments";
+ begin
+ if Rec."Status No." <> 0 then
+ Message(Text003Lbl)
+ else
+ if PaymentClass.Get(Rec."Payment Class") then
+ if PaymentClass.Suggestions = PaymentClass.Suggestions::Customer then begin
+ CreateCustomerPmtSuggestion.SetGenPayLine(Rec);
+ Customer.SetRange("Partner Type", Rec."Partner Type");
+ CreateCustomerPmtSuggestion.SetTableView(Customer);
+ CreateCustomerPmtSuggestion.RunModal();
+ Clear(CreateCustomerPmtSuggestion);
+ end else
+ Message(Text002Lbl);
+ end;
+ }
+ separator(Action1120052)
+ {
+ }
+ action(Archive)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive';
+ Image = Archive;
+ ToolTip = 'Archive the payment slip to separate it from active entries.';
+
+ trigger OnAction()
+ var
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ if Rec."No." = '' then
+ exit;
+ if not Confirm(Text009Lbl) then
+ exit;
+ PaymentMgt.ArchiveDocument(Rec);
+ end;
+ }
+ }
+ group("P&osting")
+ {
+ Caption = 'P&osting';
+ Image = Post;
+ action(GenerateFile)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Generate file';
+ Image = CreateDocument;
+ ToolTip = 'Generate an XML or an XMLport file that you can send to your bank. This requires that File is chosen in the Action Type field for the payment slip setup. ';
+
+ trigger OnAction()
+ var
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ FeatureTelemetry.LogUptake('1000HP2', FRPaymentSlipTok, Enum::"Feature Uptake Status"::"Used");
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep);
+ FeatureTelemetry.LogUsage('1000HP3', FRPaymentSlipTok, 'FR Payment Slips File Created');
+ end;
+ }
+ action(Post)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Post';
+ Image = Post;
+ ToolTip = 'Post the payment.';
+
+ trigger OnAction()
+ var
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ PaymentStep.SetFilter(
+ "Action Type",
+ '%1|%2|%3',
+ PaymentStep."Action Type"::None, PaymentStep."Action Type"::Ledger, PaymentStep."Action Type"::"Cancel File");
+ PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep);
+ end;
+ }
+ action(Print)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Print';
+ Image = Print;
+ ToolTip = 'Print the payment slip.';
+
+ trigger OnAction()
+ var
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ CurrPage.Lines.PAGE.MarkLines(true);
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report);
+ PaymentMgt.ProcessPaymentSteps(Rec, PaymentStep);
+ CurrPage.Lines.PAGE.MarkLines(false);
+ end;
+ }
+ }
+ }
+ area(Promoted)
+ {
+ group(Category_Process)
+ {
+ Caption = 'Process';
+
+ actionref(Post_Promoted; Post)
+ {
+ }
+ actionref(SuggestVendorPayments_Promoted; SuggestVendorPayments)
+ {
+ }
+ actionref(SuggestCustomerPayments_Promoted; SuggestCustomerPayments)
+ {
+ }
+ }
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ CurrPage.Lines.PAGE.Editable(true);
+ end;
+
+ var
+ PaymentStep: Record "Payment Step FR";
+ FeatureTelemetry: Codeunit "Feature Telemetry";
+ ChangeExchangeRate: Page "Change Exchange Rate";
+ Navigate: Page Navigate;
+ Text001Lbl: Label 'This payment class does not authorize vendor suggestions.';
+ Text002Lbl: Label 'This payment class does not authorize customer suggestions.';
+ Text003Lbl: Label 'You cannot suggest payments on a posted header.';
+ Text009Lbl: Label 'Do you want to archive this document?';
+ FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true;
+
+ local procedure DocumentDateOnAfterValidate()
+ begin
+ CurrPage.Update();
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al
new file mode 100644
index 0000000000..85453fd37f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListArchiveFR.Page.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10845 "Payment Slip List Archive FR"
+{
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slip Archive';
+ CardPageID = "Payment Slip Archive FR";
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Header Archive FR";
+ UsageCategory = History;
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the number of the payment slip.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code of the payment.';
+ }
+ field("Posting Date"; Rec."Posting Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the date when the payment slip was posted.';
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class used when creating this payment slip.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status of the payment.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al
new file mode 100644
index 0000000000..b0575e2d2a
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipListFR.Page.al
@@ -0,0 +1,78 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Telemetry;
+
+page 10846 "Payment Slip List FR"
+{
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Slips';
+ CardPageID = "Payment Slip FR";
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Header FR";
+ UsageCategory = Lists;
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("No."; Rec."No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the number of the payment header.';
+ }
+ field("Currency Code"; Rec."Currency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the currency code to be used on the payment lines.';
+ }
+ field("Posting Date"; Rec."Posting Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the date when the payment slip should be posted.';
+ }
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class used when creating this payment slip.';
+ }
+ field("Status Name"; Rec."Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status the payment is in.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(creation)
+ {
+ action("Create Payment Slip")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Create Payment Slip';
+ Image = NewDocument;
+ RunObject = Codeunit "Payment Management FR";
+ ToolTip = 'Manage information about customer and vendor payments.';
+ }
+ }
+ }
+
+ trigger OnOpenPage()
+ var
+ FeatureTelemetry: Codeunit "Feature Telemetry";
+ FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true;
+ begin
+ FeatureTelemetry.LogUptake('1000HP0', FRPaymentSlipTok, Enum::"Feature Uptake Status"::Discovered);
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al
new file mode 100644
index 0000000000..95fdf4d45e
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformArchiveFR.Page.al
@@ -0,0 +1,227 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Navigate;
+
+page 10847 "Payment Slip Subform ArchiveFR"
+{
+ Caption = 'Lines';
+ Editable = false;
+ PageType = ListPart;
+ SourceTable = "Payment Line Archive FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the account type of the archived payment line.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the account number of the archived payment line.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the document number that is related to the payment slip.';
+ }
+ field("External Document No."; Rec."External Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the document number of the archived payment that refers to the customer''s or vendor''s numbering system.';
+ }
+ field("Drawee Reference"; Rec."Drawee Reference")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the file reference which has been used in the electronic payment (ETEBAC) file.';
+ }
+ field("Posting Group"; Rec."Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the posting group associated with the account of the archived payment line.';
+ Visible = false;
+ }
+ field("Due Date"; Rec."Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the due date of the archived payment line.';
+ }
+ field("Debit Amount"; Rec."Debit Amount")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the debit amount of the archived payment line.';
+ }
+ field("Credit Amount"; Rec."Credit Amount")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the credit amount of the archived payment line.';
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = Basic, Suite;
+ AutoFormatType = 1;
+ ToolTip = 'Specifies the amount (including VAT) of the archived payment line.';
+ }
+ field("Bank Account Code"; Rec."Bank Account Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the bank account code that is related to the payment slip.';
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the acception code of the archived payment.';
+ }
+ field("Payment Address Code"; Rec."Payment Address Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the code of the payment address of the archived payment.';
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the branch number of the bank account as entered in the Bank Account field.';
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the agency code of the bank account as entered in the Bank Account field.';
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the number of the customer or vendor bank account of the archived payment.';
+ }
+ field("Bank Account Name"; Rec."Bank Account Name")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the name of the bank account, as entered in the Bank Account field.';
+ }
+ field("Bank City"; Rec."Bank City")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the city of the bank account.';
+ Visible = false;
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ }
+ field("RIB Checked"; Rec."RIB Checked")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the key entered in the RIB Key field is correct.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(processing)
+ {
+ group("A&ccount")
+ {
+ Caption = 'A&ccount';
+ Image = ChartOfAccounts;
+ action(Card)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Card';
+ Image = EditLines;
+ ShortCutKey = 'Shift+F7';
+ ToolTip = 'Open the card for the entity on the selected line to view more details.';
+
+ trigger OnAction()
+ begin
+ ShowAccount();
+ end;
+ }
+ action("Ledger E&ntries")
+ {
+ ApplicationArea = Basic, Suite;
+ Image = LedgerEntries;
+ Caption = 'Ledger E&ntries';
+ ShortCutKey = 'Ctrl+F7';
+ ToolTip = 'View details about ledger entries for the vendor account.';
+
+ trigger OnAction()
+ begin
+ ShowEntries();
+ end;
+ }
+ }
+ group("&Line")
+ {
+ Caption = '&Line';
+ Image = Line;
+ action(Dimensions)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Dimensions';
+ Image = Dimensions;
+ ShortCutKey = 'Shift+Ctrl+D';
+ ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.';
+
+ trigger OnAction()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ }
+ }
+ }
+
+ var
+ Navigate: Page Navigate;
+
+
+ procedure ShowAccount()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ begin
+ GenJnlLine."Account Type" := Rec."Account Type";
+ GenJnlLine."Account No." := Rec."Account No.";
+ CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Card", GenJnlLine);
+ end;
+
+
+ procedure ShowEntries()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ begin
+ GenJnlLine."Account Type" := Rec."Account Type";
+ GenJnlLine."Account No." := Rec."Account No.";
+ CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Entries", GenJnlLine);
+ end;
+
+
+ procedure NavigateLine(PostingDate: Date)
+ begin
+ Navigate.SetDoc(PostingDate, Rec."Document No.");
+ Navigate.Run();
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al
new file mode 100644
index 0000000000..161921c73e
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentSlipSubformFR.Page.al
@@ -0,0 +1,481 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Navigate;
+
+page 10848 "Payment Slip Subform FR"
+{
+ AutoSplitKey = true;
+ Caption = 'Lines';
+ DelayedInsert = true;
+ PageType = ListPart;
+ SourceTable = "Payment Line FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of account that the payment line will be posted to.';
+
+ trigger OnValidate()
+ begin
+ BankInfoEditable := IsBankInfoEditable();
+ end;
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Style = Strong;
+ StyleExpr = AccountNoEmphasize;
+ ToolTip = 'Specifies the number of the account that the entry on the journal line will be posted to.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a document number for the payment line.';
+ }
+ field("External Document No."; Rec."External Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a document number that refers to the customer''s or vendor''s numbering system.';
+ Visible = false;
+ }
+ field("Drawee Reference"; Rec."Drawee Reference")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the file reference which will be used in the electronic payment (ETEBAC) file.';
+ }
+ field("Posting Group"; Rec."Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the posting group associated with the account.';
+ Visible = false;
+ }
+ field("Due Date"; Rec."Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the due date on the entry.';
+ }
+ field("Debit Amount"; Rec."Debit Amount")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the total amount (including VAT) of the payment line, if it is a debit amount.';
+ Visible = DebitAmountVisible;
+ }
+ field("Credit Amount"; Rec."Credit Amount")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the total amount (including VAT) of the payment line, if it is a credit amount.';
+ Visible = CreditAmountVisible;
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the total amount (including VAT) of the payment line.';
+ Visible = AmountVisible;
+ AutoFormatType = 1;
+ }
+ field(IBAN; Rec.IBAN)
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the international bank account number (IBAN) for the payment slip.';
+ }
+ field("SWIFT Code"; Rec."SWIFT Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the international bank identification code for the payment slip.';
+ }
+ field("Bank Account Code"; Rec."Bank Account Code")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the code of the customer or vendor bank account that you want to perform the payment to, or collection from.';
+ Visible = BankAccountCodeVisible;
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies an acceptation code for the payment line.';
+ Visible = AcceptationCodeVisible;
+ }
+ field("Payment Address Code"; Rec."Payment Address Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a code for the payment address of the customer or vendor.';
+ }
+ field("Bank Branch No."; Rec."Bank Branch No.")
+ {
+ ApplicationArea = All;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the branch number of the bank account.';
+ Visible = RIBVisible;
+ }
+ field("Agency Code"; Rec."Agency Code")
+ {
+ ApplicationArea = All;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the agency code of the bank account.';
+ Visible = RIBVisible;
+ }
+ field("Bank Account No."; Rec."Bank Account No.")
+ {
+ ApplicationArea = All;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the number of the customer or vendor bank account that you want to perform the payment to, or collection from.';
+ Visible = RIBVisible;
+ }
+ field("Bank Account Name"; Rec."Bank Account Name")
+ {
+ ApplicationArea = All;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the name of the bank account as entered in the Bank Account Code field.';
+ Visible = RIBVisible;
+ }
+ field("Bank City"; Rec."Bank City")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the city of the bank account.';
+ Visible = false;
+ }
+ field("RIB Key"; Rec."RIB Key")
+ {
+ ApplicationArea = All;
+ Editable = BankInfoEditable;
+ ToolTip = 'Specifies the two-digit RIB key associated with the Bank Account No. RIB key value in range from 01 to 09 is represented in the single-digit form, without leading zero digit.';
+ Visible = RIBVisible;
+ }
+ field("RIB Checked"; Rec."RIB Checked")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies that the key entered in the RIB Key field is correct.';
+ Visible = RIBVisible;
+ }
+ field("Has Payment Export Error"; Rec."Has Payment Export Error")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that an error occurred when you used the Export Payments to File function in the Payment Slip window.';
+ }
+ field("Direct Debit Mandate ID"; Rec."Direct Debit Mandate ID")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the direct debit mandate of the customer who made this payment.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(processing)
+ {
+ group("F&unctions")
+ {
+ Caption = 'F&unctions';
+ Image = "Action";
+ action("Set Document ID")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Set Document ID';
+ Image = Documents;
+ ToolTip = 'Fill in the document number of the entry in the payment slip.';
+
+ trigger OnAction()
+ begin
+ SetDocumentID();
+ end;
+ }
+ }
+ group("&Line")
+ {
+ Caption = '&Line';
+ Image = Line;
+ action(Application)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = '&Application';
+ ShortCutKey = 'Shift+F11';
+ Image = ApplicationWorksheet;
+ ToolTip = 'Apply the customer or vendor payment on the selected payment slip line.';
+
+ trigger OnAction()
+ begin
+ ApplyPayment();
+ end;
+ }
+ action(Dimensions)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Dimensions';
+ Image = Dimensions;
+ ShortCutKey = 'Shift+Ctrl+D';
+ ToolTip = 'View or change the dimension settings for this payment slip. If you change the dimension, you can update all lines on the payment slip.';
+
+ trigger OnAction()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ action(Modify)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Modify';
+ Image = EditFilter;
+ ToolTip = 'View and edit information in the document associated with the line on the payment slip.';
+
+ trigger OnAction()
+ begin
+ OnModify();
+ end;
+ }
+ action(Insert)
+ {
+ ApplicationArea = Basic, Suite;
+ Image = Insert;
+ Caption = 'Insert';
+ ToolTip = 'Insert the payment line.';
+
+ trigger OnAction()
+ begin
+ OnInsert();
+ end;
+ }
+ action(Remove)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Remove';
+ Image = Cancel;
+ ToolTip = 'Remove the payment line.';
+
+ trigger OnAction()
+ begin
+ OnDelete();
+ end;
+ }
+ group("A&ccount")
+ {
+ Caption = 'A&ccount';
+ Image = ChartOfAccounts;
+ action(Card)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Card';
+ Image = EditLines;
+ ShortCutKey = 'Shift+F7';
+ ToolTip = 'Open the card for the entity on the selected line to view more details.';
+
+ trigger OnAction()
+ begin
+ ShowAccount();
+ end;
+ }
+ action("Ledger E&ntries")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Ledger E&ntries';
+ ShortCutKey = 'Ctrl+F7';
+ Image = LedgerEntries;
+ ToolTip = 'View details about ledger entries for the vendor account.';
+
+ trigger OnAction()
+ begin
+ ShowEntries();
+ end;
+ }
+ }
+ }
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ ActivateControls();
+ BankInfoEditable := IsBankInfoEditable();
+ AccountNoEmphasize := Rec."Copied To No." <> '';
+ end;
+
+ trigger OnInit()
+ begin
+ BankAccountCodeVisible := true;
+ CreditAmountVisible := true;
+ DebitAmountVisible := true;
+ AmountVisible := true;
+ AcceptationCodeVisible := true;
+ RIBVisible := true;
+ end;
+
+ trigger OnNewRecord(BelowxRec: Boolean)
+ begin
+ Rec.SetUpNewLine(xRec, BelowxRec);
+ end;
+
+ var
+ Header: Record "Payment Header FR";
+ Status: Record "Payment Status FR";
+ Navigate: Page Navigate;
+ Text000Lbl: Label 'Assign No. ?';
+ Text001Lbl: Label 'There is no line to modify.';
+ Text002Lbl: Label 'A posted line cannot be modified.';
+ Text003Lbl: Label 'You cannot assign numbers to a posted header.';
+ AccountNoEmphasize: Boolean;
+ AcceptationCodeVisible: Boolean;
+ AmountVisible: Boolean;
+ BankAccountCodeVisible: Boolean;
+ BankInfoEditable: Boolean;
+ CreditAmountVisible: Boolean;
+ DebitAmountVisible: Boolean;
+ RIBVisible: Boolean;
+
+ local procedure ApplyPayment()
+ begin
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", Rec);
+ end;
+
+ local procedure DisableFields()
+ begin
+ if Header.Get(Rec."No.") then
+ CurrPage.Editable((Header."Status No." = 0) and (Rec."Copied To No." = ''));
+ end;
+
+ local procedure OnModify()
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentModification: Page "Payment Line Modification FR";
+ begin
+ if Rec."Line No." = 0 then
+ Message(Text001Lbl)
+ else
+ if not Rec.Posted then begin
+ PaymentLine.Copy(Rec);
+ PaymentLine.SetRange("No.", Rec."No.");
+ PaymentLine.SetRange("Line No.", Rec."Line No.");
+ PaymentModification.SetTableView(PaymentLine);
+ PaymentModification.RunModal();
+ end else
+ Message(Text002Lbl);
+ end;
+
+ local procedure OnInsert()
+ var
+ PaymentManagement: Codeunit "Payment Management FR";
+ begin
+ PaymentManagement.LinesInsert(Rec."No.");
+ end;
+
+ local procedure OnDelete()
+ var
+ StatementLine: Record "Payment Line FR";
+ PostingStatement: Codeunit "Payment Management FR";
+ begin
+ StatementLine.Copy(Rec);
+ CurrPage.SetSelectionFilter(StatementLine);
+ PostingStatement.DeleteLigBorCopy(StatementLine);
+ end;
+
+ local procedure SetDocumentID()
+ var
+ StatementLine: Record "Payment Line FR";
+ No: Code[20];
+ begin
+ if Rec."Status No." <> 0 then begin
+ Message(Text003Lbl);
+ exit;
+ end;
+ if Confirm(Text000Lbl) then begin
+ CurrPage.SetSelectionFilter(StatementLine);
+ StatementLine.MarkedOnly(true);
+ if not StatementLine.Find('-') then
+ StatementLine.MarkedOnly(false);
+ if StatementLine.Find('-') then begin
+ No := StatementLine."Document No.";
+ while StatementLine.Next() <> 0 do begin
+ No := IncStr(No);
+ StatementLine."Document No." := No;
+ StatementLine.Modify();
+ end;
+ end;
+ end;
+ end;
+
+ local procedure ShowAccount()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ begin
+ GenJnlLine."Account Type" := Rec."Account Type";
+ GenJnlLine."Account No." := Rec."Account No.";
+ CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Card", GenJnlLine);
+ end;
+
+ local procedure ShowEntries()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ begin
+ GenJnlLine."Account Type" := Rec."Account Type";
+ GenJnlLine."Account No." := Rec."Account No.";
+ CODEUNIT.Run(CODEUNIT::"Gen. Jnl.-Show Entries", GenJnlLine);
+ end;
+
+
+ procedure MarkLines(ToMark: Boolean)
+ var
+ LineCopy: Record "Payment Line FR";
+ NumLines: Integer;
+ begin
+ if ToMark then begin
+ CurrPage.SetSelectionFilter(LineCopy);
+ NumLines := LineCopy.Count();
+ if NumLines > 0 then begin
+ LineCopy.Find('-');
+ repeat
+ LineCopy.Marked := true;
+ LineCopy.Modify();
+ until LineCopy.Next() = 0;
+ end else
+ LineCopy.Reset();
+ LineCopy.SetRange("No.", Rec."No.");
+ LineCopy.ModifyAll(Marked, true);
+ end else begin
+ LineCopy.SetRange("No.", Rec."No.");
+ LineCopy.ModifyAll(Marked, false);
+ end;
+ Commit();
+ end;
+
+ local procedure ActivateControls()
+ begin
+ if Header.Get(Rec."No.") then begin
+ Status.Get(Header."Payment Class", Header."Status No.");
+ RIBVisible := Status.RIB;
+ AcceptationCodeVisible := Status."Acceptation Code";
+ AmountVisible := Status.Amount;
+ DebitAmountVisible := Status.Debit;
+ CreditAmountVisible := Status.Credit;
+ BankAccountCodeVisible := Status."Bank Account";
+ DisableFields();
+ end;
+ end;
+
+
+ procedure NavigateLine(PostingDate: Date)
+ begin
+ Navigate.SetDoc(PostingDate, Rec."Document No.");
+ Navigate.Run();
+ end;
+
+ local procedure IsBankInfoEditable(): Boolean
+ begin
+ exit(not (Rec."Account Type" in [Rec."Account Type"::Customer, Rec."Account Type"::Vendor]));
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al
new file mode 100644
index 0000000000..69b0956b62
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusFR.Page.al
@@ -0,0 +1,85 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10849 "Payment Status FR"
+{
+ AutoSplitKey = true;
+ Caption = 'Payment Status';
+ DelayedInsert = true;
+ PageType = List;
+ SourceTable = "Payment Status FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment status.';
+ }
+ field(RIB; Rec.RIB)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies all information involving the bank identifier (RIB) statement of the customer or vendor be displayed on the payment lines.';
+ }
+ field(Look; Rec.Look)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that lines of payment documents with this status may be looked up and edited through the View/Edit Payment Line window.';
+ }
+ field(ReportMenu; Rec.ReportMenu)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that documents with this status may be printed.';
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the amount will displayed on the payment lines.';
+ }
+ field(Debit; Rec.Debit)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the debit amount will displayed on the payment lines.';
+ }
+ field(Credit; Rec.Credit)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the credit amount will displayed on the payment lines.';
+ }
+ field("Bank Account"; Rec."Bank Account")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the bank account code will displayed on the payment lines.';
+ }
+ field("Payment in Progress"; Rec."Payment in Progress")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the program will take into account all billing and payment lines with this status, when calculating the payments in progress.';
+ }
+ field("Archiving Authorized"; Rec."Archiving Authorized")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the payment header with this status can be archived.';
+ }
+ field(AcceptationCode; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the acceptation code will displayed on the payment lines.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al
new file mode 100644
index 0000000000..ddc9f9162b
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStatusListFR.Page.al
@@ -0,0 +1,74 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10850 "Payment Status List FR"
+{
+ AutoSplitKey = true;
+ Caption = 'Payment Status List';
+ PageType = List;
+ SourceTable = "Payment Status FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment status.';
+ }
+ field(Look; Rec.Look)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that lines of payment documents with this status may be looked up and edited through the View/Edit Payment Line window.';
+ }
+ field(ReportMenu; Rec.ReportMenu)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that documents with this status may be printed.';
+ }
+ field(RIB; Rec.RIB)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies all information involving the bank identifier (RIB) statement of the customer or vendor be displayed on the payment lines.';
+ }
+ field("Acceptation Code"; Rec."Acceptation Code")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the acceptation code will displayed on the payment lines.';
+ }
+ field(Amount; Rec.Amount)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the amount will displayed on the payment lines.';
+ }
+ field(Debit; Rec.Debit)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the debit amount will displayed on the payment lines.';
+ }
+ field(Credit; Rec.Credit)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the credit amount will displayed on the payment lines.';
+ }
+ field("Payment in Progress"; Rec."Payment in Progress")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies if you want to take into account all billing and payment lines with this status, when calculating the payments in progress.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al
new file mode 100644
index 0000000000..71e29063d4
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepCardFR.Page.al
@@ -0,0 +1,271 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10851 "Payment Step Card FR"
+{
+ Caption = 'Payment Step Card';
+ PageType = Card;
+ RefreshOnActivate = true;
+ SourceTable = "Payment Step FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(Control1)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = false;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Line; Rec.Line)
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = false;
+ ToolTip = 'Specifies the step line''s entry number.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment step.';
+ }
+ field("Previous Status"; Rec."Previous Status")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status from which this step should start executing.';
+
+ trigger OnValidate()
+ begin
+ Rec.CalcFields("Previous Status Name");
+ end;
+ }
+ field("Previous Status Name"; Rec."Previous Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Editable = false;
+ ToolTip = 'Specifies the name of the status selected in the Previous Status field.';
+ }
+ field("Next Status"; Rec."Next Status")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status on which this step should end.';
+
+ trigger OnValidate()
+ begin
+ Rec.CalcFields("Next Status Name");
+ end;
+ }
+ field("Next Status Name"; Rec."Next Status Name")
+ {
+ ApplicationArea = Basic, Suite;
+ DrillDown = false;
+ Editable = false;
+ ToolTip = 'Specifies the name of the status selected in the Next Status field.';
+ }
+ field("Action Type"; Rec."Action Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of action to be performed by this step.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Report No."; Rec."Report No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = ReportNoEnable;
+ ToolTip = 'Specifies the ID for the report used, when Action Type is set to Report.';
+ }
+ field("Export Type"; Rec."Export Type")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = ExportTypeEnable;
+ ToolTip = 'Specifies the method that is used to export files.';
+ }
+ field("Export No."; Rec."Export No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = ExportNoEnable;
+ ToolTip = 'Specifies the ID code for the selected export type.';
+ }
+ field("Verify Lines RIB"; Rec."Verify Lines RIB")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the RIB of the header on the payment slip lines has been properly reported.';
+ }
+ field("Verify Due Date"; Rec."Verify Due Date")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the due date on the billing and payment lines has been properly reported.';
+ }
+ field("Source Code"; Rec."Source Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = SourceCodeEnable;
+ ToolTip = 'Specifies the source code linked to the payment step.';
+ }
+ field("Reason Code"; Rec."Reason Code")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = ReasonCodeEnable;
+ ToolTip = 'Specifies the reason code linked to the payment step.';
+ }
+ field("Header Nos. Series"; Rec."Header Nos. Series")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = HeaderNosSeriesEnable;
+ ToolTip = 'Specifies the code used to assign numbers to the header of a new payment slip.';
+ }
+ field(Correction; Rec.Correction)
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = CorrectionEnable;
+ ToolTip = 'Specifies you want the payment entries to pass as corrections.';
+ }
+ field("Realize VAT"; Rec."Realize VAT")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = RealizeVATEnable;
+ ToolTip = 'Specifies that the unrealized VAT should be reversed and the VAT should be declared.';
+ }
+ field("Verify Header RIB"; Rec."Verify Header RIB")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the RIB on the payment slip header has been properly reported.';
+ }
+ field("Acceptation Code<>No"; Rec."Acceptation Code<>No")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that the acceptation code on each payment line is not No.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(navigation)
+ {
+ group("Payment Step")
+ {
+ Caption = 'Payment Step';
+ Image = Installments;
+ action(Ledger)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Ledger';
+ Image = Ledger;
+ RunObject = Page "Payment Step Ledger List FR";
+ RunPageLink = "Payment Class" = field("Payment Class"),
+ Line = field(Line);
+ ToolTip = 'View and edit the list of payment steps for posting debit and credit entries to the general ledger.';
+ }
+ }
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ DisableFields();
+ end;
+
+ trigger OnInit()
+ begin
+ CorrectionEnable := true;
+ HeaderNosSeriesEnable := true;
+ SourceCodeEnable := true;
+ ReasonCodeEnable := true;
+ ExportNoEnable := true;
+ ExportTypeEnable := true;
+ ReportNoEnable := true;
+ end;
+
+ var
+ PaymentClass: Record "Payment Class FR";
+ ReportNoEnable: Boolean;
+ ExportTypeEnable: Boolean;
+ ExportNoEnable: Boolean;
+ ReasonCodeEnable: Boolean;
+ SourceCodeEnable: Boolean;
+ HeaderNosSeriesEnable: Boolean;
+ CorrectionEnable: Boolean;
+ RealizeVATEnable: Boolean;
+
+
+ procedure DisableFields()
+ begin
+ case Rec."Action Type" of
+ Rec."Action Type"::None:
+ begin
+ ReportNoEnable := false;
+ ExportTypeEnable := false;
+ ExportNoEnable := false;
+ ReasonCodeEnable := false;
+ SourceCodeEnable := false;
+ HeaderNosSeriesEnable := false;
+ CorrectionEnable := false;
+ RealizeVATEnable := false;
+ end;
+
+ Rec."Action Type"::Ledger:
+ begin
+ ReportNoEnable := false;
+ ExportTypeEnable := false;
+ ExportNoEnable := false;
+ ReasonCodeEnable := true;
+ SourceCodeEnable := true;
+ HeaderNosSeriesEnable := false;
+ CorrectionEnable := true;
+ PaymentClass.Get(Rec."Payment Class");
+ RealizeVATEnable :=
+ (PaymentClass."Unrealized VAT Reversal" = PaymentClass."Unrealized VAT Reversal"::Delayed);
+ end;
+
+ Rec."Action Type"::Report:
+ begin
+ ReportNoEnable := true;
+ ExportTypeEnable := false;
+ ExportNoEnable := false;
+ ReasonCodeEnable := false;
+ SourceCodeEnable := false;
+ HeaderNosSeriesEnable := false;
+ CorrectionEnable := false;
+ RealizeVATEnable := false;
+ end;
+
+ Rec."Action Type"::File:
+ begin
+ ReportNoEnable := false;
+ ExportTypeEnable := true;
+ ExportNoEnable := true;
+ ReasonCodeEnable := false;
+ SourceCodeEnable := false;
+ HeaderNosSeriesEnable := false;
+ CorrectionEnable := false;
+ RealizeVATEnable := false;
+ end;
+
+ Rec."Action Type"::"Create New Document":
+ begin
+ ReportNoEnable := false;
+ ExportTypeEnable := false;
+ ExportNoEnable := false;
+ ReasonCodeEnable := false;
+ SourceCodeEnable := false;
+ HeaderNosSeriesEnable := true;
+ CorrectionEnable := false;
+ RealizeVATEnable := false;
+ end;
+ end;
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al
new file mode 100644
index 0000000000..61a0f14969
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerFR.Page.al
@@ -0,0 +1,255 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10852 "Payment Step Ledger FR"
+{
+ Caption = 'Payment Step Ledger';
+ PageType = Card;
+ SourceTable = "Payment Step Ledger FR";
+
+ layout
+ {
+ area(content)
+ {
+ group(Control1)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = false;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Line; Rec.Line)
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = false;
+ ToolTip = 'Specifies the ledger line''s entry number.';
+ }
+ field(Sign; Rec.Sign)
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = SignEnable;
+ ToolTip = 'Specifies if the posting will result in a debit or credit entry.';
+ }
+ field(Description; Rec.Description)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a description to be used on the general ledger entry.';
+ }
+ field("Accounting Type"; Rec."Accounting Type")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = AccountingTypeEnable;
+ ToolTip = 'Specifies the type of account to post the entry to.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = AccountTypeEnable;
+ ToolTip = 'Specifies the type of account to post the entry to.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = AccountNoEnable;
+ ToolTip = 'Specifies the account number to post the entry to.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Customer Posting Group"; Rec."Customer Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = CustomerPostingGroupEnable;
+ ToolTip = 'Specifies a code for the customer posting group used when the entry is posted.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Vendor Posting Group"; Rec."Vendor Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = VendorPostingGroupEnable;
+ ToolTip = 'Specifies a code for the vendor posting group used when the entry is posted.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field(Root; Rec.Root)
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = RootEnable;
+ ToolTip = 'Specifies the root for the G/L accounts group used, when you have selected either G/L Account / Month, or G/L Account / Week.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Memorize Entry"; Rec."Memorize Entry")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that entries created in this step will be memorized, so the next application can be performed against newly posted entries.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field(Application; Rec.Application)
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = ApplicationEnable;
+ ToolTip = 'Specifies how to apply entries.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Detail Level"; Rec."Detail Level")
+ {
+ ApplicationArea = Basic, Suite;
+ Enabled = DetailLevelEnable;
+ ToolTip = 'Specifies how payment lines will be posted.';
+
+ trigger OnValidate()
+ begin
+ DisableFields();
+ end;
+ }
+ field("Document Type"; Rec."Document Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of document that will be assigned to the ledger entry.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the method to assign a document number to the ledger entry.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ DisableFields();
+ end;
+
+ trigger OnInit()
+ begin
+ DetailLevelEnable := true;
+ RootEnable := true;
+ VendorPostingGroupEnable := true;
+ CustomerPostingGroupEnable := true;
+ AccountNoEnable := true;
+ AccountTypeEnable := true;
+ ApplicationEnable := true;
+ SignEnable := true;
+ AccountingTypeEnable := true;
+ end;
+
+ var
+ AccountingTypeEnable: Boolean;
+ SignEnable: Boolean;
+ ApplicationEnable: Boolean;
+ AccountTypeEnable: Boolean;
+ AccountNoEnable: Boolean;
+ CustomerPostingGroupEnable: Boolean;
+ VendorPostingGroupEnable: Boolean;
+ RootEnable: Boolean;
+ DetailLevelEnable: Boolean;
+
+
+ procedure DisableFields()
+ begin
+ AccountingTypeEnable := true;
+ SignEnable := true;
+ ApplicationEnable := true;
+
+ case Rec."Accounting Type" of
+ Rec."Accounting Type"::"Setup Account":
+ begin
+ AccountTypeEnable := true;
+ AccountNoEnable := true;
+ RootEnable := false;
+
+ case Rec."Account Type" of
+ Rec."Account Type"::Customer:
+ begin
+ CustomerPostingGroupEnable := true;
+ VendorPostingGroupEnable := false;
+ end;
+ Rec."Account Type"::Vendor:
+ begin
+ CustomerPostingGroupEnable := false;
+ VendorPostingGroupEnable := true;
+ end;
+ else begin
+ CustomerPostingGroupEnable := false;
+ VendorPostingGroupEnable := false;
+ end;
+ end;
+ end;
+
+ Rec."Accounting Type"::"G/L Account / Month",
+ Rec."Accounting Type"::"G/L Account / Week":
+ begin
+ AccountTypeEnable := false;
+ AccountNoEnable := false;
+ RootEnable := true;
+ CustomerPostingGroupEnable := false;
+ VendorPostingGroupEnable := false;
+ end;
+
+ Rec."Accounting Type"::"Bal. Account Previous Entry":
+ begin
+ AccountTypeEnable := false;
+ AccountNoEnable := false;
+ RootEnable := false;
+ CustomerPostingGroupEnable := false;
+ VendorPostingGroupEnable := false;
+ end;
+
+ else begin
+ AccountTypeEnable := false;
+ AccountNoEnable := false;
+ RootEnable := false;
+ CustomerPostingGroupEnable := true;
+ VendorPostingGroupEnable := true;
+ end;
+ end;
+
+ if Rec."Memorize Entry" or (Rec.Application <> Rec.Application::None) then begin
+ Rec."Detail Level" := Rec."Detail Level"::Line;
+ DetailLevelEnable := false;
+ end else
+ DetailLevelEnable := true;
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al
new file mode 100644
index 0000000000..5350c79e6d
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepLedgerListFR.Page.al
@@ -0,0 +1,105 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10853 "Payment Step Ledger List FR"
+{
+ Caption = 'Payment Step Ledger List';
+ CardPageID = "Payment Step Ledger FR";
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Step Ledger FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1120000)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Line; Rec.Line)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the ledger line''s entry number.';
+ }
+ field(Sign; Rec.Sign)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies if the posting will result in a debit or credit entry.';
+ }
+ field(Description; Rec.Description)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a description to be used on the general ledger entry.';
+ }
+ field("Accounting Type"; Rec."Accounting Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of account to post the entry to.';
+ }
+ field("Account Type"; Rec."Account Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of account to post the entry to.';
+ }
+ field("Account No."; Rec."Account No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the account number to post the entry to.';
+ }
+ field("Customer Posting Group"; Rec."Customer Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a code for the customer posting group used when the entry is posted.';
+ }
+ field("Vendor Posting Group"; Rec."Vendor Posting Group")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies a code for the vendor posting group used when the entry is posted.';
+ }
+ field(Root; Rec.Root)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the root for the G/L accounts group used, when you have selected either G/L Account / Month, or G/L Account / Week.';
+ }
+ field("Detail Level"; Rec."Detail Level")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies how payment lines will be posted.';
+ }
+ field(Application; Rec.Application)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies how to apply entries.';
+ }
+ field("Memorize Entry"; Rec."Memorize Entry")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies that entries created in this step will be memorized, so the next application can be performed against newly posted entries.';
+ }
+ field("Document Type"; Rec."Document Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of document that will be assigned to the ledger entry.';
+ }
+ field("Document No."; Rec."Document No.")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the method to assign a document number to the ledger entry.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al
new file mode 100644
index 0000000000..fdd4e26e8f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsFR.Page.al
@@ -0,0 +1,37 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10854 "Payment Steps FR"
+{
+ AutoSplitKey = true;
+ Caption = 'Payment Step';
+ CardPageID = "Payment Step Card FR";
+ DataCaptionFields = "Payment Class";
+ DelayedInsert = true;
+ PageType = List;
+ SourceTable = "Payment Step FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment step.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al
new file mode 100644
index 0000000000..a21f1f8266
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/PaymentStepsListFR.Page.al
@@ -0,0 +1,58 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10855 "Payment Steps List FR"
+{
+ Caption = 'Payment Steps List';
+ PageType = List;
+ SourceTable = "Payment Step FR";
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Line; Rec.Line)
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the step line''s entry number.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment step.';
+ }
+ field("Previous Status"; Rec."Previous Status")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status from which this step should start executing.';
+ }
+ field("Next Status"; Rec."Next Status")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the status on which this step should end.';
+ }
+ field("Action Type"; Rec."Action Type")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specifies the type of action to be performed by this step.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al b/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al
new file mode 100644
index 0000000000..a682668d9a
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Pages/ViewEditPaymentLineFR.Page.al
@@ -0,0 +1,66 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+page 10857 "View/Edit Payment Line FR"
+{
+ Caption = 'View/Edit Payment Lines';
+ Editable = false;
+ PageType = List;
+ SourceTable = "Payment Status FR";
+ SourceTableView = where(Look = const(true));
+ UsageCategory = Lists;
+
+ layout
+ {
+ area(content)
+ {
+ repeater(Control1)
+ {
+ ShowCaption = false;
+ field("Payment Class"; Rec."Payment Class")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the payment class.';
+ }
+ field(Name; Rec.Name)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies text to describe the payment status.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(processing)
+ {
+ action("Payment Lines List")
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Lines List';
+ Image = ListPage;
+ RunObject = Page "Payment Lines List FR";
+ RunPageLink = "Payment Class" = field("Payment Class"),
+ "Status No." = field(Line),
+ "Copied To No." = filter('');
+ ToolTip = 'View line information for payments and collections.';
+ }
+ }
+ area(Promoted)
+ {
+ group(Category_Process)
+ {
+ Caption = 'Process';
+
+ actionref("Payment Lines List_Promoted"; "Payment Lines List")
+ {
+ }
+ }
+ }
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al
new file mode 100644
index 0000000000..5ac567a4ba
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/ArchivePaymentSlipsFR.Report.al
@@ -0,0 +1,72 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+report 10831 "Archive Payment Slips FR"
+{
+ ApplicationArea = Basic, Suite;
+ Caption = 'Archive Payment Slips';
+ ProcessingOnly = true;
+ UsageCategory = ReportsAndAnalysis;
+
+ dataset
+ {
+ dataitem("Payment Header"; "Payment Header FR")
+ {
+ CalcFields = "Archiving Authorized";
+ DataItemTableView = sorting("No.");
+ RequestFilterFields = "No.", "Payment Class";
+
+ trigger OnAfterGetRecord()
+ begin
+ if "Archiving Authorized" then begin
+ PaymentManagement.ArchiveDocument("Payment Header");
+ ArchivedDocs += 1;
+ end;
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ begin
+ case ArchivedDocs of
+ 0:
+ Message(Text002Lbl);
+ 1:
+ Message(Text003Lbl);
+ else
+ Message(Text001Lbl, ArchivedDocs);
+ end;
+ end;
+
+ trigger OnPreReport()
+ begin
+ ArchivedDocs := 0;
+ end;
+
+ var
+ PaymentManagement: Codeunit "Payment Management FR";
+ ArchivedDocs: Integer;
+ Text001Lbl: Label '%1 Payment Headers have been archived.', Comment = '%1 = Document';
+ Text002Lbl: Label 'There is no Payment Header to archive.';
+ Text003Lbl: Label 'One Payment Header has been archived.';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc
new file mode 100644
index 0000000000..8c1fb0a5f5
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Bill.rdlc
@@ -0,0 +1,2583 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ c4ea1258-4911-4efd-a67f-8354d713e966
+
+
+
+
+
+
+
+
+
+
+ 0.20372in
+
+
+ 0.3937in
+
+
+ 0.41432in
+
+
+ 0.17123in
+
+
+ 0.11811in
+
+
+ 0.87489in
+
+
+ 0.29621in
+
+
+ 0.49994in
+
+
+ 0.49994in
+
+
+ 1.12486in
+
+
+ 0.99987in
+
+
+ 2.22962in
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox23
+ 71
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption.Value
+
+
+
+
+
+
+ 70
+
+
+ 3
+ true
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 69
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BILLCaption.Value
+
+
+
+
+
+
+ 68
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox24
+ 67
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox1
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 65
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox25
+ 64
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox2
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 62
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox26
+ 61
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox3
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 59
+
+
+ 2
+
+
+
+
+
+
+ 0.33307in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox27
+ 58
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+ =Fields!TOCaption.Value
+
+
+
+
+
+
+ 56
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!IssueCity.Value
+
+
+
+
+
+
+ 55
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!ONCaption.Value
+
+
+
+
+
+
+ 54
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!IssueDate.Value
+
+
+
+
+
+
+ 53
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 52
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!AMOUNT_FOR_CONTROLCaption.Value
+
+
+
+
+
+
+ 51
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CREATION_DATECaption.Value
+
+
+
+
+
+
+ 50
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DUE_DATECaption.Value
+
+
+
+
+
+
+ 49
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DRAWEE_REF_Caption.Value
+
+
+
+
+
+
+ 48
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 47
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_AmountText_.Value
+
+
+
+
+
+
+ 46
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value
+
+
+
+
+
+
+ 45
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PostingDate.Value
+
+
+
+
+
+
+ 44
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+
+ 43
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Drawee_Reference_.Value
+
+
+
+
+
+
+ 42
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 41
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value
+
+
+
+
+
+
+ 40
+
+
+
+
+
+
+
+ 0.33307in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox31
+ 39
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox32
+ 37
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DRAWEE_R_I_B_Caption.Value
+
+
+
+
+
+
+ 36
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox99
+ 35
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DOMICILIATIONCaption.Value
+
+
+
+
+
+
+ 34
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_Branch_No__.Value
+
+
+
+
+
+
+ 33
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Agency_Code_.Value
+
+
+
+
+
+
+ Payment_Line__Agency_Code_
+ 32
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_Account_No__.Value
+
+
+
+
+
+
+ 31
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__.Value
+
+
+
+
+
+
+ 30
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox168
+ 29
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_Account_Name_.Value
+
+
+
+
+
+
+ 28
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox34
+ 27
+
+
+ 11
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_City_.Value
+
+
+
+
+
+
+ 26
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+ =Fields!Value_in__Caption.Value
+
+
+
+
+
+
+ 25
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox73
+ 24
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!NAME_andCaption.Value
+
+
+
+
+
+
+ 23
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_1_.Value
+
+
+
+
+
+
+ 22
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 21
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox36
+ 20
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!ADDRESSCaption.Value
+
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_2_.Value
+
+
+
+
+
+
+ 18
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox37
+ 16
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!of_DRAWEECaption.Value
+
+
+
+
+
+
+ 15
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_3_.Value
+
+
+
+
+
+
+ 14
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Stamp_Allow_and_SignatureCaption.Value
+
+
+
+
+
+
+ 13
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox38
+ 12
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_4_.Value
+
+
+
+
+
+
+ 11
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox39
+ 9
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_5_.Value
+
+
+
+
+
+
+ 8
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+ =Fields!ACCEPTANCE_or_ENDORSMENTCaption.Value
+
+
+
+
+
+
+ 6
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox107
+ 5
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_6_.Value
+
+
+
+
+
+
+ 4
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox41
+ 2
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustAdr_7_.Value
+
+
+
+
+
+
+ 1
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Payment_Line_No_.Value
+ =Fields!Payment_Line_Line_No_.Value
+
+
+ End
+
+
+
+
+
+ Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+
+
+
+ DataSet_Result
+ 8.90102cm
+ 19.87908cm
+
+
+
+ 8.90102cm
+
+
+ 19.87909cm
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 0.3cm
+ 2cm
+ 2cm
+
+
+
+
+
+
+ String
+
+
+ Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption
+
+
+ Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption
+
+
+
+
+ 1
+ 1
+
+
+ 0
+ 0
+ Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Cm
+ 737802f6-b589-4fe2-85a3-1c3bda888d47
+
+
+
+
+ CustAdr_6_
+
+
+ CustAdr_7_
+
+
+ CustAdr_5_
+
+
+ CustAdr_4_
+
+
+ CustAdr_2_
+
+
+ CustAdr_3_
+
+
+ CustAdr_1_
+
+
+ Payment_Line__Agency_Code_
+
+
+ Payment_Line__Bank_Branch_No__
+
+
+ Payment_Line__Bank_Account_No__
+
+
+ CONVERTSTR_FORMAT__RIB_Key__2_______0__
+
+
+ Payment_Line__Bank_Account_Name_
+
+
+ FORMAT_Amount_0___Precision_2___Standard_Format_0___
+
+
+ FORMAT_Amount_0___Precision_2___Standard_Format_0____Control1120051
+
+
+ Payment_Line__Drawee_Reference_
+
+
+ IssueCity
+
+
+ IssueDate
+
+
+ Payment_Line__Due_Date_
+
+
+ Payment_Line__Bank_City_
+
+
+ PostingDate
+
+
+ AmountText
+
+
+ FORMAT_AmountText_
+
+
+ Payment_Line_No_
+
+
+ Payment_Line_Line_No_
+
+
+ ACCEPTANCE_or_ENDORSMENTCaption
+
+
+ of_DRAWEECaption
+
+
+ Stamp_Allow_and_SignatureCaption
+
+
+ ADDRESSCaption
+
+
+ NAME_andCaption
+
+
+ Value_in__Caption
+
+
+ DRAWEE_R_I_B_Caption
+
+
+ DOMICILIATIONCaption
+
+
+ TOCaption
+
+
+ ONCaption
+
+
+ AMOUNT_FOR_CONTROLCaption
+
+
+ CREATION_DATECaption
+
+
+ DUE_DATECaption
+
+
+ DRAWEE_REF_Caption
+
+
+ BILLCaption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/BillFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/BillFR.Report.al
new file mode 100644
index 0000000000..5201020990
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/BillFR.Report.al
@@ -0,0 +1,245 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+
+report 10834 "Bill FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Bill.rdlc';
+ Caption = 'Bill';
+
+ dataset
+ {
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemTableView = where("Account Type" = filter(Customer), Marked = const(true));
+ RequestFilterHeading = 'Payment lines';
+ column(CustAdr_6_; CustAdr[6])
+ {
+ }
+ column(CustAdr_7_; CustAdr[7])
+ {
+ }
+ column(CustAdr_5_; CustAdr[5])
+ {
+ }
+ column(CustAdr_4_; CustAdr[4])
+ {
+ }
+ column(CustAdr_2_; CustAdr[2])
+ {
+ }
+ column(CustAdr_3_; CustAdr[3])
+ {
+ }
+ column(CustAdr_1_; CustAdr[1])
+ {
+ }
+ column(Payment_Line__Agency_Code_; "Agency Code")
+ {
+ }
+ column(Payment_Line__Bank_Branch_No__; "Bank Branch No.")
+ {
+ }
+ column(Payment_Line__Bank_Account_No__; "Bank Account No.")
+ {
+ }
+ column(CONVERTSTR_FORMAT__RIB_Key__2_______0__; ConvertStr(Format("RIB Key", 2), ' ', '0'))
+ {
+ }
+ column(Payment_Line__Bank_Account_Name_; "Bank Account Name")
+ {
+ }
+ column(FORMAT_Amount_0___Precision_2___Standard_Format_0___; '****' + Format(Amount, 0, ''))
+ {
+ }
+ column(FORMAT_Amount_0___Precision_2___Standard_Format_0____Control1120051; '****' + Format(Amount, 0, ''))
+ {
+ }
+ column(Payment_Line__Drawee_Reference_; "Drawee Reference")
+ {
+ }
+ column(IssueCity; Issue_City)
+ {
+ }
+ column(IssueDate; Format(Issue_Date))
+ {
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(Payment_Line__Bank_City_; "Bank City")
+ {
+ }
+ column(PostingDate; Format(PostingDate))
+ {
+ }
+ column(AmountText; AmountText)
+ {
+ }
+ column(FORMAT_AmountText_; Format(AmountText))
+ {
+ }
+ column(Payment_Line_No_; "No.")
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(ACCEPTANCE_or_ENDORSMENTCaption; ACCEPTANCE_or_ENDORSMENTCaptionLbl)
+ {
+ }
+ column(of_DRAWEECaption; of_DRAWEECaptionLbl)
+ {
+ }
+ column(Stamp_Allow_and_SignatureCaption; Stamp_Allow_and_SignatureCaptionLbl)
+ {
+ }
+ column(ADDRESSCaption; ADDRESSCaptionLbl)
+ {
+ }
+ column(NAME_andCaption; NAME_andCaptionLbl)
+ {
+ }
+ column(Value_in__Caption; Value_in__CaptionLbl)
+ {
+ }
+ column(DRAWEE_R_I_B_Caption; DRAWEE_R_I_B_CaptionLbl)
+ {
+ }
+ column(DOMICILIATIONCaption; DOMICILIATIONCaptionLbl)
+ {
+ }
+ column(TOCaption; TOCaptionLbl)
+ {
+ }
+ column(ONCaption; ONCaptionLbl)
+ {
+ }
+ column(AMOUNT_FOR_CONTROLCaption; AMOUNT_FOR_CONTROLCaptionLbl)
+ {
+ }
+ column(CREATION_DATECaption; CREATION_DATECaptionLbl)
+ {
+ }
+ column(DUE_DATECaption; DUE_DATECaptionLbl)
+ {
+ }
+ column(DRAWEE_REF_Caption; DRAWEE_REF_CaptionLbl)
+ {
+ }
+ column(BILLCaption; BILLCaptionLbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ var
+ CustPaymentAddr: Record "Payment Address FR";
+ Cust: Record Customer;
+ FormatAddress: Codeunit "Format Address";
+ begin
+ CustPaymentAddr.Init();
+
+ PaymtHeader.Get("No.");
+ PostingDate := PaymtHeader."Posting Date";
+
+ Amount := -Amount;
+
+ GLSetup.Get();
+ if Issue_Date = 0D then
+ Issue_Date := WorkDate();
+
+ if CustPaymentAddr.Get("Account Type", "Account No.", "Payment Address Code") then
+ PaymtManagt.PaymentAddr(CustAdr, CustPaymentAddr)
+ else begin
+ Cust.Get("Account No.");
+ FormatAddress.Customer(CustAdr, Cust);
+ end;
+
+ if "Currency Code" = '' then
+ AmountText := Text001Lbl + ' €'
+ else
+ AmountText := Text001Lbl + ' ' + "Currency Code";
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = true;
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(IssueDate; Issue_Date)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Issue date';
+ ToolTip = 'Specifies the name of the city where the bill will be issued.';
+ }
+ field(IssueCity; Issue_City)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Issue city';
+ ToolTip = 'Specifies the name of the city where the bill will be issued.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnOpenPage()
+ begin
+ CompanyInfo.Get();
+ Issue_City := CompanyInfo.City;
+ Issue_Date := WorkDate();
+ end;
+ }
+
+ labels
+ {
+ Against_this_BILL_noted_as_NO_CHARGES_please_pay_the_indicated_sum_below_for_order_ofCaption = 'Against this BILL noted as NO CHARGES Please pay the indicated sum below for order of :';
+ }
+
+ var
+ CompanyInfo: Record "Company Information";
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ PaymtManagt: Codeunit "Payment Management FR";
+ CustAdr: array[8] of Text[100];
+ Issue_City: Text[30];
+ Issue_Date: Date;
+ PostingDate: Date;
+ Text001Lbl: Label 'Amount';
+ AmountText: Text[30];
+ ACCEPTANCE_or_ENDORSMENTCaptionLbl: Label 'ACCEPTANCE or ENDORSMENT';
+ of_DRAWEECaptionLbl: Label 'of DRAWEE', Comment = 'NAME and ADDRESS of DRAWEE';
+ Stamp_Allow_and_SignatureCaptionLbl: Label 'Stamp Allow and Signature';
+ ADDRESSCaptionLbl: Label 'ADDRESS', Comment = 'Translate address and uppecase the result';
+ NAME_andCaptionLbl: Label 'NAME and';
+ Value_in__CaptionLbl: Label 'Value in :';
+ DRAWEE_R_I_B_CaptionLbl: Label 'DRAWEE R.I.B.';
+ DOMICILIATIONCaptionLbl: Label 'DOMICILIATION', Comment = 'Translate domiciliation and uppecase the result';
+ TOCaptionLbl: Label 'TO';
+ ONCaptionLbl: Label 'ON';
+ AMOUNT_FOR_CONTROLCaptionLbl: Label 'AMOUNT FOR CONTROL';
+ CREATION_DATECaptionLbl: Label 'CREATION DATE';
+ DUE_DATECaptionLbl: Label 'DUE DATE';
+ DRAWEE_REF_CaptionLbl: Label 'DRAWEE REF.';
+ BILLCaptionLbl: Label 'BILL';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Draft.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Draft.rdlc
new file mode 100644
index 0000000000..8077c82db3
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Draft.rdlc
@@ -0,0 +1,2714 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ d8b68ee6-d50c-4521-bd4d-eb8f6f8fb740
+
+
+
+
+
+
+
+
+
+
+ 0.20372in
+
+
+ 0.3937in
+
+
+ 0.41432in
+
+
+ 0.17123in
+
+
+ 0.11811in
+
+
+ 0.87489in
+
+
+ 0.29621in
+
+
+ 0.49994in
+
+
+ 0.49994in
+
+
+ 1.12486in
+
+
+ 0.99987in
+
+
+ 2.22962in
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox23
+ 73
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption.Value
+
+
+
+
+
+
+ 72
+
+
+ 3
+ true
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 71
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DRAFTCaption.Value
+
+
+
+
+
+
+ 70
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox24
+ 69
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox1
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 67
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox25
+ 66
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox2
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 64
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox26
+ 63
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox3
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 61
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 60
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox5
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 58
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 57
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.16732in
+
+
+
+
+ true
+
+
+
+
+ =Fields!TOCaption.Value
+
+
+
+
+
+
+ 56
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!IssueCity.Value
+
+
+
+
+
+
+ 55
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!ONCaption.Value
+
+
+
+
+
+
+ 54
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!IssueDate.Value
+
+
+
+
+
+
+ 53
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 52
+
+
+ 2
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!AMOUNT_FOR_CONTROLCaption.Value
+
+
+
+
+
+
+ 51
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CREATION_DATECaption.Value
+
+
+
+
+
+
+ 50
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DUE_DATECaption.Value
+
+
+
+
+
+
+ 49
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!SUBSCRIBER_REF_Caption.Value
+
+
+
+
+
+
+ 48
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox59
+ 47
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!AmountText.Value
+
+
+
+
+
+
+ 46
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value
+
+
+
+
+
+
+ 45
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PostingDate.Value
+
+
+
+
+
+
+ 44
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+
+ 43
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BillReference.Value
+
+
+
+
+
+
+ 42
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 41
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_Amount_0___Precision_2___Standard_Format_0___.Value
+
+
+
+
+
+
+ 40
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 39
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 38
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 37
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!SUBSCRIBER_S_R_I_B_Caption.Value
+
+
+
+
+
+
+ 36
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 35
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!DOMICILIATIONCaption.Value
+
+
+
+
+
+
+ 34
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Branch_No__.Value
+
+
+
+
+
+
+ 33
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Agency_Code_.Value
+
+
+
+
+
+
+ 32
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Account_No__.Value
+
+
+
+
+
+
+ 31
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CONVERTSTR_FORMAT_PaymtHeader__RIB_Key__2_______0__.Value
+
+
+
+
+
+
+ 30
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox103
+ 29
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Name_.Value
+
+
+
+
+
+
+ 28
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 27
+
+
+ 11
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Post_Code_.Value
+
+
+
+
+
+
+ 26
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!Value_in__Caption.Value
+
+
+
+
+
+
+ 25
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 24
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!NAME_andCaption.Value
+
+
+
+
+
+
+ 23
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_1_.Value
+
+
+
+
+
+
+ 22
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 21
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 20
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!ADDRESSCaption.Value
+
+
+
+
+
+
+ 19
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_2_.Value
+
+
+
+
+
+
+ 18
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 16
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!of_SUBSCRIBERCaption.Value
+
+
+
+
+
+
+ 15
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_3_.Value
+
+
+
+
+
+
+ 14
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Stamp_Allow_and_SignatureCaption.Value
+
+
+
+
+
+
+ 13
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_4_.Value
+
+
+
+
+
+
+ 11
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 9
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_5_.Value
+
+
+
+
+
+
+ 8
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+ =Fields!OK_FOR_ENDORSMENTCaption.Value
+
+
+
+
+
+
+ 6
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox10
+ 5
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_6_.Value
+
+
+
+
+
+
+ 4
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ 0.16654in
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_7_.Value
+
+
+
+
+
+
+ 1
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Payment_Line_No_.Value
+ =Fields!Payment_Line_Line_No_.Value
+
+
+ End
+
+
+
+
+
+ Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+
+
+
+ DataSet_Result
+ 8.88522cm
+ 19.87908cm
+
+
+
+ 8.88522cm
+
+
+ 19.87909cm
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 2cm
+ 2cm
+
+
+
+
+
+
+ String
+
+
+ Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption
+
+
+ Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption
+
+
+
+
+ 1
+ 1
+
+
+ 0
+ 0
+ Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Cm
+ 8687ba55-c28c-4e6a-9a8f-dc967f7c4a77
+
+
+
+
+ CompanyAddr_6_
+
+
+ CompanyAddr_7_
+
+
+ CompanyAddr_5_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_1_
+
+
+ PaymtHeader__Bank_Post_Code_
+
+
+ CONVERTSTR_FORMAT_PaymtHeader__RIB_Key__2_______0__
+
+
+ PostingDate
+
+
+ FORMAT_Amount_0___Precision_2___Standard_Format_0___
+
+
+ FORMAT_Amount_0___Precision_2___Standard_Format_0____Control1120051
+
+
+ BillReference
+
+
+ IssueCity
+
+
+ AmountText
+
+
+ IssueDate
+
+
+ PaymtHeader__Bank_Branch_No__
+
+
+ PaymtHeader__Agency_Code_
+
+
+ PaymtHeader__Bank_Account_No__
+
+
+ PaymtHeader__Bank_Name_
+
+
+ Payment_Line__Due_Date_
+
+
+ Payment_Line_No_
+
+
+ Payment_Line_Line_No_
+
+
+ OK_FOR_ENDORSMENTCaption
+
+
+ of_SUBSCRIBERCaption
+
+
+ Stamp_Allow_and_SignatureCaption
+
+
+ ADDRESSCaption
+
+
+ NAME_andCaption
+
+
+ Value_in__Caption
+
+
+ SUBSCRIBER_S_R_I_B_Caption
+
+
+ DOMICILIATIONCaption
+
+
+ TOCaption
+
+
+ ONCaption
+
+
+ AMOUNT_FOR_CONTROLCaption
+
+
+ CREATION_DATECaption
+
+
+ DUE_DATECaption
+
+
+ DRAFTCaption
+
+
+ SUBSCRIBER_REF_Caption
+
+
+ DRAFTCaption_Control1120002
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DraftFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftFR.Report.al
new file mode 100644
index 0000000000..fa5da28eb7
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftFR.Report.al
@@ -0,0 +1,242 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+
+report 10836 "Draft FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Draft.rdlc';
+ Caption = 'Draft';
+
+ dataset
+ {
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemTableView = where("Account Type" = filter(Vendor), Marked = const(true));
+ RequestFilterHeading = 'Payment lines';
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CompanyAddr_7_; CompanyAddr[7])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(PaymtHeader__Bank_Post_Code_; PaymtHeader."Bank Post Code")
+ {
+ }
+ column(CONVERTSTR_FORMAT_PaymtHeader__RIB_Key__2_______0__; ConvertStr(Format(PaymtHeader."RIB Key", 2), ' ', '0'))
+ {
+ }
+ column(PostingDate; Format(PostingDate))
+ {
+ }
+ column(FORMAT_Amount_0___Precision_2___Standard_Format_0___; '****' + Format(Amount, 0, ''))
+ {
+ }
+ column(FORMAT_Amount_0___Precision_2___Standard_Format_0____Control1120051; '****' + Format(Amount, 0, ''))
+ {
+ }
+ column(BillReference; BillReference)
+ {
+ }
+ column(IssueCity; Issue_City)
+ {
+ }
+ column(AmountText; AmountText)
+ {
+ }
+ column(IssueDate; Format(Issue_Date))
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.")
+ {
+ }
+ column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code")
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.")
+ {
+ }
+ column(PaymtHeader__Bank_Name_; PaymtHeader."Bank Name")
+ {
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(Payment_Line_No_; "No.")
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(OK_FOR_ENDORSMENTCaption; OK_FOR_ENDORSMENTCaptionLbl)
+ {
+ }
+ column(of_SUBSCRIBERCaption; of_SUBSCRIBERCaptionLbl)
+ {
+ }
+ column(Stamp_Allow_and_SignatureCaption; Stamp_Allow_and_SignatureCaptionLbl)
+ {
+ }
+ column(ADDRESSCaption; ADDRESSCaptionLbl)
+ {
+ }
+ column(NAME_andCaption; NAME_andCaptionLbl)
+ {
+ }
+ column(Value_in__Caption; Value_in__CaptionLbl)
+ {
+ }
+ column(SUBSCRIBER_S_R_I_B_Caption; SUBSCRIBER_S_R_I_B_CaptionLbl)
+ {
+ }
+ column(DOMICILIATIONCaption; DOMICILIATIONCaptionLbl)
+ {
+ }
+ column(TOCaption; TOCaptionLbl)
+ {
+ }
+ column(ONCaption; ONCaptionLbl)
+ {
+ }
+ column(AMOUNT_FOR_CONTROLCaption; AMOUNT_FOR_CONTROLCaptionLbl)
+ {
+ }
+ column(CREATION_DATECaption; CREATION_DATECaptionLbl)
+ {
+ }
+ column(DUE_DATECaption; DUE_DATECaptionLbl)
+ {
+ }
+ column(DRAFTCaption; DRAFTCaptionLbl)
+ {
+ }
+ column(SUBSCRIBER_REF_Caption; SUBSCRIBER_REF_CaptionLbl)
+ {
+ }
+ column(DRAFTCaption_Control1120002; DRAFTCaption_Control1120002Lbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ GLSetup.Get();
+
+ PaymtHeader.Get("No.");
+
+ PostingDate := PaymtHeader."Posting Date";
+
+ GLSetup.Get();
+ if Issue_Date = 0D then
+ Issue_Date := WorkDate();
+
+ FormatAddress.Company(CompanyAddr, CompanyInfo);
+
+ if "Currency Code" = '' then
+ AmountText := Text001Lbl + ' €'
+ else
+ AmountText := Text001Lbl + ' ' + "Currency Code";
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ CompanyInfo.Get();
+ CompanyInfo.TestField("Default Bank Account No.");
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = true;
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(IssueDate; Issue_Date)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Issue date';
+ ToolTip = 'Specifies the name of the city where the promissory note will be issued.';
+ }
+ field(IssueCity; Issue_City)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Issue city';
+ ToolTip = 'Specifies the name of the city where the promissory note will be issued.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnOpenPage()
+ begin
+ CompanyInfo.Get();
+ Issue_City := CompanyInfo.City;
+ Issue_Date := WorkDate();
+ end;
+ }
+
+ labels
+ {
+ Against_the_present_DRAFT_noted_as_NO_CHARGES__we_will_pay_the_indicated_sum_below_toCaption = 'Against the present DRAFT noted as NO CHARGES, we will pay the indicated sum below to :';
+ }
+
+ var
+ CompanyInfo: Record "Company Information";
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ FormatAddress: Codeunit "Format Address";
+ CompanyAddr: array[8] of Text[100];
+ Issue_City: Text[30];
+ Issue_Date: Date;
+ BillReference: Code[10];
+ PostingDate: Date;
+ Text001Lbl: Label 'Amount';
+ AmountText: Text[30];
+ OK_FOR_ENDORSMENTCaptionLbl: Label 'OK FOR ENDORSMENT';
+ of_SUBSCRIBERCaptionLbl: Label 'of SUBSCRIBER', Comment = 'NAME and ADDRESS of SUBSCRIBER';
+ Stamp_Allow_and_SignatureCaptionLbl: Label 'Stamp Allow and Signature';
+ ADDRESSCaptionLbl: Label 'ADDRESS';
+ NAME_andCaptionLbl: Label 'NAME and';
+ Value_in__CaptionLbl: Label 'Value in :';
+ SUBSCRIBER_S_R_I_B_CaptionLbl: Label 'SUBSCRIBER''S R.I.B.';
+ DOMICILIATIONCaptionLbl: Label 'DOMICILIATION', Comment = 'Translate domiciliation and uppecase the result';
+ TOCaptionLbl: Label 'TO';
+ ONCaptionLbl: Label 'ON';
+ AMOUNT_FOR_CONTROLCaptionLbl: Label 'AMOUNT FOR CONTROL';
+ CREATION_DATECaptionLbl: Label 'CREATION DATE';
+ DUE_DATECaptionLbl: Label 'DUE DATE';
+ DRAFTCaptionLbl: Label 'DRAFT';
+ SUBSCRIBER_REF_CaptionLbl: Label 'SUBSCRIBER REF.';
+ DRAFTCaption_Control1120002Lbl: Label 'DRAFT', Comment = 'Translate draft and uppecase the result';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Draftnotice.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftnotice.rdlc
new file mode 100644
index 0000000000..cd79e8159d
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftnotice.rdlc
@@ -0,0 +1,3289 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ f0dc2411-2b95-4ff9-abf8-6a3e34bdcc09
+
+
+
+
+
+
+
+
+
+
+ 16.35cm
+
+
+
+
+ 14.382cm
+
+
+
+
+
+
+
+
+
+ 1.95cm
+
+
+ 1.2cm
+
+
+ 3cm
+
+
+ 2.55cm
+
+
+ 1.35cm
+
+
+ 0.9cm
+
+
+ 0.78cm
+
+
+ 1.47cm
+
+
+ 2.4cm
+
+
+ 0.75cm
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox8
+ 93
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!STRSUBSTNO_Text002_CopyText_.Value)
+
+
+
+
+
+ 92
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox205
+ 88
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_1_.Value)
+
+
+
+
+
+ 87
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox200
+ 86
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_2_.Value)
+
+
+
+
+
+ 85
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox102
+ 84
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_3_.Value)
+
+
+
+
+
+ 83
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox94
+ 82
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_4_.Value)
+
+
+
+
+
+ 81
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox86
+ 80
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_5_.Value)
+
+
+
+
+
+ 79
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox78
+ 78
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_1_.Value)
+
+
+
+
+
+ 77
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_6_.Value)
+
+
+
+
+
+ 76
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox70
+ 75
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_2_.Value)
+
+
+
+
+
+ 74
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__Caption.Value)
+
+
+
+
+
+ 73
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__.Value)
+
+
+
+
+
+ 72
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox62
+ 71
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_3_.Value)
+
+
+
+
+
+ 70
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__Caption.Value)
+
+
+
+
+
+ 69
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__.Value)
+
+
+
+
+
+ 68
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox54
+ 67
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_4_.Value)
+
+
+
+
+
+ 66
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value)
+
+
+
+
+
+ 65
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__.Value)
+
+
+
+
+
+ 64
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox46
+ 63
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_5_.Value)
+
+
+
+
+
+ 62
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox27
+ 61
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_6_.Value)
+
+
+
+
+
+ 60
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__SWIFT_Code__Caption.Value)
+
+
+
+
+
+ 59
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader_SWIFT_Code.Value)
+
+
+
+
+
+
+ 58
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox280
+ 57
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!VendAddr_7_.Value)
+
+
+
+
+
+ 56
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__IBAN__Caption.Value)
+
+
+
+
+
+ 52
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader_IBAN.Value)
+
+
+
+
+
+
+ 51
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox286
+ 49
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Lines1___No__Caption.Value)
+
+
+
+
+
+ 48
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Lines1___No__.Value)
+
+
+
+
+
+
+ 47
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox22
+ 46
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCodeCaption.Value)
+
+
+
+
+
+ 45
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+
+ 44
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox5
+ 43
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!FORMAT_PostingDate_0_4_.Value)
+
+
+
+
+
+
+ 42
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox9
+ 41
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox67
+ 40
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!HeaderText1.Value)
+
+
+
+
+
+ 39
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox43
+ 38
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Document_No__.Value
+
+
+
+
+
+
+ 37
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Payment_Class_Name_.Value
+
+
+
+
+
+ 36
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__External_Document_No__.Value
+
+
+
+
+
+
+ 35
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PostingDate.Value
+
+
+
+
+
+ 34
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+ 33
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ABS_Amount_.Value
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode.Value
+
+
+
+
+
+
+ 31
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox3
+ 30
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!HeaderText2.Value)
+
+
+
+
+
+ 29
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox16
+ 28
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Vendor_Ledger_Entry__Document_No__Caption.Value)
+
+
+
+
+
+ 27
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Vendor_Ledger_Entry_DescriptionCaption.Value)
+
+
+
+
+
+ 26
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Vendor_Ledger_Entry__External_Document_No__Caption.Value)
+
+
+
+
+
+ 25
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Vendor_Ledger_Entry__Posting_Date_Caption.Value)
+
+
+
+
+
+
+ 24
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Vendor_Ledger_Entry__Due_Date_Caption.Value)
+
+
+
+
+
+
+ 23
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!ABS__Remaining_Amount___Control1120059Caption.Value)
+
+
+
+
+
+
+ 22
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox2
+ 21
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry__Document_No__.Value
+
+
+
+
+
+
+ 13
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry_Description.Value
+
+
+
+
+
+ 12
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry__External_Document_No__.Value
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry__Posting_Date_.Value
+
+
+
+
+
+ 10
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry__Due_Date_.Value
+
+
+
+
+
+ 9
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ABS__Remaining_Amount__.Value
+
+
+
+
+
+ 8
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Ledger_Entry__Currency_Code_.Value
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox18
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Draft_Notice_AmountCaption.Value)
+
+
+
+
+
+ 5
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 4
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Last(Fields!TotalDraftAmount.Value)
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 6
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =1
+
+
+ Between
+
+
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+
+
+ =Fields!Payment_Line_No_.Value
+ =Fields!Payment_Line_Line_No_.Value
+
+
+
+
+ After
+ true
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+ After
+ true
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+ After
+ true
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+ After
+ true
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+ After
+ true
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+ After
+ true
+
+
+
+ Detail
+
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+
+
+
+ =iif(IsNothing(Fields!Vendor_Ledger_Entry_Entry_No_.Value), TRUE, FALSE)
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+
+
+ DataSet_Result
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Vendor__No__.Value
+ =Fields!CopyLoop_Number.Value
+ =Fields!Bank_Account_Buffer___Customer_No__.Value
+ =Fields!Bank_Account_Buffer___Bank_Branch_No__.Value
+ =Fields!Bank_Account_Buffer___Agency_Code_.Value
+ =Fields!Bank_Account_Buffer___Bank_Account_No__.Value
+ =Fields!Payment_Line_Payment_Address_Code.Value
+
+
+ Output
+ true
+
+
+
+ DataSet_Result
+
+
+ =IsNothing(Fields!STRSUBSTNO_Text002_CopyText_.Value)
+ Equal
+
+ =false
+
+
+
+
+
+ 14.382cm
+
+ 16.35cm
+
+
+ 0.423cm
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+ 10.05cm
+ 0.423cm
+ 1.68cm
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Cm
+ b87ff072-faf0-434b-be65-900eb0f1d3f9
+
+
+
+
+ Payment_Lines1_No_
+
+
+ Payment_Lines1_Line_No_
+
+
+ Vendor_No_
+
+
+ Bank_Account_Buffer_Customer_No_
+
+
+ Bank_Account_Buffer_Bank_Branch_No_
+
+
+ Bank_Account_Buffer_Agency_Code
+
+
+ Bank_Account_Buffer_Bank_Account_No_
+
+
+ FORMAT_PostingDate_0_4_
+
+
+ Payment_Lines1___No__
+
+
+ PaymtHeader_IBAN
+
+
+ VendAddr_7_
+
+
+ PaymtHeader_SWIFT_Code
+
+
+ VendAddr_6_
+
+
+ CompanyInformation__VAT_Registration_No__
+
+
+ VendAddr_5_
+
+
+ CompanyInformation__Fax_No__
+
+
+ VendAddr_4_
+
+
+ CompanyInformation__Phone_No__
+
+
+ VendAddr_3_
+
+
+ CompanyAddr_6_
+
+
+ VendAddr_2_
+
+
+ CompanyAddr_5_
+
+
+ VendAddr_1_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_1_
+
+
+ STRSUBSTNO_Text002_CopyText_
+
+
+ PrintCurrencyCode
+
+
+ OutputNo
+
+
+ Vendor__No__
+
+
+ CopyLoop_Number
+
+
+ Bank_Account_Buffer___Agency_Code_
+
+
+ Bank_Account_Buffer___Customer_No__
+
+
+ Bank_Account_Buffer___Bank_Branch_No__
+
+
+ Bank_Account_Buffer___Bank_Account_No__
+
+
+ HeaderText1
+
+
+ PrintCurrencyCode_Control1120069
+
+
+ ABS_Amount_
+
+
+ ABS_Amount_Format
+
+
+ Payment_Line__Due_Date_
+
+
+ PostingDate
+
+
+ Payment_Line__External_Document_No__
+
+
+ PaymtHeader__Payment_Class_Name_
+
+
+ Payment_Line__Document_No__
+
+
+ PrintCurrencyCode_Control1120064
+
+
+ DraftAmount
+
+
+ DraftAmountFormat
+
+
+ TotalDraftAmount
+
+
+ TotalDraftAmountFormat
+
+
+ Payment_Line_No_
+
+
+ Payment_Line_Line_No_
+
+
+ Payment_Line_Payment_Address_Code
+
+
+ Payment_Line_Account_No_
+
+
+ Payment_Line_Bank_Branch_No_
+
+
+ Payment_Line_Agency_Code
+
+
+ Payment_Line_Bank_Account_No_
+
+
+ Payment_Line_Applies_to_ID
+
+
+ Payment_Lines1___No__Caption
+
+
+ PaymtHeader__IBAN__Caption
+
+
+ PaymtHeader__SWIFT_Code__Caption
+
+
+ CompanyInformation__VAT_Registration_No__Caption
+
+
+ CompanyInformation__Fax_No__Caption
+
+
+ CompanyInformation__Phone_No__Caption
+
+
+ PrintCurrencyCodeCaption
+
+
+ Draft_Notice_AmountCaption
+
+
+ HeaderText2
+
+
+ ABS__Remaining_Amount__
+
+
+ ABS__Remaining_Amount__Format
+
+
+ PrintCurrencyCode_Control1120060
+
+
+ Vendor_Ledger_Entry__Currency_Code_
+
+
+ ABS__Remaining_Amount___Control1120059
+
+
+ ABS__Remaining_Amount___Control1120059Format
+
+
+ Vendor_Ledger_Entry__Document_No__
+
+
+ Vendor_Ledger_Entry_Description
+
+
+ Vendor_Ledger_Entry__External_Document_No__
+
+
+ Vendor_Ledger_Entry__Posting_Date_
+
+
+ Vendor_Ledger_Entry__Due_Date_
+
+
+ ABS__Remaining_Amount___Control1120036
+
+
+ ABS__Remaining_Amount___Control1120036Format
+
+
+ PrintCurrencyCode_Control1120063
+
+
+ Vendor_Ledger_Entry_Entry_No_
+
+
+ Vendor_Ledger_Entry_Vendor_No_
+
+
+ Vendor_Ledger_Entry_Applies_to_ID
+
+
+ Vendor_Ledger_Entry__Document_No__Caption
+
+
+ Vendor_Ledger_Entry_DescriptionCaption
+
+
+ Vendor_Ledger_Entry__External_Document_No__Caption
+
+
+ Vendor_Ledger_Entry__Posting_Date_Caption
+
+
+ Vendor_Ledger_Entry__Due_Date_Caption
+
+
+ ABS__Remaining_Amount___Control1120059Caption
+
+
+ ReportCaption
+
+
+ ReportCaption_Control1120015
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al
new file mode 100644
index 0000000000..0595db1c7f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftnoticeFR.Report.al
@@ -0,0 +1,498 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using System.Utilities;
+
+report 10837 "Draft notice FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Draftnotice.rdlc';
+ Caption = 'Draft notice';
+
+ dataset
+ {
+ dataitem("Payment Lines1"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.") where(Marked = const(true));
+ column(Payment_Lines1_No_; "No.")
+ {
+ }
+ column(Payment_Lines1_Line_No_; "Line No.")
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtHeader.Get("No.");
+ PaymtHeader.CalcFields("Payment Class Name");
+ PostingDate := PaymtHeader."Posting Date";
+
+ BankAccountBuffer.Init();
+ BankAccountBuffer."Customer No." := "Account No.";
+ BankAccountBuffer."Bank Branch No." := "Bank Branch No.";
+ BankAccountBuffer."Agency Code" := "Agency Code";
+ BankAccountBuffer."Bank Account No." := "Bank Account No.";
+ if not BankAccountBuffer.Insert() then;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", TransfertNo);
+ end;
+ }
+ dataitem(Vendor; Vendor)
+ {
+ DataItemTableView = sorting("No.");
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.";
+ column(Vendor_No_; "No.")
+ {
+ }
+ dataitem(CopyLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number);
+ dataitem("Bank Account Buffer"; "Bank Account Buffer FR")
+ {
+ DataItemTableView = sorting("Customer No.", "Bank Branch No.", "Agency Code", "Bank Account No.");
+ column(Bank_Account_Buffer_Customer_No_; "Customer No.")
+ {
+ }
+ column(Bank_Account_Buffer_Bank_Branch_No_; "Bank Branch No.")
+ {
+ }
+ column(Bank_Account_Buffer_Agency_Code; "Agency Code")
+ {
+ }
+ column(Bank_Account_Buffer_Bank_Account_No_; "Bank Account No.")
+ {
+ }
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemLink = "Account No." = field("Customer No."), "Bank Branch No." = field("Bank Branch No."), "Agency Code" = field("Agency Code"), "Bank Account No." = field("Bank Account No.");
+ DataItemLinkReference = "Bank Account Buffer";
+ DataItemTableView = sorting("No.", "Account No.", "Bank Branch No.", "Agency Code", "Bank Account No.", "Payment Address Code") where(Marked = const(true));
+ column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4))
+ {
+ }
+ column(Payment_Lines1___No__; "Payment Lines1"."No.")
+ {
+ }
+ column(PaymtHeader_IBAN; PaymtHeader.IBAN)
+ {
+ }
+ column(VendAddr_7_; VendAddr[7])
+ {
+ }
+ column(PaymtHeader_SWIFT_Code; PaymtHeader."SWIFT Code")
+ {
+ }
+ column(VendAddr_6_; VendAddr[6])
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.")
+ {
+ }
+ column(VendAddr_5_; VendAddr[5])
+ {
+ }
+ column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.")
+ {
+ }
+ column(VendAddr_4_; VendAddr[4])
+ {
+ }
+ column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.")
+ {
+ }
+ column(VendAddr_3_; VendAddr[3])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(VendAddr_2_; VendAddr[2])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(VendAddr_1_; VendAddr[1])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(STRSUBSTNO_Text002_CopyText_; StrSubstNo(Text002Lbl, CopyText))
+ {
+ }
+ column(PrintCurrencyCode; PrintCurrencyCode())
+ {
+ }
+ column(OutputNo; OutputNo)
+ {
+ }
+ column(Vendor__No__; Vendor."No.")
+ {
+ }
+ column(CopyLoop_Number; CopyLoop.Number)
+ {
+ }
+ column(Bank_Account_Buffer___Agency_Code_; "Bank Account Buffer"."Agency Code")
+ {
+ }
+ column(Bank_Account_Buffer___Customer_No__; "Bank Account Buffer"."Customer No.")
+ {
+ }
+ column(Bank_Account_Buffer___Bank_Branch_No__; "Bank Account Buffer"."Bank Branch No.")
+ {
+ }
+ column(Bank_Account_Buffer___Bank_Account_No__; "Bank Account Buffer"."Bank Account No.")
+ {
+ }
+ column(HeaderText1; HeaderText1)
+ {
+ }
+ column(PrintCurrencyCode_Control1120069; PrintCurrencyCode())
+ {
+ }
+ column(ABS_Amount_; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(PostingDate; Format(PostingDate))
+ {
+ }
+ column(Payment_Line__External_Document_No__; "External Document No.")
+ {
+ }
+ column(PaymtHeader__Payment_Class_Name_; PaymtHeader."Payment Class Name")
+ {
+ }
+ column(Payment_Line__Document_No__; "Document No.")
+ {
+ }
+ column(PrintCurrencyCode_Control1120064; PrintCurrencyCode())
+ {
+ }
+ column(DraftAmount; DraftAmount)
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(TotalDraftAmount; TotalDraftAmount)
+ {
+ }
+ column(Payment_Line_No_; "No.")
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(Payment_Line_Payment_Address_Code; "Payment Address Code")
+ {
+ }
+ column(Payment_Line_Account_No_; "Account No.")
+ {
+ }
+ column(Payment_Line_Bank_Branch_No_; "Bank Branch No.")
+ {
+ }
+ column(Payment_Line_Agency_Code; "Agency Code")
+ {
+ }
+ column(Payment_Line_Bank_Account_No_; "Bank Account No.")
+ {
+ }
+ column(Payment_Line_Applies_to_ID; "Applies-to ID")
+ {
+ }
+ column(Payment_Lines1___No__Caption; Payment_Lines1___No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__IBAN__Caption; PaymtHeader__IBAN__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code__Caption; PaymtHeader__SWIFT_Code__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl)
+ {
+ }
+ column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl)
+ {
+ }
+ column(Draft_Notice_AmountCaption; Draft_Notice_AmountCaptionLbl)
+ {
+ }
+ dataitem("Vendor Ledger Entry"; "Vendor Ledger Entry")
+ {
+ CalcFields = "Remaining Amount";
+ DataItemLink = "Vendor No." = field("Account No."), "Applies-to ID" = field("Applies-to ID");
+ DataItemLinkReference = "Payment Line";
+ DataItemTableView = sorting("Document No.");
+ column(HeaderText2; HeaderText2Lbl)
+ {
+ }
+ column(ABS__Remaining_Amount__; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120060; PrintCurrencyCode())
+ {
+ }
+ column(Vendor_Ledger_Entry__Currency_Code_; "Currency Code")
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120059; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Vendor_Ledger_Entry__Document_No__; "Document No.")
+ {
+ }
+ column(Vendor_Ledger_Entry_Description; Description)
+ {
+ }
+ column(Vendor_Ledger_Entry__External_Document_No__; "External Document No.")
+ {
+ }
+ column(Vendor_Ledger_Entry__Posting_Date_; Format("Posting Date"))
+ {
+ }
+ column(Vendor_Ledger_Entry__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120036; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120063; PrintCurrencyCode())
+ {
+ }
+ column(Vendor_Ledger_Entry_Entry_No_; "Entry No.")
+ {
+ }
+ column(Vendor_Ledger_Entry_Vendor_No_; "Vendor No.")
+ {
+ }
+ column(Vendor_Ledger_Entry_Applies_to_ID; "Applies-to ID")
+ {
+ }
+ column(Vendor_Ledger_Entry__Document_No__Caption; FieldCaption("Document No."))
+ {
+ }
+ column(Vendor_Ledger_Entry_DescriptionCaption; FieldCaption(Description))
+ {
+ }
+ column(Vendor_Ledger_Entry__External_Document_No__Caption; FieldCaption("External Document No."))
+ {
+ }
+ column(Vendor_Ledger_Entry__Posting_Date_Caption; Vendor_Ledger_Entry__Posting_Date_CaptionLbl)
+ {
+ }
+ column(Vendor_Ledger_Entry__Due_Date_Caption; Vendor_Ledger_Entry__Due_Date_CaptionLbl)
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120059Caption; ABS__Remaining_Amount___Control1120059CaptionLbl)
+ {
+ }
+ column(ReportCaption; ReportCaptionLbl)
+ {
+ }
+ column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if "Payment Line"."Applies-to ID" = '' then
+ CurrReport.Skip()
+ ;
+ if "Currency Code" = '' then
+ "Currency Code" := GLSetup."LCY Code";
+
+ DraftCounting := DraftCounting + 1;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtAddr: Record "Payment Address FR";
+ PaymtManagt: Codeunit "Payment Management FR";
+ begin
+ HeaderText1 := StrSubstNo(Text004Lbl, "Bank Account Name", "SWIFT Code",
+ "Agency Code", IBAN, PostingDate);
+ DraftCounting := 0;
+
+ TotalDraftAmount := TotalDraftAmount + Abs(Amount);
+
+ if "Payment Address Code" = '' then
+ FormatAddress.Vendor(VendAddr, Vendor)
+ else
+ if PaymtAddr.Get("Account Type"::Vendor, "Account No.", "Payment Address Code") then
+ PaymtManagt.PaymentAddr(VendAddr, PaymtAddr);
+
+ DraftAmount := Abs(Amount);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", TransfertNo);
+ SetRange("Account No.", Vendor."No.");
+
+ TotalDraftAmount := 0;
+ Clear(DraftAmount);
+ end;
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if Number > 1 then begin
+ CopyText := Text001Lbl;
+ OutputNo := OutputNo + 1;
+ end;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ OutputNo := 1;
+ LoopsNumber := Abs(CopiesNumber) + 1;
+ CopyText := '';
+ SetRange(Number, 1, LoopsNumber);
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtLine.Reset();
+ PaymtLine.SetRange("No.", TransfertNo);
+ PaymtLine.SetRange("Account No.", "No.");
+ if not PaymtLine.FindFirst() then
+ CurrReport.Skip();
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(NumberOfCopies; CopiesNumber)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Number of copies';
+ ToolTip = 'Specifies the number of copies to print.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ begin
+ BankAccountBuffer.DeleteAll();
+ end;
+
+ trigger OnPreReport()
+ begin
+ TransfertNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(TransfertNo));
+ if TransfertNo = '' then
+ Error(Text000Lbl);
+
+ CompanyInformation.Get();
+ FormatAddress.Company(CompanyAddr, CompanyInformation);
+ GLSetup.Get();
+ end;
+
+ var
+ CompanyInformation: Record "Company Information";
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ PaymtLine: Record "Payment Line FR";
+ BankAccountBuffer: Record "Bank Account Buffer FR";
+ FormatAddress: Codeunit "Format Address";
+ VendAddr: array[8] of Text[100];
+ CompanyAddr: array[8] of Text[100];
+ LoopsNumber: Integer;
+ CopiesNumber: Integer;
+ CopyText: Text;
+ DraftAmount: Decimal;
+ TotalDraftAmount: Decimal;
+ DraftCounting: Decimal;
+ TransfertNo: Code[20];
+ HeaderText1: Text;
+ PostingDate: Date;
+ Text000Lbl: Label 'You must specify a transfer number.';
+ Text001Lbl: Label 'COPY';
+ Text002Lbl: Label 'Draft notice %1', Comment = '%1 = copy';
+ Text004Lbl: Label 'A transfer to your bank account %1 (RIB : %2 %3 %4) has been done on %5.', Comment = '%1 = name, %2 = SWIFT Code, %3 = Agency Code, %4 = IBAN, %5 = Posting Date ';
+ HeaderText2Lbl: Label 'This transfer is related to these invoices :';
+ OutputNo: Integer;
+ Payment_Lines1___No__CaptionLbl: Label 'Draft No.';
+ PaymtHeader__IBAN__CaptionLbl: Label 'IBAN', Locked = true;
+ PaymtHeader__SWIFT_Code__CaptionLbl: Label 'SWIFT Code';
+ CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.';
+ CompanyInformation__Fax_No__CaptionLbl: Label 'FAX No.';
+ CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.';
+ PrintCurrencyCodeCaptionLbl: Label 'Currency Code';
+ Draft_Notice_AmountCaptionLbl: Label 'Draft Notice Amount';
+ Vendor_Ledger_Entry__Posting_Date_CaptionLbl: Label 'Posting Date';
+ Vendor_Ledger_Entry__Due_Date_CaptionLbl: Label 'Due Date';
+ ABS__Remaining_Amount___Control1120059CaptionLbl: Label 'Amount';
+ ReportCaptionLbl: Label 'Report';
+ ReportCaption_Control1120015Lbl: Label 'Report';
+
+
+ procedure PrintCurrencyCode(): Code[10]
+ begin
+ if "Payment Lines1"."Currency Code" = '' then
+ exit(GLSetup."LCY Code");
+
+ exit("Payment Lines1"."Currency Code");
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc
new file mode 100644
index 0000000000..98048ccf6b
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Draftrecapitulation.rdlc
@@ -0,0 +1,3913 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ 6b4e2b63-1565-4e2e-acfd-6000be3dc6d9
+
+
+
+
+
+
+
+
+
+
+ 1.79409cm
+
+
+ 0.6524cm
+
+
+ 0.97859cm
+
+
+ 2.06592cm
+
+
+ 1.63099cm
+
+
+ 2.12029cm
+
+
+ 1.35916cm
+
+
+ 1.46789cm
+
+
+ 0.6524cm
+
+
+ 1.30479cm
+
+
+ 0.4893cm
+
+
+ 1.30479cm
+
+
+ 1.14169cm
+
+
+ 0.8155cm
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox92
+ 91
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!STRSUBSTNO_Text001_CopyText_.Value)
+
+
+
+
+
+ textbox98
+ 90
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox84
+ 86
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_1_.Value)
+
+
+
+
+
+ textbox76
+ 85
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox80
+ 84
+
+
+ 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_2_.Value)
+
+
+
+
+
+ textbox68
+ 83
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox72
+ 82
+
+
+ 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_3_.Value)
+
+
+
+
+
+ textbox52
+ 81
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox64
+ 80
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_1_.Value)
+
+
+
+
+
+ 75
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_4_.Value)
+
+
+
+
+
+ textbox44
+ 79
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox48
+ 78
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_2_.Value)
+
+
+
+
+
+ 72
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_5_.Value)
+
+
+
+
+
+ textbox36
+ 77
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox40
+ 76
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_3_.Value)
+
+
+
+
+
+ 68
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_6_.Value)
+
+
+
+
+
+ textbox28
+ 74
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox32
+ 73
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_4_.Value)
+
+
+
+
+
+ 64
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__Caption.Value)
+
+
+
+
+
+ textbox20
+ 71
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__.Value)
+
+
+
+
+
+ textbox21
+ 70
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox24
+ 69
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_5_.Value)
+
+
+
+
+
+ 60
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__Caption.Value)
+
+
+
+
+
+ textbox220
+ 67
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__.Value)
+
+
+
+
+
+ textbox221
+ 66
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox224
+ 65
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_6_.Value)
+
+
+
+
+
+ 58
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value)
+
+
+
+
+
+ textbox212
+ 63
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__.Value)
+
+
+
+
+
+ textbox213
+ 62
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox216
+ 61
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_7_.Value)
+
+
+
+
+
+ 56
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox204
+ 59
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox196
+ 57
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Branch_No__Caption.Value)
+
+
+
+
+
+ textbox186
+ 53
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Branch_No__.Value)
+
+
+
+
+
+ textbox284
+ 52
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox188
+ 55
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Agency_Code_Caption.Value)
+
+
+
+
+
+ textbox178
+ 50
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Agency_Code_.Value)
+
+
+
+
+
+ textbox285
+ 49
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox180
+ 54
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Account_No__Caption.Value)
+
+
+
+
+
+ 47
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Account_No__.Value)
+
+
+
+
+
+ 46
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox172
+ 51
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBANCaption.Value
+
+
+
+
+
+ 47
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBAN.Value
+
+
+
+
+
+ 46
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox164
+ 48
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_Caption.Value
+
+
+
+
+
+ 47
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_.Value
+
+
+
+
+
+ 46
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox156
+ 45
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__RIB_Key_Caption.Value)
+
+
+
+
+
+ 44
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__RIB_Key_.Value)
+
+
+
+
+
+
+ 43
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox148
+ 42
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__National_Issuer_No__Caption.Value)
+
+
+
+
+
+ 41
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__National_Issuer_No__.Value)
+
+
+
+
+
+ 40
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__No__Caption.Value)
+
+
+
+
+
+ textbox140
+ 39
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__No__.Value)
+
+
+
+
+
+ textbox142
+ 38
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox144
+ 37
+
+
+ 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCodeCaption.Value)
+
+
+
+
+
+ textbox132
+ 36
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+ textbox134
+ 35
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox136
+ 34
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!FORMAT_PostingDate_0_4_.Value)
+
+
+
+
+
+ textbox261
+ 33
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox108
+ 32
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.63492cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__Account_No__Caption.Value)
+
+
+
+
+
+
+ 31
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Vendor_NameCaption.Value)
+
+
+
+
+
+ 30
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__Bank_Account_Name_Caption.Value)
+
+
+
+
+
+ 29
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Bank_AccountCaption.Value)
+
+
+
+
+
+ 28
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!ABS_Amount__Control1120031Caption.Value)
+
+
+
+
+
+
+ 27
+
+
+ 3
+
+
+
+
+
+
+
+ 0.63492cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox4
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__SWIFT_Code_Caption.Value)
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines_IBANCaption.Value)
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox19
+
+
+ 3
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox10
+ 26
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Account_No__.Value
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Vendor_Name.Value
+
+
+
+
+
+ 6
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Account_Name_.Value
+
+
+
+
+
+ 5
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Branch_No__.Value
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Agency_Code_.Value
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Account_No__.Value
+
+
+
+
+
+ 2
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ABS_Amount_.Value
+
+
+
+
+
+ 1
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode_Control1120060.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox5
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__SWIFT_Code_.Value
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines_IBAN.Value
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox33
+
+
+ 3
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox78
+ 8
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!TotalCaption.Value)
+
+
+
+
+
+ 13
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox387
+ 12
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =iif(CountRows() > 1, CStr(CountRows())+Fields!Text005.Value, CStr(CountRows())+Fields!Text004.Value)
+
+
+
+
+
+ 11
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!DraftAmount.Value)
+
+
+
+
+
+ 10
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!PrintCurrencyCode_Control1120060.Value)
+
+
+
+
+
+
+ 9
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox1
+ 14
+
+
+ 14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox2
+ 18
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!Done_at__Caption.Value)
+
+
+
+
+
+ 17
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!CompanyInformation_City.Value)
+
+
+
+
+
+
+ 16
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox30
+ 15
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox41
+ 22
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!On__Caption.Value)
+
+
+
+
+
+ 21
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!FORMAT_PostingDate_0_4__Control1120034.Value)
+
+
+
+
+
+
+ 20
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox31
+ 19
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox57
+ 25
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!Signature__Caption.Value)
+
+
+
+
+
+ 24
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox67
+ 23
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Payment_Lines1_No_.Value
+ =Fields!OutputNo.Value
+
+
+ End
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines_No_.Value
+
+
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+
+ Detail
+
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+
+
+
+
+ DataSet_Result
+ 14.80584cm
+
+
+ 15.22884cm
+
+ 17.7778cm
+
+
+ 0.423cm
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+
+ textbox305
+ 9.24228cm
+ 0.423cm
+ 2.82705cm
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Invalid
+ ec48afd7-2e28-4f0f-8566-7e90261e520c
+
+
+
+
+ Payment_Lines1_No_
+
+
+ Payment_Lines1_Line_No_
+
+
+ PaymtHeader__No__
+
+
+ STRSUBSTNO_Text001_CopyText_
+
+
+ CompanyAddr_1_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_5_
+
+
+ CompanyAddr_6_
+
+
+ CompanyInformation__Phone_No__
+
+
+ CompanyInformation__Fax_No__
+
+
+ CompanyInformation__VAT_Registration_No__
+
+
+ FORMAT_PostingDate_0_4_
+
+
+ BankAccountAddr_4_
+
+
+ BankAccountAddr_5_
+
+
+ BankAccountAddr_6_
+
+
+ BankAccountAddr_7_
+
+
+ BankAccountAddr_3_
+
+
+ BankAccountAddr_2_
+
+
+ BankAccountAddr_1_
+
+
+ PrintCurrencyCode
+
+
+ PaymtHeader__Bank_Branch_No__
+
+
+ PaymtHeader__Agency_Code_
+
+
+ PaymtHeader__Bank_Account_No__
+
+
+ PaymtHeader__RIB_Key_
+
+
+ PaymtHeader__National_Issuer_No__
+
+
+ OutputNo
+
+
+ PaymtHeader_IBAN
+
+
+ PaymtHeader__SWIFT_Code_
+
+
+ PageLoop_Number
+
+
+ PaymtHeader__No__Caption
+
+
+ CompanyInformation__Phone_No__Caption
+
+
+ CompanyInformation__Fax_No__Caption
+
+
+ CompanyInformation__VAT_Registration_No__Caption
+
+
+ PrintCurrencyCodeCaption
+
+
+ PaymtHeader__Bank_Branch_No__Caption
+
+
+ PaymtHeader__Agency_Code_Caption
+
+
+ PaymtHeader__Bank_Account_No__Caption
+
+
+ PaymtHeader__RIB_Key_Caption
+
+
+ PaymtHeader__National_Issuer_No__Caption
+
+
+ PaymtHeader_IBANCaption
+
+
+ PaymtHeader__SWIFT_Code_Caption
+
+
+ ABS_Amount_
+
+
+ ABS_Amount_Format
+
+
+ PrintCurrencyCode_Control1120060
+
+
+ Vendor_Name
+
+
+ Payment_Lines__Bank_Branch_No__
+
+
+ ABS_Amount__Control1120031
+
+
+ ABS_Amount__Control1120031Format
+
+
+ Payment_Lines__Bank_Account_Name_
+
+
+ Payment_Lines__Account_No__
+
+
+ PrintCurrencyCode_Control1120061
+
+
+ Payment_Lines__Agency_Code_
+
+
+ Payment_Lines__Bank_Account_No__
+
+
+ Payment_Lines__SWIFT_Code_
+
+
+ Payment_Lines_IBAN
+
+
+ ABS_Amount__Control1120036
+
+
+ ABS_Amount__Control1120036Format
+
+
+ PrintCurrencyCode_Control1120063
+
+
+ DraftAmount
+
+
+ DraftAmountFormat
+
+
+ PrintDraftCounting
+
+
+ PrintCurrencyCode_Control1120064
+
+
+ FORMAT_PostingDate_0_4__Control1120034
+
+
+ CompanyInformation_City
+
+
+ Text004
+
+
+ Text005
+
+
+ Payment_Lines_No_
+
+
+ Payment_Lines_Line_No_
+
+
+ Payment_Lines__Account_No__Caption
+
+
+ Vendor_NameCaption
+
+
+ Payment_Lines__Bank_Account_Name_Caption
+
+
+ ABS_Amount__Control1120031Caption
+
+
+ Bank_AccountCaption
+
+
+ Payment_Lines__SWIFT_Code_Caption
+
+
+ Payment_Lines_IBANCaption
+
+
+ ReportCaption
+
+
+ ReportCaption_Control1120015
+
+
+ TotalCaption
+
+
+ Done_at__Caption
+
+
+ On__Caption
+
+
+ Signature__Caption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al
new file mode 100644
index 0000000000..8a436e172e
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DraftrecapitulationFR.Report.al
@@ -0,0 +1,447 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Vendor;
+using System.Utilities;
+
+report 10838 "Draft recapitulation FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Draftrecapitulation.rdlc';
+ Caption = 'Draft recapitulation';
+
+ dataset
+ {
+ dataitem("Payment Lines1"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.");
+ MaxIteration = 1;
+ PrintOnlyIfDetail = true;
+ column(Payment_Lines1_No_; "No.")
+ {
+ }
+ column(Payment_Lines1_Line_No_; "Line No.")
+ {
+ }
+ dataitem(CopyLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number);
+ dataitem(PageLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number) where(Number = const(1));
+ column(PaymtHeader__No__; PaymtHeader."No.")
+ {
+ }
+ column(STRSUBSTNO_Text001_CopyText_; StrSubstNo(Text001Lbl, CopyText))
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.")
+ {
+ }
+ column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.")
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.")
+ {
+ }
+ column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4))
+ {
+ }
+ column(BankAccountAddr_4_; BankAccountAddr[4])
+ {
+ }
+ column(BankAccountAddr_5_; BankAccountAddr[5])
+ {
+ }
+ column(BankAccountAddr_6_; BankAccountAddr[6])
+ {
+ }
+ column(BankAccountAddr_7_; BankAccountAddr[7])
+ {
+ }
+ column(BankAccountAddr_3_; BankAccountAddr[3])
+ {
+ }
+ column(BankAccountAddr_2_; BankAccountAddr[2])
+ {
+ }
+ column(BankAccountAddr_1_; BankAccountAddr[1])
+ {
+ }
+ column(PrintCurrencyCode; PrintCurrencyCode())
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.")
+ {
+ }
+ column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code")
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.")
+ {
+ }
+ column(PaymtHeader__RIB_Key_; PaymtHeader."RIB Key")
+ {
+ }
+ column(PaymtHeader__National_Issuer_No__; PaymtHeader."National Issuer No.")
+ {
+ }
+ column(OutputNo; OutputNo)
+ {
+ }
+ column(PaymtHeader_IBAN; PaymtHeader.IBAN)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_; PaymtHeader."SWIFT Code")
+ {
+ }
+ column(PageLoop_Number; Number)
+ {
+ }
+ column(PaymtHeader__No__Caption; PaymtHeader__No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl)
+ {
+ }
+ column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__RIB_Key_Caption; PaymtHeader__RIB_Key_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__National_Issuer_No__Caption; PaymtHeader__National_Issuer_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader_IBANCaption; PaymtHeader_IBANCaptionLbl)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_Caption; PaymtHeader__SWIFT_Code_CaptionLbl)
+ {
+ }
+ dataitem("Payment Lines"; "Payment Line FR")
+ {
+ DataItemLink = "No." = field("No.");
+ DataItemLinkReference = "Payment Lines1";
+ DataItemTableView = sorting("No.", "Line No.");
+ column(ABS_Amount_; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120060; PrintCurrencyCode())
+ {
+ }
+ column(Vendor_Name; Vendor.Name)
+ {
+ }
+ column(Payment_Lines__Bank_Branch_No__; "Bank Branch No.")
+ {
+ }
+ column(ABS_Amount__Control1120031; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Payment_Lines__Bank_Account_Name_; "Bank Account Name")
+ {
+ }
+ column(Payment_Lines__Account_No__; "Account No.")
+ {
+ }
+ column(PrintCurrencyCode_Control1120061; PrintCurrencyCode())
+ {
+ }
+ column(Payment_Lines__Agency_Code_; "Agency Code")
+ {
+ }
+ column(Payment_Lines__Bank_Account_No__; "Bank Account No.")
+ {
+ }
+ column(Payment_Lines__SWIFT_Code_; "SWIFT Code")
+ {
+ }
+ column(Payment_Lines_IBAN; IBAN)
+ {
+ }
+ column(ABS_Amount__Control1120036; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120063; PrintCurrencyCode())
+ {
+ }
+ column(DraftAmount; DraftAmount)
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintDraftCounting; PrintDraftCounting())
+ {
+ }
+ column(PrintCurrencyCode_Control1120064; PrintCurrencyCode())
+ {
+ }
+ column(FORMAT_PostingDate_0_4__Control1120034; Format(PostingDate, 0, 4))
+ {
+ }
+ column(CompanyInformation_City; CompanyInformation.City)
+ {
+ }
+ column(Text004; Text004Lbl)
+ {
+ }
+ column(Text005; Text005Lbl)
+ {
+ }
+ column(Payment_Lines_No_; "No.")
+ {
+ }
+ column(Payment_Lines_Line_No_; "Line No.")
+ {
+ }
+ column(Payment_Lines__Account_No__Caption; FieldCaption("Account No."))
+ {
+ }
+ column(Vendor_NameCaption; Vendor_NameCaptionLbl)
+ {
+ }
+ column(Payment_Lines__Bank_Account_Name_Caption; Payment_Lines__Bank_Account_Name_CaptionLbl)
+ {
+ }
+ column(ABS_Amount__Control1120031Caption; ABS_Amount__Control1120031CaptionLbl)
+ {
+ }
+ column(Bank_AccountCaption; Bank_AccountCaptionLbl)
+ {
+ }
+ column(Payment_Lines__SWIFT_Code_Caption; Payment_Lines__SWIFT_Code_CaptionLbl)
+ {
+ }
+ column(Payment_Lines_IBANCaption; Payment_Lines_IBANCaptionLbl)
+ {
+ }
+ column(ReportCaption; ReportCaptionLbl)
+ {
+ }
+ column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl)
+ {
+ }
+ column(TotalCaption; TotalCaptionLbl)
+ {
+ }
+ column(Done_at__Caption; Done_at__CaptionLbl)
+ {
+ }
+ column(On__Caption; On__CaptionLbl)
+ {
+ }
+ column(Signature__Caption; Signature__CaptionLbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ Vendor.SetRange("No.", "Account No.");
+ if not Vendor.FindFirst() then
+ Error(Text002Lbl, "Account No.");
+
+ DraftAmount := Abs(Amount);
+ DraftCounting := 1;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Account Type", "Account Type"::Vendor);
+ Clear(DraftAmount);
+ Clear(DraftCounting);
+ end;
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if Number > 1 then begin
+ CopyText := Text006Lbl;
+ OutputNo := OutputNo + 1;
+ end;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ OutputNo := 1;
+ LoopsNumber := Abs(CopiesNumber) + 1;
+ CopyText := '';
+ SetRange(Number, 1, LoopsNumber);
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtHeader.Get("No.");
+ PostingDate := PaymtHeader."Posting Date";
+
+ PaymtManagt.PaymentBankAcc(BankAccountAddr, PaymtHeader);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", TransfertNo);
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(Copies_Number; CopiesNumber)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Number of copies';
+ ToolTip = 'Specifies the number of copies to print.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPreReport()
+ begin
+ TransfertNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(TransfertNo));
+ if TransfertNo = '' then
+ Error(Text000Lbl);
+
+ CompanyInformation.Get();
+ FormatAddress.Company(CompanyAddr, CompanyInformation);
+ end;
+
+ var
+ CompanyInformation: Record "Company Information";
+ Vendor: Record Vendor;
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ PaymtManagt: Codeunit "Payment Management FR";
+ FormatAddress: Codeunit "Format Address";
+ BankAccountAddr: array[8] of Text[100];
+ CompanyAddr: array[8] of Text[100];
+ LoopsNumber: Integer;
+ CopiesNumber: Integer;
+ CopyText: Text;
+ DraftAmount: Decimal;
+ DraftCounting: Decimal;
+ TransfertNo: Code[20];
+ PostingDate: Date;
+ Text000Lbl: Label 'You must specify a transfer number.';
+ Text002Lbl: Label 'Vendor %1 does not exist.', Comment = '%1 = Account No.';
+ Text006Lbl: Label 'COPY';
+ Text001Lbl: Label 'Draft Recapitulation %1', Comment = '%1 = copy';
+ OutputNo: Integer;
+ PaymtHeader__No__CaptionLbl: Label 'Draft No.';
+ CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.';
+ CompanyInformation__Fax_No__CaptionLbl: Label 'Fax No.';
+ CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.';
+ PrintCurrencyCodeCaptionLbl: Label 'Currency Code';
+ PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.';
+ PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code';
+ PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.';
+ PaymtHeader__RIB_Key_CaptionLbl: Label 'RIB Key';
+ PaymtHeader__National_Issuer_No__CaptionLbl: Label 'National Issuer No.';
+ PaymtHeader_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ PaymtHeader__SWIFT_Code_CaptionLbl: Label 'SWIFT Code';
+ Text004Lbl: Label ' DRAFT';
+ Text005Lbl: Label ' DRAFTS';
+ Vendor_NameCaptionLbl: Label 'Name';
+ Payment_Lines__Bank_Account_Name_CaptionLbl: Label 'Bank Account Name';
+ ABS_Amount__Control1120031CaptionLbl: Label 'Amount';
+ Bank_AccountCaptionLbl: Label 'Bank Account';
+ Payment_Lines__SWIFT_Code_CaptionLbl: Label 'Swift Code';
+ Payment_Lines_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ ReportCaptionLbl: Label 'Report';
+ ReportCaption_Control1120015Lbl: Label 'Report';
+ TotalCaptionLbl: Label 'Total';
+ Done_at__CaptionLbl: Label 'Done at :';
+ On__CaptionLbl: Label 'On :';
+ Signature__CaptionLbl: Label 'Signature :';
+
+
+ procedure PrintDraftCounting(): Text[30]
+ begin
+ if DraftCounting > 1 then
+ exit(Format(DraftCounting) + Text005Lbl);
+
+ exit(Format(DraftCounting) + Text004Lbl);
+ end;
+
+
+ procedure InitRequest(InitDraftNo: Code[20]; InitCopies: Integer)
+ begin
+ TransfertNo := InitDraftNo;
+ CopiesNumber := InitCopies;
+ end;
+
+
+ procedure PrintCurrencyCode(): Code[10]
+ begin
+ if "Payment Lines1"."Currency Code" = '' then begin
+ GLSetup.Get();
+ exit(GLSetup."LCY Code");
+ end;
+ exit("Payment Lines1"."Currency Code");
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al
new file mode 100644
index 0000000000..a7e20769d6
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/DuplicateparameterFR.Report.al
@@ -0,0 +1,150 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+report 10839 "Duplicate parameter FR"
+{
+ Caption = 'Duplicate parameter';
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem(PaymentClass; "Payment Class FR")
+ {
+ DataItemTableView = sorting(Code);
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtClass: Record "Payment Class FR";
+ begin
+ PaymtClass.Copy(PaymentClass);
+ PaymtClass.Name := '';
+ PaymtClass.Validate(Code, NewName);
+ PaymtClass.Insert();
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ VerifyNewName();
+ end;
+ }
+ dataitem("Payment Status"; "Payment Status FR")
+ {
+ DataItemTableView = sorting("Payment Class", Line);
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtStatus: Record "Payment Status FR";
+ begin
+ PaymtStatus.Copy("Payment Status");
+ PaymtStatus.Validate("Payment Class", NewName);
+ PaymtStatus.Insert();
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Payment Class", PaymentClass.Code);
+ end;
+ }
+ dataitem("Payment Step"; "Payment Step FR")
+ {
+ DataItemTableView = sorting("Payment Class", Line);
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtStep: Record "Payment Step FR";
+ begin
+ PaymtStep.Copy("Payment Step");
+ PaymtStep.Validate("Payment Class", NewName);
+ PaymtStep.Insert();
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Payment Class", PaymentClass.Code);
+ end;
+ }
+ dataitem("Payment Step Ledger"; "Payment Step Ledger FR")
+ {
+ DataItemTableView = sorting("Payment Class", Line, Sign);
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtStepLedger: Record "Payment Step Ledger FR";
+ begin
+ PaymtStepLedger.Copy("Payment Step Ledger");
+ PaymtStepLedger.Validate("Payment Class", NewName);
+ PaymtStepLedger.Insert();
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Payment Class", PaymentClass.Code);
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ group("Which name do you want to attribute to the new parameter?")
+ {
+ Caption = 'Which name do you want to attribute to the new parameter?';
+ field(Old_Name; OldName)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Old name';
+ Editable = false;
+ ToolTip = 'Specifies the previous name of the payment class.';
+ }
+ field(New_Name; NewName)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'New name';
+ ToolTip = 'Specifies the name of the new payment class.';
+ }
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ OldName: Text[30];
+ NewName: Text[30];
+ Text000Lbl: Label 'You must define a new name.';
+ Text001Lbl: Label 'Name %1 already exist. Please define another name.', Comment = '%1 = name';
+
+ procedure InitParameter("Code": Text[30])
+ begin
+ OldName := Code;
+ end;
+
+ procedure VerifyNewName()
+ var
+ PaymtClass: Record "Payment Class FR";
+ begin
+ if NewName = '' then
+ Error(Text000Lbl);
+ if PaymtClass.Get(NewName) then
+ Error(Text001Lbl, NewName);
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al
new file mode 100644
index 0000000000..d65db322b6
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/ETEBACFilesFR.Report.al
@@ -0,0 +1,339 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using System.IO;
+using System.Reflection;
+
+report 10840 "ETEBAC Files FR"
+{
+ Caption = 'ETEBAC Files';
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem("Payment Header"; "Payment Header FR")
+ {
+ DataItemTableView = sorting("No.");
+ MaxIteration = 1;
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemLink = "No." = field("No.");
+ DataItemTableView = sorting("No.", "Line No.");
+
+ trigger OnAfterGetRecord()
+ var
+ Cust: Record Customer;
+ RecordCode: Text;
+ OperationCode: Text;
+ Numbering: Text;
+ BillReference: Text;
+ CustomerName: Text;
+ CustomerBankName: Text;
+ AcceptationCode: Text;
+ BankBranchNo: Text;
+ AgencyCode: Text;
+ BankAccountNo: Text;
+ PrintAmount: Text;
+ DueDate: Text;
+ CreationDate: Text;
+ ExportedText: Text;
+ begin
+ if (CurrencyUsed = '') and ("Currency Code" <> '') then
+ Error(Text004Lbl, GLSetup."LCY Code");
+
+ TestField("Account No.");
+ Cust.Get("Account No.");
+
+ if StrLen("Bank Branch No.") > 5 then
+ Error(Text006Lbl, "Bank Account Code");
+
+ if StrLen("Agency Code") > 5 then
+ Error(Text006Lbl, "Bank Account Code");
+
+ if StrLen("Bank Account No.") > 11 then
+ Error(Text006Lbl, "Bank Account Code");
+
+ if not "RIB Checked" then
+ Error(Text007Lbl, "Bank Account Code", "Account No.");
+
+ LineNo := LineNo + 1;
+
+ RecordCode := '06';
+ OperationCode := '60';
+ Numbering := ConvertStr(Format(LineNo, 8), ' ', '0');
+
+ case "Drawee Reference" <> '' of
+ true:
+ BillReference := PADSTR2("Drawee Reference", 10, '0');
+ false:
+ BillReference := PADSTR2('', 10, ' ');
+ end;
+
+ CustomerName := PadStr(Cust.Name, 24);
+ CustomerBankName := PadStr("Bank Account Name", 24);
+
+ case "Acceptation Code" of
+ "Acceptation Code"::"LCR NA":
+ AcceptationCode := '0';
+ "Acceptation Code"::LCR:
+ AcceptationCode := '1';
+ "Acceptation Code"::BOR:
+ AcceptationCode := '2'
+ end;
+
+ BankBranchNo := PADSTR2("Bank Branch No.", 5, '0');
+ AgencyCode := PADSTR2("Agency Code", 5, '0');
+ BankAccountNo := PADSTR2("Bank Account No.", 11, '0');
+ PrintAmount := FormatAmount(Amount, 12);
+ DueDate := Format("Due Date", 6, '');
+ CreationDate := Format("Payment Header"."Posting Date", 6, '');
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ Numbering +
+ PadStr('', 8) +
+ BillReference +
+ CustomerName +
+ CustomerBankName +
+ AcceptationCode +
+ PadStr('', 2) +
+ BankBranchNo +
+ AgencyCode +
+ BankAccountNo +
+ PrintAmount +
+ PadStr('', 4) +
+ DueDate +
+ CreationDate;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+ end;
+
+ trigger OnPostDataItem()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ RecordCode: Text;
+ OperationCode: Text;
+ Numbering: Text;
+ PrintAmount: Text;
+ ExportedText: Text;
+ begin
+ LineNo := LineNo + 1;
+ RecordCode := '08';
+ OperationCode := '60';
+ Numbering := ConvertStr(Format(LineNo, 8), ' ', '0');
+ PrintAmount := FormatAmount("Payment Header".Amount, 12);
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ Numbering +
+ PadStr('', 90) +
+ PrintAmount;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+
+ PaymentHeader := "Payment Header";
+ PaymentHeader."File Export Completed" := true;
+ PaymentHeader.Modify();
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ var
+ RecordCode: Text;
+ OperationCode: Text;
+ Numbering: Text;
+ FromPaymentNo: Text;
+ DeliveryDate: Text;
+ CompanyName: Text;
+ CompanyBankName: Text;
+ EntryCode: Text;
+ CurrencyIdentifier: Code[1];
+ BankBranchNo: Text;
+ AgencyCode: Text;
+ BankAccountNo: Text;
+ ExportedText: Text;
+ begin
+ if StrLen("Bank Branch No.") > 5 then
+ Error(Text002Lbl, "Account No.");
+
+ if StrLen("Agency Code") > 5 then
+ Error(Text002Lbl, "Account No.");
+
+ if StrLen("Bank Account No.") > 11 then
+ Error(Text002Lbl, "Account No.");
+
+ if not "RIB Checked" then
+ Error(Text003Lbl, "Account No.");
+
+ case "Currency Code" = '' of
+ true:
+ CurrencyUsed := '';
+ false:
+ CurrencyUsed := 'FRF';
+ end;
+
+ case CurrencyUsed = '' of
+ true:
+ CurrencyIdentifier := 'E';
+ false:
+ CurrencyIdentifier := 'F';
+ end;
+
+ LineNo := 1;
+
+ CalcFields(Amount);
+
+ RecordCode := '03';
+ OperationCode := '60';
+ Numbering := ConvertStr(Format(LineNo, 8), ' ', '0');
+ FromPaymentNo := PadStr("National Issuer No.", 6);
+ DeliveryDate := Format("Posting Date", 6, '');
+ CompanyName := PadStr(CompanyInfo.Name, 24);
+ CompanyBankName := PadStr("Bank Name", 24);
+ EntryCode := Format(PaymentType + 1);
+ BankBranchNo := PADSTR2("Bank Branch No.", 5, '0');
+ AgencyCode := PADSTR2("Agency Code", 5, '0');
+ BankAccountNo := PADSTR2("Bank Account No.", 11, '0');
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ Numbering +
+ FromPaymentNo +
+ PadStr('', 6) +
+ DeliveryDate +
+ CompanyName +
+ CompanyBankName +
+ EntryCode +
+ PadStr('', 1) +
+ CurrencyIdentifier +
+ BankBranchNo +
+ AgencyCode +
+ BankAccountNo;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(Payment_Type; PaymentType)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Payment Type';
+ OptionCaption = 'Discount,Discount in Value,Cash after Due Date,Cash after Unpaid Delay';
+ ToolTip = 'Specifies the payment type for the ETEBAC file.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+
+ trigger OnOpenPage()
+ begin
+ PaymentType := PaymentType::"Cash after Due Date";
+ end;
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ var
+ FileMgt: Codeunit "File Management";
+ ToFile: Text[260];
+ begin
+ ExportFile.Close();
+ ToFile := Text009Lbl;
+ FileMgt.DownloadHandler(ExportFileName, GetCaption(), '', Text008Lbl, ToFile);
+ end;
+
+ trigger OnPreReport()
+ var
+ FileMgt: Codeunit "File Management";
+ begin
+ CompanyInfo.Get();
+ CompanyInfo.TestField(Name);
+
+ GLSetup.Get();
+
+ ExportFileName := FileMgt.ServerTempFileName('');
+
+ ExportFile.TextMode := true;
+ ExportFile.WriteMode := true;
+ ExportFile.Create(ExportFileName);
+ end;
+
+ var
+ GLSetup: Record "General Ledger Setup";
+ CompanyInfo: Record "Company Information";
+ ExportFile: File;
+ ExportFileName: Text;
+ CurrencyUsed: Code[10];
+ PaymentType: Option Discount,"Discount in Value","Cash after Due Date","Cash after Unpaid Delay";
+ Text002Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number';
+ Text003Lbl: Label 'The RIB of the company''s bank account %1 is incorrect. Please verify before continuing.', Comment = '%1 = No.';
+ Text004Lbl: Label 'You can only use %1.', Comment = '%1 - currency code';
+ Text006Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number';
+ Text007Lbl: Label 'The RIB of bank account %1 of customer %2 is incorrect. Please verify before continuing.', Comment = '%1 = Code, %2 = Account No.';
+ Text008Lbl: Label 'Text Files|*.txt|All Files|*.*';
+ Text009Lbl: Label 'default.txt';
+ LineNo: Integer;
+
+ local procedure GetCaption() Result: Text[50]
+ var
+ AllObjWithCaption: Record AllObjWithCaption;
+ ID: Integer;
+ begin
+ Result := '';
+ if not Evaluate(ID, DelChr(CurrReport.ObjectId(false), '=', DelChr(CurrReport.ObjectId(false), '=', '0123456789'))) then
+ exit;
+
+ if not AllObjWithCaption.Get(AllObjWithCaption."Object Type"::Report, ID) then
+ exit;
+
+ exit(CopyStr(AllObjWithCaption."Object Caption", 1, MaxStrLen(Result)));
+ end;
+
+ local procedure PADSTR2(String: Text; Length: Integer; FillCharacter: Text[1]): Text
+ var
+ PaddingLength: Integer;
+ begin
+ PaddingLength := Length - StrLen(String);
+
+ case true of
+ PaddingLength <= 0:
+ exit(PadStr(String, Length, FillCharacter));
+ PaddingLength > 0:
+ exit(PadStr('', PaddingLength, FillCharacter) + String);
+ end;
+ end;
+
+ local procedure FormatAmount(Amount: Decimal; Width: Integer): Text
+ var
+ Format_Amount: Text;
+ begin
+ Format_Amount := ConvertStr(Format(Amount, Width, ''), ' ', '0');
+ Format_Amount := '0' + CopyStr(Format_Amount, 1, Width - 3) + CopyStr(Format_Amount, Width - 1, 2);
+ exit(Format_Amount);
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al
new file mode 100644
index 0000000000..6f351858e9
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.Report.al
@@ -0,0 +1,263 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Sales.Customer;
+
+report 10841 "GL/Cust Ledger Reconciliation"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/GLCustLedgerReconciliation.rdlc';
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Cust. Ledger Reconciliation';
+ Permissions = TableData "G/L Account Net Change" = rimd;
+ UsageCategory = ReportsAndAnalysis;
+
+ dataset
+ {
+ dataitem(Customer; Customer)
+ {
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.", "Date Filter";
+ column(USERID; UserId)
+ {
+ }
+ column(FORMAT_TODAY_0_4_; Format(Today, 0, 4))
+ {
+ }
+ column(COMPANYNAME; COMPANYPROPERTY.DisplayName())
+ {
+ }
+ column(LastNo; LastNo)
+ {
+ }
+ column(FirstNo; FirstNo)
+ {
+ }
+ column(Customer__No__; "No.")
+ {
+ }
+ column(Customer_Name; Name)
+ {
+ }
+ column(TotalDebit; TotalDebit)
+ {
+ }
+ column(TotalCredit; TotalCredit)
+ {
+ }
+ column(TotalDebit_TotalCredit; TotalDebit - TotalCredit)
+ {
+ }
+ column(General_Customer_ledger_reconciliationCaption; General_Customer_ledger_reconciliationCaptionLbl)
+ {
+ }
+ column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl)
+ {
+ }
+ column(G_L_Entry__Debit_Amount_Caption; "G/L Entry".FieldCaption("Debit Amount"))
+ {
+ }
+ column(G_L_Entry__Credit_Amount_Caption; "G/L Entry".FieldCaption("Credit Amount"))
+ {
+ }
+ column(G_L_Entry_AmountCaption; "G/L Entry".FieldCaption(Amount))
+ {
+ }
+ column(G_L_Entry_DescriptionCaption; "G/L Entry".FieldCaption(Description))
+ {
+ }
+ column(G_L_Entry__Document_No__Caption; "G/L Entry".FieldCaption("Document No."))
+ {
+ }
+ column(G_L_Entry__Document_Type_Caption; "G/L Entry".FieldCaption("Document Type"))
+ {
+ }
+ column(G_L_Entry__G_L_Account_No__Caption; "G/L Entry".FieldCaption("G/L Account No."))
+ {
+ }
+ column(G_L_Entry__Posting_Date_Caption; G_L_Entry__Posting_Date_CaptionLbl)
+ {
+ }
+ column(General_AmountCaption; General_AmountCaptionLbl)
+ {
+ }
+ dataitem("Customer Posting Group"; "Customer Posting Group")
+ {
+ DataItemTableView = sorting(Code);
+ PrintOnlyIfDetail = true;
+ column(TotalDebit_TotalCredit_Control1120015; TotalDebit - TotalCredit)
+ {
+ }
+ column(TotalCredit_Control1120014; TotalCredit)
+ {
+ }
+ column(TotalDebit_Control1120013; TotalDebit)
+ {
+ }
+ column(Customer_Posting_Group_Code; Code)
+ {
+ }
+ column(Customer_Posting_Group_Receivables_Account; "Receivables Account")
+ {
+ }
+ column(Total_amount_for_the_customerCaption; Total_amount_for_the_customerCaptionLbl)
+ {
+ }
+ dataitem("G/L Entry"; "G/L Entry")
+ {
+ DataItemLink = "G/L Account No." = field("Receivables Account");
+ DataItemTableView = sorting("G/L Account No.", "Source Type", "Source No.") where(Amount = filter(<> 0));
+ column(G_L_Entry__Debit_Amount_; "Debit Amount")
+ {
+ }
+ column(G_L_Entry__Credit_Amount_; "Credit Amount")
+ {
+ }
+ column(G_L_Entry_Amount; Amount)
+ {
+ }
+ column(G_L_Entry__Posting_Date_; Format("Posting Date"))
+ {
+ }
+ column(G_L_Entry_Description; Description)
+ {
+ }
+ column(G_L_Entry__Document_Type_; "Document Type")
+ {
+ }
+ column(G_L_Entry__Document_No__; "Document No.")
+ {
+ }
+ column(G_L_Entry__G_L_Account_No__; "G/L Account No.")
+ {
+ }
+ column(G_L_Entry__Debit_Amount__Control1120036; "Debit Amount")
+ {
+ }
+ column(G_L_Entry__Credit_Amount__Control1120037; "Credit Amount")
+ {
+ }
+ column(G_L_Entry_Amount_Control1120038; Amount)
+ {
+ }
+ column(G_L_Entry_Entry_No_; "Entry No.")
+ {
+ }
+ column(Total_amount_for_the_general_ledgerCaption; Total_amount_for_the_general_ledgerCaptionLbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if ("Bal. Account Type" = "Bal. Account Type"::Customer) and ("Bal. Account No." = Customer."No.") then
+ CurrReport.Skip();
+ TotalDebit := TotalDebit + "Debit Amount";
+ TotalCredit := TotalCredit + "Credit Amount";
+ GLAccountNetChange.Get("G/L Account No.");
+ GLAccountNetChange."Net Change in Jnl." += Amount;
+ GLAccountNetChange.Modify();
+ HavingNoDetail := false;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Source Type", "Source Type"::Customer);
+ SetRange("Source No.", Customer."No.");
+ SetRange("Posting Date", Customer.GetRangeMin("Date Filter"), Customer.GetRangeMax("Date Filter"));
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ Clear(TempPostingBuffer);
+ TempPostingBuffer."Account Type" := TempPostingBuffer."Account Type"::"G/L Account";
+ TempPostingBuffer."Account No." := "Receivables Account";
+ if not TempPostingBuffer.Insert() then
+ CurrReport.Skip();
+ Clear(GLAccountNetChange);
+ GLAccountNetChange."No." := "Receivables Account";
+ if not GLAccountNetChange.Insert() then;
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ TempPostingBuffer.DeleteAll();
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ TotalDebit := 0;
+ TotalCredit := 0;
+ HavingNoDetail := true;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ Clear(TotalDebit);
+ Clear(TotalCredit);
+ Customer.FindFirst();
+ FirstNo := "No.";
+ Customer.FindLast();
+ LastNo := "No.";
+ end;
+ }
+ dataitem("G/L Account Net Change"; "G/L Account Net Change")
+ {
+ column(HavingNoDetail; HavingNoDetail)
+ {
+ }
+ column(GL_Account_Net_Change; "Net Change in Jnl.")
+ {
+ }
+ column(GL_Account_No; "No.")
+ {
+ }
+ column(General_amount_for_the_general_ledgerCaption; General_amount_for_the_general_ledgerCaptionLbl)
+ {
+ }
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ begin
+ GLAccountNetChange.DeleteAll();
+ end;
+
+ var
+ TempPostingBuffer: Record "Payment Post. Buffer FR" temporary;
+ GLAccountNetChange: Record "G/L Account Net Change";
+ TotalDebit: Decimal;
+ TotalCredit: Decimal;
+ FirstNo: Code[20];
+ LastNo: Code[20];
+ HavingNoDetail: Boolean;
+ General_Customer_ledger_reconciliationCaptionLbl: Label 'General/Customer ledger reconciliation';
+ CurrReport_PAGENOCaptionLbl: Label 'Page';
+ G_L_Entry__Posting_Date_CaptionLbl: Label 'Posting Date';
+ General_AmountCaptionLbl: Label 'General Amount';
+ Total_amount_for_the_customerCaptionLbl: Label 'Total amount for the customer';
+ Total_amount_for_the_general_ledgerCaptionLbl: Label 'Total amount for the general ledger';
+ General_amount_for_the_general_ledgerCaptionLbl: Label 'General amount for the general ledger';
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc
new file mode 100644
index 0000000000..9a95231ca7
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLCustLedgerReconciliation.rdlc
@@ -0,0 +1,245 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+
+
+
+
+
+ 2in
+
+
+ 6.5in
+
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Inch
+ 0eeb6585-38ae-40f1-885b-8d50088d51b4
+
+
+
+
+ USERID
+
+
+ FORMAT_TODAY_0_4_
+
+
+ COMPANYNAME
+
+
+ LastNo
+
+
+ FirstNo
+
+
+ Customer__No__
+
+
+ Customer_Name
+
+
+ TotalDebit
+
+
+ TotalDebitFormat
+
+
+ TotalCredit
+
+
+ TotalCreditFormat
+
+
+ TotalDebit_TotalCredit
+
+
+ TotalDebit_TotalCreditFormat
+
+
+ General_Customer_ledger_reconciliationCaption
+
+
+ CurrReport_PAGENOCaption
+
+
+ G_L_Entry__Debit_Amount_Caption
+
+
+ G_L_Entry__Credit_Amount_Caption
+
+
+ G_L_Entry_AmountCaption
+
+
+ G_L_Entry_DescriptionCaption
+
+
+ G_L_Entry__Document_No__Caption
+
+
+ G_L_Entry__Document_Type_Caption
+
+
+ G_L_Entry__G_L_Account_No__Caption
+
+
+ G_L_Entry__Posting_Date_Caption
+
+
+ General_AmountCaption
+
+
+ TotalDebit_TotalCredit_Control1120015
+
+
+ TotalDebit_TotalCredit_Control1120015Format
+
+
+ TotalCredit_Control1120014
+
+
+ TotalCredit_Control1120014Format
+
+
+ TotalDebit_Control1120013
+
+
+ TotalDebit_Control1120013Format
+
+
+ Customer_Posting_Group_Code
+
+
+ Customer_Posting_Group_Receivables_Account
+
+
+ Total_amount_for_the_customerCaption
+
+
+ G_L_Entry__Debit_Amount_
+
+
+ G_L_Entry__Debit_Amount_Format
+
+
+ G_L_Entry__Credit_Amount_
+
+
+ G_L_Entry__Credit_Amount_Format
+
+
+ G_L_Entry_Amount
+
+
+ G_L_Entry_AmountFormat
+
+
+ G_L_Entry__Posting_Date_
+
+
+ G_L_Entry_Description
+
+
+ G_L_Entry__Document_Type_
+
+
+ G_L_Entry__Document_No__
+
+
+ G_L_Entry__G_L_Account_No__
+
+
+ G_L_Entry__Debit_Amount__Control1120036
+
+
+ G_L_Entry__Debit_Amount__Control1120036Format
+
+
+ G_L_Entry__Credit_Amount__Control1120037
+
+
+ G_L_Entry__Credit_Amount__Control1120037Format
+
+
+ G_L_Entry_Amount_Control1120038
+
+
+ G_L_Entry_Amount_Control1120038Format
+
+
+ G_L_Entry_Entry_No_
+
+
+ Total_amount_for_the_general_ledgerCaption
+
+
+ HavingNoDetail
+
+
+ GL_Account_Net_Change
+
+
+ GL_Account_Net_ChangeFormat
+
+
+ GL_Account_No
+
+
+ General_amount_for_the_general_ledgerCaption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.Report.al
new file mode 100644
index 0000000000..be399d1d08
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.Report.al
@@ -0,0 +1,263 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Purchases.Vendor;
+
+report 10844 "GL/Vend Ledger Reconciliation"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/GLVendLedgerReconciliation.rdlc';
+ ApplicationArea = Basic, Suite;
+ Caption = 'GL/Vend. Ledger Reconciliation';
+ Permissions = TableData "G/L Account Net Change" = rimd;
+ UsageCategory = ReportsAndAnalysis;
+
+ dataset
+ {
+ dataitem(Vendor; Vendor)
+ {
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.", "Date Filter";
+ column(USERID; UserId)
+ {
+ }
+ column(FORMAT_TODAY_0_4_; Format(Today, 0, 4))
+ {
+ }
+ column(COMPANYNAME; COMPANYPROPERTY.DisplayName())
+ {
+ }
+ column(FirstNo; FirstNo)
+ {
+ }
+ column(LastNo; LastNo)
+ {
+ }
+ column(Vendor__No__; "No.")
+ {
+ }
+ column(Vendor_Name; Name)
+ {
+ }
+ column(TotalDebit; TotalDebit)
+ {
+ }
+ column(TotalCredit; TotalCredit)
+ {
+ }
+ column(TotalDebit_TotalCredit; TotalDebit - TotalCredit)
+ {
+ }
+ column(General_Vendor_ledger_reconciliationCaption; General_Vendor_ledger_reconciliationCaptionLbl)
+ {
+ }
+ column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl)
+ {
+ }
+ column(G_L_Entry__Debit_Amount_Caption; "G/L Entry".FieldCaption("Debit Amount"))
+ {
+ }
+ column(G_L_Entry__Credit_Amount_Caption; "G/L Entry".FieldCaption("Credit Amount"))
+ {
+ }
+ column(G_L_Entry_AmountCaption; "G/L Entry".FieldCaption(Amount))
+ {
+ }
+ column(G_L_Entry_DescriptionCaption; "G/L Entry".FieldCaption(Description))
+ {
+ }
+ column(G_L_Entry__Document_No__Caption; "G/L Entry".FieldCaption("Document No."))
+ {
+ }
+ column(G_L_Entry__Document_Type_Caption; "G/L Entry".FieldCaption("Document Type"))
+ {
+ }
+ column(G_L_Entry__G_L_Account_No__Caption; "G/L Entry".FieldCaption("G/L Account No."))
+ {
+ }
+ column(G_L_Entry__Posting_Date_Caption; G_L_Entry__Posting_Date_CaptionLbl)
+ {
+ }
+ column(General_AmountCaption; General_AmountCaptionLbl)
+ {
+ }
+ dataitem("Vendor Posting Group"; "Vendor Posting Group")
+ {
+ DataItemTableView = sorting(Code);
+ PrintOnlyIfDetail = true;
+ column(TotalDebit_TotalCredit_Control1120015; TotalDebit - TotalCredit)
+ {
+ }
+ column(TotalCredit_Control1120014; TotalCredit)
+ {
+ }
+ column(TotalDebit_Control1120013; TotalDebit)
+ {
+ }
+ column(Vendor_Posting_Group_Code; Code)
+ {
+ }
+ column(Vendor_Posting_Group_Payables_Account; "Payables Account")
+ {
+ }
+ column(Total_amount_for_the_vendorCaption; Total_amount_for_the_vendorCaptionLbl)
+ {
+ }
+ dataitem("G/L Entry"; "G/L Entry")
+ {
+ DataItemLink = "G/L Account No." = field("Payables Account");
+ DataItemTableView = sorting("G/L Account No.", "Source Type", "Source No.") where(Amount = filter(<> 0));
+ column(G_L_Entry__Debit_Amount_; "Debit Amount")
+ {
+ }
+ column(G_L_Entry__Credit_Amount_; "Credit Amount")
+ {
+ }
+ column(G_L_Entry_Amount; Amount)
+ {
+ }
+ column(G_L_Entry__Posting_Date_; Format("Posting Date"))
+ {
+ }
+ column(G_L_Entry_Description; Description)
+ {
+ }
+ column(G_L_Entry__Document_Type_; "Document Type")
+ {
+ }
+ column(G_L_Entry__Document_No__; "Document No.")
+ {
+ }
+ column(G_L_Entry__G_L_Account_No__; "G/L Account No.")
+ {
+ }
+ column(G_L_Entry__Debit_Amount__Control1120036; "Debit Amount")
+ {
+ }
+ column(G_L_Entry__Credit_Amount__Control1120037; "Credit Amount")
+ {
+ }
+ column(G_L_Entry_Amount_Control1120038; Amount)
+ {
+ }
+ column(G_L_Entry_Entry_No_; "Entry No.")
+ {
+ }
+ column(Total_amount_for_the_general_ledgerCaption; Total_amount_for_the_general_ledgerCaptionLbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if ("Bal. Account Type" = "Bal. Account Type"::Vendor) and ("Bal. Account No." = Vendor."No.") then
+ CurrReport.Skip();
+ TotalDebit := TotalDebit + "Debit Amount";
+ TotalCredit := TotalCredit + "Credit Amount";
+ GLAccountNetChange.Get("G/L Account No.");
+ GLAccountNetChange."Net Change in Jnl." += Amount;
+ GLAccountNetChange.Modify();
+ HavingDetail := true;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("Source Type", "Source Type"::Vendor);
+ SetRange("Source No.", Vendor."No.");
+ SetRange("Posting Date", Vendor.GetRangeMin("Date Filter"), Vendor.GetRangeMax("Date Filter"));
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ Clear(TempPostingBuffer);
+ TempPostingBuffer."Account Type" := TempPostingBuffer."Account Type"::"G/L Account";
+ TempPostingBuffer."Account No." := "Payables Account";
+ if not TempPostingBuffer.Insert() then
+ CurrReport.Skip();
+ Clear(GLAccountNetChange);
+ GLAccountNetChange."No." := "Payables Account";
+ if not GLAccountNetChange.Insert() then;
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ TempPostingBuffer.DeleteAll();
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ TotalDebit := 0;
+ TotalCredit := 0;
+ HavingDetail := false;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ Clear(TotalDebit);
+ Clear(TotalCredit);
+ Vendor.FindFirst();
+ FirstNo := "No.";
+ Vendor.FindLast();
+ LastNo := "No.";
+ end;
+ }
+ dataitem("G/L Account Net Change"; "G/L Account Net Change")
+ {
+ column(HavingDetail; HavingDetail)
+ {
+ }
+ column(GL_Account_Net_Change; "Net Change in Jnl.")
+ {
+ }
+ column(GL_Account_No; "No.")
+ {
+ }
+ column(General_amount_for_the_general_ledgerCaption; General_amount_for_the_general_ledgerCaptionLbl)
+ {
+ }
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ begin
+ GLAccountNetChange.DeleteAll();
+ end;
+
+ var
+ TempPostingBuffer: Record "Payment Post. Buffer FR" temporary;
+ GLAccountNetChange: Record "G/L Account Net Change";
+ TotalDebit: Decimal;
+ TotalCredit: Decimal;
+ FirstNo: Code[20];
+ LastNo: Code[20];
+ HavingDetail: Boolean;
+ General_Vendor_ledger_reconciliationCaptionLbl: Label 'General/Vendor ledger reconciliation';
+ CurrReport_PAGENOCaptionLbl: Label 'Page';
+ G_L_Entry__Posting_Date_CaptionLbl: Label 'Posting Date';
+ General_AmountCaptionLbl: Label 'General Amount';
+ Total_amount_for_the_vendorCaptionLbl: Label 'Total amount for the vendor';
+ Total_amount_for_the_general_ledgerCaptionLbl: Label 'Total amount for the general ledger';
+ General_amount_for_the_general_ledgerCaptionLbl: Label 'General amount for the general ledger';
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.rdlc
new file mode 100644
index 0000000000..aefe6b448d
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/GLVendLedgerReconciliation.rdlc
@@ -0,0 +1,245 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+
+
+
+
+
+ 2in
+
+
+ 6.5in
+
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Inch
+ 0eeb6585-38ae-40f1-885b-8d50088d51b4
+
+
+
+
+ USERID
+
+
+ FORMAT_TODAY_0_4_
+
+
+ COMPANYNAME
+
+
+ FirstNo
+
+
+ LastNo
+
+
+ Vendor__No__
+
+
+ Vendor_Name
+
+
+ TotalDebit
+
+
+ TotalDebitFormat
+
+
+ TotalCredit
+
+
+ TotalCreditFormat
+
+
+ TotalDebit_TotalCredit
+
+
+ TotalDebit_TotalCreditFormat
+
+
+ General_Vendor_ledger_reconciliationCaption
+
+
+ CurrReport_PAGENOCaption
+
+
+ G_L_Entry__Debit_Amount_Caption
+
+
+ G_L_Entry__Credit_Amount_Caption
+
+
+ G_L_Entry_AmountCaption
+
+
+ G_L_Entry_DescriptionCaption
+
+
+ G_L_Entry__Document_No__Caption
+
+
+ G_L_Entry__Document_Type_Caption
+
+
+ G_L_Entry__G_L_Account_No__Caption
+
+
+ G_L_Entry__Posting_Date_Caption
+
+
+ General_AmountCaption
+
+
+ TotalDebit_TotalCredit_Control1120015
+
+
+ TotalDebit_TotalCredit_Control1120015Format
+
+
+ TotalCredit_Control1120014
+
+
+ TotalCredit_Control1120014Format
+
+
+ TotalDebit_Control1120013
+
+
+ TotalDebit_Control1120013Format
+
+
+ Vendor_Posting_Group_Code
+
+
+ Vendor_Posting_Group_Payables_Account
+
+
+ Total_amount_for_the_vendorCaption
+
+
+ G_L_Entry__Debit_Amount_
+
+
+ G_L_Entry__Debit_Amount_Format
+
+
+ G_L_Entry__Credit_Amount_
+
+
+ G_L_Entry__Credit_Amount_Format
+
+
+ G_L_Entry_Amount
+
+
+ G_L_Entry_AmountFormat
+
+
+ G_L_Entry__Posting_Date_
+
+
+ G_L_Entry_Description
+
+
+ G_L_Entry__Document_Type_
+
+
+ G_L_Entry__Document_No__
+
+
+ G_L_Entry__G_L_Account_No__
+
+
+ G_L_Entry__Debit_Amount__Control1120036
+
+
+ G_L_Entry__Debit_Amount__Control1120036Format
+
+
+ G_L_Entry__Credit_Amount__Control1120037
+
+
+ G_L_Entry__Credit_Amount__Control1120037Format
+
+
+ G_L_Entry_Amount_Control1120038
+
+
+ G_L_Entry_Amount_Control1120038Format
+
+
+ G_L_Entry_Entry_No_
+
+
+ Total_amount_for_the_general_ledgerCaption
+
+
+ HavingDetail
+
+
+ GL_Account_Net_Change
+
+
+ GL_Account_Net_ChangeFormat
+
+
+ GL_Account_No
+
+
+ General_amount_for_the_general_ledgerCaption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentList.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentList.rdlc
new file mode 100644
index 0000000000..a0677b8777
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentList.rdlc
@@ -0,0 +1,1133 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ d6589c0f-228f-4648-a575-2d73ff079653
+
+
+
+
+
+
+
+
+
+
+ 1.75cm
+
+
+ 1.5cm
+
+
+ 0.45cm
+
+
+ 1cm
+
+
+ 1.65cm
+
+
+ 1.65cm
+
+
+ 1.75cm
+
+
+
+
+ 0.07937cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!COMPANYNAME.Value
+
+
+
+
+
+ 14
+
+ true
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payments_LinesCaption.Value
+
+
+
+
+
+ 13
+
+ true
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CurrReport_PAGENOCaption.Value
+
+
+
+
+
+ 12
+
+ true
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_TODAY_0_4_.Value
+
+
+
+
+
+ 11
+
+ true
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__No___Control1120011Caption.Value)
+
+
+
+
+
+ 20
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line_AmountCaption.Value)
+
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Account_Type_Caption.Value)
+
+
+
+
+
+ 18
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Account_No__Caption.Value)
+
+
+
+
+
+ 17
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Posting_Group_Caption.Value)
+
+
+
+
+
+ 16
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Due_Date_Caption.Value)
+
+
+
+
+
+ 15
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox2
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =Code.IsHeaderShow()
+
+
+
+
+
+ textbox9
+
+ true
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox10
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__No__Caption.Value)
+
+
+
+
+
+ 10
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Line__No__.Value)
+
+
+
+
+
+
+ 9
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 8
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox1
+ 7
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__No__.Value
+
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Payment_Line_Amount.Value
+
+
+
+
+
+
+ 4
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Account_Type_.Value
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Account_No__.Value
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Posting_Group_.Value
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+
+
+ =Fields!Payment_Line__No__.Value
+
+
+
+
+
+ =not(Code.footer)
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+
+ Detail
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+
+
+
+ DataSet_Result
+ 9.75cm
+
+
+ 3.46337cm
+
+ 18.15cm
+
+
+ 1.692cm
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+
+ 0.423cm
+ 17.7cm
+ 0.423cm
+ 5
+
+
+
+ true
+ true
+
+
+
+
+ =User!UserID
+
+
+
+
+
+
+ 0.846cm
+ 14.9cm
+ 0.423cm
+ 4
+
+
+
+ true
+
+
+
+
+ =ReportItems!FORMAT_TODAY_0_4_.Value
+
+
+
+
+
+
+ 15cm
+ 0.423cm
+ 3
+
+
+
+ true
+
+
+
+
+ =ReportItems!COMPANYNAME.Value
+
+
+
+
+
+ 0.423cm
+ 0.423cm
+ 7.5cm
+ 2
+
+
+
+ true
+
+
+
+
+ =ReportItems!Payments_LinesCaption.Value
+
+
+
+
+
+ 0.423cm
+ 7.5cm
+ 1
+
+
+
+ true
+
+
+
+
+ =ReportItems!CurrReport_PAGENOCaption.Value
+
+
+
+
+
+ 0.423cm
+ 16.95cm
+ 0.423cm
+ 0.75cm
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Shared footer As Boolean
+Public Function IsHeaderShow()
+ footer=true
+End Function
+ =User!Language
+ true
+ Invalid
+ bd5c9901-bc30-4b2f-b650-4077c13d2f1d
+
+
+
+
+ FORMAT_TODAY_0_4_
+
+
+ COMPANYNAME
+
+
+ USERID
+
+
+ Payment_Line__No__
+
+
+ Payment_Line__No___Control1120011
+
+
+ Payment_Line_Amount
+
+
+ Payment_Line_AmountFormat
+
+
+ Payment_Line__Account_Type_
+
+
+ Payment_Line__Account_No__
+
+
+ Payment_Line__Posting_Group_
+
+
+ Payment_Line__Due_Date_
+
+
+ Payment_Line_Line_No_
+
+
+ Payments_LinesCaption
+
+
+ CurrReport_PAGENOCaption
+
+
+ Payment_Line__No___Control1120011Caption
+
+
+ Payment_Line_AmountCaption
+
+
+ Payment_Line__Account_Type_Caption
+
+
+ Payment_Line__Account_No__Caption
+
+
+ Payment_Line__Posting_Group_Caption
+
+
+ Payment_Line__Due_Date_Caption
+
+
+ Payment_Line__No__Caption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al
new file mode 100644
index 0000000000..0fb9f4ec15
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/PaymentListFR.Report.al
@@ -0,0 +1,104 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+report 10845 "Payment List FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/PaymentList.rdlc';
+ Caption = 'Payment List';
+
+ dataset
+ {
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.");
+ RequestFilterFields = "No.";
+ RequestFilterHeading = 'Payment lines';
+ column(FORMAT_TODAY_0_4_; Format(Today, 0, 4))
+ {
+ }
+ column(COMPANYNAME; COMPANYPROPERTY.DisplayName())
+ {
+ }
+ column(USERID; UserId)
+ {
+ }
+ column(Payment_Line__No__; "No.")
+ {
+ }
+ column(Payment_Line__No___Control1120011; "No.")
+ {
+ }
+ column(Payment_Line_Amount; Amount)
+ {
+ }
+ column(Payment_Line__Account_Type_; "Account Type")
+ {
+ }
+ column(Payment_Line__Account_No__; "Account No.")
+ {
+ }
+ column(Payment_Line__Posting_Group_; "Posting Group")
+ {
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(Payments_LinesCaption; Payments_LinesCaptionLbl)
+ {
+ }
+ column(CurrReport_PAGENOCaption; CurrReport_PAGENOCaptionLbl)
+ {
+ }
+ column(Payment_Line__No___Control1120011Caption; FieldCaption("No."))
+ {
+ }
+ column(Payment_Line_AmountCaption; FieldCaption(Amount))
+ {
+ }
+ column(Payment_Line__Account_Type_Caption; FieldCaption("Account Type"))
+ {
+ }
+ column(Payment_Line__Account_No__Caption; FieldCaption("Account No."))
+ {
+ }
+ column(Payment_Line__Posting_Group_Caption; FieldCaption("Posting Group"))
+ {
+ }
+ column(Payment_Line__Due_Date_Caption; Payment_Line__Due_Date_CaptionLbl)
+ {
+ }
+ column(Payment_Line__No__Caption; FieldCaption("No."))
+ {
+ }
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ Payments_LinesCaptionLbl: Label 'Payments Lines';
+ CurrReport_PAGENOCaptionLbl: Label 'Page';
+ Payment_Line__Due_Date_CaptionLbl: Label 'Due Date';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al
new file mode 100644
index 0000000000..4ab1587347
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.Report.al
@@ -0,0 +1,315 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+
+report 10846 "Recapitulation Form FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/RecapitulationFormFR.rdlc';
+ Caption = 'Recapitulation Form';
+
+ dataset
+ {
+ dataitem("Bank Account"; "Bank Account")
+ {
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.";
+ column(BankAccAddr_1_; BankAccAddr[1])
+ {
+ }
+ column(BankAccAddr_2_; BankAccAddr[2])
+ {
+ }
+ column(BankAccAddr_3_; BankAccAddr[3])
+ {
+ }
+ column(BankAccAddr_4_; BankAccAddr[4])
+ {
+ }
+ column(BankAccAddr_5_; BankAccAddr[5])
+ {
+ }
+ column(BankAccAddr_6_; BankAccAddr[6])
+ {
+ }
+ column(BankAccAddr_7_; BankAccAddr[7])
+ {
+ }
+ column(BankAccAddr_8_; BankAccAddr[8])
+ {
+ }
+ column(Bank_Account__Bank_Account_No__; "Bank Account No.")
+ {
+ }
+ column(Bank_Account__Bank_Branch_No__; "Bank Branch No.")
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__; StrSubstNo(Text001Lbl, Format(WorkDate(), 0, 4)))
+ {
+ }
+ column(CONVERTSTR_FORMAT__RIB_Key__2_______0__; ConvertStr(Format("RIB Key FR", 2), ' ', '0'))
+ {
+ }
+ column(Bank_Account__Agency_Code_; "Agency Code FR")
+ {
+ }
+ column(Bank_Account__No__; "No.")
+ {
+ }
+ column(Bank_Account__Bank_Account_No__Caption; FieldCaption("Bank Account No."))
+ {
+ }
+ column(Bank_Account__Bank_Branch_No__Caption; FieldCaption("Bank Branch No."))
+ {
+ }
+ column(Checks_Caption; Checks_CaptionLbl)
+ {
+ }
+ column(No_Caption; No_CaptionLbl)
+ {
+ }
+ column(Customer_No_Caption; Customer_No_CaptionLbl)
+ {
+ }
+ column(Customer_NameCaption; Customer_NameCaptionLbl)
+ {
+ }
+ column(CustBankAccNoCaption; CustBankAccNoCaptionLbl)
+ {
+ }
+ column(CustBankAcc_CodeCaption; CustBankAcc_CodeCaptionLbl)
+ {
+ }
+ column(CustBankAcc_NameCaption; CustBankAcc_NameCaptionLbl)
+ {
+ }
+ column(Gen__Journal_Line__AmountCaption; Gen__Journal_Line__AmountCaptionLbl)
+ {
+ }
+ column(Recapitulation_FormCaption; Recapitulation_FormCaptionLbl)
+ {
+ }
+ column(Gen__Journal_Line___Currency_Code_Caption; Gen__Journal_Line___Currency_Code_CaptionLbl)
+ {
+ }
+ column(CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption; CONVERTSTR_FORMAT__RIB_Key__2_______0__CaptionLbl)
+ {
+ }
+ column(Bank_Account__Agency_Code_Caption; FieldCaption("Agency Code FR"))
+ {
+ }
+ dataitem("Gen. Journal Line"; "Gen. Journal Line")
+ {
+ DataItemTableView = sorting("Journal Template Name", "Journal Batch Name", "Posting Date", "Document No.") where("Document Type" = const(Payment));
+ RequestFilterFields = "Posting Date", "Document No.";
+ column(LineNum; LineNum)
+ {
+ }
+ column(GenJnlLine_Amount; "Gen. Journal Line".Amount)
+ {
+ }
+ column(CurrencyCode; CurrencyCode)
+ {
+ }
+ column(Gen__Journal_Line_Journal_Template_Name; "Journal Template Name")
+ {
+ }
+ column(Gen__Journal_Line_Journal_Batch_Name; "Journal Batch Name")
+ {
+ }
+ column(Gen__Journal_Line_Line_No_; "Line No.")
+ {
+ }
+ column(Gen__Journal_Line_Account_No_; "Account No.")
+ {
+ }
+ column(LineNumCaption; LineNumCaptionLbl)
+ {
+ }
+ column(GenJnlLine_AmountCaption; GenJnlLine_AmountCaptionLbl)
+ {
+ }
+ dataitem(Customer; Customer)
+ {
+ DataItemLink = "No." = field("Account No.");
+ DataItemTableView = sorting("No.");
+ column(Gen__Journal_Line___Currency_Code_; "Gen. Journal Line"."Currency Code")
+ {
+ }
+ column(Gen__Journal_Line__Amount; -"Gen. Journal Line".Amount)
+ {
+ }
+ column(CustBankAcc_Name; CustBankAcc.Name)
+ {
+ }
+ column(CustBankAccNo; CustBankAccNo)
+ {
+ }
+ column(CustBankAcc_Code; CustBankAcc.Code)
+ {
+ }
+ column(Customer_Name; Name)
+ {
+ }
+ column(Gen__Journal_Line___Account_No__; "Gen. Journal Line"."Account No.")
+ {
+ }
+ column(LineNum_Control1120037; LineNum)
+ {
+ }
+ column(Customer_No_; "No.")
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if CustBankAcc.Get(Customer."No.", "Gen. Journal Line"."Recipient Bank Account") then
+ CustBankAccNo := CustBankAcc."Bank Branch No." + ' ' +
+ CustBankAcc."Agency Code FR" + ' ' +
+ CustBankAcc."Bank Account No." + ' ' +
+ ConvertStr(Format(CustBankAcc."RIB Key FR", 2), ' ', '0')
+ else begin
+ CustBankAccNo := '';
+ CustBankAcc.Code := '';
+ CustBankAcc.Name := '';
+ end;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if not ("Gen. Journal Line"."Account Type" in ["Gen. Journal Line"."Account Type"::Customer,
+ "Gen. Journal Line"."Account Type"::"G/L Account"])
+ then
+ CurrReport.Skip();
+
+ if "Gen. Journal Line"."Account Type" = "Gen. Journal Line"."Account Type"::"G/L Account" then
+ LineNum := LineNum
+ else
+ LineNum := IncStr(LineNum);
+
+ if GenJnlLine."Currency Code" = '' then
+ CurrencyCode := GLSetup."LCY Code"
+ else
+ CurrencyCode := GenJnlLine."Currency Code";
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ if not GenJnlLine.FindFirst() then
+ CurrReport.Skip();
+
+ if BalanceAmount then
+ GenJnlLine."Amount (LCY)" := -GenJnlLine."Amount (LCY)";
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ LineNum := '0';
+ GenJnlLine.Copy("Gen. Journal Line");
+ GenJnlLine.SetRange("Bal. Account Type", "Account Type"::"Bank Account");
+ GenJnlLine.SetRange("Bal. Account No.", "Bank Account"."No.");
+ if GenJnlLine.FindFirst() then begin
+ BalanceAmount := true;
+ "Gen. Journal Line".SetRange("Bal. Account No.", "Bank Account"."No.");
+ "Gen. Journal Line".SetRange("Posting Date", GenJnlLine."Posting Date");
+ end else begin
+ GenJnlLine.Copy("Gen. Journal Line");
+ GenJnlLine.SetRange("Account Type", "Account Type"::"Bank Account");
+ GenJnlLine.SetRange("Account No.", "Bank Account"."No.");
+ BalanceAmount := false;
+ if GenJnlLine.FindFirst() then begin
+ "Gen. Journal Line".SetRange("Document No.", GenJnlLine."Document No.");
+ "Gen. Journal Line".SetRange("Posting Date", GenJnlLine."Posting Date");
+ end else
+ CurrReport.Break();
+ end;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ FormatAddr.BankAcc(BankAccAddr, "Bank Account");
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ CompanyInfo.Get();
+ FormatAddr.Company(CompanyAddr, CompanyInfo);
+
+ GLSetup.Get();
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ CompanyInfo: Record "Company Information";
+ GLSetup: Record "General Ledger Setup";
+ CustBankAcc: Record "Customer Bank Account";
+ GenJnlLine: Record "Gen. Journal Line";
+ FormatAddr: Codeunit "Format Address";
+ CompanyAddr: array[8] of Text[100];
+ BankAccAddr: array[8] of Text[100];
+ CustBankAccNo: Text[250];
+ LineNum: Code[10];
+ CurrencyCode: Code[10];
+ BalanceAmount: Boolean;
+ Checks_CaptionLbl: Label 'Checks:';
+ No_CaptionLbl: Label 'No.';
+ Customer_No_CaptionLbl: Label 'Customer No.';
+ Customer_NameCaptionLbl: Label 'Customer Name';
+ CustBankAccNoCaptionLbl: Label 'Cust. Bank Account No.';
+ CustBankAcc_CodeCaptionLbl: Label 'Cust. Bank Account Code';
+ CustBankAcc_NameCaptionLbl: Label 'Cust. Bank Account Name';
+ Gen__Journal_Line__AmountCaptionLbl: Label 'Amount';
+ Recapitulation_FormCaptionLbl: Label 'Recapitulation Form';
+ Gen__Journal_Line___Currency_Code_CaptionLbl: Label 'Currency Code';
+ CONVERTSTR_FORMAT__RIB_Key__2_______0__CaptionLbl: Label 'RIB Key';
+ LineNumCaptionLbl: Label 'Total number of checks:';
+ GenJnlLine_AmountCaptionLbl: Label 'Total Amount';
+ Text001Lbl: Label 'The %1', Comment = '%1 = Work Date';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc
new file mode 100644
index 0000000000..bcdc74b6e2
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RecapitulationFormFR.rdlc
@@ -0,0 +1,3117 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ 24ecd37f-cab9-4f52-bd2b-aa209a2ef428
+
+
+
+
+
+
+
+
+
+
+ 0.75cm
+
+
+ 1.95cm
+
+
+ 1.05cm
+
+
+ 0.6cm
+
+
+ 1.65cm
+
+
+ 1.65cm
+
+
+ 2.5cm
+
+
+ 1.25cm
+
+
+ 3.45cm
+
+
+ 0.45cm
+
+
+ 1.5cm
+
+
+ 1.65cm
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Recapitulation_FormCaption.Value)
+
+
+
+
+
+ 80
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox5
+ 79
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox35
+ 78
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox51
+ 77
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__.Value)
+
+
+
+
+
+ 76
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox58
+ 75
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_1_.Value)
+
+
+
+
+
+ 74
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox62
+ 73
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_2_.Value)
+
+
+
+
+
+ 72
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox70
+ 71
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_3_.Value)
+
+
+
+
+
+ 70
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox78
+ 69
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_4_.Value)
+
+
+
+
+
+ 68
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox86
+ 67
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_5_.Value)
+
+
+
+
+
+ 66
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox46
+ 65
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_1_.Value)
+
+
+
+
+
+ 64
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox50
+ 63
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_6_.Value)
+
+
+
+
+
+ 62
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox30
+ 61
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_2_.Value)
+
+
+
+
+
+ 60
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox34
+ 59
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox245
+ 58
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_3_.Value)
+
+
+
+
+
+ 57
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox252
+ 56
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox237
+ 55
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_4_.Value)
+
+
+
+
+
+ 54
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox244
+ 53
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox229
+ 52
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_5_.Value)
+
+
+
+
+
+ 51
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox236
+ 50
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox221
+ 49
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_6_.Value)
+
+
+
+
+
+ 48
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox228
+ 47
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox213
+ 46
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_7_.Value)
+
+
+
+
+
+ 45
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox220
+ 44
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox205
+ 43
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccAddr_8_.Value)
+
+
+
+
+
+ 42
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox212
+ 41
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox107
+ 40
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Bank_Account_No__Caption.Value)
+
+
+
+
+
+ 39
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Bank_Account_No__.Value)
+
+
+
+
+
+ 38
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox142
+ 37
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Agency_Code_Caption.Value)
+
+
+
+
+
+ 36
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Agency_Code_.Value)
+
+
+
+
+
+ 35
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox143
+ 34
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Bank_Branch_No__Caption.Value)
+
+
+
+
+
+ 33
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_Account__Bank_Branch_No__.Value)
+
+
+
+
+
+ 32
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox144
+ 31
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption.Value)
+
+
+
+
+
+ 30
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CONVERTSTR_FORMAT__RIB_Key__2_______0__.Value)
+
+
+
+
+
+ 29
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox145
+ 28
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ 1.269cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox269
+ 27
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Checks_Caption.Value)
+
+
+
+
+
+ 26
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox121
+ 25
+
+
+ 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox287
+ 24
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!No_Caption.Value)
+
+
+
+
+
+
+ 23
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Customer_No_Caption.Value)
+
+
+
+
+
+ 22
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Customer_NameCaption.Value)
+
+
+
+
+
+ 21
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustBankAcc_CodeCaption.Value)
+
+
+
+
+
+ 20
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustBankAccNoCaption.Value)
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustBankAcc_NameCaption.Value)
+
+
+
+
+
+ 18
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Gen__Journal_Line__AmountCaption.Value)
+
+
+
+
+
+
+ 17
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Gen__Journal_Line___Currency_Code_Caption.Value)
+
+
+
+
+
+ 16
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!LineNum_Control1120037.Value
+
+
+
+
+
+
+ textbox1
+ 7
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Customer_No_.Value
+
+
+
+
+
+
+ textbox2
+ 6
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Customer_Name.Value
+
+
+
+
+
+
+ textbox129
+ 5
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustBankAcc_Code.Value
+
+
+
+
+
+
+ textbox12
+ 4
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustBankAccNo.Value
+
+
+
+
+
+
+ textbox13
+ 3
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CustBankAcc_Name.Value
+
+
+
+
+
+
+ textbox14
+ 2
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Gen__Journal_Line__Amount.Value
+
+
+
+
+
+
+ textbox160
+ 1
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Gen__Journal_Line___Currency_Code_.Value
+
+
+
+
+
+
+ textbox16
+
+
+
+
+
+
+
+ 1.269cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox10
+ 8
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!LineNumCaption.Value)
+
+
+
+
+
+ 14
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!LineNum.Value)
+
+
+
+
+
+
+ 13
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox17
+ 12
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!GenJnlLine_AmountCaption.Value)
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =-Sum(Fields!GenJnlLine_Amount.Value)
+
+
+
+
+
+ 10
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CurrencyCode.Value)
+
+
+
+
+
+ 9
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox59
+ 15
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Bank_Account__No__.Value
+
+
+ End
+
+
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+
+ Detail
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+
+
+ DataSet_Result
+
+
+ 14.382cm
+
+ 18.45cm
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Invalid
+ ececd71d-2a15-4172-8b73-685b0408ecc4
+
+
+
+
+ BankAccAddr_1_
+
+
+ BankAccAddr_2_
+
+
+ BankAccAddr_3_
+
+
+ BankAccAddr_4_
+
+
+ BankAccAddr_5_
+
+
+ BankAccAddr_6_
+
+
+ BankAccAddr_7_
+
+
+ BankAccAddr_8_
+
+
+ Bank_Account__Bank_Account_No__
+
+
+ Bank_Account__Bank_Branch_No__
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_5_
+
+
+ CompanyAddr_6_
+
+
+ CompanyAddr_1_
+
+
+ STRSUBSTNO_Text001_FORMAT_WORKDATE_0_4__
+
+
+ CONVERTSTR_FORMAT__RIB_Key__2_______0__
+
+
+ Bank_Account__Agency_Code_
+
+
+ Bank_Account__No__
+
+
+ Bank_Account__Bank_Account_No__Caption
+
+
+ Bank_Account__Bank_Branch_No__Caption
+
+
+ Checks_Caption
+
+
+ No_Caption
+
+
+ Customer_No_Caption
+
+
+ Customer_NameCaption
+
+
+ CustBankAccNoCaption
+
+
+ CustBankAcc_CodeCaption
+
+
+ CustBankAcc_NameCaption
+
+
+ Gen__Journal_Line__AmountCaption
+
+
+ Recapitulation_FormCaption
+
+
+ Gen__Journal_Line___Currency_Code_Caption
+
+
+ CONVERTSTR_FORMAT__RIB_Key__2_______0__Caption
+
+
+ Bank_Account__Agency_Code_Caption
+
+
+ LineNum
+
+
+ GenJnlLine_Amount
+
+
+ GenJnlLine_AmountFormat
+
+
+ CurrencyCode
+
+
+ Gen__Journal_Line_Journal_Template_Name
+
+
+ Gen__Journal_Line_Journal_Batch_Name
+
+
+ Gen__Journal_Line_Line_No_
+
+
+ Gen__Journal_Line_Account_No_
+
+
+ LineNumCaption
+
+
+ GenJnlLine_AmountCaption
+
+
+ Gen__Journal_Line___Currency_Code_
+
+
+ Gen__Journal_Line__Amount
+
+
+ Gen__Journal_Line__AmountFormat
+
+
+ CustBankAcc_Name
+
+
+ CustBankAccNo
+
+
+ CustBankAcc_Code
+
+
+ Customer_Name
+
+
+ Gen__Journal_Line___Account_No__
+
+
+ LineNum_Control1120037
+
+
+ Customer_No_
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc
new file mode 100644
index 0000000000..94f78950d9
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Remittance.rdlc
@@ -0,0 +1,3587 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ fb5a3061-bc43-4772-8295-cd8cafc0a095
+
+
+
+
+
+
+
+
+
+
+ 1.58727cm
+
+
+ 0.81602cm
+
+
+ 0.71711cm
+
+
+ 0.14837cm
+
+
+ 1.5873cm
+
+
+ 2.53968cm
+
+
+ 3.1746cm
+
+
+ 1.5873cm
+
+
+ 1.5873cm
+
+
+ 0.63492cm
+
+
+ 1.90476cm
+
+
+ 2.05302cm
+
+
+ 1.26984cm
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 99
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =iif(Fields!OutputNo.Value = 1, Fields!Text003.Value, Fields!Text003.Value + " " + Fields!Text000.Value)
+
+
+
+
+
+ 98
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 97
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 93
+
+ true
+
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_1_.Value
+
+
+
+
+
+ 92
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 91
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_2_.Value
+
+
+
+
+
+ 90
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 89
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_3_.Value
+
+
+
+
+
+ 88
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 87
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_1_.Value
+
+
+
+
+
+ 82
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_4_.Value
+
+
+
+
+
+ 86
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 85
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_2_.Value
+
+
+
+
+
+ 78
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_5_.Value
+
+
+
+
+
+ 84
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 83
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_3_.Value
+
+
+
+
+
+ 73
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyAddr_6_.Value
+
+
+
+
+
+ 80
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 79
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_4_.Value
+
+
+
+
+
+ 68
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__Phone_No__Caption.Value
+
+
+
+
+
+ 76
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__Phone_No__.Value
+
+
+
+
+
+ 75
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 74
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_5_.Value
+
+
+
+
+
+ 63
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__Fax_No__Caption.Value
+
+
+
+
+
+ 71
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__Fax_No__.Value
+
+
+
+
+
+ 70
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 69
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_6_.Value
+
+
+
+
+
+ 60
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__VAT_Registration_No__Caption.Value
+
+
+
+
+
+ 66
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!CompanyInfo__VAT_Registration_No__.Value
+
+
+
+
+
+ 65
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 64
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!BankAccAddr_7_.Value
+
+
+
+
+
+ 57
+
+
+ 6
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 61
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 58
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Branch_No__Caption.Value
+
+
+
+
+
+ 50
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Branch_No__.Value
+
+
+
+
+
+
+ 49
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 55
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Agency_Code_Caption.Value
+
+
+
+
+
+ 43
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Agency_Code_.Value
+
+
+
+
+
+
+ 42
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__No__Caption.Value
+
+
+
+
+
+ 54
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ 53
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__No__.Value
+
+
+
+
+
+
+ 52
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 51
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Account_No__Caption.Value
+
+
+
+
+
+ 38
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Account_No__.Value
+
+
+
+
+
+
+ 37
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCodeCaption.Value
+
+
+
+
+
+ 47
+
+
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ 46
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode.Value
+
+
+
+
+
+
+ 45
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 44
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBANCaption.Value
+
+
+
+
+
+ 38
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBAN.Value
+
+
+
+
+
+
+ 37
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Operation.Value
+
+
+
+
+
+ 40
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 39
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_Caption.Value
+
+
+
+
+
+ 38
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_.Value
+
+
+
+
+
+
+ 37
+
+
+ 4
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 35
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 34
+
+
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_PostingDate_0_4_.Value
+
+
+
+
+
+
+ 33
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 31
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!All_amounts_are_in_company_currencyCaption.Value
+
+
+
+
+
+
+ textbox5
+
+ =iif(Fields!PrintAmountInLCYCode.Value, FALSE, TRUE)
+
+ NoOutput
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Due_Date_Caption.Value)
+
+
+
+
+
+
+ 28
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__No__Caption.Value)
+
+
+
+
+
+
+ 27
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ 26
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Drawee_Reference_Caption.Value)
+
+
+
+
+
+
+ 25
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Account_No__Caption.Value)
+
+
+
+
+
+ 24
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Cust_NameCaption.Value)
+
+
+
+
+
+ 23
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Bank_Branch_No__Caption.Value)
+
+
+
+
+
+ 22
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Agency_Code_Caption.Value)
+
+
+
+
+
+ 21
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__Bank_Account_No__Caption.Value)
+
+
+
+
+
+ 20
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!StatementAmount_Control1120031Caption.Value)
+
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ 0.63492cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox2
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line__SWIFT_Code_Caption.Value)
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox23
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Line_IBANCaption.Value)
+
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox28
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox3
+ 18
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+ 17
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Payment_Line__No__.Value
+
+
+
+
+
+
+ 16
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!EmptyStringCaption.Value
+
+
+
+
+
+ 15
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Drawee_Reference_.Value
+
+
+
+
+
+ 14
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Account_No__.Value
+
+
+
+
+
+
+ 13
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Cust_Name.Value
+
+
+
+
+
+ 12
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_Branch_No__.Value
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Agency_Code_.Value
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Bank_Account_No__.Value
+
+
+
+
+
+ 9
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!StatementAmount.Value
+
+
+
+
+
+ 8
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode_Control1120060.Value
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox4
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__SWIFT_Code_.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox12
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line_IBAN.Value
+
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox18
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ textbox32
+ 1
+
+
+ 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!TotalCaption.Value)
+
+
+
+
+
+ 6
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 5
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!PrintCountingDelivery.Value)
+
+
+
+
+
+ 4
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!StatementAmount.Value)
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode_Control1120060.Value)
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!OutputNo.Value
+
+
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+
+
+ =Fields!Payment_Lines1_No_.Value
+
+
+ End
+
+
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+
+ Detail
+
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+
+
+
+
+ DataSet_Result
+ 5.24669in
+
+
+ 13.32659cm
+
+ 19.6075cm
+
+
+ 0.16654in
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+
+ 10.57035cm
+ 0.16654in
+ 3.1746cm
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1cm
+ 0cm
+ 2cm
+ 2cm
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Shared Data as Object
+
+Public Function SetData(NewData as Object)
+ If NewData <> "" Then
+ Data = NewData
+ End If
+End Function
+
+Public Function GetData(Num as Integer) as Object
+ Return Cstr(Choose(Num, Split(Cstr(Data),Chr(177))))
+End Function
+ =User!Language
+ true
+ Invalid
+ cb321b4b-8d75-426c-81ba-15ee989d1b8b
+
+
+
+
+ Payment_Lines1_No_
+
+
+ Payment_Lines1_Line_No_
+
+
+ Operation
+
+
+ PaymtHeader__No__
+
+
+ STRSUBSTNO_Text003____1__CopyText_
+
+
+ CompanyAddr_1_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_5_
+
+
+ CompanyAddr_6_
+
+
+ CompanyInfo__Phone_No__
+
+
+ CompanyInfo__Fax_No__
+
+
+ CompanyInfo__VAT_Registration_No__
+
+
+ FORMAT_PostingDate_0_4_
+
+
+ BankAccAddr_4_
+
+
+ BankAccAddr_5_
+
+
+ BankAccAddr_6_
+
+
+ BankAccAddr_7_
+
+
+ BankAccAddr_3_
+
+
+ BankAccAddr_2_
+
+
+ BankAccAddr_1_
+
+
+ PrintCurrencyCode
+
+
+ PaymtHeader__Bank_Branch_No__
+
+
+ PaymtHeader__Agency_Code_
+
+
+ PaymtHeader__Bank_Account_No__
+
+
+ OutputNo
+
+
+ Text003
+
+
+ Text000
+
+
+ PaymtHeader_IBAN
+
+
+ PaymtHeader__SWIFT_Code_
+
+
+ PageLoop_Number
+
+
+ PaymtHeader__No__Caption
+
+
+ CompanyInfo__Phone_No__Caption
+
+
+ CompanyInfo__Fax_No__Caption
+
+
+ CompanyInfo__VAT_Registration_No__Caption
+
+
+ PrintCurrencyCodeCaption
+
+
+ PaymtHeader__Bank_Branch_No__Caption
+
+
+ PaymtHeader__Agency_Code_Caption
+
+
+ PaymtHeader__Bank_Account_No__Caption
+
+
+ PaymtHeader_IBANCaption
+
+
+ PaymtHeader__SWIFT_Code_Caption
+
+
+ PrintAmountInLCYCode
+
+
+ StatementAmount
+
+
+ StatementAmountFormat
+
+
+ PrintCurrencyCode_Control1120060
+
+
+ Cust_Name
+
+
+ StatementAmount_Control1120031
+
+
+ StatementAmount_Control1120031Format
+
+
+ PrintCurrencyCode_Control1120061
+
+
+ Payment_Line__Due_Date_
+
+
+ Payment_Line__No__
+
+
+ Payment_Line__Account_No__
+
+
+ Payment_Line__Drawee_Reference_
+
+
+ Payment_Line__Bank_Branch_No__
+
+
+ Payment_Line__Agency_Code_
+
+
+ Payment_Line__Bank_Account_No__
+
+
+ Payment_Line__SWIFT_Code_
+
+
+ Payment_Line_IBAN
+
+
+ StatementAmount_Control1120036
+
+
+ StatementAmount_Control1120036Format
+
+
+ PrintCurrencyCode_Control1120063
+
+
+ StatementAmount_Control1120039
+
+
+ StatementAmount_Control1120039Format
+
+
+ PrintCountingDelivery
+
+
+ PrintCurrencyCode_Control1120064
+
+
+ Payment_Line_Line_No_
+
+
+ All_amounts_are_in_company_currencyCaption
+
+
+ Cust_NameCaption
+
+
+ StatementAmount_Control1120031Caption
+
+
+ Payment_Line__Drawee_Reference_Caption
+
+
+ Payment_Line__No__Caption
+
+
+ Payment_Line__Due_Date_Caption
+
+
+ Payment_Line__Account_No__Caption
+
+
+ Payment_Line__Bank_Branch_No__Caption
+
+
+ Payment_Line__Agency_Code_Caption
+
+
+ Payment_Line__Bank_Account_No__Caption
+
+
+ Payment_Line__SWIFT_Code_Caption
+
+
+ Payment_Line_IBANCaption
+
+
+ ReportCaption
+
+
+ EmptyStringCaption
+
+
+ ReportCaption_Control1120015
+
+
+ TotalCaption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al
new file mode 100644
index 0000000000..92efd08b33
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/RemittanceFR.Report.al
@@ -0,0 +1,457 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using System.Utilities;
+
+report 10847 "Remittance FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Remittance.rdlc';
+ Caption = 'Remittance';
+
+ dataset
+ {
+ dataitem("Payment Lines1"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.") where("Account Type" = const(Customer));
+ MaxIteration = 1;
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.";
+ RequestFilterHeading = 'Payment lines';
+ column(Payment_Lines1_No_; "No.")
+ {
+ }
+ column(Payment_Lines1_Line_No_; "Line No.")
+ {
+ }
+ dataitem(CopyLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number);
+ dataitem(PageLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number) where(Number = const(1));
+ column(Operation; Operation)
+ {
+ }
+ column(PaymtHeader__No__; PaymtHeader."No.")
+ {
+ }
+ column(STRSUBSTNO_Text003____1__CopyText_; StrSubstNo(Text003Lbl + ' %1', CopyText))
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CompanyInfo__Phone_No__; CompanyInfo."Phone No.")
+ {
+ }
+ column(CompanyInfo__Fax_No__; CompanyInfo."Fax No.")
+ {
+ }
+ column(CompanyInfo__VAT_Registration_No__; CompanyInfo."VAT Registration No.")
+ {
+ }
+ column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4))
+ {
+ }
+ column(BankAccAddr_4_; BankAccAddr[4])
+ {
+ }
+ column(BankAccAddr_5_; BankAccAddr[5])
+ {
+ }
+ column(BankAccAddr_6_; BankAccAddr[6])
+ {
+ }
+ column(BankAccAddr_7_; BankAccAddr[7])
+ {
+ }
+ column(BankAccAddr_3_; BankAccAddr[3])
+ {
+ }
+ column(BankAccAddr_2_; BankAccAddr[2])
+ {
+ }
+ column(BankAccAddr_1_; BankAccAddr[1])
+ {
+ }
+ column(PrintCurrencyCode; PrintCurrencyCode())
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.")
+ {
+ }
+ column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code")
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.")
+ {
+ }
+ column(OutputNo; OutputNo)
+ {
+ }
+ column(Text003; Text003Lbl)
+ {
+ }
+ column(Text000; Text000Lbl)
+ {
+ }
+ column(PaymtHeader_IBAN; PaymtHeader.IBAN)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_; PaymtHeader."SWIFT Code")
+ {
+ }
+ column(PageLoop_Number; Number)
+ {
+ }
+ column(PaymtHeader__No__Caption; PaymtHeader__No__CaptionLbl)
+ {
+ }
+ column(CompanyInfo__Phone_No__Caption; CompanyInfo__Phone_No__CaptionLbl)
+ {
+ }
+ column(CompanyInfo__Fax_No__Caption; CompanyInfo__Fax_No__CaptionLbl)
+ {
+ }
+ column(CompanyInfo__VAT_Registration_No__Caption; CompanyInfo__VAT_Registration_No__CaptionLbl)
+ {
+ }
+ column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader_IBANCaption; PaymtHeader_IBANCaptionLbl)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_Caption; PaymtHeader__SWIFT_Code_CaptionLbl)
+ {
+ }
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemLink = "No." = field("No.");
+ DataItemLinkReference = "Payment Lines1";
+ DataItemTableView = sorting("No.", "Line No.");
+ column(PrintAmountInLCYCode; PrintAmountInLCYCode)
+ {
+ }
+ column(StatementAmount; StatementAmount)
+ {
+ AutoFormatExpression = ExtrCurrencyCode();
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120060; PrintCurrencyCode())
+ {
+ }
+ column(Cust_Name; Cust.Name)
+ {
+ }
+ column(StatementAmount_Control1120031; StatementAmount)
+ {
+ AutoFormatExpression = ExtrCurrencyCode();
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120061; PrintCurrencyCode())
+ {
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(Payment_Line__No__; "No.")
+ {
+ }
+ column(Payment_Line__Account_No__; "Account No.")
+ {
+ }
+ column(Payment_Line__Drawee_Reference_; "Drawee Reference")
+ {
+ }
+ column(Payment_Line__Bank_Branch_No__; "Bank Branch No.")
+ {
+ }
+ column(Payment_Line__Agency_Code_; "Agency Code")
+ {
+ }
+ column(Payment_Line__Bank_Account_No__; "Bank Account No.")
+ {
+ }
+ column(Payment_Line__SWIFT_Code_; "SWIFT Code")
+ {
+ }
+ column(Payment_Line_IBAN; IBAN)
+ {
+ }
+ column(StatementAmount_Control1120036; StatementAmount)
+ {
+ AutoFormatExpression = ExtrCurrencyCode();
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120063; PrintCurrencyCode())
+ {
+ }
+ column(StatementAmount_Control1120039; StatementAmount)
+ {
+ AutoFormatExpression = ExtrCurrencyCode();
+ AutoFormatType = 1;
+ }
+ column(PrintCountingDelivery; PrintCountingDelivery())
+ {
+ }
+ column(PrintCurrencyCode_Control1120064; PrintCurrencyCode())
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(All_amounts_are_in_company_currencyCaption; All_amounts_are_in_company_currencyCaptionLbl)
+ {
+ }
+ column(Cust_NameCaption; Cust_NameCaptionLbl)
+ {
+ }
+ column(StatementAmount_Control1120031Caption; StatementAmount_Control1120031CaptionLbl)
+ {
+ }
+ column(Payment_Line__Drawee_Reference_Caption; FieldCaption("Drawee Reference"))
+ {
+ }
+ column(Payment_Line__No__Caption; Payment_Line__No__CaptionLbl)
+ {
+ }
+ column(Payment_Line__Due_Date_Caption; Payment_Line__Due_Date_CaptionLbl)
+ {
+ }
+ column(Payment_Line__Account_No__Caption; FieldCaption("Account No."))
+ {
+ }
+ column(Payment_Line__Bank_Branch_No__Caption; FieldCaption("Bank Branch No."))
+ {
+ }
+ column(Payment_Line__Agency_Code_Caption; FieldCaption("Agency Code"))
+ {
+ }
+ column(Payment_Line__Bank_Account_No__Caption; FieldCaption("Bank Account No."))
+ {
+ }
+ column(Payment_Line__SWIFT_Code_Caption; FieldCaption("SWIFT Code"))
+ {
+ }
+ column(Payment_Line_IBANCaption; Payment_Line_IBANCaptionLbl)
+ {
+ }
+ column(ReportCaption; ReportCaptionLbl)
+ {
+ }
+ column(EmptyStringCaption; EmptyStringCaptionLbl)
+ {
+ }
+ column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl)
+ {
+ }
+ column(TotalCaption; TotalCaptionLbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ Cust.Get("Account No.");
+
+ if PrintAmountInLCYCode then
+ StatementAmount := Amount
+ else
+ StatementAmount := Amount;
+ StatementAmount := Abs(Amount);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ Clear(StatementAmount);
+ end;
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if Number > 1 then begin
+ OutputNo := OutputNo + 1;
+ CopyText := Text000Lbl;
+ end;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ LoopsNumber := Abs(CopiesNumber) + 1;
+ CopyText := '';
+ SetRange(Number, 1, LoopsNumber);
+
+ OutputNo := 1;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtHeader.Get("No.");
+ PostingDate := PaymtHeader."Posting Date";
+
+ PaymtHeader.CalcFields("No. of Lines");
+ CountStatement := PaymtHeader."No. of Lines";
+
+ PaymtHeader.TestField("Account Type", PaymtHeader."Account Type"::"Bank Account");
+
+ FormatAddress.FormatAddr(
+ BankAccAddr, PaymtHeader."Bank Name", PaymtHeader."Bank Name 2", '', PaymtHeader."Bank Address", PaymtHeader."Bank Address 2",
+ PaymtHeader."Bank City", PaymtHeader."Bank Post Code", '', '');
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ CompanyInfo.Get();
+ FormatAddress.Company(CompanyAddr, CompanyInfo);
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = true;
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(Copies_Number; CopiesNumber)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Number of Copies';
+ ToolTip = 'Specifies the number of copies to print.';
+ }
+ field(PrintAmountIn_LCYCode; PrintAmountInLCYCode)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Print Amounts in LCY';
+ ToolTip = 'Specifies whether to print amounts in the local currency.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ CompanyInfo: Record "Company Information";
+ Cust: Record Customer;
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ FormatAddress: Codeunit "Format Address";
+ BankAccAddr: array[8] of Text[100];
+ CompanyAddr: array[8] of Text[100];
+ Operation: Text[80];
+ LoopsNumber: Integer;
+ CopiesNumber: Integer;
+ CopyText: Text[30];
+ PrintAmountInLCYCode: Boolean;
+ StatementAmount: Decimal;
+ CountStatement: Integer;
+ PostingDate: Date;
+ Text001Lbl: Label ' BILL';
+ Text002Lbl: Label ' BILLS';
+ OutputNo: Integer;
+ Text003Lbl: Label 'Remittance';
+ Text000Lbl: Label 'COPY';
+ PaymtHeader__No__CaptionLbl: Label 'Remittance No.';
+ CompanyInfo__Phone_No__CaptionLbl: Label 'Phone No.';
+ CompanyInfo__Fax_No__CaptionLbl: Label 'FAX No.';
+ CompanyInfo__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.';
+ PrintCurrencyCodeCaptionLbl: Label 'Currency Code';
+ PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.';
+ PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code';
+ PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.';
+ PaymtHeader_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ PaymtHeader__SWIFT_Code_CaptionLbl: Label 'SWIFT Code';
+ All_amounts_are_in_company_currencyCaptionLbl: Label 'All amounts are in company currency';
+ Cust_NameCaptionLbl: Label 'Name';
+ StatementAmount_Control1120031CaptionLbl: Label 'Remaining Amount';
+ Payment_Line__No__CaptionLbl: Label 'Document No.';
+ Payment_Line__Due_Date_CaptionLbl: Label 'Due Date';
+ Payment_Line_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ ReportCaptionLbl: Label 'Report';
+ EmptyStringCaptionLbl: Label '/', Locked = true;
+ ReportCaption_Control1120015Lbl: Label 'Report';
+ TotalCaptionLbl: Label 'Total';
+
+
+ procedure ExtrCurrencyCode(): Code[10]
+ begin
+ if PrintAmountInLCYCode then
+ exit('');
+
+ exit("Payment Lines1"."Currency Code");
+ end;
+
+
+ procedure PrintCurrencyCode(): Code[10]
+ begin
+ if ("Payment Lines1"."Currency Code" = '') or PrintAmountInLCYCode then begin
+ GLSetup.Get();
+ exit(GLSetup."LCY Code");
+ end;
+ exit("Payment Lines1"."Currency Code");
+ end;
+
+
+ procedure PrintCountingDelivery(): Text[30]
+ begin
+ if CountStatement > 1 then
+ exit(Format(CountStatement) + Text002Lbl);
+
+ exit(Format(CountStatement) + Text001Lbl);
+ end;
+
+
+ procedure InitRequest(InitCopies: Integer; InitAmountInLCYCode: Boolean)
+ begin
+ CopiesNumber := InitCopies;
+ PrintAmountInLCYCode := InitAmountInLCYCode;
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al
new file mode 100644
index 0000000000..3c4028fc45
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SEPAISO20022FR.Report.al
@@ -0,0 +1,534 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System;
+using System.IO;
+using System.Text;
+using System.Xml;
+
+report 10848 "SEPA ISO20022 FR"
+{
+ Caption = 'SEPA ISO20022';
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem("Payment Header"; "Payment Header FR")
+ {
+
+ trigger OnAfterGetRecord()
+ begin
+ TestField(IBAN);
+ TestField("SWIFT Code");
+ TestField("Bank Country/Region Code");
+ if not CheckBankCountrySEPAAllowed("Bank Country/Region Code") then
+ Error(SEPANotEnabledForPaymentErr, "Bank Country/Region Code");
+ PaymentLineFR.Reset();
+ PaymentLineFR.SetRange("No.", "No.");
+ CheckPaymentLines();
+ ExportSEPAFile();
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ PaymentHeader := "Payment Header";
+ PaymentHeader."File Export Completed" := true;
+ PaymentHeader.Modify();
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ var
+ FileMgt: Codeunit "File Management";
+ ToFile: Text;
+ begin
+ ToFile := Text009Lbl;
+ OnPostReportOnAfterSetToFile(ToFile);
+
+ if ServerFileName <> '' then
+ FileMgt.CopyServerFile(FileName, ServerFileName, true)
+ else
+ if not FileMgt.DownloadHandler(FileName, Text000Lbl, '', Text001Lbl, ToFile) then
+ Error(Text010Lbl);
+ end;
+
+ trigger OnPreReport()
+ var
+ FileMgt: Codeunit "File Management";
+ begin
+ // Perform Checks
+ CompanyInfo.Get();
+ CompanyInfo.TestField("Country/Region Code");
+ CompanyInfo.TestField("VAT Registration No.");
+
+ FileName := FileMgt.ServerTempFileName('');
+
+ if DelChr(FileName, '<>') = '' then
+ Error(Text002Lbl);
+ end;
+
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLineFR: Record "Payment Line FR";
+ CompanyInfo: Record "Company Information";
+ SEPACountry: Record "Country/Region";
+ XMLDomDoc: DotNet XmlDocument;
+ FileName: Text;
+ Text000Lbl: Label 'Save As';
+ Text001Lbl: Label 'XML Files (*.xml)|*.xml|All Files|*.*', Comment = 'Only translate ''XML Files'' and ''All Files'' {Split=r"[\|\(]\*\.[^ |)]*[|) ]?"}';
+ Text002Lbl: Label 'File name must be specified.';
+ SEPANotEnabledForVendorErr: Label 'The SEPA Allowed field is not enabled for the Country/Region: %1 of the Vendor Bank Account: %2.', Comment = '%1 = code, %2 = No. and Code';
+ ServerFileName: Text;
+ PaymentLineCount: Integer;
+ SEPANotEnabledForPaymentErr: Label 'The SEPA Allowed field is not enabled for the Country/Region: %1 of the Payment Header: Bank Country/Region Code.', Comment = '%1= Number';
+ Text004Lbl: Label 'Currency is not Euro in the %1, %2: %3.', Comment = '%1 = table caption, %2 = field caption, %3 = Line No.';
+ Text005Lbl: Label 'Payment Lines can only be of type Customer or Vendor for SEPA.';
+ Text009Lbl: Label 'default.xml';
+ Text010Lbl: Label 'File download failed.';
+ Text011Lbl: Label 'Amount cannot be negative in the %1, %2: %3.', Comment = '%1 = table caption, %2 = field caption, %3 = Line No.';
+
+ local procedure ExportSEPAFile()
+ var
+ XMLDOMManagement: Codeunit "XML DOM Management";
+ XMLRootElement: DotNet XmlElement;
+ XMLNodeCurr: DotNet XmlNode;
+ XMLNewChild: DotNet XmlNode;
+ begin
+ XMLDOMManagement.LoadXMLDocumentFromText('', XMLDomDoc);
+ XMLRootElement := XMLDomDoc.DocumentElement;
+ XMLRootElement.SetAttribute('xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.001.001.02');
+ XMLRootElement.SetAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchemainstance');
+ XMLNodeCurr := XMLDomDoc.SelectSingleNode('Document');
+ AddElement(XMLNodeCurr, 'pain.001.001.02', '', '', XMLNewChild);
+
+ ExportGroupHeader(XMLNewChild);
+ ExportPaymentInformation(XMLNewChild);
+
+ XMLDomDoc.Save(FileName);
+ Clear(XMLDomDoc);
+ end;
+
+ local procedure ExportGroupHeader(XMLNodeCurr: DotNet XmlNode)
+ var
+ XMLNewChild: DotNet XmlNode;
+ MessageId: Text;
+ begin
+ AddElement(XMLNodeCurr, 'GrpHdr', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ MessageId := "Payment Header"."No.";
+ if StrLen(MessageId) > 35 then
+ MessageId := CopyStr(MessageId, StrLen(MessageId) - 34);
+
+ AddElement(XMLNodeCurr, 'MsgId', MessageId, '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'CreDtTm', Format(CurrentDateTime, 19, 9), '', XMLNewChild);
+
+ PaymentLineFR.Reset();
+ PaymentLineFR.SetRange("No.", "Payment Header"."No.");
+ AddElement(XMLNodeCurr, 'NbOfTxs', Format(PaymentLineCount, 0, 9), '', XMLNewChild);
+ "Payment Header".CalcFields(Amount);
+ AddElement(XMLNodeCurr, 'CtrlSum', Format("Payment Header".Amount, 0, ''), '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'Grpg', 'MIXD', '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'InitgPty', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'Nm', CompanyInfo.Name, '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'OrgId', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'TaxIdNb', Format(DelChr(CompanyInfo."VAT Registration No."), 0, 9), '', XMLNewChild);
+
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ end;
+
+ local procedure ExportPaymentInformation(XMLNodeCurr: DotNet XmlNode)
+ var
+ XMLNewChild: DotNet XmlNode;
+ AddressLine1: Text[151];
+ AddressLine2: Text[60];
+ UstrdRemitInfo: Text;
+ begin
+ AddElement(XMLNodeCurr, 'PmtInf', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'PmtInfId', "Payment Header"."No.", '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'PmtMtd', 'TRF', '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'PmtTpInf', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'SvcLvl', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'Cd', 'SEPA', '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'ReqdExctnDt', Format("Payment Header"."Posting Date", 0, 9), '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'Dbtr', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'Nm', CompanyInfo.Name, '', XMLNewChild);
+
+ AddElement(XMLNodeCurr, 'PstlAdr', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddressLine1 := DelChr(CompanyInfo.Address, '<>') + ' ' + DelChr(CompanyInfo."Address 2", '<>');
+ if DelChr(AddressLine1) <> '' then
+ AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine1, 1, 70), '', XMLNewChild);
+
+ AddressLine2 := DelChr(CompanyInfo."Post Code", '<>') + ' ' + DelChr(CompanyInfo.City, '<>');
+ if DelChr(AddressLine2) <> '' then
+ AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine2, 1, 70), '', XMLNewChild);
+
+ AddElement(XMLNodeCurr, 'Ctry', CopyStr(CompanyInfo."Country/Region Code", 1, 2), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'DbtrAcct', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'IBAN', CopyStr(DelChr("Payment Header".IBAN), 1, 34), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'Ccy', 'EUR', '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'DbtrAgt', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'FinInstnId', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'BIC', CopyStr(DelChr("Payment Header"."SWIFT Code"), 1, 11), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'ChrgBr', 'SLEV', '', XMLNewChild);
+
+ if PaymentLineFR.Find('-') then
+ repeat
+ AddElement(XMLNodeCurr, 'CdtTrfTxInf', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'PmtId', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'EndToEndId', GetEndToEndId(PaymentLineFR), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'Amt', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+ if PaymentLineFR.Amount < 0 then
+ Error(Text011Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No.");
+ AddElement(XMLNodeCurr, 'InstdAmt', Format(PaymentLineFR.Amount, 0, ''), '', XMLNewChild);
+ AddAttribute(XMLDomDoc, XMLNewChild, 'Ccy', 'EUR');
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'CdtrAgt', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'FinInstnId', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'BIC', CopyStr(DelChr(PaymentLineFR."SWIFT Code"), 1, 11), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ AddElement(XMLNodeCurr, 'Cdtr', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddAccountInformation(XMLNodeCurr);
+
+ AddElement(XMLNodeCurr, 'CdtrAcct', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'Id', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddElement(XMLNodeCurr, 'IBAN', CopyStr(DelChr(PaymentLineFR.IBAN), 1, 34), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+
+ UstrdRemitInfo := CreateUstrdRemitInfo();
+ if DelChr(UstrdRemitInfo) <> '' then begin
+ AddElement(XMLNodeCurr, 'RmtInf', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+ AddElement(XMLNodeCurr, 'Ustrd', UstrdRemitInfo, '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ end;
+
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ until PaymentLineFR.Next() = 0;
+
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ end;
+
+ local procedure AddElement(var XMLNode: DotNet XmlNode; NodeName: Text;
+ NodeText: Text; NameSpace: Text[250]; var CreatedXMLNode: DotNet XmlNode): Boolean
+ var
+ StringConversionMgt: Codeunit StringConversionManagement;
+ NewChildNode: DotNet XmlNode;
+ begin
+ NewChildNode := XMLNode.OwnerDocument.CreateNode('element', NodeName, NameSpace);
+ if IsNull(NewChildNode) then
+ exit(false);
+
+ if NodeText <> '' then
+ NewChildNode.InnerText := StringConversionMgt.WindowsToASCII(NodeText);
+ XMLNode.AppendChild(NewChildNode);
+ CreatedXMLNode := NewChildNode;
+ Clear(NewChildNode);
+ exit(true);
+ end;
+
+ local procedure AddAttribute(var XMLDomDocParam: DotNet XmlDocument;
+
+ var
+ XMLDomNode: DotNet XmlNode;
+ AttribName: Text[250];
+ AttribValue: Text[250]): Boolean
+ var
+ XMLDomAttribute: DotNet XmlAttribute;
+ begin
+ XMLDomAttribute := XMLDomDocParam.CreateAttribute(AttribName);
+ if IsNull(XMLDomAttribute) then
+ exit(false);
+
+ if AttribValue <> '' then
+ XMLDomAttribute.Value := AttribValue;
+ XMLDomNode.Attributes.SetNamedItem(XMLDomAttribute);
+ Clear(XMLDomAttribute);
+ exit(true);
+ end;
+
+ local procedure AddAccountInformation(var XMLNodeCurr: DotNet XmlNode)
+ var
+ Cust: Record Customer;
+ Vend: Record Vendor;
+ begin
+ case PaymentLineFR."Account Type" of
+ PaymentLineFR."Account Type"::Customer:
+ begin
+ Cust.Get(PaymentLineFR."Account No.");
+ AddAccountTags(XMLNodeCurr, Cust.Name, Cust.Address, Cust."Address 2", Cust."Post Code", Cust.City, Cust."Country/Region Code");
+ end;
+ PaymentLineFR."Account Type"::Vendor:
+ begin
+ Vend.Get(PaymentLineFR."Account No.");
+ AddAccountTags(XMLNodeCurr, Vend.Name, Vend.Address, Vend."Address 2", Vend."Post Code", Vend.City, Vend."Country/Region Code");
+ end;
+ end;
+ end;
+
+ local procedure AddAccountTags(var XMLNodeCurr: DotNet XmlNode; AccountName: Text;
+ Address: Text;
+ Address2: Text[70];
+ PostCode: Text[70];
+ City: Text[70];
+ CountryCode: Text[10])
+ var
+ XMLNewChild: DotNet XmlNode;
+ AddressLine1: Text[150];
+ AddressLine2: Text[150];
+ begin
+ AddElement(XMLNodeCurr, 'Nm', AccountName, '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'PstlAdr', '', '', XMLNewChild);
+ XMLNodeCurr := XMLNewChild;
+
+ AddressLine1 := DelChr(Address, '<>') + ' ' + DelChr(Address2, '<>');
+ if DelChr(AddressLine1) <> '' then
+ AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine1, 1, 70), '', XMLNewChild);
+ AddressLine2 := DelChr(PostCode, '<>') + ' ' + DelChr(City, '<>');
+ if DelChr(AddressLine2) <> '' then
+ AddElement(XMLNodeCurr, 'AdrLine', CopyStr(AddressLine2, 1, 70), '', XMLNewChild);
+ AddElement(XMLNodeCurr, 'Ctry', CopyStr(CountryCode, 1, 2), '', XMLNewChild);
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ XMLNodeCurr := XMLNodeCurr.ParentNode;
+ end;
+
+ local procedure CheckBankCountrySEPAAllowed(CountryCode: Code[10]): Boolean
+ begin
+ if SEPACountry.Code <> CountryCode then
+ SEPACountry.Get(CountryCode);
+ exit(SEPACountry."SEPA Allowed");
+ end;
+
+ local procedure CheckPaymentLines()
+ var
+ VendorBankAcc: Record "Vendor Bank Account";
+ CustomerBankAcc: Record "Customer Bank Account";
+ begin
+ // Loop through all Payment lines and perform validations
+ PaymentLineCount := 0;
+ if PaymentLineFR.Find('-') then
+ repeat
+ PaymentLineFR.TestField(IBAN);
+ PaymentLineFR.TestField("SWIFT Code");
+ case PaymentLineFR."Account Type" of
+ PaymentLineFR."Account Type"::Vendor:
+ begin
+ VendorBankAcc.Get(PaymentLineFR."Account No.", PaymentLineFR."Bank Account Code");
+ VendorBankAcc.TestField("Country/Region Code");
+ if not CheckBankCountrySEPAAllowed(VendorBankAcc."Country/Region Code") then
+ Error(SEPANotEnabledForVendorErr, SEPACountry.Code,
+ VendorBankAcc."Vendor No." + ',' + VendorBankAcc.Code);
+ end;
+ PaymentLineFR."Account Type"::Customer:
+ begin
+ CustomerBankAcc.Get(PaymentLineFR."Account No.", PaymentLineFR."Bank Account Code");
+ CustomerBankAcc.TestField("Country/Region Code");
+ if not CheckBankCountrySEPAAllowed(CustomerBankAcc."Country/Region Code") then
+ Error(SEPANotEnabledForVendorErr, SEPACountry.Code,
+ CustomerBankAcc."Customer No." + ',' + CustomerBankAcc.Code);
+ end;
+ end;
+ CheckEUCurrencyInLines(PaymentLineFR."Currency Code");
+ if not (PaymentLineFR."Account Type" in [PaymentLineFR."Account Type"::Customer, PaymentLineFR."Account Type"::Vendor]) then
+ Error(Text005Lbl);
+ PaymentLineCount := PaymentLineCount + 1;
+ until PaymentLineFR.Next() = 0;
+ end;
+
+ local procedure CheckEUCurrencyInLines(CurrencyCode: Code[10])
+ var
+ GLSetup: Record "General Ledger Setup";
+ begin
+ // Check whether the currency being used is Euro
+ GLSetup.Get();
+ case GLSetup."Local Currency" of
+ GLSetup."Local Currency"::Euro:
+ if CurrencyCode <> '' then
+ Error(Text004Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No.");
+ GLSetup."Local Currency"::Other:
+ begin
+ GLSetup.TestField("Currency Euro");
+ if CurrencyCode <> GLSetup."Currency Euro" then
+ Error(Text004Lbl, PaymentLineFR.TableCaption(), PaymentLineFR.FieldCaption("Line No."), PaymentLineFR."Line No.");
+ end;
+ end;
+ end;
+
+
+ procedure CreateUstrdRemitInfo(): Text
+ var
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ UstrdRemitInfo: Text;
+ Separator: Text[1];
+ LoopBreak: Boolean;
+ begin
+ UstrdRemitInfo := '';
+ LoopBreak := false;
+ if ((DelChr(PaymentLineFR."Applies-to Doc. No.") = '') and
+ (DelChr(PaymentLineFR."Applies-to ID") = ''))
+ then
+ exit(UstrdRemitInfo);
+ case PaymentLineFR."Account Type" of
+ PaymentLineFR."Account Type"::Vendor:
+ if DelChr(PaymentLineFR."Applies-to Doc. No.") <> '' then
+ UstrdRemitInfo := DelChr(PaymentLineFR."Applies-to Doc. No.")
+ else begin
+ VendLedgEntry.SetCurrentKey("Vendor No.", "Applies-to ID");
+ VendLedgEntry.SetRange("Vendor No.", PaymentLineFR."Account No.");
+ VendLedgEntry.SetRange("Applies-to ID", PaymentLineFR."Applies-to ID");
+ if VendLedgEntry.FindSet() then
+ repeat
+ if UstrdRemitInfo = '' then
+ Separator := ''
+ else
+ Separator := ',';
+ if DelChr(VendLedgEntry."External Document No.") <> '' then
+ if StrLen(UstrdRemitInfo + Separator + DelChr(VendLedgEntry."External Document No.")) <= 140 then
+ UstrdRemitInfo := UstrdRemitInfo + Separator + DelChr(VendLedgEntry."External Document No.")
+ else
+ LoopBreak := true;
+ until (VendLedgEntry.Next() = 0) or LoopBreak;
+ end;
+ PaymentLineFR."Account Type"::Customer:
+ if DelChr(PaymentLineFR."Applies-to Doc. No.") <> '' then
+ UstrdRemitInfo := PaymentLineFR."Applies-to Doc. No."
+ else begin
+ CustLedgEntry.SetCurrentKey("Customer No.", "Applies-to ID");
+ CustLedgEntry.SetRange("Customer No.", PaymentLineFR."Account No.");
+ CustLedgEntry.SetRange("Applies-to ID", PaymentLineFR."Applies-to ID");
+ if CustLedgEntry.FindSet() then
+ repeat
+ if UstrdRemitInfo = '' then
+ Separator := ''
+ else
+ Separator := ',';
+ if DelChr(CustLedgEntry."Document No.") <> '' then
+ if StrLen(UstrdRemitInfo + Separator + DelChr(CustLedgEntry."Document No.")) <= 140 then
+ UstrdRemitInfo := UstrdRemitInfo + Separator + DelChr(CustLedgEntry."Document No.")
+ else
+ LoopBreak := true;
+ until (CustLedgEntry.Next() = 0) or LoopBreak;
+ end;
+ end;
+ exit(UstrdRemitInfo);
+ end;
+
+ local procedure GetEndToEndId(PaymentLine: Record "Payment Line FR") EndtoEndIdTxt: Text
+ begin
+ EndtoEndIdTxt := PaymentLine."Document No.";
+ if DelChr(EndtoEndIdTxt, '<>') = '' then
+ EndtoEndIdTxt := 'NOTPROVIDED';
+
+ OnAfterGetEndToEndId(PaymentLine, EndtoEndIdTxt);
+
+ exit(CopyStr(EndtoEndIdTxt, 1, 35));
+ end;
+
+
+ procedure SetFilePath(FilePath: Text)
+ begin
+ ServerFileName := FilePath;
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterGetEndToEndId(PaymentLine: Record "Payment Line FR"; var EndtoEndIdTxt: Text)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnPostReportOnAfterSetToFile(var ToFile: Text)
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al
new file mode 100644
index 0000000000..065fde00dc
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestCustPayments.Report.al
@@ -0,0 +1,461 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Payables;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+
+report 10849 "Suggest Cust. Payments"
+{
+ Caption = 'Suggest Customer Payments';
+ Permissions = TableData "Cust. Ledger Entry" = rm;
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem(Customer; Customer)
+ {
+ DataItemTableView = sorting("No.");
+ RequestFilterFields = "No.", "Payment Method Code";
+
+ trigger OnAfterGetRecord()
+ begin
+ Window.Update(1, "No.");
+ GetCustLedgEntries(true, false);
+ GetCustLedgEntries(false, false);
+ CheckAmounts(false);
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ if PaymentDisc then begin
+ Reset();
+ CopyFilters(Cust2);
+ Window.Open(Text007Lbl);
+ if Find('-') then
+ repeat
+ Window.Update(1, "No.");
+ TempPayableCustLedgEntry.SetRange("Vendor No.", "No.");
+ GetCustLedgEntries(true, true);
+ GetCustLedgEntries(false, true);
+ CheckAmounts(true);
+ until Next() = 0;
+ end;
+
+ GenPayLine.LockTable();
+ GenPayLine.SetRange("No.", GenPayLine."No.");
+ if GenPayLine.FindLast() then begin
+ LastLineNo := GenPayLine."Line No.";
+ GenPayLine.Init();
+ end;
+
+ Window.Open(Text008Lbl);
+
+ TempPayableCustLedgEntry.Reset();
+ TempPayableCustLedgEntry.SetRange(Priority, 1, 2147483647);
+ MakeGenPayLines();
+ TempPayableCustLedgEntry.Reset();
+ TempPayableCustLedgEntry.SetRange(Priority, 0);
+ MakeGenPayLines();
+ TempPayableCustLedgEntry.Reset();
+ TempPayableCustLedgEntry.DeleteAll();
+ Window.Close();
+
+ if GenPayLineInserted and (Customer.GetFilter("Partner Type") <> '') then begin
+ GenPayHead."Partner Type" := Customer."Partner Type";
+ GenPayHead.Modify();
+ end;
+ ShowMessage(MessageText);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ if LastDueDateToPayReq = 0D then
+ Error(Text000Lbl);
+ if PostingDate = 0D then
+ Error(Text001Lbl);
+
+ GenPayLineInserted := false;
+ MessageText := '';
+
+ if PaymentDisc and (LastDueDateToPayReq < WorkDate()) then
+ if not
+ Confirm(
+ Text003Lbl +
+ Text004Lbl, false,
+ WorkDate())
+ then
+ Error(Text005Lbl);
+
+ Cust2.CopyFilters(Customer);
+ Window.Open(Text006Lbl);
+
+ NextEntryNo := 1;
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = false;
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(LastPaymentDate; LastDueDateToPayReq)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Last Payment Date';
+ ToolTip = 'Specifies the latest payment date that can appear on the customer ledger entries to include in the batch job. ';
+ }
+ field(UsePaymentDisc; PaymentDisc)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Find Payment Discounts';
+ MultiLine = true;
+ ToolTip = 'Specifies whether to include customer ledger entries for which you can receive a payment discount.';
+ }
+ field(Summarize_Per; SummarizePer)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Summarize per';
+ OptionCaption = ' ,Customer,Due date';
+ ToolTip = 'Specifies how to summarize. Choose the Customer option for one summarized line per customer for open ledger entries. Choose the Due Date option for one summarized line per due date per customer for open ledger entries. Choose the empty option if you want each open customer ledger entry to result in an individual payment line.';
+ }
+ field(Currency_Filter; CurrencyFilter)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Currency Filter';
+ Editable = false;
+ TableRelation = Currency;
+ ToolTip = 'Specifies the currencies to include in the transfer. To see the available currencies, choose the Filter field.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ Cust2: Record Customer;
+ GenPayHead: Record "Payment Header FR";
+ GenPayLine: Record "Payment Line FR";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ TempPayableCustLedgEntry: Record "Payable Vendor Ledger Entry" temporary;
+ TempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary;
+ TempOldTempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary;
+ PaymentClass: Record "Payment Class FR";
+ Window: Dialog;
+ PaymentDisc: Boolean;
+ PostingDate: Date;
+ LastDueDateToPayReq: Date;
+ NextDocNo: Code[20];
+ SummarizePer: Option " ",Customer,"Due date";
+ LastLineNo: Integer;
+ NextEntryNo: Integer;
+ MessageText: Text[250];
+ GenPayLineInserted: Boolean;
+ CurrencyFilter: Code[10];
+ Text000Lbl: Label 'Please enter the last payment date.';
+ Text001Lbl: Label 'Please enter the posting date.';
+ Text003Lbl: Label 'The selected last due date is earlier than %1.\\', Comment = '%1 = work date';
+ Text004Lbl: Label 'Do you still want to run the batch job?';
+ Text005Lbl: Label 'The batch job was interrupted.';
+ Text006Lbl: Label 'Processing customers #1##########', Comment = '%1=';
+ Text007Lbl: Label 'Processing customers for payment discounts #1##########', Comment = '%1=';
+ Text008Lbl: Label 'Inserting payment journal lines #1##########', Comment = '%1=';
+ Text016Lbl: Label ' is already applied to %1 %2 for customer %3.', Comment = '%1 = Document Type, %2 = No., %3 = No.';
+
+ procedure SetGenPayLine(NewGenPayLine: Record "Payment Header FR")
+ begin
+ GenPayHead := NewGenPayLine;
+ GenPayLine."No." := NewGenPayLine."No.";
+ PaymentClass.Get(GenPayHead."Payment Class");
+ PostingDate := GenPayHead."Posting Date";
+ CurrencyFilter := GenPayHead."Currency Code";
+ end;
+
+
+ procedure GetCustLedgEntries(Positive: Boolean; Future: Boolean)
+ begin
+ CustLedgEntry.Reset();
+ CustLedgEntry.SetCurrentKey("Customer No.", Open, Positive, "Due Date");
+ CustLedgEntry.SetRange("Customer No.", Customer."No.");
+ CustLedgEntry.SetRange(Open, true);
+ CustLedgEntry.SetRange(Positive, Positive);
+ CustLedgEntry.SetRange("Currency Code", CurrencyFilter);
+ CustLedgEntry.SetRange("Applies-to ID", '');
+ if Future then begin
+ CustLedgEntry.SetRange("Due Date", LastDueDateToPayReq + 1, 99991231D);
+ CustLedgEntry.SetRange("Pmt. Discount Date", PostingDate, LastDueDateToPayReq);
+ CustLedgEntry.SetFilter("Original Pmt. Disc. Possible", '<0');
+ end else
+ CustLedgEntry.SetRange("Due Date", 0D, LastDueDateToPayReq);
+ CustLedgEntry.SetRange("On Hold", '');
+ OnGetCustLedgEntriesOnAfterSetFilters(CustLedgEntry);
+
+ if CustLedgEntry.FindSet() then
+ repeat
+ SaveAmount();
+ until CustLedgEntry.Next() = 0;
+ end;
+
+ local procedure SaveAmount()
+ begin
+ GenPayLine."Account Type" := GenPayLine."Account Type"::Customer;
+ GenPayLine.Validate("Account No.", CustLedgEntry."Customer No.");
+ GenPayLine."Posting Date" := CustLedgEntry."Posting Date";
+ GenPayLine."Currency Factor" := CustLedgEntry."Adjusted Currency Factor";
+ if GenPayLine."Currency Factor" = 0 then
+ GenPayLine."Currency Factor" := 1;
+ GenPayLine.Validate("Currency Code", CustLedgEntry."Currency Code");
+ CustLedgEntry.CalcFields("Remaining Amount");
+ if ((CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::"Credit Memo") and
+ (CustLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or
+ (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Invoice)) and
+ (PostingDate <= CustLedgEntry."Pmt. Discount Date") and PaymentDisc
+ then
+ GenPayLine.Amount := -(CustLedgEntry."Remaining Amount" - CustLedgEntry."Original Pmt. Disc. Possible")
+ else
+ GenPayLine.Amount := -CustLedgEntry."Remaining Amount";
+ GenPayLine.Validate(Amount);
+
+ TempPayableCustLedgEntry."Vendor No." := CustLedgEntry."Customer No.";
+ TempPayableCustLedgEntry."Entry No." := NextEntryNo;
+ TempPayableCustLedgEntry."Vendor Ledg. Entry No." := CustLedgEntry."Entry No.";
+ TempPayableCustLedgEntry.Amount := GenPayLine.Amount;
+ TempPayableCustLedgEntry."Amount (LCY)" := GenPayLine."Amount (LCY)";
+ TempPayableCustLedgEntry.Positive := (TempPayableCustLedgEntry.Amount > 0);
+ TempPayableCustLedgEntry.Future := (CustLedgEntry."Due Date" > LastDueDateToPayReq);
+ TempPayableCustLedgEntry."Currency Code" := CustLedgEntry."Currency Code";
+ TempPayableCustLedgEntry."Due Date" := CustLedgEntry."Due Date";
+ TempPayableCustLedgEntry.Insert();
+ NextEntryNo := NextEntryNo + 1;
+ end;
+
+
+ procedure CheckAmounts(Future: Boolean)
+ var
+ CurrencyBalance: Decimal;
+ PrevCurrency: Code[10];
+ begin
+ CurrencyBalance := 0;
+ TempPayableCustLedgEntry.SetRange("Vendor No.", Customer."No.");
+ TempPayableCustLedgEntry.SetRange(Future, Future);
+ if TempPayableCustLedgEntry.Find('-') then begin
+ PrevCurrency := TempPayableCustLedgEntry."Currency Code";
+ repeat
+ if TempPayableCustLedgEntry."Currency Code" <> PrevCurrency then begin
+ if CurrencyBalance < 0 then begin
+ TempPayableCustLedgEntry.SetRange("Currency Code", PrevCurrency);
+ TempPayableCustLedgEntry.DeleteAll();
+ TempPayableCustLedgEntry.SetRange("Currency Code");
+ end;
+ CurrencyBalance := 0;
+ PrevCurrency := TempPayableCustLedgEntry."Currency Code";
+ end;
+ CurrencyBalance := CurrencyBalance + TempPayableCustLedgEntry."Amount (LCY)"
+ until TempPayableCustLedgEntry.Next() = 0;
+ if CurrencyBalance > 0 then begin
+ TempPayableCustLedgEntry.SetRange("Currency Code", PrevCurrency);
+ TempPayableCustLedgEntry.DeleteAll();
+ TempPayableCustLedgEntry.SetRange("Currency Code");
+ end;
+ end;
+ TempPayableCustLedgEntry.Reset();
+ end;
+
+ local procedure InsertTempPaymentPostBuffer(var PaymentPostBufferTemp: Record "Payment Post. Buffer FR" temporary; var CustLedgerEntry: Record "Cust. Ledger Entry")
+ begin
+ PaymentPostBufferTemp."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentPostBufferTemp."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ PaymentPostBufferTemp."Currency Factor" := CustLedgerEntry."Adjusted Currency Factor";
+ PaymentPostBufferTemp.Amount := TempPayableCustLedgEntry.Amount;
+ PaymentPostBufferTemp."Amount (LCY)" := TempPayableCustLedgEntry."Amount (LCY)";
+ PaymentPostBufferTemp."Global Dimension 1 Code" := CustLedgerEntry."Global Dimension 1 Code";
+ PaymentPostBufferTemp."Global Dimension 2 Code" := CustLedgerEntry."Global Dimension 2 Code";
+ PaymentPostBufferTemp."Auxiliary Entry No." := CustLedgerEntry."Entry No.";
+ PaymentPostBufferTemp.Insert();
+ end;
+
+ local procedure MakeGenPayLines()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ GenPayLine3: Record "Gen. Journal Line";
+ NoSeries: Codeunit "No. Series";
+ begin
+ TempPaymentPostBuffer.DeleteAll();
+
+ if TempPayableCustLedgEntry.Find('-') then
+ repeat
+ TempPayableCustLedgEntry.SetRange("Vendor No.", TempPayableCustLedgEntry."Vendor No.");
+ TempPayableCustLedgEntry.Find('-');
+ repeat
+ CustLedgEntry.Get(TempPayableCustLedgEntry."Vendor Ledg. Entry No.");
+ TempPaymentPostBuffer."Account No." := CustLedgEntry."Customer No.";
+ TempPaymentPostBuffer."Currency Code" := CustLedgEntry."Currency Code";
+ if SummarizePer = SummarizePer::"Due date" then
+ TempPaymentPostBuffer."Due Date" := CustLedgEntry."Due Date";
+
+ TempPaymentPostBuffer."Dimension Entry No." := 0;
+ TempPaymentPostBuffer."Global Dimension 1 Code" := '';
+ TempPaymentPostBuffer."Global Dimension 2 Code" := '';
+
+ if SummarizePer in [SummarizePer::Customer, SummarizePer::"Due date"] then begin
+ TempPaymentPostBuffer."Auxiliary Entry No." := 0;
+ if TempPaymentPostBuffer.Find() then begin
+ TempPaymentPostBuffer.Amount := TempPaymentPostBuffer.Amount + TempPayableCustLedgEntry.Amount;
+ TempPaymentPostBuffer."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)" + TempPayableCustLedgEntry."Amount (LCY)";
+ TempPaymentPostBuffer.Modify();
+ end else begin
+ LastLineNo := LastLineNo + 10000;
+ TempPaymentPostBuffer."Payment Line No." := LastLineNo;
+ if PaymentClass."Line No. Series" = '' then begin
+ NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(LastLineNo), 1, MaxStrLen(NextDocNo));
+ TempPaymentPostBuffer."Applies-to ID" := NextDocNo;
+ end else begin
+ NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate);
+ TempPaymentPostBuffer."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo;
+ end;
+ TempPaymentPostBuffer."Document No." := NextDocNo;
+ NextDocNo := IncStr(NextDocNo);
+ TempPaymentPostBuffer.Amount := TempPayableCustLedgEntry.Amount;
+ TempPaymentPostBuffer."Amount (LCY)" := TempPayableCustLedgEntry."Amount (LCY)";
+ Window.Update(1, CustLedgEntry."Customer No.");
+ TempPaymentPostBuffer.Insert();
+ end;
+ CustLedgEntry."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID";
+ CODEUNIT.Run(CODEUNIT::"Cust. Entry-Edit", CustLedgEntry)
+ end else begin
+ GenPayLine3.Reset();
+ GenPayLine3.SetCurrentKey(
+ "Account Type", "Account No.", "Applies-to Doc. Type", "Applies-to Doc. No.");
+ GenPayLine3.SetRange("Account Type", GenPayLine3."Account Type"::Customer);
+ GenPayLine3.SetRange("Account No.", CustLedgEntry."Customer No.");
+ GenPayLine3.SetRange("Applies-to Doc. Type", CustLedgEntry."Document Type");
+ GenPayLine3.SetRange("Applies-to Doc. No.", CustLedgEntry."Document No.");
+ if GenPayLine3.FindFirst() then
+ GenPayLine3.FieldError(
+ "Applies-to Doc. No.",
+ StrSubstNo(
+ Text016Lbl,
+ CustLedgEntry."Document Type", CustLedgEntry."Document No.",
+ CustLedgEntry."Customer No."));
+ InsertTempPaymentPostBuffer(TempPaymentPostBuffer, CustLedgEntry);
+ Window.Update(1, CustLedgEntry."Customer No.");
+ end;
+ CustLedgEntry.CalcFields("Remaining Amount");
+ CustLedgEntry."Amount to Apply" := CustLedgEntry."Remaining Amount";
+ CODEUNIT.Run(CODEUNIT::"Cust. Entry-Edit", CustLedgEntry)
+ until TempPayableCustLedgEntry.Next() = 0;
+ TempPayableCustLedgEntry.SetFilter("Vendor No.", '>%1', TempPayableCustLedgEntry."Vendor No.");
+ until not TempPayableCustLedgEntry.Find('-');
+
+ Clear(TempOldTempPaymentPostBuffer);
+ TempPaymentPostBuffer.SetCurrentKey("Document No.");
+ if TempPaymentPostBuffer.FindSet() then
+ repeat
+ GenPayLine.Init();
+ Window.Update(1, TempPaymentPostBuffer."Account No.");
+ if SummarizePer = SummarizePer::" " then begin
+ LastLineNo := LastLineNo + 10000;
+ GenPayLine."Line No." := LastLineNo;
+ if PaymentClass."Line No. Series" = '' then begin
+ NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(GenPayLine."Line No."), 1, MaxStrLen(NextDocNo));
+ GenPayLine."Applies-to ID" := NextDocNo;
+ end else begin
+ NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate);
+ GenPayLine."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo;
+ end;
+ end else begin
+ GenPayLine."Line No." := TempPaymentPostBuffer."Payment Line No.";
+ NextDocNo := TempPaymentPostBuffer."Document No.";
+ GenPayLine."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID";
+ end;
+ GenPayLine."Document No." := NextDocNo;
+ TempOldTempPaymentPostBuffer := TempPaymentPostBuffer;
+ TempOldTempPaymentPostBuffer."Document No." := GenPayLine."Document No.";
+ if SummarizePer = SummarizePer::" " then begin
+ CustLedgEntry.Get(TempPaymentPostBuffer."Auxiliary Entry No.");
+ CustLedgEntry."Applies-to ID" := GenPayLine."Applies-to ID";
+ CustLedgEntry.Modify();
+ end;
+ GenPayLine."Account Type" := GenPayLine."Account Type"::Customer;
+ GenPayLine.Validate("Account No.", TempPaymentPostBuffer."Account No.");
+ GenPayLine."Currency Code" := TempPaymentPostBuffer."Currency Code";
+ GenPayLine.Amount := TempPaymentPostBuffer.Amount;
+ if GenPayLine.Amount > 0 then
+ GenPayLine."Debit Amount" := GenPayLine.Amount
+ else
+ GenPayLine."Credit Amount" := -GenPayLine.Amount;
+ GenPayLine."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)";
+ GenPayLine."Currency Factor" := TempPaymentPostBuffer."Currency Factor";
+ if (GenPayLine."Currency Factor" = 0) and (GenPayLine.Amount <> 0) then
+ GenPayLine."Currency Factor" := GenPayLine.Amount / GenPayLine."Amount (LCY)";
+ Cust2.Get(GenPayLine."Account No.");
+ GenPayLine.Validate("Bank Account Code", Cust2."Preferred Bank Account Code");
+ GenPayLine."Payment Class" := GenPayHead."Payment Class";
+ GenPayLine.Validate("Status No.");
+ GenPayLine."Posting Date" := PostingDate;
+ if SummarizePer = SummarizePer::" " then begin
+ GenPayLine."Applies-to Doc. Type" := CustLedgEntry."Document Type";
+ GenPayLine."Applies-to Doc. No." := CustLedgEntry."Document No.";
+ GenPayLine."Dimension Set ID" := CustLedgEntry."Dimension Set ID";
+ if SEPADirectDebitMandate.Get(CustLedgEntry."Direct Debit Mandate ID") then
+ GenPayLine.Validate("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+ GenPayLine."Direct Debit Mandate ID" := CustLedgEntry."Direct Debit Mandate ID";
+ end;
+ case SummarizePer of
+ SummarizePer::" ":
+ GenPayLine."Due Date" := CustLedgEntry."Due Date";
+ SummarizePer::Customer:
+ begin
+ TempPayableCustLedgEntry.SetCurrentKey("Vendor No.", "Due Date");
+ TempPayableCustLedgEntry.SetRange("Vendor No.", TempPaymentPostBuffer."Account No.");
+ TempPayableCustLedgEntry.Find('+');
+ GenPayLine."Due Date" := TempPayableCustLedgEntry."Due Date";
+ TempPayableCustLedgEntry.DeleteAll();
+ end;
+ SummarizePer::"Due date":
+ GenPayLine."Due Date" := TempPaymentPostBuffer."Due Date";
+ end;
+ if GenPayLine.Amount <> 0 then begin
+ if GenPayLine."Dimension Set ID" = 0 then
+ GenPayLine.DimensionSetup();
+ // per "Vendor", per "Due Date"
+ GenPayLine.Insert(true);
+ end;
+ GenPayLineInserted := true;
+ until TempPaymentPostBuffer.Next() = 0;
+ end;
+
+ local procedure ShowMessage(Text: Text)
+ begin
+ if (Text <> '') and GenPayLineInserted then
+ Message(Text);
+ end;
+
+ [IntegrationEvent(true, false)]
+ local procedure OnGetCustLedgEntriesOnAfterSetFilters(var CustLedgEntry: Record "Cust. Ledger Entry")
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al
new file mode 100644
index 0000000000..b9a1db98a9
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/SuggestVendPayments.Report.al
@@ -0,0 +1,526 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+
+report 10850 "Suggest Vend. Payments"
+{
+ Caption = 'Suggest Vendor Payments';
+ Permissions = TableData "Vendor Ledger Entry" = rm;
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem(Vendor; Vendor)
+ {
+ DataItemTableView = sorting("No.");
+ RequestFilterFields = "No.", "Payment Method Code";
+
+ trigger OnAfterGetRecord()
+ begin
+ if StopPayments then
+ CurrReport.Break();
+ Window.Update(1, "No.");
+ GetVendLedgEntries(true, false);
+ GetVendLedgEntries(false, false);
+ CheckAmounts(false);
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ if UsePriority and not StopPayments then begin
+ Reset();
+ CopyFilters(Vend2);
+ SetCurrentKey(Priority);
+ SetRange(Priority, 0);
+ if Find('-') then
+ repeat
+ Window.Update(1, "No.");
+ GetVendLedgEntries(true, false);
+ GetVendLedgEntries(false, false);
+ CheckAmounts(false);
+ until (Next() = 0) or StopPayments;
+ end;
+
+ if UsePaymentDisc and not StopPayments then begin
+ Reset();
+ CopyFilters(Vend2);
+ Window.Open(Text007Lbl);
+ if Find('-') then
+ repeat
+ Window.Update(1, "No.");
+ TempPayableVendLedgEntry.SetRange("Vendor No.", "No.");
+ GetVendLedgEntries(true, true);
+ GetVendLedgEntries(false, true);
+ CheckAmounts(true);
+ until (Next() = 0) or StopPayments;
+ end;
+
+ GenPayLine.LockTable();
+ GenPayLine.SetRange("No.", GenPayLine."No.");
+ if GenPayLine.FindLast() then begin
+ LastLineNo := GenPayLine."Line No.";
+ GenPayLine.Init();
+ end;
+
+ Window.Open(Text008Lbl);
+
+ TempPayableVendLedgEntry.Reset();
+ TempPayableVendLedgEntry.SetRange(Priority, 1, 2147483647);
+ MakeGenPayLines();
+ TempPayableVendLedgEntry.Reset();
+ TempPayableVendLedgEntry.SetRange(Priority, 0);
+ MakeGenPayLines();
+ TempPayableVendLedgEntry.Reset();
+ TempPayableVendLedgEntry.DeleteAll();
+
+ Window.Close();
+ ShowMessage(MessageText);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ if LastDueDateToPayReq = 0D then
+ Error(Text000Lbl);
+ if PostingDate = 0D then
+ Error(Text001Lbl);
+
+ GenPayLineInserted := false;
+ MessageText := '';
+
+ if UsePaymentDisc and (LastDueDateToPayReq < WorkDate()) then
+ if not
+ Confirm(
+ Text003Lbl +
+ Text004Lbl, false,
+ WorkDate())
+ then
+ Error(Text005Lbl);
+
+ Vend2.CopyFilters(Vendor);
+
+ OriginalAmtAvailable := AmountAvailable;
+ if UsePriority then begin
+ SetCurrentKey(Priority);
+ SetRange(Priority, 1, 2147483647);
+ UsePriority := true;
+ end;
+ Window.Open(Text006Lbl);
+
+ NextEntryNo := 1;
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = false;
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(LastPaymentDate; LastDueDateToPayReq)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Last Payment Date';
+ ToolTip = 'Specifies the latest payment date that can appear on the vendor ledger entries to include in the batch job. ';
+ }
+ field(UsePayment_Disc; UsePaymentDisc)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Find Payment Discounts';
+ MultiLine = true;
+ ToolTip = 'Specifies whether to include vendor ledger entries for which you can receive a payment discount.';
+ }
+ field(Summarize_Per; SummarizePer)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Summarize per';
+ OptionCaption = ' ,Vendor,Due date';
+ ToolTip = 'Specifies how to summarize. Choose the Vendor option for one summarized line per vendor for open ledger entries. Choose the Due Date option for one summarized line per due date per vendor for open ledger entries. Choose the empty option if you want each open vendor ledger entry to result in an individual payment line.';
+ }
+ field(Use_Priority; UsePriority)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Use Vendor Priority';
+ ToolTip = 'Specifies whether to order suggested payments based on the priority that is specified for the vendor on the Vendor card.';
+
+ trigger OnValidate()
+ begin
+ if not UsePriority and (AmountAvailable <> 0) then
+ Error(Text011Lbl);
+ end;
+ }
+ field(AvailableAmountLCY; AmountAvailable)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Available Amount (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = VendLedgEntry."Currency Code";
+ ToolTip = 'Specifies a maximum amount available in local currency for payments. ';
+
+ trigger OnValidate()
+ begin
+ AmountAvailableOnAfterValidate();
+ end;
+ }
+ field(Currency_Filter; CurrencyFilter)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Currency Filter';
+ Editable = false;
+ TableRelation = Currency;
+ ToolTip = 'Specifies the currencies to include in the transfer. To see the available currencies, choose the Filter field.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ var
+ Vend2: Record Vendor;
+ GenPayHead: Record "Payment Header FR";
+ GenPayLine: Record "Payment Line FR";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ TempPayableVendLedgEntry: Record "Payable Vendor Ledger Entry" temporary;
+ TempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary;
+ TempOldTempPaymentPostBuffer: Record "Payment Post. Buffer FR" temporary;
+ PaymentClass: Record "Payment Class FR";
+ Window: Dialog;
+ UsePaymentDisc: Boolean;
+ PostingDate: Date;
+ LastDueDateToPayReq: Date;
+ NextDocNo: Code[20];
+ AmountAvailable: Decimal;
+ OriginalAmtAvailable: Decimal;
+ UsePriority: Boolean;
+ SummarizePer: Option " ",Vendor,"Due date";
+ LastLineNo: Integer;
+ NextEntryNo: Integer;
+ StopPayments: Boolean;
+ MessageText: Text;
+ GenPayLineInserted: Boolean;
+ CurrencyFilter: Code[10];
+ Text000Lbl: Label 'Please enter the last payment date.';
+ Text001Lbl: Label 'Please enter the posting date.';
+ Text003Lbl: Label 'The selected last due date is earlier than %1.\\', Comment = '%1 = work date';
+ Text004Lbl: Label 'Do you still want to run the batch job?';
+ Text005Lbl: Label 'The batch job was interrupted.';
+ Text006Lbl: Label 'Processing vendors #1##########', Comment = '%1=';
+ Text007Lbl: Label 'Processing vendors for payment discounts #1##########', Comment = '%1=';
+ Text008Lbl: Label 'Inserting payment journal lines #1##########', Comment = '%1=';
+ Text011Lbl: Label 'Use Vendor Priority must be activated when the value in the Amount Available field is not 0.';
+ Text016Lbl: Label ' is already applied to %1 %2 for vendor %3.', Comment = '%1 = Document Type, %2 = No., %3 = No.';
+
+ procedure SetGenPayLine(NewGenPayLine: Record "Payment Header FR")
+ begin
+ GenPayHead := NewGenPayLine;
+ GenPayLine."No." := NewGenPayLine."No.";
+ PaymentClass.Get(GenPayHead."Payment Class");
+ PostingDate := GenPayHead."Posting Date";
+ CurrencyFilter := GenPayHead."Currency Code";
+ end;
+
+
+ procedure GetVendLedgEntries(Positive: Boolean; Future: Boolean)
+ begin
+ VendLedgEntry.Reset();
+ VendLedgEntry.SetCurrentKey("Vendor No.", Open, Positive, "Due Date");
+ VendLedgEntry.SetRange("Vendor No.", Vendor."No.");
+ VendLedgEntry.SetRange(Open, true);
+ VendLedgEntry.SetRange(Positive, Positive);
+ VendLedgEntry.SetRange("Currency Code", CurrencyFilter);
+ VendLedgEntry.SetRange("Applies-to ID", '');
+ if Future then begin
+ VendLedgEntry.SetRange("Due Date", LastDueDateToPayReq + 1, 99991231D);
+ VendLedgEntry.SetRange("Pmt. Discount Date", PostingDate, LastDueDateToPayReq);
+ VendLedgEntry.SetFilter("Original Pmt. Disc. Possible", '<0');
+ end else
+ VendLedgEntry.SetRange("Due Date", 0D, LastDueDateToPayReq);
+ VendLedgEntry.SetRange("On Hold", '');
+ if VendLedgEntry.Find('-') then
+ repeat
+ SaveAmount();
+ until VendLedgEntry.Next() = 0;
+ end;
+
+ local procedure SaveAmount()
+ begin
+ GenPayLine."Account Type" := GenPayLine."Account Type"::Vendor;
+ GenPayLine.Validate("Account No.", VendLedgEntry."Vendor No.");
+ GenPayLine."Posting Date" := VendLedgEntry."Posting Date";
+ GenPayLine."Currency Factor" := VendLedgEntry."Adjusted Currency Factor";
+ if GenPayLine."Currency Factor" = 0 then
+ GenPayLine."Currency Factor" := 1;
+ GenPayLine.Validate("Currency Code", VendLedgEntry."Currency Code");
+ VendLedgEntry.CalcFields("Remaining Amount");
+ if ((VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::"Credit Memo") and
+ (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) or
+ (VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Invoice)) and
+ (PostingDate <= VendLedgEntry."Pmt. Discount Date")
+ then
+ GenPayLine.Amount := -(VendLedgEntry."Remaining Amount" - VendLedgEntry."Original Pmt. Disc. Possible")
+ else
+ GenPayLine.Amount := -VendLedgEntry."Remaining Amount";
+ GenPayLine.Validate(Amount);
+
+ if UsePriority then
+ TempPayableVendLedgEntry.Priority := Vendor.Priority
+ else
+ TempPayableVendLedgEntry.Priority := 0;
+ TempPayableVendLedgEntry."Vendor No." := VendLedgEntry."Vendor No.";
+ TempPayableVendLedgEntry."Entry No." := NextEntryNo;
+ TempPayableVendLedgEntry."Vendor Ledg. Entry No." := VendLedgEntry."Entry No.";
+ TempPayableVendLedgEntry.Amount := GenPayLine.Amount;
+ TempPayableVendLedgEntry."Amount (LCY)" := GenPayLine."Amount (LCY)";
+ TempPayableVendLedgEntry.Positive := (TempPayableVendLedgEntry.Amount > 0);
+ TempPayableVendLedgEntry.Future := (VendLedgEntry."Due Date" > LastDueDateToPayReq);
+ TempPayableVendLedgEntry."Currency Code" := VendLedgEntry."Currency Code";
+ TempPayableVendLedgEntry."Due Date" := VendLedgEntry."Due Date";
+ TempPayableVendLedgEntry.Insert();
+ NextEntryNo := NextEntryNo + 1;
+ end;
+
+
+ procedure CheckAmounts(Future: Boolean)
+ var
+ CurrencyBalance: Decimal;
+ PrevCurrency: Code[10];
+ begin
+ CurrencyBalance := 0;
+ TempPayableVendLedgEntry.SetRange("Vendor No.", Vendor."No.");
+ TempPayableVendLedgEntry.SetRange(Future, Future);
+ if TempPayableVendLedgEntry.Find('-') then begin
+ PrevCurrency := TempPayableVendLedgEntry."Currency Code";
+ repeat
+ if TempPayableVendLedgEntry."Currency Code" <> PrevCurrency then begin
+ if CurrencyBalance < 0 then begin
+ TempPayableVendLedgEntry.SetRange("Currency Code", PrevCurrency);
+ TempPayableVendLedgEntry.DeleteAll();
+ TempPayableVendLedgEntry.SetRange("Currency Code");
+ end else
+ AmountAvailable := AmountAvailable - CurrencyBalance;
+ CurrencyBalance := 0;
+ PrevCurrency := TempPayableVendLedgEntry."Currency Code";
+ end;
+ if (OriginalAmtAvailable = 0) or
+ (AmountAvailable >= CurrencyBalance + TempPayableVendLedgEntry."Amount (LCY)")
+ then
+ CurrencyBalance := CurrencyBalance + TempPayableVendLedgEntry."Amount (LCY)"
+ else
+ TempPayableVendLedgEntry.Delete();
+ until TempPayableVendLedgEntry.Next() = 0;
+ if CurrencyBalance < 0 then begin
+ TempPayableVendLedgEntry.SetRange("Currency Code", PrevCurrency);
+ TempPayableVendLedgEntry.DeleteAll();
+ TempPayableVendLedgEntry.SetRange("Currency Code");
+ end else
+ if OriginalAmtAvailable > 0 then
+ AmountAvailable := AmountAvailable - CurrencyBalance;
+ if (OriginalAmtAvailable > 0) and (AmountAvailable <= 0) then
+ StopPayments := true;
+ end;
+ TempPayableVendLedgEntry.Reset();
+ end;
+
+ local procedure InsertTempPaymentPostBuffer(var PaymentPostBufferTemp: Record "Payment Post. Buffer FR" temporary; var VendorLedgEntry: Record "Vendor Ledger Entry")
+ begin
+ PaymentPostBufferTemp."Applies-to Doc. Type" := VendorLedgEntry."Document Type";
+ PaymentPostBufferTemp."Applies-to Doc. No." := VendorLedgEntry."Document No.";
+ PaymentPostBufferTemp."Currency Factor" := VendorLedgEntry."Adjusted Currency Factor";
+ PaymentPostBufferTemp.Amount := TempPayableVendLedgEntry.Amount;
+ PaymentPostBufferTemp."Amount (LCY)" := TempPayableVendLedgEntry."Amount (LCY)";
+ PaymentPostBufferTemp."Global Dimension 1 Code" := VendorLedgEntry."Global Dimension 1 Code";
+ PaymentPostBufferTemp."Global Dimension 2 Code" := VendorLedgEntry."Global Dimension 2 Code";
+ PaymentPostBufferTemp."Auxiliary Entry No." := VendorLedgEntry."Entry No.";
+ PaymentPostBufferTemp.Insert();
+ end;
+
+ local procedure MakeGenPayLines()
+ var
+ GenPayLine3: Record "Gen. Journal Line";
+ NoSeries: Codeunit "No. Series";
+ begin
+ TempPaymentPostBuffer.DeleteAll();
+
+ if TempPayableVendLedgEntry.Find('-') then
+ repeat
+ TempPayableVendLedgEntry.SetRange("Vendor No.", TempPayableVendLedgEntry."Vendor No.");
+ TempPayableVendLedgEntry.Find('-');
+ repeat
+ VendLedgEntry.Get(TempPayableVendLedgEntry."Vendor Ledg. Entry No.");
+ TempPaymentPostBuffer."Account No." := VendLedgEntry."Vendor No.";
+ TempPaymentPostBuffer."Currency Code" := VendLedgEntry."Currency Code";
+ if SummarizePer = SummarizePer::"Due date" then
+ TempPaymentPostBuffer."Due Date" := VendLedgEntry."Due Date";
+
+ TempPaymentPostBuffer."Dimension Entry No." := 0;
+ TempPaymentPostBuffer."Global Dimension 1 Code" := '';
+ TempPaymentPostBuffer."Global Dimension 2 Code" := '';
+
+ if SummarizePer in [SummarizePer::Vendor, SummarizePer::"Due date"] then begin
+ TempPaymentPostBuffer."Auxiliary Entry No." := 0;
+ if TempPaymentPostBuffer.Find() then begin
+ TempPaymentPostBuffer.Amount := TempPaymentPostBuffer.Amount + TempPayableVendLedgEntry.Amount;
+ TempPaymentPostBuffer."Amount (LCY)" := TempPaymentPostBuffer."Amount (LCY)" + TempPayableVendLedgEntry."Amount (LCY)";
+ TempPaymentPostBuffer.Modify();
+ end else begin
+ LastLineNo := LastLineNo + 10000;
+ TempPaymentPostBuffer."Payment Line No." := LastLineNo;
+ if PaymentClass."Line No. Series" = '' then begin
+ NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(LastLineNo), 1, MaxStrLen(NextDocNo));
+ TempPaymentPostBuffer."Applies-to ID" := NextDocNo;
+ end else begin
+ NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate);
+ TempPaymentPostBuffer."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo;
+ end;
+ TempPaymentPostBuffer."Document No." := NextDocNo;
+ NextDocNo := IncStr(NextDocNo);
+ TempPaymentPostBuffer.Amount := TempPayableVendLedgEntry.Amount;
+ TempPaymentPostBuffer."Amount (LCY)" := TempPayableVendLedgEntry."Amount (LCY)";
+ Window.Update(1, VendLedgEntry."Vendor No.");
+ TempPaymentPostBuffer.Insert();
+ end;
+ VendLedgEntry."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID";
+ CODEUNIT.Run(CODEUNIT::"Vend. Entry-Edit", VendLedgEntry);
+ end else begin
+ GenPayLine3.Reset();
+ GenPayLine3.SetCurrentKey(
+ "Account Type", "Account No.", "Applies-to Doc. Type", "Applies-to Doc. No.");
+ GenPayLine3.SetRange("Account Type", GenPayLine3."Account Type"::Vendor);
+ GenPayLine3.SetRange("Account No.", VendLedgEntry."Vendor No.");
+ GenPayLine3.SetRange("Applies-to Doc. Type", VendLedgEntry."Document Type");
+ GenPayLine3.SetRange("Applies-to Doc. No.", VendLedgEntry."Document No.");
+ if GenPayLine3.FindFirst() then
+ GenPayLine3.FieldError(
+ "Applies-to Doc. No.",
+ StrSubstNo(
+ Text016Lbl,
+ VendLedgEntry."Document Type", VendLedgEntry."Document No.",
+ VendLedgEntry."Vendor No."));
+ InsertTempPaymentPostBuffer(TempPaymentPostBuffer, VendLedgEntry);
+ Window.Update(1, VendLedgEntry."Vendor No.");
+ end;
+ VendLedgEntry.CalcFields("Remaining Amount");
+ VendLedgEntry."Amount to Apply" := VendLedgEntry."Remaining Amount";
+ CODEUNIT.Run(CODEUNIT::"Vend. Entry-Edit", VendLedgEntry);
+ until TempPayableVendLedgEntry.Next() = 0;
+ TempPayableVendLedgEntry.SetFilter("Vendor No.", '>%1', TempPayableVendLedgEntry."Vendor No.");
+ until not TempPayableVendLedgEntry.FindFirst();
+
+ Clear(TempOldTempPaymentPostBuffer);
+ TempPaymentPostBuffer.SetCurrentKey("Document No.");
+ if TempPaymentPostBuffer.Find('-') then
+ repeat
+ GenPayLine.Init();
+ Window.Update(1, TempPaymentPostBuffer."Account No.");
+ if SummarizePer = SummarizePer::" " then begin
+ LastLineNo := LastLineNo + 10000;
+ GenPayLine."Line No." := LastLineNo;
+ if PaymentClass."Line No. Series" = '' then begin
+ NextDocNo := CopyStr(GenPayHead."No." + '/' + Format(GenPayLine."Line No."), 1, MaxStrLen(NextDocNo));
+ GenPayLine."Applies-to ID" := NextDocNo;
+ end else begin
+ NextDocNo := NoSeries.GetNextNo(PaymentClass."Line No. Series", PostingDate);
+ GenPayLine."Applies-to ID" := GenPayHead."No." + '/' + NextDocNo;
+ end;
+ end else begin
+ GenPayLine."Line No." := TempPaymentPostBuffer."Payment Line No.";
+ NextDocNo := TempPaymentPostBuffer."Document No.";
+ GenPayLine."Applies-to ID" := TempPaymentPostBuffer."Applies-to ID";
+ end;
+ GenPayLine."Document No." := NextDocNo;
+ TempOldTempPaymentPostBuffer := TempPaymentPostBuffer;
+ TempOldTempPaymentPostBuffer."Document No." := GenPayLine."Document No.";
+ if SummarizePer = SummarizePer::" " then begin
+ VendLedgEntry.Get(TempPaymentPostBuffer."Auxiliary Entry No.");
+ VendLedgEntry."Applies-to ID" := GenPayLine."Applies-to ID";
+ VendLedgEntry.Modify();
+ end;
+ GenPayLine."Account Type" := GenPayLine."Account Type"::Vendor;
+ GenPayLine.Validate("Account No.", TempPaymentPostBuffer."Account No.");
+ GenPayLine."Currency Code" := TempPaymentPostBuffer."Currency Code";
+ GenPayLine."Currency Factor" := GenPayHead."Currency Factor";
+ if GenPayLine."Currency Factor" = 0 then
+ GenPayLine."Currency Factor" := 1;
+ GenPayLine.Validate(Amount, TempPaymentPostBuffer.Amount);
+ Vend2.Get(GenPayLine."Account No.");
+ GenPayLine.Validate("Bank Account Code", Vend2."Preferred Bank Account Code");
+ GenPayLine."Payment Class" := GenPayHead."Payment Class";
+ GenPayLine.Validate("Status No.");
+ GenPayLine."Posting Date" := PostingDate;
+ if SummarizePer = SummarizePer::" " then begin
+ GenPayLine."Applies-to Doc. Type" := VendLedgEntry."Document Type";
+ GenPayLine."Applies-to Doc. No." := VendLedgEntry."Document No.";
+ GenPayLine."Dimension Set ID" := VendLedgEntry."Dimension Set ID";
+ end;
+ case SummarizePer of
+ SummarizePer::" ":
+ GenPayLine."Due Date" := VendLedgEntry."Due Date";
+ SummarizePer::Vendor:
+ begin
+ if GenPayLine.Amount = 0 then
+ SetAppliesToIDBlank(VendLedgEntry, TempPayableVendLedgEntry, TempPaymentPostBuffer);
+ TempPayableVendLedgEntry.SetCurrentKey("Vendor No.", "Due Date");
+ TempPayableVendLedgEntry.SetRange("Vendor No.", TempPaymentPostBuffer."Account No.");
+ TempPayableVendLedgEntry.Find('-');
+ GenPayLine."Due Date" := TempPayableVendLedgEntry."Due Date";
+ TempPayableVendLedgEntry.DeleteAll();
+ end;
+ SummarizePer::"Due date":
+ GenPayLine."Due Date" := TempPaymentPostBuffer."Due Date";
+ end;
+ if GenPayLine.Amount <> 0 then begin
+ if GenPayLine."Dimension Set ID" = 0 then
+ // per "Customer", per "Due Date"
+ GenPayLine.DimensionSetup();
+ GenPayLine.Insert(true);
+ end;
+ GenPayLineInserted := true;
+ until TempPaymentPostBuffer.Next() = 0;
+ end;
+
+ local procedure ShowMessage(Text: Text)
+ begin
+ if (Text <> '') and GenPayLineInserted then
+ Message(Text);
+ end;
+
+ local procedure AmountAvailableOnAfterValidate()
+ begin
+ if AmountAvailable <> 0 then
+ UsePriority := true;
+ end;
+
+ local procedure SetAppliesToIDBlank(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var TempPayableVendorLedgEntry: Record "Payable Vendor Ledger Entry" temporary; TempPmtPostBuffer: Record "Payment Post. Buffer FR" temporary)
+ begin
+ TempPayableVendorLedgEntry.SetRange("Vendor No.", TempPmtPostBuffer."Account No.");
+ if TempPayableVendorLedgEntry.FindSet() then
+ repeat
+ VendorLedgerEntry.Get(TempPayableVendorLedgEntry."Vendor Ledg. Entry No.");
+ VendorLedgerEntry."Applies-to ID" := '';
+ VendorLedgerEntry.Modify();
+ until TempPayableVendorLedgEntry.Next() = 0;
+ TempPayableVendorLedgEntry.SetRange("Vendor No.");
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al
new file mode 100644
index 0000000000..bef399fdbe
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawFR.Report.al
@@ -0,0 +1,341 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.IO;
+using System.Reflection;
+
+report 10851 "Withdraw FR"
+{
+ Caption = 'Withdraw';
+ ProcessingOnly = true;
+
+ dataset
+ {
+ dataitem("Payment Header"; "Payment Header FR")
+ {
+ DataItemTableView = sorting("No.");
+ MaxIteration = 1;
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemLink = "No." = field("No.");
+ DataItemTableView = sorting("No.", "Line No.");
+
+ trigger OnAfterGetRecord()
+ var
+ GLAcct: Record "G/L Account";
+ Cust: Record Customer;
+ Vend: Record Vendor;
+ BankAcct: Record "Bank Account";
+ FixedAsset: Record "Fixed Asset";
+ PaymentClass: Record "Payment Class FR";
+ RecordCode: Text;
+ OperationCode: Text;
+ FromPaymentNo: Text;
+ CustName: Text;
+ CustBankName: Text;
+ BankBranchNo: Text;
+ AgencyCode: Text;
+ BankAccountNo: Text;
+ Designation: Text;
+ PrintAmount: Text;
+ ExportedText: Text;
+ begin
+ TestField("Account No.");
+
+ if StrLen("Bank Branch No.") > 5 then
+ Error(Text008Lbl, "Bank Account Name");
+
+ if StrLen("Agency Code") > 5 then
+ Error(Text008Lbl, "Bank Account Name");
+
+ if StrLen("Bank Account No.") > 11 then
+ Error(Text008Lbl, "Bank Account Name");
+
+ if not "RIB Checked" then
+ Error(Text009Lbl, "Bank Account Name", "Account No.");
+
+ if "Currency Code" <> "Payment Header"."Currency Code" then
+ Error(Text010Lbl);
+
+ if "Due Date" <> DueDate then
+ Error(Text011Lbl);
+
+ PaymentClass.Get("Payment Header"."Payment Class");
+ if (PaymentClass."Line No. Series" <> '') and ("Document No." = '') then
+ Error(Text012Lbl);
+
+ RecordCode := '06';
+ OperationCode := '08';
+ FromPaymentNo := PadStr("Payment Header"."National Issuer No.", 6);
+
+ case "Account Type" of
+ "Account Type"::"G/L Account":
+ begin
+ GLAcct.Get("Account No.");
+ CustName := PadStr(GLAcct.Name, 24);
+ end;
+ "Account Type"::Customer:
+ begin
+ Cust.Get("Account No.");
+ CustName := PadStr(Cust.Name, 24);
+ end;
+ "Account Type"::Vendor:
+ begin
+ Vend.Get("Account No.");
+ CustName := PadStr(Vend.Name, 24);
+ end;
+ "Account Type"::"Bank Account":
+ begin
+ BankAcct.Get("Account No.");
+ CustName := PadStr(BankAcct.Name, 24);
+ end;
+ "Account Type"::"Fixed Asset":
+ begin
+ FixedAsset.Get("Account No.");
+ CustName := PadStr(FixedAsset.Description, 24);
+ end;
+ end;
+
+ "Payment Header".CalcFields("Status Name");
+
+ CustBankName := PadStr("Bank Account Name", 20);
+ BankBranchNo := PADSTR2("Bank Branch No.", 5, '0');
+ AgencyCode := PADSTR2("Agency Code", 5, '0');
+ BankAccountNo := PADSTR2("Bank Account No.", 11, '0');
+ Designation := PadStr("Payment Header"."Status Name", 31);
+ PrintAmount := FormatAmount(Amount, 16);
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ PadStr('', 8) +
+ FromPaymentNo +
+ PadStr('', 12) +
+ CustName +
+ CustBankName +
+ PadStr('', 12) +
+ AgencyCode +
+ BankAccountNo +
+ PrintAmount +
+ Designation +
+ BankBranchNo;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+ end;
+
+ trigger OnPostDataItem()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ RecordCode: Text;
+ OperationCode: Text;
+ FromPaymentNo: Text;
+ PrintAmount: Text;
+ ExportedText: Text;
+ begin
+ RecordCode := '08';
+ OperationCode := '08';
+ FromPaymentNo := PadStr("Payment Header"."National Issuer No.", 6);
+ PrintAmount := FormatAmount("Payment Header".Amount, 16);
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ PadStr('', 8) +
+ FromPaymentNo +
+ PadStr('', 84) +
+ PrintAmount;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+
+ PaymentHeader := "Payment Header";
+ PaymentHeader."File Export Completed" := true;
+ PaymentHeader.Modify();
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ var
+ RecordCode: Text;
+ OperationCode: Text;
+ FromPaymentNo: Text;
+ ExecutionDate: Text;
+ CompanyName: Text;
+ CurrencyIdentifier: Code[1];
+ BankBranchNo: Text;
+ AgencyCode: Text;
+ BankAccountNo: Text;
+ ExportedText: Text;
+ begin
+ TestField("National Issuer No.");
+ TestField("No.");
+
+ if StrLen("Bank Branch No.") > 5 then
+ Error(Text003Lbl, "Bank Account No.");
+
+ if StrLen("Agency Code") > 5 then
+ Error(Text003Lbl, "Bank Account No.");
+
+ if StrLen("Bank Account No.") > 11 then
+ Error(Text003Lbl, "Bank Account No.");
+
+ if not "RIB Checked" then
+ Error(Text004Lbl, "No.");
+
+ if ("Currency Code" <> '') and ("Currency Code" <> GLSetup."LCY Code") then
+ Error(Text006Lbl, GLSetup."LCY Code");
+
+ case "Currency Code" = '' of
+ true:
+ CurrencyIdentifier := 'E';
+ false:
+ CurrencyIdentifier := 'F';
+ end;
+
+ CalcFields(Amount);
+
+ RecordCode := '03';
+ OperationCode := '08';
+ FromPaymentNo := PadStr("National Issuer No.", 6);
+ ExecutionDate := Format(DueDate, 4, '') + CopyStr(Format(DueDate, 2, ''), 2, 1);
+ CompanyName := PadStr(CompanyInfo.Name, 24);
+ BankBranchNo := PADSTR2("Bank Branch No.", 5, '0');
+ AgencyCode := PADSTR2("Agency Code", 5, '0');
+ BankAccountNo := PADSTR2("Bank Account No.", 11, '0');
+ ExportedText :=
+ RecordCode +
+ OperationCode +
+ PadStr('', 8) +
+ FromPaymentNo +
+ PadStr('', 7) +
+ ExecutionDate +
+ CompanyName +
+ PadStr('', 26) +
+ CurrencyIdentifier +
+ PadStr('', 5) +
+ AgencyCode +
+ BankAccountNo +
+ PadStr('', 47) +
+ BankBranchNo;
+
+ ExportFile.Write(PadStr(ExportedText, 160));
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(Due_Date; DueDate)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Due Date';
+ ToolTip = 'Specifies the due date on the entry.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ var
+ ToFile: Text;
+ begin
+ ExportFile.Close();
+ ToFile := Text013Lbl;
+ Download(ExportFileName, GetCaption(), '', Text014Lbl, ToFile);
+ end;
+
+ trigger OnPreReport()
+ var
+ FileMgt: Codeunit "File Management";
+ begin
+ CompanyInfo.Get();
+ CompanyInfo.TestField(Name);
+
+ GLSetup.Get();
+ ExportFileName := FileMgt.ServerTempFileName('');
+
+ ExportFile.TextMode := true;
+ ExportFile.WriteMode := true;
+ ExportFile.Create(ExportFileName);
+ end;
+
+ var
+ GLSetup: Record "General Ledger Setup";
+ CompanyInfo: Record "Company Information";
+ ExportFile: File;
+ ExportFileName: Text;
+ DueDate: Date;
+ Text003Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = number';
+ Text004Lbl: Label 'The RIB of the company''s bank account %1 is incorrect. Please verify before continuing.', Comment = '%1 = No.';
+ Text006Lbl: Label 'You can only use currency code %1.', Comment = '%1 = LCY Code';
+ Text008Lbl: Label 'Bank Account No. %1 is too long. Please verify before continuing.', Comment = '%1 = Name';
+ Text009Lbl: Label 'The RIB of bank account %1 of customer %2 is incorrect. Please verify before continuing.', Comment = '%1 = Name, %2 = Account No.';
+ Text010Lbl: Label 'All withdraws must refer to the same currency.';
+ Text011Lbl: Label 'All withdraws must have the same due date.';
+ Text012Lbl: Label 'All withdraws must have the same document number.';
+ Text013Lbl: Label 'default.txt';
+ Text014Lbl: Label 'Text Files|*.txt|All Files|*.*';
+
+ local procedure GetCaption() Result: Text[50]
+ var
+ AllObjWithCaption: Record AllObjWithCaption;
+ ID: Integer;
+ begin
+ Result := '';
+ if not Evaluate(ID, DelChr(CurrReport.ObjectId(false), '=', DelChr(CurrReport.ObjectId(false), '=', '0123456789'))) then
+ exit;
+
+ if not AllObjWithCaption.Get(AllObjWithCaption."Object Type"::Report, ID) then
+ exit;
+
+ exit(CopyStr(AllObjWithCaption."Object Caption", 1, MaxStrLen(Result)));
+ end;
+
+ local procedure FormatAmount(Amount: Decimal; Width: Integer): Text
+ var
+ Format_Amount: Text;
+ begin
+ Format_Amount := ConvertStr(Format(Amount, Width, ''), ' ', '0');
+ Format_Amount := '0' + CopyStr(Format_Amount, 1, Width - 3) + CopyStr(Format_Amount, Width - 1, 2);
+ exit(Format_Amount);
+ end;
+
+ local procedure PADSTR2(String: Text; Length: Integer; FillCharacter: Text[1]): Text
+ var
+ PaddingLength: Integer;
+ begin
+ PaddingLength := Length - StrLen(String);
+
+ case true of
+ PaddingLength <= 0:
+ exit(PadStr(String, Length, FillCharacter));
+ PaddingLength > 0:
+ exit(PadStr('', PaddingLength, FillCharacter) + String);
+ end;
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc
new file mode 100644
index 0000000000..a3ae6c3576
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawnotice.rdlc
@@ -0,0 +1,3382 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ c9f80d2a-2ece-4755-ae61-8a906cb9cd22
+
+
+
+
+
+
+
+
+
+
+ 16.7988cm
+
+
+
+
+ 14.91643cm
+
+
+
+
+
+
+
+
+
+ 2.1cm
+
+
+ 4.35cm
+
+
+ 2.55cm
+
+
+ 2.25cm
+
+
+ 2.25cm
+
+
+ 2.4cm
+
+
+ 0.9cm
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!HeaderText1.Value)
+
+
+
+
+
+
+ 76
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+ Direct Debit Mandate ID Payment Line
+
+
+
+
+
+
+ textbox2
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Document_No__.Value
+
+
+
+
+
+
+ 75
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Payment_Class_Name_.Value
+
+
+
+
+
+
+ 74
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__External_Document_No__.Value
+
+
+
+
+
+
+ 73
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PostingDate.Value
+
+
+
+
+
+
+ 72
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Line__Due_Date_.Value
+
+
+
+
+
+
+ 71
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!ABS_Amount_.Value
+
+
+
+
+
+
+ 70
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode.Value
+
+
+
+
+
+
+ 69
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!DirectDebitMandateID_PaymentLine.Value
+
+
+
+
+
+
+ 75
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!SWIFTCode_PaymentLine.Value
+
+
+
+
+
+
+ 73
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!IBAN_PaymentLine.Value
+
+
+
+
+
+
+ 71
+
+
+ 2
+ true
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 62
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!HeaderText2.Value)
+
+
+
+
+
+
+ 61
+
+
+ 7
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 60
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 59
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 58
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 57
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 56
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 55
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 54
+
+
+
+
+
+
+
+ 0.846cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Cust__Ledger_Entry__Document_No__Caption.Value)
+
+
+
+
+
+
+ 53
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Cust__Ledger_Entry_DescriptionCaption.Value)
+
+
+
+
+
+
+ 52
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Cust__Ledger_Entry__External_Document_No__Caption.Value)
+
+
+
+
+
+
+ 51
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Cust__Ledger_Entry__Posting_Date_Caption.Value)
+
+
+
+
+
+
+ 50
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Cust__Ledger_Entry__Due_Date_Caption.Value)
+
+
+
+
+
+
+ 49
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!ABS__Remaining_Amount___Control1120031Caption.Value)
+
+
+
+
+
+
+ 48
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 47
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox4
+ 46
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 45
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 44
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 43
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 42
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 41
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry__Document_No__.Value
+
+
+
+
+
+
+ 33
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry_Description.Value
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry__External_Document_No__.Value
+
+
+
+
+
+
+ 31
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry__Posting_Date_.Value
+
+
+
+
+
+
+ 30
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry__Due_Date_.Value
+
+
+
+
+
+
+ 29
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ABS__Remaining_Amount__.Value
+
+
+
+
+
+
+ 28
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Cust__Ledger_Entry__Currency_Code_.Value
+
+
+
+
+
+
+ 27
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox44
+ 6
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox45
+ 5
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox46
+ 4
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox48
+ 3
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox50
+ 2
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox55
+ 1
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox56
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox156
+ 13
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox157
+ 12
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox158
+ 11
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox159
+ 10
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox160
+ 9
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox161
+ 8
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox162
+ 7
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!Withdraw_Notice_AmountCaption.Value)
+
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox19
+ 18
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox111
+ 17
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox3
+ 16
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Last(Fields!TotalWithdrawAmount.Value)
+
+
+
+
+
+
+ 15
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Last(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+
+ 14
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox124
+ 26
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox125
+ 25
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox126
+ 24
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox127
+ 23
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox128
+ 22
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox129
+ 21
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox130
+ 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+ After
+ true
+
+
+
+
+ =Fields!Payment_Line___No__.Value
+ =Fields!Payment_Line_Line_No_.Value
+
+
+
+
+ After
+ true
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+ After
+ true
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+ After
+ true
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+ After
+ true
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+ After
+ true
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+ After
+ true
+
+
+
+ Detail
+
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+
+
+
+ =IIF(IsNothing(Fields!Cust__Led_Entry___Entry_No__.Value),True,False)
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+ DataSet_Result
+
+
+ =Fields!PageCaption.Value
+ GreaterThan
+
+
+
+
+
+ 8.57143cm
+ 6.345cm
+ 16.8cm
+
+ =IIF(Fields!PageCaption.Value = "",True,False)
+
+ NoOutput
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_1_.Value)
+
+
+
+
+
+
+ textbox61
+ 1.26984cm
+ 0.423cm
+ 6.768cm
+ 1
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_2_.Value)
+
+
+
+
+
+
+ 1.69312cm
+ 0.423cm
+ 6.768cm
+ 2
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_3_.Value)
+
+
+
+
+
+
+ 2.1164cm
+ 0.423cm
+ 6.768cm
+ 3
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_4_.Value)
+
+
+
+
+
+
+ 2.53968cm
+ 0.423cm
+ 6.768cm
+ 4
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_5_.Value)
+
+
+
+
+
+
+ 2.96296cm
+ 0.423cm
+ 6.768cm
+ 5
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_6_.Value)
+
+
+
+
+
+
+ 3.38624cm
+ 0.423cm
+ 6.768cm
+ 6
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__Caption.Value)
+
+
+
+
+
+
+ 3.80952cm
+ 0.423cm
+ 1.95cm
+ 7
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__.Value)
+
+
+
+
+
+
+ 3.80952cm
+ 2.08995cm
+ 0.423cm
+ 4.67805cm
+ 8
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__Caption.Value)
+
+
+
+
+
+
+ 4.2328cm
+ 0.423cm
+ 1.95cm
+ 9
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__.Value)
+
+
+
+
+
+
+ 4.2328cm
+ 2.08995cm
+ 0.423cm
+ 4.67805cm
+ 10
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value)
+
+
+
+
+
+
+ 4.65608cm
+ 0.423cm
+ 1.95cm
+ 11
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__.Value)
+
+
+
+
+
+
+ 4.65608cm
+ 2.08995cm
+ 0.423cm
+ 4.67805cm
+ 12
+
+
+
+ true
+
+
+
+
+ =First(Fields!STRSUBSTNO_Text003_CopyText_.Value)
+
+
+
+
+
+
+ 10.47619cm
+ 0.423cm
+ 2.48063in
+ 13
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_1_.Value)
+
+
+
+
+
+
+ 2.93651cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 15
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_2_.Value)
+
+
+
+
+
+
+ 3.35979cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 16
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_3_.Value)
+
+
+
+
+
+
+ 3.78307cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 17
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_4_.Value)
+
+
+
+
+
+
+ 4.20635cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 18
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_5_.Value)
+
+
+
+
+
+
+ 4.62963cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 19
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_6_.Value)
+
+
+
+
+
+
+ 5.05291cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 20
+
+
+
+ true
+
+
+
+
+ =First(Fields!CustAddr_7_.Value)
+
+
+
+
+
+
+ 5.47619cm
+ 10.152cm
+ 0.423cm
+ 2.60827in
+ 21
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Branch_No__Caption.Value)
+
+
+
+
+
+
+ 5.50265cm
+ 0.423cm
+ 3cm
+ 22
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Branch_No__.Value)
+
+
+
+
+
+
+ 5.50265cm
+ 3.14815cm
+ 0.423cm
+ 3.15cm
+ 23
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Agency_Code_Caption.Value)
+
+
+
+
+
+
+ 5.92593cm
+ 0.423cm
+ 3cm
+ 24
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Agency_Code_.Value)
+
+
+
+
+
+
+ 5.92593cm
+ 3.14815cm
+ 0.423cm
+ 3.15cm
+ 25
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Account_No__Caption.Value)
+
+
+
+
+
+
+ 6.34921cm
+ 0.423cm
+ 3cm
+ 26
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__Bank_Account_No__.Value)
+
+
+
+
+
+
+ 6.34921cm
+ 3.14815cm
+ 0.423cm
+ 3.15cm
+ 27
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Lines1___No__Caption.Value)
+
+
+
+
+
+
+ 7.19577cm
+ 0.423cm
+ 3cm
+ 28
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Lines1___No__.Value)
+
+
+
+
+
+
+ 7.19577cm
+ 3.14815cm
+ 0.423cm
+ 3.15cm
+ 29
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCodeCaption.Value)
+
+
+
+
+
+
+ 7.61905cm
+ 0.423cm
+ 3cm
+ 30
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+
+ 7.61905cm
+ 3.14815cm
+ 0.423cm
+ 3.15cm
+ 31
+
+
+
+ true
+
+
+
+
+ =First(Fields!FORMAT_PostingDate_0_4_.Value)
+
+
+
+
+
+
+ 7.61905cm
+ 12.06349cm
+ 0.423cm
+ 4.35cm
+ 32
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Customer_No_.Value
+ =Fields!OutputNo.Value
+ =Fields!Bank_Account_Buffer_Customer_No_.Value
+ =Fields!Bank_Account_Buffer_Bank_Branch_No_.Value
+ =Fields!Bank_Account_Buffer_Agency_Code.Value
+ =Fields!Bank_Account_Buffer_Bank_Account_No_.Value
+ =Fields!Payment_Line_Payment_Address_Code.Value
+
+
+ Between
+
+
+ Output
+ true
+
+
+
+ DataSet_Result
+
+ End
+
+
+
+ =IsNothing(Fields!STRSUBSTNO_Text003_CopyText_.Value)
+ Equal
+
+ =false
+
+
+
+ 14.91643cm
+ 16.7988cm
+
+
+
+ 14.91643cm
+
+
+ 16.7988cm
+
+
+ 0.423cm
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+
+ 10.47619cm
+ 0.423cm
+ 1.68cm
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+ =User!Language
+ true
+ Cm
+ 8a20b070-a199-4a41-a096-c6100a97ef6f
+
+
+
+
+ Payment_Lines1_No_
+
+
+ Payment_Lines1_Line_No_
+
+
+ Customer_No_
+
+
+ Bank_Account_Buffer_Customer_No_
+
+
+ Bank_Account_Buffer_Bank_Branch_No_
+
+
+ Bank_Account_Buffer_Agency_Code
+
+
+ Bank_Account_Buffer_Bank_Account_No_
+
+
+ FORMAT_PostingDate_0_4_
+
+
+ Payment_Lines1___No__
+
+
+ PaymtHeader__Bank_Account_No__
+
+
+ PaymtHeader__Agency_Code_
+
+
+ CustAddr_7_
+
+
+ PaymtHeader__Bank_Branch_No__
+
+
+ CustAddr_6_
+
+
+ CompanyInformation__VAT_Registration_No__
+
+
+ CustAddr_5_
+
+
+ CompanyInformation__Fax_No__
+
+
+ CustAddr_4_
+
+
+ CompanyInformation__Phone_No__
+
+
+ CustAddr_3_
+
+
+ CompanyAddr_6_
+
+
+ CustAddr_2_
+
+
+ CompanyAddr_5_
+
+
+ CustAddr_1_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_1_
+
+
+ STRSUBSTNO_Text003_CopyText_
+
+
+ PrintCurrencyCode
+
+
+ CustomerNO
+
+
+ PageCaption
+
+
+ OutputNo
+
+
+ CopyLoop_Number
+
+
+ HeaderText1
+
+
+ Payment_Line___No__
+
+
+ TotalWithdrawAmount
+
+
+ TotalWithdrawAmountFormat
+
+
+ PrintCurrencyCode_Control1120000
+
+
+ ABS_Amount_
+
+
+ ABS_Amount_Format
+
+
+ Payment_Line__Due_Date_
+
+
+ PostingDate
+
+
+ Payment_Line__External_Document_No__
+
+
+ PaymtHeader__Payment_Class_Name_
+
+
+ Payment_Line__Document_No__
+
+
+ WithdrawAmount
+
+
+ WithdrawAmountFormat
+
+
+ PrintCurrencyCode_Control1120019
+
+
+ Payment_Line_Line_No_
+
+
+ Payment_Line_Payment_Address_Code
+
+
+ Payment_Line_Account_No_
+
+
+ Payment_Line_Bank_Branch_No_
+
+
+ Payment_Line_Agency_Code
+
+
+ Payment_Line_Bank_Account_No_
+
+
+ Payment_Line_Applies_to_ID
+
+
+ Payment_Lines1___No__Caption
+
+
+ PaymtHeader__Bank_Account_No__Caption
+
+
+ PaymtHeader__Agency_Code_Caption
+
+
+ PaymtHeader__Bank_Branch_No__Caption
+
+
+ CompanyInformation__VAT_Registration_No__Caption
+
+
+ CompanyInformation__Fax_No__Caption
+
+
+ CompanyInformation__Phone_No__Caption
+
+
+ PrintCurrencyCodeCaption
+
+
+ Withdraw_Notice_AmountCaption
+
+
+ DirectDebitMandateID_PaymentLine
+
+
+ IBAN_PaymentLine
+
+
+ SWIFTCode_PaymentLine
+
+
+ HeaderText2
+
+
+ ABS__Remaining_Amount__
+
+
+ ABS__Remaining_Amount__Format
+
+
+ PrintCurrencyCode_Control1120060
+
+
+ Cust__Ledger_Entry__Currency_Code_
+
+
+ ABS__Remaining_Amount___Control1120031
+
+
+ ABS__Remaining_Amount___Control1120031Format
+
+
+ Cust__Ledger_Entry__Due_Date_
+
+
+ Cust__Ledger_Entry__Posting_Date_
+
+
+ Cust__Ledger_Entry__External_Document_No__
+
+
+ Cust__Ledger_Entry_Description
+
+
+ Cust__Ledger_Entry__Document_No__
+
+
+ Cust__Led_Entry___Entry_No__
+
+
+ ABS__Remaining_Amount___Control1120036
+
+
+ ABS__Remaining_Amount___Control1120036Format
+
+
+ PrintCurrencyCode_Control1120063
+
+
+ Cust__Ledger_Entry_Customer_No_
+
+
+ Cust__Ledger_Entry_Applies_to_ID
+
+
+ Cust__Ledger_Entry_DescriptionCaption
+
+
+ Cust__Ledger_Entry__External_Document_No__Caption
+
+
+ Cust__Ledger_Entry__Posting_Date_Caption
+
+
+ Cust__Ledger_Entry__Due_Date_Caption
+
+
+ ABS__Remaining_Amount___Control1120031Caption
+
+
+ Cust__Ledger_Entry__Document_No__Caption
+
+
+ ReportCaption
+
+
+ ReportCaption_Control1120015
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawnoticeFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawnoticeFR.Report.al
new file mode 100644
index 0000000000..6f6774aa38
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawnoticeFR.Report.al
@@ -0,0 +1,511 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.Utilities;
+
+report 10852 "Withdraw notice FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Withdrawnotice.rdlc';
+ Caption = 'Withdraw notice';
+
+ dataset
+ {
+ dataitem("Payment Lines1"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.") where(Marked = const(true));
+ column(Payment_Lines1_No_; "No.")
+ {
+ }
+ column(Payment_Lines1_Line_No_; "Line No.")
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtHeader.Get("No.");
+ PaymtHeader.CalcFields("Payment Class Name");
+ PostingDate := PaymtHeader."Posting Date";
+
+ BankAccountBuffer.Init();
+ BankAccountBuffer."Customer No." := "Account No.";
+ BankAccountBuffer."Bank Branch No." := "Bank Branch No.";
+ BankAccountBuffer."Agency Code" := "Agency Code";
+ BankAccountBuffer."Bank Account No." := "Bank Account No.";
+ if not BankAccountBuffer.Insert() then;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", WithdrawNo);
+ end;
+ }
+ dataitem(Customer; Customer)
+ {
+ DataItemTableView = sorting("No.");
+ PrintOnlyIfDetail = true;
+ RequestFilterFields = "No.";
+ column(Customer_No_; "No.")
+ {
+ }
+ dataitem(CopyLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number);
+ dataitem("Bank Account Buffer"; "Bank Account Buffer FR")
+ {
+ DataItemTableView = sorting("Customer No.", "Bank Branch No.", "Agency Code", "Bank Account No.");
+ column(Bank_Account_Buffer_Customer_No_; "Customer No.")
+ {
+ }
+ column(Bank_Account_Buffer_Bank_Branch_No_; "Bank Branch No.")
+ {
+ }
+ column(Bank_Account_Buffer_Agency_Code; "Agency Code")
+ {
+ }
+ column(Bank_Account_Buffer_Bank_Account_No_; "Bank Account No.")
+ {
+ }
+ dataitem("Payment Line"; "Payment Line FR")
+ {
+ DataItemLink = "Account No." = field("Customer No."), "Bank Branch No." = field("Bank Branch No."), "Agency Code" = field("Agency Code"), "Bank Account No." = field("Bank Account No.");
+ DataItemLinkReference = "Bank Account Buffer";
+ DataItemTableView = sorting("No.", "Account No.", "Bank Branch No.", "Agency Code", "Bank Account No.", "Payment Address Code") where(Marked = const(true));
+ column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4))
+ {
+ }
+ column(Payment_Lines1___No__; "Payment Lines1"."No.")
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.")
+ {
+ }
+ column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code")
+ {
+ }
+ column(CustAddr_7_; CustAddr[7])
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.")
+ {
+ }
+ column(CustAddr_6_; CustAddr[6])
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.")
+ {
+ }
+ column(CustAddr_5_; CustAddr[5])
+ {
+ }
+ column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.")
+ {
+ }
+ column(CustAddr_4_; CustAddr[4])
+ {
+ }
+ column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.")
+ {
+ }
+ column(CustAddr_3_; CustAddr[3])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CustAddr_2_; CustAddr[2])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CustAddr_1_; CustAddr[1])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(STRSUBSTNO_Text003_CopyText_; StrSubstNo(Text003Lbl, CopyText))
+ {
+ }
+ column(PrintCurrencyCode; PrintCurrencyCode())
+ {
+ }
+ column(CustomerNO; Customer."No.")
+ {
+ }
+ column(PageCaption; StrSubstNo(Text005Lbl, ' '))
+ {
+ }
+ column(OutputNo; OutputNo)
+ {
+ }
+ column(CopyLoop_Number; CopyLoop.Number)
+ {
+ }
+ column(HeaderText1; HeaderText1)
+ {
+ }
+ column(Payment_Line___No__; "No.")
+ {
+ }
+ column(TotalWithdrawAmount; TotalWithdrawAmount)
+ {
+ }
+ column(PrintCurrencyCode_Control1120000; PrintCurrencyCode())
+ {
+ }
+ column(ABS_Amount_; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Payment_Line__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(PostingDate; Format(PostingDate))
+ {
+ }
+ column(Payment_Line__External_Document_No__; "External Document No.")
+ {
+ }
+ column(PaymtHeader__Payment_Class_Name_; PaymtHeader."Payment Class Name")
+ {
+ }
+ column(Payment_Line__Document_No__; "Document No.")
+ {
+ }
+ column(WithdrawAmount; WithdrawAmount)
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120019; PrintCurrencyCode())
+ {
+ }
+ column(Payment_Line_Line_No_; "Line No.")
+ {
+ }
+ column(Payment_Line_Payment_Address_Code; "Payment Address Code")
+ {
+ }
+ column(Payment_Line_Account_No_; "Account No.")
+ {
+ }
+ column(Payment_Line_Bank_Branch_No_; "Bank Branch No.")
+ {
+ }
+ column(Payment_Line_Agency_Code; "Agency Code")
+ {
+ }
+ column(Payment_Line_Bank_Account_No_; "Bank Account No.")
+ {
+ }
+ column(Payment_Line_Applies_to_ID; "Applies-to ID")
+ {
+ }
+ column(Payment_Lines1___No__Caption; Payment_Lines1___No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl)
+ {
+ }
+ column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl)
+ {
+ }
+ column(Withdraw_Notice_AmountCaption; Withdraw_Notice_AmountCaptionLbl)
+ {
+ }
+ column(DirectDebitMandateID_PaymentLine; "Direct Debit Mandate ID")
+ {
+ }
+ column(IBAN_PaymentLine; IBAN)
+ {
+ }
+ column(SWIFTCode_PaymentLine; "SWIFT Code")
+ {
+ }
+ dataitem("Cust. Ledger Entry"; "Cust. Ledger Entry")
+ {
+ CalcFields = "Remaining Amount";
+ DataItemLink = "Customer No." = field("Account No."), "Applies-to ID" = field("Applies-to ID");
+ DataItemLinkReference = "Payment Line";
+ DataItemTableView = sorting("Document No.");
+ column(HeaderText2; HeaderText2Lbl)
+ {
+ }
+ column(ABS__Remaining_Amount__; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120060; PrintCurrencyCode())
+ {
+ }
+ column(Cust__Ledger_Entry__Currency_Code_; "Currency Code")
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120031; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Cust__Ledger_Entry__Due_Date_; Format("Due Date"))
+ {
+ }
+ column(Cust__Ledger_Entry__Posting_Date_; Format("Posting Date"))
+ {
+ }
+ column(Cust__Ledger_Entry__External_Document_No__; "External Document No.")
+ {
+ }
+ column(Cust__Ledger_Entry_Description; Description)
+ {
+ }
+ column(Cust__Ledger_Entry__Document_No__; "Document No.")
+ {
+ }
+ column(Cust__Led_Entry___Entry_No__; "Cust. Ledger Entry"."Entry No.")
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120036; Abs("Remaining Amount"))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120063; PrintCurrencyCode())
+ {
+ }
+ column(Cust__Ledger_Entry_Customer_No_; "Customer No.")
+ {
+ }
+ column(Cust__Ledger_Entry_Applies_to_ID; "Applies-to ID")
+ {
+ }
+ column(Cust__Ledger_Entry_DescriptionCaption; FieldCaption(Description))
+ {
+ }
+ column(Cust__Ledger_Entry__External_Document_No__Caption; FieldCaption("External Document No."))
+ {
+ }
+ column(Cust__Ledger_Entry__Posting_Date_Caption; Cust__Ledger_Entry__Posting_Date_CaptionLbl)
+ {
+ }
+ column(Cust__Ledger_Entry__Due_Date_Caption; Cust__Ledger_Entry__Due_Date_CaptionLbl)
+ {
+ }
+ column(ABS__Remaining_Amount___Control1120031Caption; ABS__Remaining_Amount___Control1120031CaptionLbl)
+ {
+ }
+ column(Cust__Ledger_Entry__Document_No__Caption; FieldCaption("Document No."))
+ {
+ }
+ column(ReportCaption; ReportCaptionLbl)
+ {
+ }
+ column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl)
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if "Payment Line"."Applies-to ID" = '' then
+ CurrReport.Skip();
+ if "Currency Code" = '' then
+ "Currency Code" := GLSetup."LCY Code";
+
+ WithdrawCounting := WithdrawCounting + 1;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ var
+ PaymtAddr: Record "Payment Address FR";
+ PaymtManagt: Codeunit "Payment Management FR";
+ begin
+ HeaderText1 := StrSubstNo(Text004Lbl, "Bank Account Name", "Bank Branch No.",
+ "Agency Code", "Bank Account No.", PostingDate);
+
+ if PaymentAddressCodeOld <> "Payment Address Code" then begin
+ WithdrawCounting := 0;
+ PaymentAddressCodeOld := "Payment Address Code";
+ end;
+
+ TotalWithdrawAmount += Abs(Amount);
+
+ if "Payment Address Code" = '' then
+ FormatAddress.Customer(CustAddr, Customer)
+ else
+ if PaymtAddr.Get("Account Type"::Customer, "Account No.", "Payment Address Code") then
+ PaymtManagt.PaymentAddr(CustAddr, PaymtAddr);
+
+ WithdrawAmount := Abs(Amount);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", WithdrawNo);
+ SetRange("Account No.", Customer."No.");
+
+ TotalWithdrawAmount := 0;
+ Clear(WithdrawAmount);
+ end;
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if Number > 1 then begin
+ CopyText := Text001Lbl;
+ OutputNo += 1;
+ end;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ LoopsNumber := Abs(CopiesNumber) + 1;
+ CopyText := '';
+ SetRange(Number, 1, LoopsNumber);
+
+ OutputNo := 1;
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtLine.Reset();
+ PaymtLine.SetRange("No.", WithdrawNo);
+ PaymtLine.SetRange("Account No.", "No.");
+ if not PaymtLine.FindFirst() then
+ CurrReport.Skip();
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(NumberOfCopies; CopiesNumber)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Number of copies';
+ ToolTip = 'Specifies the number of copies to print.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPostReport()
+ begin
+ BankAccountBuffer.DeleteAll();
+ end;
+
+ trigger OnPreReport()
+ begin
+ WithdrawNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(WithdrawNo));
+ if WithdrawNo = '' then
+ Error(Text000Lbl);
+
+ CompanyInformation.Get();
+ FormatAddress.Company(CompanyAddr, CompanyInformation);
+ GLSetup.Get();
+ end;
+
+ var
+ CompanyInformation: Record "Company Information";
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ PaymtLine: Record "Payment Line FR";
+ BankAccountBuffer: Record "Bank Account Buffer FR";
+ FormatAddress: Codeunit "Format Address";
+ CustAddr: array[8] of Text[100];
+ CompanyAddr: array[8] of Text[100];
+ LoopsNumber: Integer;
+ CopiesNumber: Integer;
+ OutputNo: Integer;
+ CopyText: Text;
+ PaymentAddressCodeOld: Code[10];
+ WithdrawAmount: Decimal;
+ TotalWithdrawAmount: Decimal;
+ WithdrawCounting: Decimal;
+ WithdrawNo: Code[20];
+ HeaderText1: Text;
+ PostingDate: Date;
+ Text000Lbl: Label 'You must specify a withdraw number.';
+ Text001Lbl: Label 'COPY';
+ Text003Lbl: Label 'Withdraw %1', Comment = '%1 = Withdraw - report title. Can be "Withdraw" or "Withdraw COPY"';
+ Text004Lbl: Label 'A withdraw on your bank account %1 (RIB : %2 %3 %4) has been done on %5.', Comment = '%1 = Name, %2 = Bank Branch No., %3 = Agency Code, %4 = Bank Account No., %5 = Posting Date';
+ HeaderText2Lbl: Label 'This withdraw is related to these invoices :';
+ Text005Lbl: Label 'Page %1', Comment = '%1 = caption';
+ Payment_Lines1___No__CaptionLbl: Label 'Withdraw No.';
+ PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.';
+ PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code';
+ PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.';
+ CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.';
+ CompanyInformation__Fax_No__CaptionLbl: Label 'FAX No.';
+ CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.';
+ PrintCurrencyCodeCaptionLbl: Label 'Currency Code';
+ Withdraw_Notice_AmountCaptionLbl: Label 'Withdraw Notice Amount';
+ Cust__Ledger_Entry__Posting_Date_CaptionLbl: Label 'Posting Date';
+ Cust__Ledger_Entry__Due_Date_CaptionLbl: Label 'Due Date';
+ ABS__Remaining_Amount___Control1120031CaptionLbl: Label 'Amount';
+ ReportCaptionLbl: Label 'Report';
+ ReportCaption_Control1120015Lbl: Label 'Report';
+
+
+ procedure PrintCurrencyCode(): Code[10]
+ begin
+ if "Payment Lines1"."Currency Code" = '' then
+ exit(GLSetup."LCY Code");
+
+ exit("Payment Lines1"."Currency Code");
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawrecapitulation.rdlc b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawrecapitulation.rdlc
new file mode 100644
index 0000000000..0cd9fa4264
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/Withdrawrecapitulation.rdlc
@@ -0,0 +1,2991 @@
+
+
+ 0
+
+
+
+ SQL
+
+
+ None
+ 92d58a04-af66-42d1-87c5-088bcaab09ea
+
+
+
+
+
+
+
+
+
+
+ 16.81389cm
+
+
+
+
+ 15.76411cm
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__National_Issuer_No__Caption.Value
+
+
+
+
+
+
+ 7.61737cm
+ 8.25397cm
+ 0.423cm
+ 3cm
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__RIB_Key_Caption.Value
+
+
+
+
+
+
+ 7.19437cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 1
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Account_No__Caption.Value
+
+
+
+
+
+
+ 5.92537cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 2
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Agency_Code_Caption.Value
+
+
+
+
+
+
+ 5.50236cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 3
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Branch_No__Caption.Value
+
+
+
+
+
+
+ 5.07937cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 4
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCodeCaption.Value)
+
+
+
+
+
+
+ 8.883cm
+ 0.10873cm
+ 0.423cm
+ 3cm
+ 5
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__Caption.Value)
+
+
+
+
+
+
+ 4.65299cm
+ 0.10873cm
+ 0.423cm
+ 2.1cm
+ 6
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__Caption.Value)
+
+
+
+
+
+
+ 4.22999cm
+ 0.10873cm
+ 0.423cm
+ 2.1cm
+ 7
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__Caption.Value)
+
+
+
+
+
+
+ 3.807cm
+ 0.10873cm
+ 0.423cm
+ 2.1cm
+ 8
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__No__Caption.Value)
+
+
+
+
+
+
+ 8.45999cm
+ 0.10873cm
+ 0.423cm
+ 3cm
+ 9
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__National_Issuer_No__.Value
+
+
+
+
+
+
+ 7.61737cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 10
+
+
+
+ true
+
+
+
+
+ =FORMAT(Fields!PaymtHeader__RIB_Key_.Value)
+
+
+
+
+
+
+ 7.19437cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 11
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Account_No__.Value
+
+
+
+
+
+
+ 5.92537cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 12
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Agency_Code_.Value
+
+
+
+
+
+
+ 5.50236cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 13
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__Bank_Branch_No__.Value
+
+
+
+
+
+
+ 5.07937cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 14
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode.Value)
+
+
+
+
+
+
+ 8.883cm
+ 3.25873cm
+ 0.423cm
+ 3.15cm
+ 15
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_1_.Value)
+
+
+
+
+
+
+ 1.80006cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 16
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_2_.Value)
+
+
+
+
+
+
+ 2.22306cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 17
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_3_.Value)
+
+
+
+
+
+
+ 2.64607cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 18
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_7_.Value)
+
+
+
+
+
+
+ 4.33806cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 19
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_6_.Value)
+
+
+
+
+
+
+ 3.91507cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 20
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_5_.Value)
+
+
+
+
+
+
+ 3.49206cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 21
+
+
+
+ true
+
+
+
+
+ =First(Fields!BankAccountAddr_4_.Value)
+
+
+
+
+
+
+ 3.06906cm
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 22
+
+
+
+ true
+
+
+
+
+ =Fields!FORMAT_PostingDate_0_4_.Value
+
+
+
+
+
+
+ 8.57143cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 23
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__VAT_Registration_No__.Value)
+
+
+
+
+
+
+ 4.65299cm
+ 2.35873cm
+ 0.423cm
+ 4.6254cm
+ 24
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Fax_No__.Value)
+
+
+
+
+
+
+ 4.22999cm
+ 2.35873cm
+ 0.423cm
+ 4.6254cm
+ 25
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation__Phone_No__.Value)
+
+
+
+
+
+
+ 3.807cm
+ 2.35873cm
+ 0.423cm
+ 4.6254cm
+ 26
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_6_.Value )
+
+
+
+
+
+
+ 3.38399cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 27
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_5_.Value )
+
+
+
+
+
+
+ 2.96099cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 28
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_4_.Value )
+
+
+
+
+
+
+ 2.538cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 29
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_3_.Value )
+
+
+
+
+
+
+ 2.11499cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 30
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_2_.Value )
+
+
+
+
+
+
+ 1.69199cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 31
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyAddr_1_.Value )
+
+
+
+
+
+
+ 1.269cm
+ 0.10873cm
+ 0.423cm
+ 6.8754cm
+ 32
+
+
+
+ true
+
+
+
+
+ =First(Fields!PaymtHeader__No__.Value)
+
+
+
+
+
+
+ 8.45999cm
+ 3.25873cm
+ 0.423cm
+ 3.15cm
+ 34
+
+
+
+ true
+
+
+
+
+ =Fields!STRSUBSTNO_Text005_CopyText_.Value
+
+
+
+
+
+
+ 8.25397cm
+ 0.423cm
+ 8.25397cm
+ 35
+
+
+
+
+
+
+ 1.65cm
+
+
+ 3.35cm
+
+
+ 3.45cm
+
+
+ 1.35cm
+
+
+ 1.5873cm
+
+
+ 0.63492cm
+
+
+ 1.5873cm
+
+
+ 2.3cm
+
+
+ 0.825cm
+
+
+ 0.07937cm
+
+
+
+
+ 0.63492cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__Account_No__Caption.Value)
+
+
+
+
+
+
+ 34
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Customer_NameCaption.Value)
+
+
+
+
+
+
+ 33
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__Bank_Account_Name_Caption.Value)
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Bank_AccountCaption.Value)
+
+
+
+
+
+
+ 31
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!ABS_Amount__Control1120031Caption.Value)
+
+
+
+
+
+
+ 30
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox12
+ 29
+
+
+
+
+
+
+
+ 0.63492cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!DirectDebitMandateID_PaymentLines_Caption.Value)
+
+
+
+
+
+
+
+
+ 2
+ true
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines__SWIFT_Code_Caption.Value)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =First(Fields!Payment_Lines_IBANCaption.Value)
+
+
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox18
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox20
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox2
+ 28
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Account_No__.Value
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Customer_Name.Value
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Account_Name_.Value
+
+
+
+
+
+
+ 6
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Branch_No__.Value
+
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Agency_Code_.Value
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__Bank_Account_No__.Value
+
+
+
+
+
+
+ 3
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ABS_Amount_.Value
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!PrintCurrencyCode_Control1120060.Value
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox15
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!DirectDebitMandateID_PaymentLines.Value
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines__SWIFT_Code_.Value
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!Payment_Lines_IBAN.Value
+
+
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox23
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox25
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox10
+ 9
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!TotalCaption.Value)
+
+
+
+
+
+
+ 14
+
+
+ 2
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Format(Sum(Fields!WithdrawCounting.Value)) + IIF(Sum(Fields!WithdrawCounting.Value) > 1,Fields!Text001.Value,Fields!Text002.Value)
+
+
+
+
+
+
+ textbox1
+ 13
+
+
+ 5
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(Fields!WithdrawAmount.Value)
+
+
+
+
+
+
+ 12
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!PrintCurrencyCode_Control1120060.Value)
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =iif(Code.IsNewPage(Fields!OutputNo.Value),TRUE,FALSE)
+
+
+
+
+
+
+ 10
+
+ true
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox27
+ 15
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ textbox35
+ 16
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 20
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Done_at__Caption.Value)
+
+
+
+
+
+
+ 19
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!CompanyInformation_City.Value)
+
+
+
+
+
+
+ 18
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 17
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 24
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!On__Caption.Value)
+
+
+
+
+
+
+ 23
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!FORMAT_PostingDate_0_4__Control1120034.Value)
+
+
+
+
+
+
+ 22
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 21
+
+
+ 2
+
+
+
+
+
+
+ 0.423cm
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 27
+
+
+ 4
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =First(Fields!Signature__Caption.Value)
+
+
+
+
+
+
+ 26
+
+
+ 2
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ 25
+
+
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Payment_Lines1_No_.Value
+
+
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+ After
+ true
+ true
+
+
+
+ Detail
+
+
+
+
+
+ Detail_Collection
+ Output
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+ Before
+ true
+
+
+
+
+
+ DataSet_Result
+ 9.84127cm
+ 5.49984cm
+ 16.81389cm
+ 36
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_Caption.Value
+
+
+
+
+
+
+ 6.77137cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 37
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader__SWIFT_Code_.Value
+
+
+
+
+
+
+ 6.77137cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 38
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBANCaption.Value
+
+
+
+
+
+
+ 6.34921cm
+ 8.27857cm
+ 0.423cm
+ 3cm
+ 39
+
+
+
+ true
+
+
+
+
+ =Fields!PaymtHeader_IBAN.Value
+
+
+
+
+
+
+ 6.34837cm
+ 11.42857cm
+ 0.423cm
+ 5.07937cm
+ 40
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!OutputNo.Value
+
+
+ Between
+
+
+ Output
+ true
+
+
+
+ DataSet_Result
+
+ End
+
+ 15.76411cm
+ 16.81389cm
+
+
+
+ 15.76411cm
+
+
+ 16.81389cm
+
+
+ 0.423cm
+ true
+ true
+
+
+ true
+
+
+
+
+ =Globals!PageNumber
+
+
+
+
+
+
+ 8.27857cm
+ 0.423cm
+ 1.68cm
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 11in
+ 8.5in
+ 1.5cm
+ 2cm
+ 2cm
+
+
+
+
+ Public Function BlankZero(ByVal Value As Decimal)
+ if Value = 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankPos(ByVal Value As Decimal)
+ if Value > 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankZeroAndPos(ByVal Value As Decimal)
+ if Value >= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNeg(ByVal Value As Decimal)
+ if Value < 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+Public Function BlankNegAndZero(ByVal Value As Decimal)
+ if Value <= 0 then
+ Return ""
+ end if
+ Return Value
+End Function
+
+
+Shared Data as Object
+
+Public Function GetData(Num as Integer) as Object
+ Return Cstr(Choose(Num, Split(Cstr(Data),Chr(177))))
+End Function
+
+Public Function SetData(NewData as Object)
+ If NewData <> "" Then
+ Data = NewData
+ End If
+End Function
+
+Shared offset as Integer
+Shared newPage as Object
+Shared currentgroup1 as Object
+Public Function GetGroupPageNumber(NewPage as Boolean, pagenumber as Integer) as Object
+ If NewPage
+ offset = pagenumber - 1
+ End If
+ Return pagenumber - offset
+End Function
+
+Public Function IsNewPage(group1 as Object) As Boolean
+ newPage = FALSE
+ If Not (group1 = currentgroup1)
+ newPage = TRUE
+ currentgroup1 = group1
+ End If
+ Return newPage
+End Function
+ =User!Language
+ true
+ Cm
+ 03c00d17-f8d7-49c7-b925-f347d24bb84d
+
+
+
+
+ Payment_Lines1_No_
+
+
+ Payment_Lines1_Line_No_
+
+
+ PaymtHeader__No__
+
+
+ STRSUBSTNO_Text005_CopyText_
+
+
+ CompanyAddr_1_
+
+
+ CompanyAddr_2_
+
+
+ CompanyAddr_3_
+
+
+ CompanyAddr_4_
+
+
+ CompanyAddr_5_
+
+
+ CompanyAddr_6_
+
+
+ CompanyInformation__Phone_No__
+
+
+ CompanyInformation__Fax_No__
+
+
+ CompanyInformation__VAT_Registration_No__
+
+
+ FORMAT_PostingDate_0_4_
+
+
+ BankAccountAddr_4_
+
+
+ BankAccountAddr_5_
+
+
+ BankAccountAddr_6_
+
+
+ BankAccountAddr_7_
+
+
+ BankAccountAddr_3_
+
+
+ BankAccountAddr_2_
+
+
+ BankAccountAddr_1_
+
+
+ PrintCurrencyCode
+
+
+ PaymtHeader__Bank_Branch_No__
+
+
+ PaymtHeader__Agency_Code_
+
+
+ PaymtHeader__Bank_Account_No__
+
+
+ PaymtHeader__RIB_Key_
+
+
+ PaymtHeader__National_Issuer_No__
+
+
+ OutputNo
+
+
+ PaymtHeader_IBAN
+
+
+ PaymtHeader__SWIFT_Code_
+
+
+ PageLoop_Number
+
+
+ PaymtHeader__No__Caption
+
+
+ CompanyInformation__Phone_No__Caption
+
+
+ CompanyInformation__Fax_No__Caption
+
+
+ CompanyInformation__VAT_Registration_No__Caption
+
+
+ PrintCurrencyCodeCaption
+
+
+ PaymtHeader__Bank_Branch_No__Caption
+
+
+ PaymtHeader__Agency_Code_Caption
+
+
+ PaymtHeader__Bank_Account_No__Caption
+
+
+ PaymtHeader__RIB_Key_Caption
+
+
+ PaymtHeader__National_Issuer_No__Caption
+
+
+ PageCaption
+
+
+ PaymtHeader_IBANCaption
+
+
+ PaymtHeader__SWIFT_Code_Caption
+
+
+ ABS_Amount_
+
+
+ ABS_Amount_Format
+
+
+ PrintCurrencyCode_Control1120060
+
+
+ Customer_Name
+
+
+ Payment_Lines__Bank_Branch_No__
+
+
+ ABS_Amount__Control1120031
+
+
+ ABS_Amount__Control1120031Format
+
+
+ Payment_Lines__Bank_Account_Name_
+
+
+ Payment_Lines__Account_No__
+
+
+ PrintCurrencyCode_Control1120061
+
+
+ Payment_Lines__Agency_Code_
+
+
+ Payment_Lines__Bank_Account_No__
+
+
+ Payment_Lines__SWIFT_Code_
+
+
+ Payment_Lines_IBAN
+
+
+ ABS_Amount__Control1120036
+
+
+ ABS_Amount__Control1120036Format
+
+
+ PrintCurrencyCode_Control1120063
+
+
+ WithdrawAmount
+
+
+ WithdrawAmountFormat
+
+
+ PrintWithdrawCounting
+
+
+ PrintCurrencyCode_Control1120064
+
+
+ FORMAT_PostingDate_0_4__Control1120034
+
+
+ CompanyInformation_City
+
+
+ WithdrawCounting
+
+
+ WithdrawCountingFormat
+
+
+ Text001
+
+
+ Text002
+
+
+ Payment_Lines_No_
+
+
+ Payment_Lines_Line_No_
+
+
+ Payment_Lines__Account_No__Caption
+
+
+ Customer_NameCaption
+
+
+ Payment_Lines__Bank_Account_Name_Caption
+
+
+ ABS_Amount__Control1120031Caption
+
+
+ Bank_AccountCaption
+
+
+ Payment_Lines__SWIFT_Code_Caption
+
+
+ Payment_Lines_IBANCaption
+
+
+ ReportCaption
+
+
+ ReportCaption_Control1120015
+
+
+ TotalCaption
+
+
+ Done_at__Caption
+
+
+ On__Caption
+
+
+ Signature__Caption
+
+
+ DirectDebitMandateID_PaymentLines
+
+
+ DirectDebitMandateID_PaymentLines_Caption
+
+
+
+ DataSource
+
+
+
+
+
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawrecapitulationFR.Report.al b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawrecapitulationFR.Report.al
new file mode 100644
index 0000000000..763aacde6d
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Reports/WithdrawrecapitulationFR.Report.al
@@ -0,0 +1,459 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using System.Utilities;
+
+report 10853 "Withdraw recapitulation FR"
+{
+ DefaultLayout = RDLC;
+ RDLCLayout = './src/Reports/Withdrawrecapitulation.rdlc';
+ Caption = 'Withdraw recapitulation';
+
+ dataset
+ {
+ dataitem("Payment Lines1"; "Payment Line FR")
+ {
+ DataItemTableView = sorting("No.", "Line No.");
+ MaxIteration = 1;
+ PrintOnlyIfDetail = true;
+ column(Payment_Lines1_No_; "No.")
+ {
+ }
+ column(Payment_Lines1_Line_No_; "Line No.")
+ {
+ }
+ dataitem(CopyLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number);
+ dataitem(PageLoop; "Integer")
+ {
+ DataItemTableView = sorting(Number) where(Number = const(1));
+ column(PaymtHeader__No__; PaymtHeader."No.")
+ {
+ }
+ column(STRSUBSTNO_Text005_CopyText_; StrSubstNo(Text005Lbl, CopyText))
+ {
+ }
+ column(CompanyAddr_1_; CompanyAddr[1])
+ {
+ }
+ column(CompanyAddr_2_; CompanyAddr[2])
+ {
+ }
+ column(CompanyAddr_3_; CompanyAddr[3])
+ {
+ }
+ column(CompanyAddr_4_; CompanyAddr[4])
+ {
+ }
+ column(CompanyAddr_5_; CompanyAddr[5])
+ {
+ }
+ column(CompanyAddr_6_; CompanyAddr[6])
+ {
+ }
+ column(CompanyInformation__Phone_No__; CompanyInformation."Phone No.")
+ {
+ }
+ column(CompanyInformation__Fax_No__; CompanyInformation."Fax No.")
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__; CompanyInformation."VAT Registration No.")
+ {
+ }
+ column(FORMAT_PostingDate_0_4_; Format(PostingDate, 0, 4))
+ {
+ }
+ column(BankAccountAddr_4_; BankAccountAddr[4])
+ {
+ }
+ column(BankAccountAddr_5_; BankAccountAddr[5])
+ {
+ }
+ column(BankAccountAddr_6_; BankAccountAddr[6])
+ {
+ }
+ column(BankAccountAddr_7_; BankAccountAddr[7])
+ {
+ }
+ column(BankAccountAddr_3_; BankAccountAddr[3])
+ {
+ }
+ column(BankAccountAddr_2_; BankAccountAddr[2])
+ {
+ }
+ column(BankAccountAddr_1_; BankAccountAddr[1])
+ {
+ }
+ column(PrintCurrencyCode; PrintCurrencyCode())
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__; PaymtHeader."Bank Branch No.")
+ {
+ }
+ column(PaymtHeader__Agency_Code_; PaymtHeader."Agency Code")
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__; PaymtHeader."Bank Account No.")
+ {
+ }
+ column(PaymtHeader__RIB_Key_; PaymtHeader."RIB Key")
+ {
+ }
+ column(PaymtHeader__National_Issuer_No__; PaymtHeader."National Issuer No.")
+ {
+ }
+ column(OutputNo; OutputNo)
+ {
+ }
+ column(PaymtHeader_IBAN; PaymtHeader.IBAN)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_; PaymtHeader."SWIFT Code")
+ {
+ }
+ column(PageLoop_Number; Number)
+ {
+ }
+ column(PaymtHeader__No__Caption; PaymtHeader__No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Phone_No__Caption; CompanyInformation__Phone_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__Fax_No__Caption; CompanyInformation__Fax_No__CaptionLbl)
+ {
+ }
+ column(CompanyInformation__VAT_Registration_No__Caption; CompanyInformation__VAT_Registration_No__CaptionLbl)
+ {
+ }
+ column(PrintCurrencyCodeCaption; PrintCurrencyCodeCaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Branch_No__Caption; PaymtHeader__Bank_Branch_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Agency_Code_Caption; PaymtHeader__Agency_Code_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__Bank_Account_No__Caption; PaymtHeader__Bank_Account_No__CaptionLbl)
+ {
+ }
+ column(PaymtHeader__RIB_Key_Caption; PaymtHeader__RIB_Key_CaptionLbl)
+ {
+ }
+ column(PaymtHeader__National_Issuer_No__Caption; PaymtHeader__National_Issuer_No__CaptionLbl)
+ {
+ }
+ column(PageCaption; PageCaptionLbl)
+ {
+ }
+ column(PaymtHeader_IBANCaption; PaymtHeader_IBANCaptionLbl)
+ {
+ }
+ column(PaymtHeader__SWIFT_Code_Caption; PaymtHeader__SWIFT_Code_CaptionLbl)
+ {
+ }
+ dataitem("Payment Lines"; "Payment Line FR")
+ {
+ DataItemLink = "No." = field("No.");
+ DataItemLinkReference = "Payment Lines1";
+ DataItemTableView = sorting("No.", "Line No.");
+ column(ABS_Amount_; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120060; PrintCurrencyCode())
+ {
+ }
+ column(Customer_Name; Customer.Name)
+ {
+ }
+ column(Payment_Lines__Bank_Branch_No__; "Bank Branch No.")
+ {
+ }
+ column(ABS_Amount__Control1120031; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(Payment_Lines__Bank_Account_Name_; "Bank Account Name")
+ {
+ }
+ column(Payment_Lines__Account_No__; "Account No.")
+ {
+ }
+ column(PrintCurrencyCode_Control1120061; PrintCurrencyCode())
+ {
+ }
+ column(Payment_Lines__Agency_Code_; "Agency Code")
+ {
+ }
+ column(Payment_Lines__Bank_Account_No__; "Bank Account No.")
+ {
+ }
+ column(Payment_Lines__SWIFT_Code_; "SWIFT Code")
+ {
+ }
+ column(Payment_Lines_IBAN; IBAN)
+ {
+ }
+ column(ABS_Amount__Control1120036; Abs(Amount))
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintCurrencyCode_Control1120063; PrintCurrencyCode())
+ {
+ }
+ column(WithdrawAmount; WithdrawAmount)
+ {
+ AutoFormatExpression = "Currency Code";
+ AutoFormatType = 1;
+ }
+ column(PrintWithdrawCounting; PrintWithdrawCounting())
+ {
+ }
+ column(PrintCurrencyCode_Control1120064; PrintCurrencyCode())
+ {
+ }
+ column(FORMAT_PostingDate_0_4__Control1120034; Format(PostingDate, 0, 4))
+ {
+ }
+ column(CompanyInformation_City; CompanyInformation.City)
+ {
+ }
+ column(WithdrawCounting; WithdrawCounting)
+ {
+ }
+ column(Text001; Text001Lbl)
+ {
+ }
+ column(Text002; Text002Lbl)
+ {
+ }
+ column(Payment_Lines_No_; "No.")
+ {
+ }
+ column(Payment_Lines_Line_No_; "Line No.")
+ {
+ }
+ column(Payment_Lines__Account_No__Caption; FieldCaption("Account No."))
+ {
+ }
+ column(Customer_NameCaption; Customer_NameCaptionLbl)
+ {
+ }
+ column(Payment_Lines__Bank_Account_Name_Caption; FieldCaption("Bank Account Name"))
+ {
+ }
+ column(ABS_Amount__Control1120031Caption; ABS_Amount__Control1120031CaptionLbl)
+ {
+ }
+ column(Bank_AccountCaption; Bank_AccountCaptionLbl)
+ {
+ }
+ column(Payment_Lines__SWIFT_Code_Caption; Payment_Lines__SWIFT_Code_CaptionLbl)
+ {
+ }
+ column(Payment_Lines_IBANCaption; Payment_Lines_IBANCaptionLbl)
+ {
+ }
+ column(ReportCaption; ReportCaptionLbl)
+ {
+ }
+ column(ReportCaption_Control1120015; ReportCaption_Control1120015Lbl)
+ {
+ }
+ column(TotalCaption; TotalCaptionLbl)
+ {
+ }
+ column(Done_at__Caption; Done_at__CaptionLbl)
+ {
+ }
+ column(On__Caption; On__CaptionLbl)
+ {
+ }
+ column(Signature__Caption; Signature__CaptionLbl)
+ {
+ }
+ column(DirectDebitMandateID_PaymentLines; "Direct Debit Mandate ID")
+ {
+ }
+ column(DirectDebitMandateID_PaymentLines_Caption; FieldCaption("Direct Debit Mandate ID"))
+ {
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ Customer.SetRange("No.", "Account No.");
+ if not Customer.FindFirst() then
+ Error(Text004Lbl, "Account No.");
+
+ WithdrawAmount := Abs(Amount);
+ WithdrawCounting := 1;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ Clear(WithdrawAmount);
+ Clear(WithdrawCounting);
+ SetRange("Account Type", "Account Type"::Customer);
+ end;
+ }
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ if Number > 1 then begin
+ CopyText := Text003Lbl;
+ OutputNo += 1;
+ end;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ OutputNo := 1;
+ LoopsNumber := Abs(CopiesNumber) + 1;
+ CopyText := '';
+ SetRange(Number, 1, LoopsNumber);
+ end;
+ }
+
+ trigger OnAfterGetRecord()
+ begin
+ PaymtHeader.Get("No.");
+ PostingDate := PaymtHeader."Posting Date";
+
+ PaymtManagt.PaymentBankAcc(BankAccountAddr, PaymtHeader);
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ SetRange("No.", WithDrawNo);
+ end;
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ area(content)
+ {
+ group(Options)
+ {
+ Caption = 'Options';
+ field(Copies_Number; CopiesNumber)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Number of copies';
+ ToolTip = 'Specifies the number of copies to print.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ }
+ }
+
+ labels
+ {
+ }
+
+ trigger OnPreReport()
+ begin
+ WithDrawNo := CopyStr("Payment Lines1".GetFilter("No."), 1, MaxStrLen(WithDrawNo));
+ if WithDrawNo = '' then
+ Error(Text006Lbl);
+
+ CompanyInformation.Get();
+ FormatAddress.Company(CompanyAddr, CompanyInformation);
+ end;
+
+ var
+ CompanyInformation: Record "Company Information";
+ Customer: Record Customer;
+ GLSetup: Record "General Ledger Setup";
+ PaymtHeader: Record "Payment Header FR";
+ PaymtManagt: Codeunit "Payment Management FR";
+ FormatAddress: Codeunit "Format Address";
+ BankAccountAddr: array[8] of Text[100];
+ CompanyAddr: array[8] of Text[100];
+ LoopsNumber: Integer;
+ CopiesNumber: Integer;
+ CopyText: Text;
+ WithdrawAmount: Decimal;
+ WithdrawCounting: Decimal;
+ WithDrawNo: Code[20];
+ PostingDate: Date;
+ Text003Lbl: Label 'COPY';
+ Text004Lbl: Label 'Customer %1 does not exist.', Comment = '%1 = Account No.';
+ Text005Lbl: Label 'Withdraw Recapitulation %1', Comment = '%1 = copy';
+ Text006Lbl: Label 'You must specify a withdraw number.';
+ OutputNo: Integer;
+ PaymtHeader__No__CaptionLbl: Label 'Withdraw No.';
+ CompanyInformation__Phone_No__CaptionLbl: Label 'Phone No.';
+ CompanyInformation__Fax_No__CaptionLbl: Label 'Fax No.';
+ CompanyInformation__VAT_Registration_No__CaptionLbl: Label 'VAT Registration No.';
+ PrintCurrencyCodeCaptionLbl: Label 'Currency Code';
+ PaymtHeader__Bank_Branch_No__CaptionLbl: Label 'Bank Branch No.';
+ PaymtHeader__Agency_Code_CaptionLbl: Label 'Agency Code';
+ PaymtHeader__Bank_Account_No__CaptionLbl: Label 'Bank Account No.';
+ PaymtHeader__RIB_Key_CaptionLbl: Label 'RIB Key';
+ PaymtHeader__National_Issuer_No__CaptionLbl: Label 'National Issuer No.';
+ PageCaptionLbl: Label 'Page';
+ PaymtHeader_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ PaymtHeader__SWIFT_Code_CaptionLbl: Label 'SWIFT Code';
+ Text001Lbl: Label ' WITHDRAWS';
+ Text002Lbl: Label ' WITHDRAW';
+ Customer_NameCaptionLbl: Label 'Name';
+ ABS_Amount__Control1120031CaptionLbl: Label 'Amount';
+ Bank_AccountCaptionLbl: Label 'Bank Account';
+ Payment_Lines__SWIFT_Code_CaptionLbl: Label 'SWIFT Code';
+ Payment_Lines_IBANCaptionLbl: Label 'IBAN', Locked = true;
+ ReportCaptionLbl: Label 'Report';
+ ReportCaption_Control1120015Lbl: Label 'Report';
+ TotalCaptionLbl: Label 'Total';
+ Done_at__CaptionLbl: Label 'Done at :';
+ On__CaptionLbl: Label 'On :';
+ Signature__CaptionLbl: Label 'Signature :';
+
+
+ procedure PrintWithdrawCounting(): Text[30]
+ begin
+ if WithdrawCounting > 1 then
+ exit(Format(WithdrawCounting) + Text001Lbl);
+
+ exit(Format(WithdrawCounting) + Text002Lbl);
+ end;
+
+
+ procedure InitRequest(InitWithdrawNo: Code[20]; InitCopies: Integer)
+ begin
+ WithDrawNo := InitWithdrawNo;
+ CopiesNumber := InitCopies;
+ end;
+
+
+ procedure PrintCurrencyCode(): Code[10]
+ begin
+ if "Payment Lines1"."Currency Code" = '' then begin
+ GLSetup.Get();
+ exit(GLSetup."LCY Code");
+ end;
+ exit("Payment Lines1"."Currency Code");
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/BankAccount.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/BankAccount.TableExt.al
new file mode 100644
index 0000000000..00f86267dd
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/BankAccount.TableExt.al
@@ -0,0 +1,60 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.BankAccount;
+
+using Microsoft.Bank.Payment;
+
+tableextension 10831 "Bank Account" extends "Bank Account"
+{
+ fields
+ {
+ field(10805; "Agency Code FR"; Text[5])
+ {
+ Caption = 'Agency Code';
+ InitValue = '00000';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if StrLen("Agency Code FR") < 5 then
+ "Agency Code FR" := PadStr('', 5 - StrLen("Agency Code FR"), '0') + "Agency Code FR";
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10806; "RIB Key FR"; Integer)
+ {
+ Caption = 'RIB Key';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10807; "RIB Checked FR"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
+ modify("Bank Branch No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ modify("Bank Account No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ }
+
+ var
+ RIBKeyFR: Codeunit "RIB Key FR";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Customer.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Customer.TableExt.al
new file mode 100644
index 0000000000..2974a284bf
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Customer.TableExt.al
@@ -0,0 +1,27 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+#pragma warning disable AA0232
+
+using Microsoft.Sales.Customer;
+
+tableextension 10832 Customer extends Customer
+{
+ fields
+ {
+ field(10861; "Payment in progress (LCY) FR"; Decimal)
+ {
+ CalcFormula = - sum("Payment Line FR"."Amount (LCY)" where("Account Type" = const(Customer),
+ "Account No." = field("No."),
+ "Copied To Line" = const(0),
+ "Payment in Progress" = const(true)));
+ Caption = 'Payment in progress (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/CustomerBankAccount.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/CustomerBankAccount.TableExt.al
new file mode 100644
index 0000000000..e4f305cac6
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/CustomerBankAccount.TableExt.al
@@ -0,0 +1,59 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Sales.Customer;
+using Microsoft.Bank.Payment;
+
+tableextension 10833 "Customer Bank Account" extends "Customer Bank Account"
+{
+ fields
+ {
+ field(10805; "Agency Code FR"; Text[5])
+ {
+ Caption = 'Agency Code';
+ InitValue = '00000';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if StrLen("Agency Code FR") < 5 then
+ "Agency Code FR" := PadStr('', 5 - StrLen("Agency Code FR"), '0') + "Agency Code FR";
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10806; "RIB Key FR"; Integer)
+ {
+ Caption = 'RIB Key';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10807; "RIB Checked FR"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
+ modify("Bank Branch No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ modify("Bank Account No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ }
+
+ var
+ RIBKeyFR: Codeunit "RIB Key FR";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/GeneralLedgerSetup.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/GeneralLedgerSetup.TableExt.al
new file mode 100644
index 0000000000..e234ad1a60
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/GeneralLedgerSetup.TableExt.al
@@ -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.Bank.Payment;
+using Microsoft.Finance.GeneralLedger.Setup;
+
+
+tableextension 10834 "General Ledger Setup" extends "General Ledger Setup"
+{
+ fields
+ {
+ modify("Unrealized VAT")
+ {
+ trigger OnAfterValidate()
+ begin
+ if not "Unrealized VAT" then begin
+ PaymentClass.SetFilter(
+ PaymentClass."Unrealized VAT Reversal", '=%1', PaymentClass."Unrealized VAT Reversal"::Delayed);
+ if PaymentClass.Find('-') then
+ Error(
+ Text10801Lbl, PaymentClass.TableCaption(), PaymentClass.Code,
+ PaymentClass.FieldCaption("Unrealized VAT Reversal"), PaymentClass."Unrealized VAT Reversal");
+ end
+ end;
+ }
+ }
+ var
+ PaymentClass: Record "Payment Class FR";
+ Text10801Lbl: Label '%1 %2 has %3 set to %4.', Comment = '%1 = Table Caption, %2 = Code, %3 = field caption, %4 = Unrealized VAT Reversal';
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Vendor.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Vendor.TableExt.al
new file mode 100644
index 0000000000..209366402c
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/Vendor.TableExt.al
@@ -0,0 +1,27 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+#pragma warning disable AA0232
+
+using Microsoft.Purchases.Vendor;
+
+tableextension 10835 Vendor extends Vendor
+{
+ fields
+ {
+ field(10861; "Payment in progress (LCY) FR"; Decimal)
+ {
+ CalcFormula = sum("Payment Line FR"."Amount (LCY)" where("Account Type" = const(Vendor),
+ "Account No." = field("No."),
+ "Copied To Line" = const(0),
+ "Payment in Progress" = const(true)));
+ Caption = 'Payment in progress (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/TableExtensions/VendorBankAccount.TableExt.al b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/VendorBankAccount.TableExt.al
new file mode 100644
index 0000000000..bdd9b21133
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/TableExtensions/VendorBankAccount.TableExt.al
@@ -0,0 +1,59 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Purchases.Vendor;
+using Microsoft.Bank.Payment;
+
+tableextension 10836 "Vendor Bank Account" extends "Vendor Bank Account"
+{
+ fields
+ {
+ field(10805; "Agency Code FR"; Text[5])
+ {
+ Caption = 'Agency Code';
+ InitValue = '00000';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if StrLen("Agency Code FR") < 5 then
+ "Agency Code FR" := PadStr('', 5 - StrLen("Agency Code FR"), '0') + "Agency Code FR";
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10806; "RIB Key FR"; Integer)
+ {
+ Caption = 'RIB Key';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ field(10807; "RIB Checked FR"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
+ modify("Bank Branch No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ modify("Bank Account No.")
+ {
+ trigger OnBeforeValidate()
+ begin
+ "RIB Checked FR" := RIBKeyFR.Check("Bank Branch No.", "Agency Code FR", "Bank Account No.", "RIB Key FR");
+ end;
+ }
+ }
+
+ var
+ RIBKeyFR: Codeunit "RIB Key FR";
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/BankAccountBufferFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/BankAccountBufferFR.Table.al
new file mode 100644
index 0000000000..5d70d72940
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/BankAccountBufferFR.Table.al
@@ -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.Bank.Payment;
+
+table 10831 "Bank Account Buffer FR"
+{
+ Caption = 'Bank Account Buffer';
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Customer No."; Code[20])
+ {
+ Caption = 'Customer No.';
+ }
+ field(2; "Bank Branch No."; Text[20])
+ {
+ Caption = 'Bank Branch No.';
+ }
+ field(3; "Agency Code"; Text[20])
+ {
+ Caption = 'Agency Code';
+ }
+ field(4; "Bank Account No."; Text[30])
+ {
+ Caption = 'Bank Account No.';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Customer No.", "Bank Branch No.", "Agency Code", "Bank Account No.")
+ {
+ Clustered = true;
+ }
+ }
+
+ fieldgroups
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentAddressFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentAddressFR.Table.al
new file mode 100644
index 0000000000..eea1a3d19f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentAddressFR.Table.al
@@ -0,0 +1,133 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Address;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10832 "Payment Address FR"
+{
+ Caption = 'Payment Address';
+ DrillDownPageID = "Payment Addresses FR";
+ LookupPageID = "Payment Addresses FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+ }
+ field(2; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor;
+ }
+ field(3; "Code"; Code[10])
+ {
+ Caption = 'Code';
+ }
+ field(4; Name; Text[50])
+ {
+ Caption = 'Name';
+
+ trigger OnValidate()
+ begin
+ if ("Search Name" = UpperCase(xRec.Name)) or ("Search Name" = '') then
+ "Search Name" := Name;
+ end;
+ }
+ field(5; "Search Name"; Code[50])
+ {
+ Caption = 'Search Name';
+ }
+ field(6; "Name 2"; Text[50])
+ {
+ Caption = 'Name 2';
+ }
+ field(7; Address; Text[50])
+ {
+ Caption = 'Address';
+ }
+ field(8; "Address 2"; Text[50])
+ {
+ Caption = 'Address 2';
+ }
+ field(9; "Post Code"; Code[20])
+ {
+ Caption = 'Post Code';
+ TableRelation = if ("Country/Region Code" = const('')) "Post Code"
+ else
+ if ("Country/Region Code" = filter(<> '')) "Post Code" where("Country/Region Code" = field("Country/Region Code"));
+ ValidateTableRelation = false;
+
+ trigger OnValidate()
+ begin
+ PostCode.ValidatePostCode(City, "Post Code", County, "Country/Region Code", (CurrFieldNo <> 0) and GuiAllowed);
+ end;
+ }
+ field(10; City; Text[30])
+ {
+ Caption = 'City';
+ TableRelation = if ("Country/Region Code" = const('')) "Post Code".City
+ else
+ if ("Country/Region Code" = filter(<> '')) "Post Code".City where("Country/Region Code" = field("Country/Region Code"));
+ ValidateTableRelation = false;
+
+ trigger OnValidate()
+ begin
+ PostCode.ValidatePostCode(City, "Post Code", County, "Country/Region Code", (CurrFieldNo <> 0) and GuiAllowed);
+ end;
+ }
+ field(11; Contact; Text[50])
+ {
+ Caption = 'Contact';
+ }
+ field(12; "Country/Region Code"; Code[10])
+ {
+ Caption = 'Country/Region Code';
+ TableRelation = "Country/Region";
+ }
+ field(13; County; Text[30])
+ {
+ Caption = 'County';
+ }
+ field(20; "Default Value"; Boolean)
+ {
+ Caption = 'Default Value';
+
+ trigger OnValidate()
+ var
+ PaymentAddress: Record "Payment Address FR";
+ begin
+ if "Default Value" then begin
+ PaymentAddress.SetRange("Account Type", "Account Type");
+ PaymentAddress.SetRange("Account No.", "Account No.");
+ PaymentAddress.SetFilter(Code, '<>%1', Code);
+ PaymentAddress.ModifyAll("Default Value", false, false);
+ end;
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Account Type", "Account No.", "Code")
+ {
+ Clustered = true;
+ }
+ }
+
+ fieldgroups
+ {
+ }
+
+ var
+ PostCode: Record "Post Code";
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentClassFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentClassFR.Table.al
new file mode 100644
index 0000000000..78750b1e90
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentClassFR.Table.al
@@ -0,0 +1,170 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.NoSeries;
+using System.Telemetry;
+
+table 10833 "Payment Class FR"
+{
+ Caption = 'Payment Class';
+ LookupPageID = "Payment Class List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Code"; Text[30])
+ {
+ Caption = 'Code';
+ NotBlank = true;
+
+ trigger OnValidate()
+ begin
+ if Name = '' then
+ Name := Code;
+ end;
+ }
+ field(2; Name; Text[50])
+ {
+ Caption = 'Name';
+ }
+ field(3; "Header No. Series"; Code[20])
+ {
+ Caption = 'Header No. Series';
+ TableRelation = "No. Series";
+
+ trigger OnValidate()
+ var
+ NoSeriesLine: Record "No. Series Line";
+ begin
+ if "Header No. Series" <> '' then begin
+ NoSeriesLine.SetRange("Series Code", "Header No. Series");
+ if NoSeriesLine.FindLast() then
+ if (StrLen(NoSeriesLine."Starting No.") > 10) or (StrLen(NoSeriesLine."Ending No.") > 10) then
+ Error(Text002Lbl);
+ end;
+ end;
+ }
+ field(4; Enable; Boolean)
+ {
+ Caption = 'Enable';
+ InitValue = true;
+ }
+ field(5; "Line No. Series"; Code[20])
+ {
+ Caption = 'Line No. Series';
+ TableRelation = "No. Series";
+
+ trigger OnValidate()
+ var
+ NoSeriesLine: Record "No. Series Line";
+ begin
+ if "Line No. Series" <> '' then begin
+ NoSeriesLine.SetRange("Series Code", "Line No. Series");
+ if NoSeriesLine.FindLast() then
+ if (StrLen(NoSeriesLine."Starting No.") > 10) or (StrLen(NoSeriesLine."Ending No.") > 10) then
+ Error(Text002Lbl);
+ end;
+ end;
+ }
+ field(6; Suggestions; Option)
+ {
+ Caption = 'Suggestions';
+ OptionCaption = 'None,Customer,Vendor';
+ OptionMembers = "None",Customer,Vendor;
+ }
+ field(10; "Is Create Document"; Boolean)
+ {
+ CalcFormula = exist("Payment Step FR" where("Payment Class" = field(Code),
+ "Action Type" = const("Create New Document")));
+ Caption = 'Is Create Document';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(11; "Unrealized VAT Reversal"; Option)
+ {
+ Caption = 'Unrealized VAT Reversal';
+ OptionCaption = 'Application,Delayed';
+ OptionMembers = Application,Delayed;
+
+ trigger OnValidate()
+ begin
+ if "Unrealized VAT Reversal" = "Unrealized VAT Reversal"::Delayed then begin
+ GLSetup.Get();
+ GLSetup.TestField("Unrealized VAT", true);
+ end else begin
+ PaymentStep.SetRange("Payment Class", Code);
+ PaymentStep.SetRange("Realize VAT", true);
+ if PaymentStep.FindFirst() then
+ Error(
+ Text003Lbl, TableCaption(), Code,
+ PaymentStep.TableCaption(), PaymentStep.FieldCaption("Realize VAT"));
+ end;
+ end;
+ }
+ field(12; "SEPA Transfer Type"; Option)
+ {
+ Caption = 'SEPA Transfer Type';
+ OptionCaption = ' ,Credit Transfer,Direct Debit';
+ OptionMembers = " ","Credit Transfer","Direct Debit";
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Code")
+ {
+ Clustered = true;
+ }
+ key(Key2; Suggestions)
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ fieldgroup(DropDown; "Code", Name)
+ {
+ }
+ }
+
+ trigger OnDelete()
+ var
+ Status: Record "Payment Status FR";
+ Step: Record "Payment Step FR";
+ StepLedger: Record "Payment Step Ledger FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentHeader.SetRange("Payment Class", Code);
+ PaymentLine.SetRange("Payment Class", Code);
+ if not PaymentHeader.IsEmpty() then
+ Error(Text001Lbl);
+ if not PaymentLine.IsEmpty() then
+ Error(Text001Lbl);
+ Status.SetRange("Payment Class", Code);
+ Status.DeleteAll();
+ Step.SetRange("Payment Class", Code);
+ Step.DeleteAll();
+ StepLedger.SetRange("Payment Class", Code);
+ StepLedger.DeleteAll();
+ end;
+
+ trigger OnInsert()
+ begin
+ FeatureTelemetry.LogUptake('1000HP1', FRPaymentSlipTok, Enum::"Feature Uptake Status"::"Set up");
+ end;
+
+ var
+ GLSetup: Record "General Ledger Setup";
+ PaymentStep: Record "Payment Step FR";
+ FeatureTelemetry: Codeunit "Feature Telemetry";
+ FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true;
+ Text001Lbl: Label 'You cannot delete this Payment Class because it is already in use.';
+ Text002Lbl: Label 'You cannot assign numbers longer than 10 characters.';
+ Text003Lbl: Label '%1 %2 has at least one %3 for which %4 is checked.', Comment = '%1 = TableCaption, %2 = code, %3 = fieldCaption, %4 = Realize VAT';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderArchiveFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderArchiveFR.Table.al
new file mode 100644
index 0000000000..a6d04c19c7
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderArchiveFR.Table.al
@@ -0,0 +1,251 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10834 "Payment Header Archive FR"
+{
+ Caption = 'Payment Header Archive';
+ DrillDownPageID = "Payment Slip List Archive FR";
+ LookupPageID = "Payment Slip List Archive FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "No."; Code[20])
+ {
+ Caption = 'No.';
+ }
+ field(2; "Currency Code"; Code[10])
+ {
+ Caption = 'Currency Code';
+ TableRelation = Currency;
+ }
+ field(3; "Currency Factor"; Decimal)
+ {
+ Caption = 'Currency Factor';
+ DecimalPlaces = 0 : 15;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(4; "Posting Date"; Date)
+ {
+ Caption = 'Posting Date';
+ }
+ field(5; "Document Date"; Date)
+ {
+ Caption = 'Document Date';
+ }
+ field(6; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(7; "Status No."; Integer)
+ {
+ Caption = 'Status No.';
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+ }
+ field(8; "Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Status No.")));
+ Caption = 'Status Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(9; "Shortcut Dimension 1 Code"; Code[20])
+ {
+ CaptionClass = '1,2,1';
+ Caption = 'Shortcut Dimension 1 Code';
+ }
+ field(10; "Shortcut Dimension 2 Code"; Code[20])
+ {
+ CaptionClass = '1,2,2';
+ Caption = 'Shortcut Dimension 2 Code';
+ }
+ field(11; "Payment Class Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Class FR".Name where(Code = field("Payment Class")));
+ Caption = 'Payment Class Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(12; "No. Series"; Code[20])
+ {
+ Caption = 'No. Series';
+ }
+ field(13; "Source Code"; Code[10])
+ {
+ Caption = 'Source Code';
+ TableRelation = "Source Code";
+ }
+ field(14; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+ }
+ field(15; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+ }
+#pragma warning disable AA0232
+ field(16; "Amount (LCY)"; Decimal)
+ {
+ CalcFormula = sum("Payment Line Archive FR"."Amount (LCY)" where("No." = field("No.")));
+ Caption = 'Amount (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Editable = false;
+ FieldClass = FlowField;
+ }
+#pragma warning restore AA0232
+ field(17; Amount; Decimal)
+ {
+ CalcFormula = sum("Payment Line Archive FR".Amount where("No." = field("No.")));
+ Caption = 'Amount';
+ Editable = false;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ FieldClass = FlowField;
+ }
+ field(18; "Bank Branch No."; Text[20])
+ {
+ Caption = 'Bank Branch No.';
+ }
+ field(19; "Bank Account No."; Text[30])
+ {
+ Caption = 'Bank Account No.';
+ }
+ field(20; "Agency Code"; Text[20])
+ {
+ Caption = 'Agency Code';
+ }
+ field(21; "RIB Key"; Integer)
+ {
+ Caption = 'RIB Key';
+ }
+ field(22; "RIB Checked"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ }
+ field(23; "Bank Name"; Text[100])
+ {
+ Caption = 'Bank Name';
+ }
+ field(24; "Bank Post Code"; Code[20])
+ {
+ Caption = 'Bank Post Code';
+ TableRelation = "Post Code";
+ ValidateTableRelation = false;
+ }
+ field(25; "Bank City"; Text[30])
+ {
+ Caption = 'Bank City';
+ }
+ field(26; "Bank Name 2"; Text[50])
+ {
+ Caption = 'Bank Name 2';
+ }
+ field(27; "Bank Address"; Text[100])
+ {
+ Caption = 'Bank Address';
+ }
+ field(28; "Bank Address 2"; Text[50])
+ {
+ Caption = 'Bank Address 2';
+ }
+ field(29; "Bank Contact"; Text[100])
+ {
+ Caption = 'Bank Contact';
+ }
+ field(30; "Bank County"; Text[30])
+ {
+ Caption = 'Bank County';
+ }
+ field(31; "Bank Country/Region Code"; Code[10])
+ {
+ Caption = 'Bank Country/Region Code';
+ TableRelation = "Country/Region";
+ }
+ field(32; "National Issuer No."; Code[6])
+ {
+ Caption = 'National Issuer No.';
+ Numeric = true;
+ }
+ field(50; IBAN; Code[50])
+ {
+ Caption = 'IBAN';
+
+ trigger OnValidate()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.CheckIBAN(IBAN);
+ end;
+ }
+ field(51; "SWIFT Code"; Code[20])
+ {
+ Caption = 'SWIFT Code';
+ }
+ field(480; "Dimension Set ID"; Integer)
+ {
+ Caption = 'Dimension Set ID';
+ Editable = false;
+ TableRelation = "Dimension Set Entry";
+
+ trigger OnLookup()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "No.")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Posting Date")
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ fieldgroup(DropDown; "No.")
+ {
+ }
+ }
+
+ procedure ShowDimensions()
+ var
+ DimMgt: Codeunit DimensionManagement;
+ begin
+ DimMgt.ShowDimensionSet("Dimension Set ID", CopyStr(StrSubstNo('%1 %2', TableCaption(), "No."), 1, 250));
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderFR.Table.al
new file mode 100644
index 0000000000..03eee24cc0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentHeaderFR.Table.al
@@ -0,0 +1,702 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.Enums;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10835 "Payment Header FR"
+{
+ Caption = 'Payment Header';
+ DrillDownPageID = "Payment Slip List FR";
+ LookupPageID = "Payment Slip List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "No."; Code[20])
+ {
+ Caption = 'No.';
+ Editable = false;
+
+ trigger OnValidate()
+ var
+ NoSeries: Codeunit "No. Series";
+ begin
+ if "No." <> xRec."No." then begin
+ PaymentClass := PaymentClass2;
+ if PaymentClass."Header No. Series" <> '' then
+ NoSeries.TestManual(PaymentClass."Header No. Series");
+ "No. Series" := '';
+ end;
+ end;
+ }
+ field(2; "Currency Code"; Code[10])
+ {
+ Caption = 'Currency Code';
+ TableRelation = Currency;
+
+ trigger OnValidate()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CompanyBank: Record "Bank Account";
+ begin
+ if "Account Type" = "Account Type"::"Bank Account" then
+ if CompanyBank.Get("Account No.") then
+ if CompanyBank."Currency Code" <> '' then
+ Error(Text008Lbl, CompanyBank."Currency Code");
+
+ if CurrFieldNo <> FieldNo("Currency Code") then
+ UpdateCurrencyFactor()
+ else
+ if "Currency Code" <> xRec."Currency Code" then begin
+ PaymentLine.SetRange("No.", "No.");
+ if PaymentLine.FindFirst() then
+ Error(Text002Lbl);
+ UpdateCurrencyFactor();
+ end else
+ if "Currency Code" <> '' then begin
+ UpdateCurrencyFactor();
+ if "Currency Factor" <> xRec."Currency Factor" then
+ ConfirmUpdateCurrencyFactor();
+ end;
+ if "Currency Code" <> xRec."Currency Code" then begin
+ PaymentLine.Init();
+ PaymentLine.SetRange("No.", "No.");
+ PaymentLine.ModifyAll("Currency Code", "Currency Code");
+ PaymentLine.ModifyAll("Currency Factor", "Currency Factor");
+ end;
+ end;
+ }
+ field(3; "Currency Factor"; Decimal)
+ {
+ Caption = 'Currency Factor';
+ DecimalPlaces = 0 : 15;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+
+ trigger OnValidate()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", "No.");
+ if PaymentLine.FindSet() then
+ repeat
+ PaymentLine."Currency Factor" := "Currency Factor";
+ PaymentLine.Validate(Amount);
+ PaymentLine.Modify();
+ until PaymentLine.Next() = 0;
+ end;
+ }
+ field(4; "Posting Date"; Date)
+ {
+ Caption = 'Posting Date';
+
+ trigger OnValidate()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ if "Posting Date" <> xRec."Posting Date" then begin
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", "No.");
+ PaymentLine.ModifyAll("Posting Date", "Posting Date");
+ end;
+ end;
+ }
+ field(5; "Document Date"; Date)
+ {
+ Caption = 'Document Date';
+
+ trigger OnValidate()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ if "Document Date" <> xRec."Document Date" then begin
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", "No.");
+ if PaymentLine.FindSet() then
+ repeat
+ PaymentLine.UpdateDueDate("Document Date");
+ until PaymentLine.Next() = 0;
+ end;
+ end;
+ }
+ field(6; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+
+ trigger OnValidate()
+ begin
+ Validate("Status No.");
+ end;
+ }
+ field(7; "Status No."; Integer)
+ {
+ Caption = 'Status No.';
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+
+ trigger OnValidate()
+ var
+ PaymentStep: Record "Payment Step FR";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ PaymentStep.SetRange("Payment Class", "Payment Class");
+ PaymentStep.SetFilter("Next Status", '>%1', "Status No.");
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Ledger);
+ if PaymentStep.FindFirst() then
+ "Source Code" := PaymentStep."Source Code";
+ PaymentStatus.Get("Payment Class", "Status No.");
+ "Archiving Authorized" := PaymentStatus."Archiving Authorized";
+ end;
+ }
+ field(8; "Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Status No.")));
+ Caption = 'Status Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(9; "Shortcut Dimension 1 Code"; Code[20])
+ {
+ CaptionClass = '1,2,1';
+ Caption = 'Shortcut Dimension 1 Code';
+
+ trigger OnLookup()
+ begin
+ LookupShortcutDimCode(1, "Shortcut Dimension 1 Code");
+ Validate("Shortcut Dimension 1 Code");
+ end;
+
+ trigger OnValidate()
+ begin
+ ValidateShortcutDimCode(1, "Shortcut Dimension 1 Code");
+ Modify();
+ end;
+ }
+ field(10; "Shortcut Dimension 2 Code"; Code[20])
+ {
+ CaptionClass = '1,2,2';
+ Caption = 'Shortcut Dimension 2 Code';
+
+ trigger OnLookup()
+ begin
+ LookupShortcutDimCode(2, "Shortcut Dimension 2 Code");
+ Validate("Shortcut Dimension 2 Code");
+ end;
+
+ trigger OnValidate()
+ begin
+ ValidateShortcutDimCode(2, "Shortcut Dimension 2 Code");
+ Modify();
+ end;
+ }
+ field(11; "Payment Class Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Class FR".Name where(Code = field("Payment Class")));
+ Caption = 'Payment Class Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(12; "No. Series"; Code[20])
+ {
+ Caption = 'No. Series';
+ TableRelation = "No. Series";
+ }
+ field(13; "Source Code"; Code[10])
+ {
+ Caption = 'Source Code';
+ TableRelation = "Source Code";
+ }
+ field(14; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+
+ trigger OnValidate()
+ begin
+ if "Account Type" <> xRec."Account Type" then begin
+ Validate("Account No.", '');
+ "Dimension Set ID" := 0;
+ DimensionManagement.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Shortcut Dimension 1 Code",
+ "Shortcut Dimension 2 Code");
+ end;
+ end;
+ }
+ field(15; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+
+ trigger OnValidate()
+ begin
+ if "Account No." <> xRec."Account No." then begin
+ "Dimension Set ID" := 0;
+ DimensionManagement.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Shortcut Dimension 1 Code",
+ "Shortcut Dimension 2 Code");
+ if "Account No." <> '' then
+ DimensionSetup();
+ end;
+ if "Account Type" = "Account Type"::"Bank Account" then begin
+ if CompanyBankAccount.Get("Account No.") then begin
+ if "Currency Code" = '' then
+ if CompanyBankAccount."Currency Code" <> '' then
+ Error(Text006Lbl);
+ if "Currency Code" <> '' then
+ if (CompanyBankAccount."Currency Code" <> "Currency Code") and (CompanyBankAccount."Currency Code" <> '') then
+ Error(Text007Lbl, "Currency Code");
+ "Bank Branch No." := CompanyBankAccount."Bank Branch No.";
+ "Bank Account No." := CompanyBankAccount."Bank Account No.";
+ IBAN := CompanyBankAccount.IBAN;
+ "SWIFT Code" := CompanyBankAccount."SWIFT Code";
+ "Bank Country/Region Code" := CompanyBankAccount."Country/Region Code";
+ "Agency Code" := CompanyBankAccount."Agency Code FR";
+ "RIB Key" := CompanyBankAccount."RIB Key FR";
+ "RIB Checked" := CompanyBankAccount."RIB Checked FR";
+ "Bank Name" := CompanyBankAccount.Name;
+ "Bank Post Code" := CompanyBankAccount."Post Code";
+ "Bank City" := CompanyBankAccount.City;
+ "Bank Name 2" := CompanyBankAccount."Name 2";
+ "Bank Address" := CompanyBankAccount.Address;
+ "Bank Address 2" := CompanyBankAccount."Address 2";
+ "National Issuer No." := CompanyBankAccount."National Issuer No.";
+ end else
+ InitBankAccount();
+ end else
+ InitBankAccount();
+ end;
+ }
+#pragma warning disable AA0232
+ field(16; "Amount (LCY)"; Decimal)
+ {
+ CalcFormula = sum("Payment Line FR"."Amount (LCY)" where("No." = field("No.")));
+ Caption = 'Amount (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Editable = false;
+ FieldClass = FlowField;
+ }
+#pragma warning restore AA0232
+ field(17; Amount; Decimal)
+ {
+ CalcFormula = sum("Payment Line FR".Amount where("No." = field("No.")));
+ Caption = 'Amount';
+ Editable = false;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ FieldClass = FlowField;
+ }
+ field(18; "Bank Branch No."; Text[20])
+ {
+ Caption = 'Bank Branch No.';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(19; "Bank Account No."; Text[30])
+ {
+ Caption = 'Bank Account No.';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(20; "Agency Code"; Text[20])
+ {
+ Caption = 'Agency Code';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(21; "RIB Key"; Integer)
+ {
+ Caption = 'RIB Key';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(22; "RIB Checked"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ }
+ field(23; "Bank Name"; Text[100])
+ {
+ Caption = 'Bank Name';
+ }
+ field(24; "Bank Post Code"; Code[20])
+ {
+ Caption = 'Bank Post Code';
+ TableRelation = if ("Bank Country/Region Code" = const('')) "Post Code"
+ else
+ if ("Bank Country/Region Code" = filter(<> '')) "Post Code" where("Country/Region Code" = field("Bank Country/Region Code"));
+ ValidateTableRelation = false;
+
+ trigger OnValidate()
+ begin
+ PostCode.ValidatePostCode(
+ "Bank City", "Bank Post Code", "Bank County", "Bank Country/Region Code", (CurrFieldNo <> 0) and GuiAllowed);
+ end;
+ }
+ field(25; "Bank City"; Text[30])
+ {
+ Caption = 'Bank City';
+ TableRelation = if ("Bank Country/Region Code" = const('')) "Post Code".City
+ else
+ if ("Bank Country/Region Code" = filter(<> '')) "Post Code".City where("Country/Region Code" = field("Bank Country/Region Code"));
+ ValidateTableRelation = false;
+
+ trigger OnValidate()
+ begin
+ PostCode.ValidatePostCode(
+ "Bank City", "Bank Post Code", "Bank County", "Bank Country/Region Code", (CurrFieldNo <> 0) and GuiAllowed);
+ end;
+ }
+ field(26; "Bank Name 2"; Text[50])
+ {
+ Caption = 'Bank Name 2';
+ }
+ field(27; "Bank Address"; Text[100])
+ {
+ Caption = 'Bank Address';
+ }
+ field(28; "Bank Address 2"; Text[50])
+ {
+ Caption = 'Bank Address 2';
+ }
+ field(29; "Bank Contact"; Text[100])
+ {
+ Caption = 'Bank Contact';
+ }
+ field(30; "Bank County"; Text[30])
+ {
+ Caption = 'Bank County';
+ }
+ field(31; "Bank Country/Region Code"; Code[10])
+ {
+ Caption = 'Bank Country/Region Code';
+ TableRelation = "Country/Region";
+ }
+ field(32; "National Issuer No."; Code[6])
+ {
+ Caption = 'National Issuer No.';
+ Numeric = true;
+ }
+ field(40; "File Export Completed"; Boolean)
+ {
+ Caption = 'File Export Completed';
+ Editable = false;
+ }
+ field(41; "No. of Lines"; Integer)
+ {
+ CalcFormula = count("Payment Line FR" where("No." = field("No.")));
+ Caption = 'No. of Lines';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(42; "No. of Unposted Lines"; Integer)
+ {
+ CalcFormula = count("Payment Line FR" where("No." = field("No."),
+ Posted = const(false)));
+ Caption = 'No. of Unposted Lines';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(43; "Archiving Authorized"; Boolean)
+ {
+ CalcFormula = lookup("Payment Status FR"."Archiving Authorized" where("Payment Class" = field("Payment Class"),
+ Line = field("Status No.")));
+ Caption = 'Archiving Authorized';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(50; IBAN; Code[50])
+ {
+ Caption = 'IBAN';
+
+ trigger OnValidate()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.CheckIBAN(IBAN);
+ end;
+ }
+ field(51; "SWIFT Code"; Code[20])
+ {
+ Caption = 'SWIFT Code';
+ }
+ field(132; "Partner Type"; Enum "Partner Type")
+ {
+ Caption = 'Partner Type';
+ }
+ field(480; "Dimension Set ID"; Integer)
+ {
+ Caption = 'Dimension Set ID';
+ Editable = false;
+ TableRelation = "Dimension Set Entry";
+
+ trigger OnLookup()
+ begin
+ Rec.ShowDocDim();
+ end;
+
+ trigger OnValidate()
+ begin
+ DimensionManagement.UpdateGlobalDimFromDimSetID("Dimension Set ID", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code");
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "No.")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Posting Date")
+ {
+ }
+ key(Key3; "Payment Class")
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ fieldgroup(DropDown; "No.")
+ {
+ }
+ }
+
+ trigger OnDelete()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ if "Status No." > 0 then
+ Error(Text000Lbl);
+
+ PaymentLine.SetRange("No.", "No.");
+ PaymentLine.SetFilter("Copied To No.", '<>''''');
+ if PaymentLine.FindFirst() then
+ Error(Text000Lbl);
+ PaymentLine.SetRange("Copied To No.");
+ PaymentLine.DeleteAll(true);
+ end;
+
+ trigger OnInsert()
+ var
+ NoSeries: Codeunit "No. Series";
+ begin
+ if "No." = '' then begin
+ if PAGE.RunModal(PAGE::"Payment Class List FR", PaymentClass2) = ACTION::LookupOK then
+ PaymentClass := PaymentClass2;
+ PaymentClass.TestField("Header No. Series");
+ "No. Series" := PaymentClass."Header No. Series";
+ if NoSeries.AreRelated("No. Series", xRec."No. Series") then
+ "No. Series" := xRec."No. Series";
+ "No." := NoSeries.GetNextNo("No. Series");
+ Validate("Payment Class", PaymentClass.Code);
+ end;
+ InitHeader();
+ end;
+
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentClass2: Record "Payment Class FR";
+ CurrencyExchangeRate: Record "Currency Exchange Rate";
+ CompanyBankAccount: Record "Bank Account";
+ PostCode: Record "Post Code";
+ DimensionManagement: Codeunit DimensionManagement;
+ RibKey: Codeunit "RIB Key FR";
+ CurrencyDate: Date;
+ Text000Lbl: Label 'Deleting the line is not allowed.';
+ Text001Lbl: Label 'There is no line to treat.';
+ Text002Lbl: Label 'You cannot modify Currency Code because the Payment Header contains lines.';
+ Text006Lbl: Label 'The currency code for the document is the LCY Code.\\Please select a bank for which the currency code is the LCY Code.';
+ Text007Lbl: Label 'The currency code for the document is %1.\\Please select a bank for which the currency code is %1 or the LCY Code.', Comment = '%1 = code';
+ Text008Lbl: Label 'Your bank''s currency code is %1.\\You must change the bank account code before modifying the currency code.', Comment = '%1 = code';
+ Text009Lbl: Label 'You may have changed a dimension.\\Do you want to update the lines?';
+
+ procedure LookupShortcutDimCode(FieldNo: Integer; var ShortcutDimCode: Code[20])
+ begin
+ DimensionManagement.LookupDimValueCode(FieldNo, ShortcutDimCode);
+ DimensionManagement.ValidateShortcutDimValues(FieldNo, ShortcutDimCode, "Dimension Set ID");
+ end;
+
+ procedure ValidateShortcutDimCode(FieldNo: Integer; var ShortcutDimCode: Code[20])
+ begin
+ DimensionManagement.ValidateShortcutDimValues(FieldNo, ShortcutDimCode, "Dimension Set ID");
+ if xRec."Dimension Set ID" <> "Dimension Set ID" then
+ if PaymentLinesExist() then
+ UpdateAllLineDim("Dimension Set ID", xRec."Dimension Set ID");
+ end;
+
+ procedure AssistEdit(OldPaymentHeader: Record "Payment Header FR"): Boolean
+ var
+ NoSeries: Codeunit "No. Series";
+ begin
+ PaymentHeader := Rec;
+ PaymentClass := PaymentClass2;
+ PaymentClass.TestField("Header No. Series");
+ if NoSeries.LookupRelatedNoSeries(PaymentClass."Header No. Series", OldPaymentHeader."No. Series", PaymentHeader."No. Series") then begin
+ PaymentHeader."No." := NoSeries.GetNextNo(PaymentHeader."No. Series");
+ Rec := PaymentHeader;
+ exit(true);
+ end;
+ end;
+
+ local procedure UpdateCurrencyFactor()
+ begin
+ if "Currency Code" <> '' then begin
+ CurrencyDate := WorkDate();
+ "Currency Factor" := CurrencyExchangeRate.ExchangeRate(CurrencyDate, "Currency Code");
+ end else
+ "Currency Factor" := 1;
+ end;
+
+ local procedure ConfirmUpdateCurrencyFactor()
+ begin
+ "Currency Factor" := xRec."Currency Factor";
+ end;
+
+ procedure InitBankAccount()
+ begin
+ "Bank Branch No." := '';
+ "Bank Account No." := '';
+ IBAN := '';
+ "SWIFT Code" := '';
+ "Agency Code" := '';
+ "RIB Key" := 0;
+ "RIB Checked" := false;
+ "Bank Name" := '';
+ "Bank Post Code" := '';
+ "Bank City" := '';
+ "Bank Name 2" := '';
+ "Bank Address" := '';
+ "Bank Address 2" := '';
+ "Bank Contact" := '';
+ "Bank County" := '';
+ "Bank Country/Region Code" := '';
+ "National Issuer No." := '';
+ end;
+
+ procedure TestNbOfLines()
+ begin
+ CalcFields("No. of Lines");
+ if "No. of Lines" = 0 then
+ Error(Text001Lbl);
+ end;
+
+ procedure InitHeader()
+ begin
+ "Posting Date" := WorkDate();
+ "Document Date" := WorkDate();
+ Validate("Account Type", "Account Type"::"Bank Account");
+ end;
+
+ procedure DimensionSetup()
+ begin
+ DimensionCreate();
+ end;
+
+ procedure DimensionCreate()
+ var
+ DefaultDimSource: List of [Dictionary of [Integer, Code[20]]];
+ OldDimSetID: Integer;
+ begin
+ DimensionManagement.AddDimSource(DefaultDimSource, DimensionManagement.TypeToTableID1("Account Type".AsInteger()), Rec."Account No.");
+ "Shortcut Dimension 1 Code" := '';
+ "Shortcut Dimension 2 Code" := '';
+ OldDimSetID := "Dimension Set ID";
+
+ "Dimension Set ID" :=
+ DimensionManagement.GetRecDefaultDimID(
+ Rec, CurrFieldNo, DefaultDimSource, "Source Code", "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code", 0, 0);
+
+ if OldDimSetID <> "Dimension Set ID" then begin
+ Modify();
+ if PaymentLinesExist() then
+ UpdateAllLineDim("Dimension Set ID", OldDimSetID);
+ end;
+ end;
+
+ procedure ShowDocDim()
+ var
+ OldDimSetID: Integer;
+ begin
+ OldDimSetID := "Dimension Set ID";
+ "Dimension Set ID" :=
+ DimensionManagement.EditDimensionSet(
+ "Dimension Set ID", StrSubstNo('%1 %2', 'Payment: ', "No."),
+ "Shortcut Dimension 1 Code", "Shortcut Dimension 2 Code");
+
+ if OldDimSetID <> "Dimension Set ID" then begin
+ Modify();
+ if PaymentLinesExist() then
+ UpdateAllLineDim("Dimension Set ID", OldDimSetID);
+ end;
+ end;
+
+ procedure PaymentLinesExist(): Boolean
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", "No.");
+ exit(not PaymentLine.IsEmpty())
+ end;
+
+ local procedure UpdateAllLineDim(NewParentDimSetID: Integer; OldParentDimSetID: Integer)
+ var
+ PaymentLine: Record "Payment Line FR";
+ NewDimSetID: Integer;
+ begin
+ // Update all lines with changed dimensions.
+
+ if NewParentDimSetID = OldParentDimSetID then
+ exit;
+ if not Confirm(Text009Lbl) then
+ exit;
+
+ PaymentLine.Reset();
+ PaymentLine.SetRange("No.", "No.");
+ PaymentLine.LockTable();
+ if PaymentLine.Find('-') then
+ repeat
+ NewDimSetID := DimensionManagement.GetDeltaDimSetID(PaymentLine."Dimension Set ID", NewParentDimSetID, OldParentDimSetID);
+ if PaymentLine."Dimension Set ID" <> NewDimSetID then begin
+ PaymentLine."Dimension Set ID" := NewDimSetID;
+ PaymentLine.Modify();
+ end;
+ until PaymentLine.Next() = 0;
+ end;
+}
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineArchiveFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineArchiveFR.Table.al
new file mode 100644
index 0000000000..880b2721a0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineArchiveFR.Table.al
@@ -0,0 +1,348 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10836 "Payment Line Archive FR"
+{
+ Caption = 'Payment Line Archive';
+ DrillDownPageID = "Payment Lines Archive List FR";
+ LookupPageID = "Payment Lines Archive List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "No."; Code[20])
+ {
+ Caption = 'No.';
+ TableRelation = "Payment Header Archive FR";
+ }
+ field(2; "Line No."; Integer)
+ {
+ Caption = 'Line No.';
+ }
+ field(3; Amount; Decimal)
+ {
+ Caption = 'Amount';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(4; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+ }
+ field(5; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(6; "Posting Group"; Code[20])
+ {
+ Caption = 'Posting Group';
+ Editable = true;
+ TableRelation = if ("Account Type" = const(Customer)) "Customer Posting Group"
+ else
+ if ("Account Type" = const(Vendor)) "Vendor Posting Group"
+ else
+ if ("Account Type" = const("Fixed Asset")) "FA Posting Group";
+ }
+ field(7; "Copied To No."; Code[20])
+ {
+ Caption = 'Copied To No.';
+ }
+ field(8; "Copied To Line"; Integer)
+ {
+ Caption = 'Copied To Line';
+ }
+ field(9; "Due Date"; Date)
+ {
+ Caption = 'Due Date';
+ }
+ field(10; "Acc. Type Last Entry Debit"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Acc. Type Last Entry Debit';
+ Editable = false;
+ }
+ field(11; "Acc. No. Last Entry Debit"; Code[20])
+ {
+ Caption = 'Acc. No. Last Entry Debit';
+ Editable = false;
+ TableRelation = if ("Acc. Type Last Entry Debit" = const("G/L Account")) "G/L Account"
+ else
+ if ("Acc. Type Last Entry Debit" = const(Customer)) Customer
+ else
+ if ("Acc. Type Last Entry Debit" = const(Vendor)) Vendor
+ else
+ if ("Acc. Type Last Entry Debit" = const("Bank Account")) "Bank Account"
+ else
+ if ("Acc. Type Last Entry Debit" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(12; "Acc. Type Last Entry Credit"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Acc. Type Last Entry Credit';
+ Editable = false;
+ }
+ field(13; "Acc. No. Last Entry Credit"; Code[20])
+ {
+ Caption = 'Acc. No. Last Entry Credit';
+ Editable = false;
+ TableRelation = if ("Acc. Type Last Entry Credit" = const("G/L Account")) "G/L Account"
+ else
+ if ("Acc. Type Last Entry Credit" = const(Customer)) Customer
+ else
+ if ("Acc. Type Last Entry Credit" = const(Vendor)) Vendor
+ else
+ if ("Acc. Type Last Entry Credit" = const("Bank Account")) "Bank Account"
+ else
+ if ("Acc. Type Last Entry Credit" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(14; "P. Group Last Entry Debit"; Code[20])
+ {
+ Caption = 'P. Group Last Entry Debit';
+ Editable = false;
+ }
+ field(15; "P. Group Last Entry Credit"; Code[20])
+ {
+ Caption = 'P. Group Last Entry Credit';
+ Editable = false;
+ }
+ field(16; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(17; "Status No."; Integer)
+ {
+ Caption = 'Status No.';
+ Editable = false;
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+ }
+ field(18; "Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Status No.")));
+ Caption = 'Status Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(19; IsCopy; Boolean)
+ {
+ Caption = 'IsCopy';
+ }
+ field(20; "Currency Code"; Code[10])
+ {
+ Caption = 'Currency Code';
+ TableRelation = Currency;
+ }
+ field(21; "Entry No. Debit"; Integer)
+ {
+ Caption = 'Entry No. Debit';
+ Editable = false;
+ }
+ field(22; "Entry No. Credit"; Integer)
+ {
+ Caption = 'Entry No. Credit';
+ Editable = false;
+ }
+ field(23; "Entry No. Debit Memo"; Integer)
+ {
+ Caption = 'Entry No. Debit Memo';
+ Editable = false;
+ }
+ field(24; "Entry No. Credit Memo"; Integer)
+ {
+ Caption = 'Entry No. Credit Memo';
+ Editable = false;
+ }
+ field(25; "Bank Account Code"; Code[20])
+ {
+ Caption = 'Bank Account Code';
+ TableRelation = if ("Account Type" = const(Customer)) "Customer Bank Account".Code where("Customer No." = field("Account No."))
+ else
+ if ("Account Type" = const(Vendor)) "Vendor Bank Account".Code where("Vendor No." = field("Account No."));
+ }
+ field(26; "Bank Branch No."; Text[20])
+ {
+ Caption = 'Bank Branch No.';
+ }
+ field(27; "Bank Account No."; Text[30])
+ {
+ Caption = 'Bank Account No.';
+ }
+ field(28; "Agency Code"; Text[5])
+ {
+ Caption = 'Agency Code';
+ }
+ field(29; "RIB Key"; Integer)
+ {
+ Caption = 'RIB Key';
+ }
+ field(30; "RIB Checked"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ }
+ field(31; "Acceptation Code"; Option)
+ {
+ Caption = 'Acceptation Code';
+ InitValue = No;
+ OptionCaption = 'LCR,No,BOR,LCR NA';
+ OptionMembers = LCR,No,BOR,"LCR NA";
+ }
+ field(32; "Document No."; Code[20])
+ {
+ Caption = 'Document No.';
+ }
+ field(33; "Debit Amount"; Decimal)
+ {
+ AutoFormatExpression = Rec."Currency Code";
+ AutoFormatType = 1;
+ BlankZero = true;
+ Caption = 'Debit Amount';
+ }
+ field(34; "Credit Amount"; Decimal)
+ {
+ AutoFormatExpression = Rec."Currency Code";
+ AutoFormatType = 1;
+ BlankZero = true;
+ Caption = 'Credit Amount';
+ }
+ field(35; "Applies-to ID"; Code[50])
+ {
+ Caption = 'Applies-to ID';
+ }
+ field(36; "Currency Factor"; Decimal)
+ {
+ Caption = 'Currency Factor';
+ DecimalPlaces = 0 : 15;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(37; Posted; Boolean)
+ {
+ Caption = 'Posted';
+ }
+ field(38; Correction; Boolean)
+ {
+ Caption = 'Correction';
+ }
+ field(39; "Bank Account Name"; Text[100])
+ {
+ Caption = 'Bank Account Name';
+ }
+ field(40; "Payment Address Code"; Code[10])
+ {
+ Caption = 'Payment Address Code';
+ TableRelation = "Payment Address FR".Code where("Account Type" = field("Account Type"),
+ "Account No." = field("Account No."));
+ }
+ field(41; "Applies-to Doc. Type"; Option)
+ {
+ Caption = 'Applies-to Doc. Type';
+ Editable = false;
+ OptionCaption = ' ,Payment,Invoice,Credit Memo,Finance Charge Memo,Reminder';
+ OptionMembers = " ",Payment,Invoice,"Credit Memo","Finance Charge Memo",Reminder;
+ }
+ field(42; "Applies-to Doc. No."; Code[20])
+ {
+ Caption = 'Applies-to Doc. No.';
+ Editable = false;
+ }
+ field(43; "External Document No."; Code[35])
+ {
+ Caption = 'External Document No.';
+ }
+ field(44; "Amount (LCY)"; Decimal)
+ {
+ Caption = 'Amount (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(45; "Drawee Reference"; Text[10])
+ {
+ Caption = 'Drawee Reference';
+ }
+ field(46; "Bank City"; Text[30])
+ {
+ Caption = 'Bank City';
+ }
+ field(48; "Posting Date"; Date)
+ {
+ Caption = 'Posting Date';
+ }
+ field(50; "Payment in Progress"; Boolean)
+ {
+ Caption = 'Payment in Progress';
+ Editable = false;
+ }
+ field(55; IBAN; Code[50])
+ {
+ Caption = 'IBAN';
+
+ trigger OnValidate()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.CheckIBAN(IBAN);
+ end;
+ }
+ field(56; "SWIFT Code"; Code[20])
+ {
+ Caption = 'SWIFT Code';
+ }
+ field(480; "Dimension Set ID"; Integer)
+ {
+ Caption = 'Dimension Set ID';
+ Editable = false;
+ TableRelation = "Dimension Set Entry";
+
+ trigger OnLookup()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "No.", "Line No.")
+ {
+ Clustered = true;
+ SumIndexFields = Amount, "Amount (LCY)";
+ }
+ key(Key2; "Posting Date", "Document No.")
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ }
+
+ procedure ShowDimensions()
+ var
+ DimMgt: Codeunit DimensionManagement;
+ begin
+ DimMgt.ShowDimensionSet("Dimension Set ID", CopyStr(StrSubstNo('%1 %2 %3', TableCaption(), "No.", "Line No."), 1, 250));
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineFR.Table.al
new file mode 100644
index 0000000000..24324ce234
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentLineFR.Table.al
@@ -0,0 +1,891 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Foundation.PaymentTerms;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+
+table 10837 "Payment Line FR"
+{
+ Caption = 'Payment Line';
+ DrillDownPageID = "Payment Lines List FR";
+ LookupPageID = "Payment Lines List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "No."; Code[20])
+ {
+ Caption = 'No.';
+ TableRelation = "Payment Header FR";
+ }
+ field(2; "Line No."; Integer)
+ {
+ Caption = 'Line No.';
+ }
+ field(3; Amount; Decimal)
+ {
+ Caption = 'Amount';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+
+ trigger OnValidate()
+ var
+ CurrExchRate: Record "Currency Exchange Rate";
+ PaymentSubscribers: Codeunit "PaymentMgt Subscribers FR";
+ begin
+ if ((Amount > 0) and (not Correction)) or
+ ((Amount < 0) and Correction)
+ then begin
+ "Debit Amount" := Amount;
+ "Credit Amount" := 0
+ end else begin
+ "Debit Amount" := 0;
+ "Credit Amount" := -Amount;
+ end;
+ if "Currency Code" = '' then
+ "Amount (LCY)" := Amount
+ else
+ "Amount (LCY)" := Round(
+ CurrExchRate.ExchangeAmtFCYToLCY(
+ "Posting Date", "Currency Code",
+ Amount, "Currency Factor"));
+ if Amount <> xRec.Amount then
+ PaymentSubscribers.PmtTolPaymentLine(Rec);
+ end;
+ }
+ field(4; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+
+ trigger OnValidate()
+ begin
+ UpdateEntry(false);
+ end;
+ }
+ field(5; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+
+ trigger OnValidate()
+ begin
+ UpdateEntry(false);
+ end;
+ }
+ field(6; "Posting Group"; Code[20])
+ {
+ Caption = 'Posting Group';
+ Editable = false;
+ TableRelation = if ("Account Type" = const(Customer)) "Customer Posting Group"
+ else
+ if ("Account Type" = const(Vendor)) "Vendor Posting Group"
+ else
+ if ("Account Type" = const("Fixed Asset")) "FA Posting Group";
+ }
+ field(7; "Copied To No."; Code[20])
+ {
+ Caption = 'Copied To No.';
+ }
+ field(8; "Copied To Line"; Integer)
+ {
+ Caption = 'Copied To Line';
+ }
+ field(9; "Due Date"; Date)
+ {
+ Caption = 'Due Date';
+ }
+ field(10; "Acc. Type Last Entry Debit"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Acc. Type Last Entry Debit';
+ Editable = false;
+ }
+ field(11; "Acc. No. Last Entry Debit"; Code[20])
+ {
+ Caption = 'Acc. No. Last Entry Debit';
+ Editable = false;
+ TableRelation = if ("Acc. Type Last Entry Debit" = const("G/L Account")) "G/L Account"
+ else
+ if ("Acc. Type Last Entry Debit" = const(Customer)) Customer
+ else
+ if ("Acc. Type Last Entry Debit" = const(Vendor)) Vendor
+ else
+ if ("Acc. Type Last Entry Debit" = const("Bank Account")) "Bank Account"
+ else
+ if ("Acc. Type Last Entry Debit" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(12; "Acc. Type Last Entry Credit"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Acc. Type Last Entry Credit';
+ Editable = false;
+ }
+ field(13; "Acc. No. Last Entry Credit"; Code[20])
+ {
+ Caption = 'Acc. No. Last Entry Credit';
+ Editable = false;
+ TableRelation = if ("Acc. Type Last Entry Credit" = const("G/L Account")) "G/L Account"
+ else
+ if ("Acc. Type Last Entry Credit" = const(Customer)) Customer
+ else
+ if ("Acc. Type Last Entry Credit" = const(Vendor)) Vendor
+ else
+ if ("Acc. Type Last Entry Credit" = const("Bank Account")) "Bank Account"
+ else
+ if ("Acc. Type Last Entry Credit" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(14; "P. Group Last Entry Debit"; Code[20])
+ {
+ Caption = 'P. Group Last Entry Debit';
+ Editable = false;
+ }
+ field(15; "P. Group Last Entry Credit"; Code[20])
+ {
+ Caption = 'P. Group Last Entry Credit';
+ Editable = false;
+ }
+ field(16; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(17; "Status No."; Integer)
+ {
+ Caption = 'Status No.';
+ Editable = false;
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+
+ trigger OnValidate()
+ var
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ PaymentStatus.Get("Payment Class", "Status No.");
+ "Payment in Progress" := PaymentStatus."Payment in Progress";
+ end;
+ }
+ field(18; "Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Status No.")));
+ Caption = 'Status Name';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(19; IsCopy; Boolean)
+ {
+ Caption = 'IsCopy';
+ }
+ field(20; "Currency Code"; Code[10])
+ {
+ Caption = 'Currency Code';
+ TableRelation = Currency;
+ }
+ field(21; "Entry No. Debit"; Integer)
+ {
+ Caption = 'Entry No. Debit';
+ Editable = false;
+ }
+ field(22; "Entry No. Credit"; Integer)
+ {
+ Caption = 'Entry No. Credit';
+ Editable = false;
+ }
+ field(23; "Entry No. Debit Memo"; Integer)
+ {
+ Caption = 'Entry No. Debit Memo';
+ Editable = false;
+ }
+ field(24; "Entry No. Credit Memo"; Integer)
+ {
+ Caption = 'Entry No. Credit Memo';
+ Editable = false;
+ }
+ field(25; "Bank Account Code"; Code[20])
+ {
+ Caption = 'Bank Account Code';
+ TableRelation = if ("Account Type" = const(Customer)) "Customer Bank Account".Code where("Customer No." = field("Account No."))
+ else
+ if ("Account Type" = const(Vendor)) "Vendor Bank Account".Code where("Vendor No." = field("Account No."));
+
+ trigger OnValidate()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ if "Bank Account Code" <> '' then begin
+ if "Account Type" = "Account Type"::Customer then begin
+ if SEPADirectDebitMandate.Get("Direct Debit Mandate ID") then
+ if "Bank Account Code" <> SEPADirectDebitMandate."Customer Bank Account Code" then
+ Error(BankAccErr, SEPADirectDebitMandate."Customer Bank Account Code");
+ CustomerBank.Get("Account No.", "Bank Account Code");
+ "Bank Branch No." := CustomerBank."Bank Branch No.";
+ "Bank Account No." := CustomerBank."Bank Account No.";
+ IBAN := CustomerBank.IBAN;
+ "SWIFT Code" := CustomerBank."SWIFT Code";
+ "Agency Code" := CustomerBank."Agency Code FR";
+ "Bank Account Name" := CustomerBank.Name;
+ "RIB Key" := CustomerBank."RIB Key FR";
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ "Bank City" := CustomerBank.City;
+ end else
+ if "Account Type" = "Account Type"::Vendor then begin
+ VendorBank.Get("Account No.", "Bank Account Code");
+ "Bank Branch No." := VendorBank."Bank Branch No.";
+ "Bank Account No." := VendorBank."Bank Account No.";
+ IBAN := VendorBank.IBAN;
+ "SWIFT Code" := VendorBank."SWIFT Code";
+ "Agency Code" := VendorBank."Agency Code FR";
+ "Bank Account Name" := VendorBank.Name;
+ "RIB Key" := VendorBank."RIB Key FR";
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ "Bank City" := VendorBank.City;
+ end;
+ end else
+ InitBankAccount();
+ end;
+ }
+ field(26; "Bank Branch No."; Text[20])
+ {
+ Caption = 'Bank Branch No.';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(27; "Bank Account No."; Text[30])
+ {
+ Caption = 'Bank Account No.';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(28; "Agency Code"; Text[5])
+ {
+ Caption = 'Agency Code';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(29; "RIB Key"; Integer)
+ {
+ Caption = 'RIB Key';
+
+ trigger OnValidate()
+ begin
+ "RIB Checked" := RibKey.Check("Bank Branch No.", "Agency Code", "Bank Account No.", "RIB Key");
+ end;
+ }
+ field(30; "RIB Checked"; Boolean)
+ {
+ Caption = 'RIB Checked';
+ Editable = false;
+ }
+ field(31; "Acceptation Code"; Option)
+ {
+ Caption = 'Acceptation Code';
+ InitValue = No;
+ OptionCaption = 'LCR,No,BOR,LCR NA';
+ OptionMembers = LCR,No,BOR,"LCR NA";
+ }
+ field(32; "Document No."; Code[20])
+ {
+ Caption = 'Document No.';
+ }
+ field(33; "Debit Amount"; Decimal)
+ {
+ AutoFormatExpression = Rec."Currency Code";
+ AutoFormatType = 1;
+ BlankZero = true;
+ Caption = 'Debit Amount';
+
+ trigger OnValidate()
+ begin
+ GetCurrency();
+ "Debit Amount" := Round("Debit Amount", Currency."Amount Rounding Precision");
+ Correction := "Debit Amount" < 0;
+ Validate(Amount, "Debit Amount");
+ end;
+ }
+ field(34; "Credit Amount"; Decimal)
+ {
+ AutoFormatExpression = Rec."Currency Code";
+ AutoFormatType = 1;
+ BlankZero = true;
+ Caption = 'Credit Amount';
+
+ trigger OnValidate()
+ begin
+ GetCurrency();
+ "Credit Amount" := Round("Credit Amount", Currency."Amount Rounding Precision");
+ Correction := "Credit Amount" < 0;
+ Validate(Amount, -"Credit Amount");
+ end;
+ }
+ field(35; "Applies-to ID"; Code[50])
+ {
+ Caption = 'Applies-to ID';
+ }
+ field(36; "Currency Factor"; Decimal)
+ {
+ Caption = 'Currency Factor';
+ DecimalPlaces = 0 : 15;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(37; Posted; Boolean)
+ {
+ Caption = 'Posted';
+ }
+ field(38; Correction; Boolean)
+ {
+ Caption = 'Correction';
+
+ trigger OnValidate()
+ begin
+ Validate(Amount);
+ end;
+ }
+ field(39; "Bank Account Name"; Text[100])
+ {
+ Caption = 'Bank Account Name';
+ }
+ field(40; "Payment Address Code"; Code[10])
+ {
+ Caption = 'Payment Address Code';
+ TableRelation = "Payment Address FR".Code where("Account Type" = field("Account Type"),
+ "Account No." = field("Account No."));
+ }
+ field(41; "Applies-to Doc. Type"; Enum "Gen. Journal Document Type")
+ {
+ Caption = 'Applies-to Doc. Type';
+ Editable = false;
+ }
+ field(42; "Applies-to Doc. No."; Code[20])
+ {
+ Caption = 'Applies-to Doc. No.';
+ Editable = false;
+ }
+ field(43; "External Document No."; Code[35])
+ {
+ Caption = 'External Document No.';
+ }
+ field(44; "Amount (LCY)"; Decimal)
+ {
+ Caption = 'Amount (LCY)';
+ Editable = false;
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(45; "Drawee Reference"; Text[10])
+ {
+ Caption = 'Drawee Reference';
+ }
+ field(46; "Bank City"; Text[30])
+ {
+ Caption = 'Bank City';
+ }
+ field(47; Marked; Boolean)
+ {
+ Caption = 'Marked';
+ Editable = false;
+ }
+ field(48; "Posting Date"; Date)
+ {
+ Caption = 'Posting Date';
+ Editable = false;
+ }
+ field(50; "Payment in Progress"; Boolean)
+ {
+ Caption = 'Payment in Progress';
+ Editable = false;
+ }
+ field(51; "Created from No."; Code[20])
+ {
+ Caption = 'Created from No.';
+ }
+ field(55; IBAN; Code[50])
+ {
+ Caption = 'IBAN', Locked = true;
+
+ trigger OnValidate()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.CheckIBAN(IBAN);
+ end;
+ }
+ field(56; "SWIFT Code"; Code[20])
+ {
+ Caption = 'SWIFT Code';
+ }
+ field(291; "Has Payment Export Error"; Boolean)
+ {
+ CalcFormula = exist("Payment Jnl. Export Error Text" where("Document No." = field("No."),
+ "Journal Line No." = field("Line No.")));
+ Caption = 'Has Payment Export Error';
+ Editable = false;
+ FieldClass = FlowField;
+ }
+ field(480; "Dimension Set ID"; Integer)
+ {
+ Caption = 'Dimension Set ID';
+ Editable = false;
+ TableRelation = "Dimension Set Entry";
+
+ trigger OnLookup()
+ begin
+ Rec.ShowDimensions();
+ end;
+ }
+ field(1230; "Direct Debit Mandate ID"; Code[35])
+ {
+ Caption = 'Direct Debit Mandate ID';
+ TableRelation = if ("Account Type" = const(Customer)) "SEPA Direct Debit Mandate" where("Customer No." = field("Account No."));
+
+ trigger OnValidate()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ if SEPADirectDebitMandate.Get("Direct Debit Mandate ID") then
+ Validate("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "No.", "Line No.")
+ {
+ Clustered = true;
+ SumIndexFields = Amount;
+ }
+ key(Key2; "Copied To No.", "Copied To Line")
+ {
+ }
+ key(Key3; "Account Type", "Account No.", "Copied To Line", "Payment in Progress")
+ {
+ SumIndexFields = "Amount (LCY)";
+ }
+ key(Key4; "No.", "Account No.", "Bank Branch No.", "Agency Code", "Bank Account No.", "Payment Address Code")
+ {
+ }
+ key(Key5; "Posting Date", "Document No.")
+ {
+ }
+ key(Key6; "Payment Class")
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ }
+
+ trigger OnDelete()
+ var
+ PaymentApply: Codeunit "Payment-Apply FR";
+ begin
+ if "Copied To No." <> '' then
+ Error(Text001Lbl);
+ PaymentApply.DeleteApply(Rec);
+ DeletePaymentFileErrors();
+ end;
+
+ trigger OnInsert()
+ var
+ Statement: Record "Payment Header FR";
+ begin
+ Statement.Get("No.");
+ Statement.TestField("File Export Completed", false);
+ "Payment Class" := Statement."Payment Class";
+ if (Statement."Currency Code" <> "Currency Code") and IsCopy then
+ Error(Text000Lbl);
+ "Currency Code" := Statement."Currency Code";
+ "Currency Factor" := Statement."Currency Factor";
+ "Posting Date" := Statement."Posting Date";
+ Validate(Amount);
+ Validate("Status No.");
+ PaymentClass.Get(Statement."Payment Class");
+ if PaymentClass."Line No. Series" = '' then
+ "Document No." := Statement."No."
+ else
+ if "Document No." = '' then
+ "Document No." := NoSeries.GetNextNo(PaymentClass."Line No. Series", "Posting Date");
+ UpdateEntry(true);
+ end;
+
+ trigger OnModify()
+ begin
+ ModifyCheck();
+ end;
+
+ var
+ Currency: Record Currency;
+ CustomerBank: Record "Customer Bank Account";
+ VendorBank: Record "Vendor Bank Account";
+ PaymentClass: Record "Payment Class FR";
+ Customer: Record Customer;
+ Vendor: Record Vendor;
+ DefaultDimension: Record "Default Dimension";
+ RibKey: Codeunit "RIB Key FR";
+ NoSeries: Codeunit "No. Series";
+ DimMgt: Codeunit DimensionManagement;
+ Text000Lbl: Label 'You cannot use different currencies on the same payment header.';
+ Text001Lbl: Label 'You cannot delete this payment line.';
+ Text002Lbl: Label 'You cannot modify this payment line.';
+ BankAccErr: Label 'You must use customer bank account, %1, which you specified in the selected direct debit mandate.', Comment = '%1 = Code';
+
+ local procedure AddDocumentNoToList(var List: Text; DocumentNo: Code[35]; LenToCut: Integer)
+ var
+ Delimiter: Text[2];
+ PrevLen: Integer;
+ begin
+ PrevLen := StrLen(List);
+ if PrevLen <> 0 then
+ Delimiter := ', ';
+ List += Delimiter + DocumentNo;
+ if (PrevLen <= LenToCut) and (StrLen(List) > LenToCut) then
+ List := CopyStr(List, 1, PrevLen) + PadStr('', LenToCut - PrevLen) + CopyStr(List, PrevLen + StrLen(Delimiter) + 1);
+ end;
+
+ procedure SetUpNewLine(LastGenJnlLine: Record "Payment Line FR"; BottomLine: Boolean)
+ var
+ Statement: Record "Payment Header FR";
+ begin
+ "Account Type" := LastGenJnlLine."Account Type";
+ if "No." <> '' then begin
+ Statement.Get("No.");
+ PaymentClass.Get(Statement."Payment Class");
+ if PaymentClass."Line No. Series" = '' then
+ "Document No." := Statement."No."
+ else
+ if "Document No." = '' then
+ "Document No." := NoSeries.GetNextNo(PaymentClass."Line No. Series", "Posting Date");
+ end;
+ "Due Date" := Statement."Posting Date";
+
+ OnAfterSetUpNewLine(Rec);
+ end;
+
+ procedure ShowDimensions()
+ begin
+ "Dimension Set ID" :=
+ DimMgt.EditDimensionSet("Dimension Set ID", CopyStr(StrSubstNo('%1 %2 %3', TableCaption(), "No.", "Line No."), 1, 250));
+ end;
+
+ procedure GetAppliedDocNoList(LenToCut: Integer) List: Text
+ var
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ DocumentNo: Code[35];
+ begin
+ if ("Applies-to Doc. No." = '') and ("Applies-to ID" = '') then
+ exit('');
+ case "Account Type" of
+ "Account Type"::Customer:
+ begin
+ CustLedgEntry.SetRange("Customer No.", "Account No.");
+ if "Applies-to Doc. No." <> '' then begin
+ CustLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
+ CustLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
+ end else
+ CustLedgEntry.SetRange("Applies-to ID", "Applies-to ID");
+ if CustLedgEntry.FindSet() then
+ repeat
+ AddDocumentNoToList(List, CustLedgEntry."Document No.", LenToCut);
+ until CustLedgEntry.Next() = 0;
+ end;
+ "Account Type"::Vendor:
+ begin
+ VendLedgEntry.SetRange("Vendor No.", "Account No.");
+ if "Applies-to Doc. No." <> '' then begin
+ VendLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
+ VendLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
+ end else
+ VendLedgEntry.SetRange("Applies-to ID", "Applies-to ID");
+ if VendLedgEntry.FindSet() then
+ repeat
+ if VendLedgEntry."External Document No." = '' then
+ DocumentNo := VendLedgEntry."Document No."
+ else
+ DocumentNo := VendLedgEntry."External Document No.";
+ AddDocumentNoToList(List, DocumentNo, LenToCut);
+ until VendLedgEntry.Next() = 0;
+ end;
+ else
+ exit('');
+ end;
+ exit(List);
+ end;
+
+ procedure GetAppliesToDocCustLedgEntry(var CustLedgEntry: Record "Cust. Ledger Entry")
+ begin
+ if "Account Type" <> "Account Type"::Customer then
+ exit;
+
+ CustLedgEntry.SetRange("Customer No.", "Account No.");
+ CustLedgEntry.SetRange(Open, true);
+ if "Applies-to Doc. No." <> '' then begin
+ CustLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
+ CustLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
+ if CustLedgEntry.FindFirst() then;
+ end else
+ if "Applies-to ID" <> '' then begin
+ CustLedgEntry.SetRange("Applies-to ID", "Applies-to ID");
+ if CustLedgEntry.FindSet() then;
+ end;
+ end;
+
+ procedure GetCurrency()
+ var
+ Header: Record "Payment Header FR";
+ begin
+ Header.Get("No.");
+ if Header."Currency Code" = '' then begin
+ Clear(Currency);
+ Currency.InitRoundingPrecision();
+ end else
+ Currency.Get(Header."Currency Code");
+ end;
+
+ procedure InitBankAccount()
+ begin
+ "Bank Account Code" := '';
+ "Bank Branch No." := '';
+ "Bank Account No." := '';
+ "Agency Code" := '';
+ "RIB Key" := 0;
+ "RIB Checked" := false;
+ "Bank Account Name" := '';
+ "Bank City" := '';
+ IBAN := '';
+ "SWIFT Code" := '';
+ end;
+
+ procedure DimensionSetup()
+ var
+ DimensionManagement: Codeunit DimensionManagement;
+ begin
+ if "Line No." <> 0 then begin
+ Clear(DefaultDimension);
+ DefaultDimension.SetRange("Table ID", DimensionManagement.TypeToTableID1("Account Type".AsInteger()));
+ DimensionCreate();
+ end;
+ end;
+
+ procedure DimensionCreate()
+ var
+ TempDimSetEntry: Record "Dimension Set Entry" temporary;
+ DimSetEntry: Record "Dimension Set Entry";
+ DimValue: Record "Dimension Value";
+ PaymentHeader: Record "Payment Header FR";
+ IsHandled: Boolean;
+ begin
+ IsHandled := false;
+ OnBeforeDimensionCreate(Rec, DefaultDimension, IsHandled);
+ if IsHandled then
+ exit;
+
+ DefaultDimension.SetRange("No.", "Account No.");
+ DefaultDimension.SetFilter("Dimension Value Code", '<>%1', '');
+ if DefaultDimension.Find('-') then
+ repeat
+ DimValue.Get(DefaultDimension."Dimension Code", DefaultDimension."Dimension Value Code");
+ TempDimSetEntry."Dimension Code" := DimValue."Dimension Code";
+ TempDimSetEntry."Dimension Value Code" := DimValue.Code;
+ TempDimSetEntry."Dimension Value ID" := DimValue."Dimension Value ID";
+ TempDimSetEntry.Insert();
+ until DefaultDimension.Next() = 0;
+
+ PaymentHeader.SetRange("No.", "No.");
+ PaymentHeader.FindFirst();
+
+ DimSetEntry.SetRange("Dimension Set ID", PaymentHeader."Dimension Set ID");
+ if DimSetEntry.FindSet() then
+ repeat
+ TempDimSetEntry := DimSetEntry;
+ TempDimSetEntry."Dimension Set ID" := 0;
+ if not TempDimSetEntry.Modify() then
+ TempDimSetEntry.Insert();
+ until DimSetEntry.Next() = 0;
+
+ "Dimension Set ID" := DimMgt.GetDimensionSetID(TempDimSetEntry);
+ end;
+
+ procedure DeletePaymentFileErrors()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ begin
+ GenJnlLine."Journal Template Name" := '';
+ GenJnlLine."Journal Batch Name" := Format(DATABASE::"Payment Header FR");
+ GenJnlLine."Document No." := "No.";
+ GenJnlLine."Line No." := "Line No.";
+ GenJnlLine.DeletePaymentFileErrors();
+ end;
+
+ procedure UpdateDueDate(DocumentDate: Date)
+ var
+ PaymentTerms: Record "Payment Terms";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ if "Status No." > 0 then
+ exit;
+ if DocumentDate = 0D then begin
+ PaymentHeader.Get("No.");
+ DocumentDate := PaymentHeader."Posting Date";
+ if DocumentDate = 0D then
+ exit;
+ end;
+ Clear(PaymentTerms);
+ if "Account Type" = "Account Type"::Customer then begin
+ if "Account No." <> '' then begin
+ Customer.Get("Account No.");
+ if not PaymentTerms.Get(Customer."Payment Terms Code") then
+ "Due Date" := PaymentHeader."Posting Date";
+ end
+ end else
+ if "Account Type" = "Account Type"::Vendor then
+ if "Account No." <> '' then begin
+ Vendor.Get("Account No.");
+ if not PaymentTerms.Get(Vendor."Payment Terms Code") then
+ "Due Date" := PaymentHeader."Posting Date";
+ end;
+ if PaymentTerms.Code <> '' then
+ "Due Date" := CalcDate(PaymentTerms."Due Date Calculation", DocumentDate);
+ end;
+
+ procedure UpdateEntry(InsertRecord: Boolean)
+ var
+ PaymentAddress: Record "Payment Address FR";
+ GLAccount: Record "G/L Account";
+ BankAccount: Record "Bank Account";
+ FixedAsset: Record "Fixed Asset";
+ begin
+ if (xRec."Line No." <> 0) and ("Account Type" <> xRec."Account Type") then begin
+ if not InsertRecord then begin
+ "Account No." := '';
+ InitBankAccount();
+ "Due Date" := 0D;
+ end;
+ "Dimension Set ID" := 0;
+ end;
+ if "Account No." = '' then begin
+ InitBankAccount();
+ "Due Date" := 0D;
+ "Dimension Set ID" := 0;
+ exit;
+ end;
+ if (xRec."Line No." = "Line No.") and (xRec."Account No." <> '') and ("Account No." <> xRec."Account No.") then begin
+ InitBankAccount();
+ "Dimension Set ID" := 0;
+ end;
+ if (xRec."Line No." = "Line No.") and (xRec."Account Type" = "Account Type") and (xRec."Account No." = "Account No.") then
+ exit;
+ case "Account Type" of
+ "Account Type"::"G/L Account":
+ begin
+ GLAccount.Get("Account No.");
+ GLAccount.TestField("Account Type", GLAccount."Account Type"::Posting);
+ GLAccount.TestField(Blocked, false);
+ end;
+ "Account Type"::Customer:
+ begin
+ Customer.Get("Account No.");
+ if Customer."Privacy Blocked" then
+ Customer.FieldError("Privacy Blocked");
+
+ if Customer.Blocked in [Customer.Blocked::All] then
+ Customer.FieldError(Blocked);
+ if "Bank Account Code" = '' then
+ if Customer."Preferred Bank Account Code" <> '' then
+ Validate("Bank Account Code", Customer."Preferred Bank Account Code");
+ if not InsertRecord then
+ UpdateDueDate(0D);
+ end;
+ "Account Type"::Vendor:
+ begin
+ Vendor.Get("Account No.");
+ Vendor.TestField(Blocked, Vendor.Blocked::" ");
+ Vendor.TestField("Privacy Blocked", false);
+ if "Bank Account Code" = '' then
+ if Vendor."Preferred Bank Account Code" <> '' then
+ Validate("Bank Account Code", Vendor."Preferred Bank Account Code");
+ if not InsertRecord then
+ UpdateDueDate(0D);
+ end;
+ "Account Type"::"Bank Account":
+ begin
+ BankAccount.Get("Account No.");
+ BankAccount.TestField(Blocked, false);
+ end;
+ "Account Type"::"Fixed Asset":
+ begin
+ FixedAsset.Get("Account No.");
+ FixedAsset.TestField(Blocked, false);
+ end;
+ end;
+ OnUpdateEntryOnBeforeDimensionSetup(Rec);
+ DimensionSetup();
+ PaymentAddress.SetRange("Account Type", "Account Type");
+ PaymentAddress.SetRange("Account No.", "Account No.");
+ PaymentAddress.SetRange("Default Value", true);
+ if PaymentAddress.FindFirst() then
+ "Payment Address Code" := PaymentAddress.Code
+ else
+ "Payment Address Code" := '';
+
+ OnAfterUpdateEntry(Rec);
+ end;
+
+ procedure ModifyCheck()
+ begin
+ if Posted then
+ Error(Text002Lbl);
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterSetUpNewLine(var PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterUpdateEntry(var PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeDimensionCreate(var PaymentLine: Record "Payment Line FR"; var DefaultDimension: Record "Default Dimension"; var IsHandled: Boolean)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnUpdateEntryOnBeforeDimensionSetup(var PaymentLine: Record "Payment Line FR")
+ begin
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentPostBufferFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentPostBufferFR.Table.al
new file mode 100644
index 0000000000..08288fdabd
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentPostBufferFR.Table.al
@@ -0,0 +1,394 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Finance.SalesTax;
+using Microsoft.Finance.VAT.Setup;
+using Microsoft.FixedAssets.Depreciation;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.FixedAssets.Insurance;
+using Microsoft.FixedAssets.Maintenance;
+using Microsoft.Foundation.Enums;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10838 "Payment Post. Buffer FR"
+{
+ Caption = 'Payment Post. Buffer';
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+ }
+ field(2; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(4; "Global Dimension 1 Code"; Code[20])
+ {
+ CaptionClass = '1,1,1';
+ Caption = 'Global Dimension 1 Code';
+ }
+ field(5; "Global Dimension 2 Code"; Code[20])
+ {
+ CaptionClass = '1,1,2';
+ Caption = 'Global Dimension 2 Code';
+ }
+ field(6; "Job No."; Code[20])
+ {
+ Caption = 'Job No.';
+ }
+ field(7; Amount; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Amount';
+
+ trigger OnValidate()
+ begin
+ if Amount < 0 then
+ Sign := Sign::Negative
+ else
+ Sign := Sign::Positive;
+ end;
+ }
+ field(8; "VAT Amount"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'VAT Amount';
+ }
+ field(9; "Line Discount Amount"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Line Discount Amount';
+ }
+ field(10; "Gen. Bus. Posting Group"; Code[20])
+ {
+ Caption = 'Gen. Bus. Posting Group';
+ TableRelation = "Gen. Business Posting Group";
+ }
+ field(11; "Gen. Prod. Posting Group"; Code[20])
+ {
+ Caption = 'Gen. Prod. Posting Group';
+ TableRelation = "Gen. Product Posting Group";
+ }
+ field(12; "VAT Calculation Type"; Enum "Tax Calculation Type")
+ {
+ Caption = 'VAT Calculation Type';
+ }
+ field(13; "Inv. Discount Amount"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Inv. Discount Amount';
+ }
+ field(14; "VAT Base Amount"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'VAT Base Amount';
+ }
+ field(15; "Line Discount Account"; Code[20])
+ {
+ Caption = 'Line Discount Account';
+ TableRelation = "G/L Account";
+ }
+ field(16; "Inv. Discount Account"; Code[20])
+ {
+ Caption = 'Inv. Discount Account';
+ TableRelation = "G/L Account";
+ }
+ field(17; "System-Created Entry"; Boolean)
+ {
+ Caption = 'System-Created Entry';
+ }
+ field(18; "Tax Area Code"; Code[20])
+ {
+ Caption = 'Tax Area Code';
+ TableRelation = "Tax Area";
+ }
+ field(19; "Tax Liable"; Boolean)
+ {
+ Caption = 'Tax Liable';
+ }
+ field(20; "Tax Group Code"; Code[20])
+ {
+ Caption = 'Tax Group Code';
+ TableRelation = "Tax Group";
+ }
+ field(21; Quantity; Decimal)
+ {
+ Caption = 'Quantity';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ DecimalPlaces = 1 : 5;
+ }
+ field(22; "Use Tax"; Boolean)
+ {
+ Caption = 'Use Tax';
+ }
+ field(23; "VAT Bus. Posting Group"; Code[20])
+ {
+ Caption = 'VAT Bus. Posting Group';
+ TableRelation = "VAT Business Posting Group";
+ }
+ field(24; "VAT Prod. Posting Group"; Code[20])
+ {
+ Caption = 'VAT Prod. Posting Group';
+ TableRelation = "VAT Product Posting Group";
+ }
+ field(25; "Amount (ACY)"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Amount (ACY)';
+ }
+ field(26; "VAT Amount (ACY)"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'VAT Amount (ACY)';
+ }
+ field(27; "Line Discount Amt. (ACY)"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Line Discount Amt. (ACY)';
+ }
+ field(28; "Inv. Discount Amt. (ACY)"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Inv. Discount Amt. (ACY)';
+ }
+ field(29; "VAT Base Amount (ACY)"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'VAT Base Amount (ACY)';
+ }
+ field(30; "Dimension Entry No."; Integer)
+ {
+ Caption = 'Dimension Entry No.';
+ }
+ field(31; "VAT Difference"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'VAT Difference';
+ }
+ field(32; "VAT %"; Decimal)
+ {
+ Caption = 'VAT %';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ DecimalPlaces = 1 : 1;
+ }
+ field(33; "GL Entry No."; Integer)
+ {
+ Caption = 'GL Entry No.';
+ }
+ field(34; "Applies-to Doc. Type"; Enum "Gen. Journal Document Type")
+ {
+ Caption = 'Applies-to Doc. Type';
+ }
+ field(35; "Applies-to Doc. No."; Code[20])
+ {
+ Caption = 'Applies-to Doc. No.';
+ }
+ field(36; "Amount (LCY)"; Decimal)
+ {
+ Caption = 'Amount (LCY)';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(37; "Currency Code"; Code[10])
+ {
+ Caption = 'Currency Code';
+ }
+ field(38; "Currency Factor"; Decimal)
+ {
+ Caption = 'Currency Factor';
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ }
+ field(63; "External Document No."; Code[35])
+ {
+ Caption = 'External Document No.';
+ }
+ field(78; "Source Type"; Enum "Gen. Journal Source Type")
+ {
+ Caption = 'Source Type';
+ }
+ field(79; "Source No."; Code[20])
+ {
+ Caption = 'Source No.';
+ TableRelation = if ("Source Type" = const(Customer)) Customer
+ else
+ if ("Source Type" = const(Vendor)) Vendor
+ else
+ if ("Source Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Source Type" = const("Fixed Asset")) "Fixed Asset";
+ }
+ field(90; "Auxiliary Entry No."; Integer)
+ {
+ Caption = 'Auxiliary Entry No.';
+ }
+ field(91; "Created from No."; Code[20])
+ {
+ Caption = 'Created from No.';
+ }
+ field(200; Sign; Option)
+ {
+ Caption = 'Sign';
+ OptionCaption = 'Negative,Positive';
+ OptionMembers = Negative,Positive;
+ }
+ field(480; "Dimension Set ID"; Integer)
+ {
+ Caption = 'Dimension Set ID';
+ Editable = false;
+ TableRelation = "Dimension Set Entry";
+ }
+ field(5600; "FA Posting Date"; Date)
+ {
+ Caption = 'FA Posting Date';
+ }
+ field(5601; "FA Posting Type"; Option)
+ {
+ Caption = 'FA Posting Type';
+ OptionCaption = ' ,Acquisition Cost,Maintenance';
+ OptionMembers = " ","Acquisition Cost",Maintenance;
+ }
+ field(5602; "Depreciation Book Code"; Code[10])
+ {
+ Caption = 'Depreciation Book Code';
+ TableRelation = "Depreciation Book";
+ }
+ field(5603; "Salvage Value"; Decimal)
+ {
+ AutoFormatType = 1;
+ AutoFormatExpression = Rec."Currency Code";
+ Caption = 'Salvage Value';
+ }
+ field(5605; "Depr. until FA Posting Date"; Boolean)
+ {
+ Caption = 'Depr. until FA Posting Date';
+ }
+ field(5606; "Depr. Acquisition Cost"; Boolean)
+ {
+ Caption = 'Depr. Acquisition Cost';
+ }
+ field(5609; "Maintenance Code"; Code[10])
+ {
+ Caption = 'Maintenance Code';
+ TableRelation = Maintenance;
+ }
+ field(5610; "Insurance No."; Code[20])
+ {
+ Caption = 'Insurance No.';
+ TableRelation = Insurance;
+ }
+ field(5611; "Budgeted FA No."; Code[20])
+ {
+ Caption = 'Budgeted FA No.';
+ TableRelation = "Fixed Asset";
+ }
+ field(5612; "Duplicate in Depreciation Book"; Code[10])
+ {
+ Caption = 'Duplicate in Depreciation Book';
+ TableRelation = "Depreciation Book";
+ }
+ field(5613; "Use Duplication List"; Boolean)
+ {
+ Caption = 'Use Duplication List';
+ }
+ field(5614; "Fixed Asset Line No."; Integer)
+ {
+ Caption = 'Fixed Asset Line No.';
+ }
+ field(5615; "FA Discount Account"; Code[20])
+ {
+ Caption = 'FA Discount Account';
+ TableRelation = "G/L Account";
+ }
+ field(5616; "Payment Line No."; Integer)
+ {
+ Caption = 'Payment Line No.';
+ }
+ field(5617; "Posting Group"; Code[20])
+ {
+ Caption = 'Posting Group';
+ }
+ field(5618; "Applies-to ID"; Code[50])
+ {
+ Caption = 'Applies-to ID';
+ }
+ field(5619; "Due Date"; Date)
+ {
+ Caption = 'Due Date';
+ }
+ field(5620; "Document Type"; Enum "Gen. Journal Document Type")
+ {
+ Caption = 'Document Type';
+ }
+ field(5621; "Document No."; Code[20])
+ {
+ Caption = 'Document No.';
+ }
+ field(5622; Description; Text[50])
+ {
+ Caption = 'Description';
+ }
+ field(5623; Correction; Boolean)
+ {
+ Caption = 'Correction';
+ }
+ field(5624; "Header Document No."; Code[20])
+ {
+ Caption = 'Header Document No.';
+ }
+ field(5625; "Line No."; Integer)
+ {
+ Caption = 'Line No.';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Account Type", "Account No.", "Gen. Bus. Posting Group", "Gen. Prod. Posting Group", "VAT Bus. Posting Group", "VAT Prod. Posting Group", "Use Tax", "Job No.", "Fixed Asset Line No.", "Payment Line No.", "Posting Group", "Applies-to ID", "Due Date", Sign, "Currency Code", "Auxiliary Entry No.")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Document No.")
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStatusFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStatusFR.Table.al
new file mode 100644
index 0000000000..1f1c11548f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStatusFR.Table.al
@@ -0,0 +1,120 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+table 10839 "Payment Status FR"
+{
+ Caption = 'Payment Status';
+ LookupPageID = "Payment Status List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(2; Line; Integer)
+ {
+ Caption = 'Line';
+ }
+ field(3; Name; Text[50])
+ {
+ Caption = 'Name';
+ }
+ field(4; RIB; Boolean)
+ {
+ Caption = 'RIB';
+ }
+ field(5; Look; Boolean)
+ {
+ Caption = 'Look';
+ }
+ field(6; ReportMenu; Boolean)
+ {
+ Caption = 'ReportMenu';
+ }
+ field(7; "Acceptation Code"; Boolean)
+ {
+ Caption = 'Acceptation Code';
+ }
+ field(8; Amount; Boolean)
+ {
+ Caption = 'Amount';
+ }
+ field(9; Debit; Boolean)
+ {
+ Caption = 'Debit';
+ }
+ field(10; Credit; Boolean)
+ {
+ Caption = 'Credit';
+ }
+ field(11; "Bank Account"; Boolean)
+ {
+ Caption = 'Bank Account';
+ }
+ field(20; "Payment in Progress"; Boolean)
+ {
+ Caption = 'Payment in Progress';
+ }
+ field(21; "Archiving Authorized"; Boolean)
+ {
+ Caption = 'Archiving Authorized';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Payment Class", Line)
+ {
+ Clustered = true;
+ }
+ }
+
+ fieldgroups
+ {
+ }
+
+ trigger OnDelete()
+ var
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ if Line = 0 then
+ Error(Text000Lbl);
+ PaymentStep.SetRange("Payment Class", "Payment Class");
+ PaymentStep.SetRange("Previous Status", Line);
+ if PaymentStep.FindFirst() then
+ Error(Text001Lbl);
+ PaymentStep.SetRange("Previous Status");
+ PaymentStep.SetRange("Next Status", Line);
+ if not PaymentStep.IsEmpty() then
+ Error(Text001Lbl);
+ PaymentHeader.SetRange("Payment Class", "Payment Class");
+ PaymentHeader.SetRange("Status No.", Line);
+ if not PaymentHeader.IsEmpty() then
+ Error(Text001Lbl);
+ PaymentLine.SetRange("Payment Class", "Payment Class");
+ PaymentLine.SetRange("Status No.", Line);
+ if not PaymentLine.IsEmpty() then
+ Error(Text001Lbl);
+ end;
+
+ trigger OnInsert()
+ var
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ if not PaymentStatus.Get("Payment Class", 0) then
+ Line := 0;
+ end;
+
+ var
+ Text000Lbl: Label 'Deleting the first report is not allowed.';
+ Text001Lbl: Label 'Deleting is not allowed because this Payment Status is already used.';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepFR.Table.al
new file mode 100644
index 0000000000..7bd76c0cd4
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepFR.Table.al
@@ -0,0 +1,165 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.NoSeries;
+using System.Reflection;
+
+table 10840 "Payment Step FR"
+{
+ Caption = 'Payment Step';
+ LookupPageID = "Payment Steps List FR";
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(2; Line; Integer)
+ {
+ Caption = 'Line';
+ }
+ field(3; Name; Text[50])
+ {
+ Caption = 'Name';
+ }
+ field(4; "Previous Status"; Integer)
+ {
+ Caption = 'Previous Status';
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+ }
+ field(5; "Next Status"; Integer)
+ {
+ Caption = 'Next Status';
+ TableRelation = "Payment Status FR".Line where("Payment Class" = field("Payment Class"));
+ }
+ field(6; "Action Type"; Enum "Payment Step Action Type FR")
+ {
+ Caption = 'Action Type';
+ }
+ field(7; "Report No."; Integer)
+ {
+ Caption = 'Report No.';
+ TableRelation = if ("Action Type" = const(Report)) AllObj."Object ID" where("Object Type" = const(Report));
+ }
+ field(8; "Export No."; Integer)
+ {
+ Caption = 'Export No.';
+ TableRelation = if ("Action Type" = const(File),
+ "Export Type" = const(Report)) AllObj."Object ID" where("Object Type" = const(Report))
+ else
+ if ("Action Type" = const(File),
+ "Export Type" = const(XMLport)) AllObj."Object ID" where("Object Type" = const(XMLport));
+ }
+ field(9; "Previous Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Previous Status")));
+ Caption = 'Previous Status Name';
+ FieldClass = FlowField;
+ }
+ field(10; "Next Status Name"; Text[50])
+ {
+ CalcFormula = lookup("Payment Status FR".Name where("Payment Class" = field("Payment Class"),
+ Line = field("Next Status")));
+ Caption = 'Next Status Name';
+ FieldClass = FlowField;
+ }
+ field(11; "Verify Lines RIB"; Boolean)
+ {
+ Caption = 'Verify Lines RIB';
+ }
+ field(12; "Header Nos. Series"; Code[20])
+ {
+ Caption = 'Header Nos. Series';
+ TableRelation = "No. Series";
+
+ trigger OnValidate()
+ var
+ NoSeriesLine: Record "No. Series Line";
+ begin
+ if "Header Nos. Series" <> '' then begin
+ NoSeriesLine.SetRange("Series Code", "Header Nos. Series");
+ if NoSeriesLine.FindLast() then
+ if (StrLen(NoSeriesLine."Starting No.") > 10) or (StrLen(NoSeriesLine."Ending No.") > 10) then
+ Error(Text001Lbl);
+ end;
+ end;
+ }
+ field(13; "Reason Code"; Code[10])
+ {
+ Caption = 'Reason Code';
+ TableRelation = "Reason Code";
+ }
+ field(14; "Source Code"; Code[10])
+ {
+ Caption = 'Source Code';
+ Editable = true;
+ TableRelation = "Source Code";
+ }
+ field(15; "Acceptation Code<>No"; Boolean)
+ {
+ Caption = 'Acceptation Code<>No';
+ }
+ field(16; Correction; Boolean)
+ {
+ Caption = 'Correction';
+ }
+ field(17; "Verify Header RIB"; Boolean)
+ {
+ Caption = 'Verify Header RIB';
+ }
+ field(18; "Verify Due Date"; Boolean)
+ {
+ Caption = 'Verify Due Date';
+ }
+ field(19; "Realize VAT"; Boolean)
+ {
+ Caption = 'Realize VAT';
+ }
+ field(30; "Export Type"; Option)
+ {
+ Caption = 'Export Type';
+ InitValue = "XMLport";
+ OptionCaption = ',,,Report,,,XMLport';
+ OptionMembers = ,,,"Report",,,"XMLport";
+
+ trigger OnValidate()
+ begin
+ "Export No." := 0;
+ end;
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Payment Class", Line)
+ {
+ Clustered = true;
+ }
+ key(Key2; Name)
+ {
+ }
+ }
+
+ fieldgroups
+ {
+ }
+
+ trigger OnDelete()
+ begin
+ if Line = 0 then
+ Error(Text000Lbl);
+ end;
+
+ var
+ Text000Lbl: Label 'Deleting the default report is not allowed.';
+ Text001Lbl: Label 'You cannot assign a number series with numbers longer than 10 characters.';
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepLedgerFR.Table.al b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepLedgerFR.Table.al
new file mode 100644
index 0000000000..ecdd54ee96
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/Tables/PaymentStepLedgerFR.Table.al
@@ -0,0 +1,125 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+table 10841 "Payment Step Ledger FR"
+{
+ Caption = 'Payment Step Ledger';
+ DataClassification = CustomerContent;
+
+ fields
+ {
+ field(1; "Payment Class"; Text[30])
+ {
+ Caption = 'Payment Class';
+ TableRelation = "Payment Class FR";
+ }
+ field(2; Line; Integer)
+ {
+ Caption = 'Line';
+ }
+ field(3; Sign; Option)
+ {
+ Caption = 'Sign';
+ OptionCaption = 'Debit,Credit';
+ OptionMembers = Debit,Credit;
+ }
+ field(4; Description; Text[50])
+ {
+ Caption = 'Description';
+ }
+ field(8; "Accounting Type"; Option)
+ {
+ Caption = 'Accounting Type';
+ OptionCaption = 'Payment Line Account,Associated G/L Account,Setup Account,G/L Account / Month,G/L Account / Week,Bal. Account Previous Entry,Header Payment Account';
+ OptionMembers = "Payment Line Account","Associated G/L Account","Setup Account","G/L Account / Month","G/L Account / Week","Bal. Account Previous Entry","Header Payment Account";
+
+ trigger OnValidate()
+ begin
+ Validate(Root);
+ end;
+ }
+ field(9; "Account Type"; enum "Gen. Journal Account Type")
+ {
+ Caption = 'Account Type';
+ }
+ field(10; "Account No."; Code[20])
+ {
+ Caption = 'Account No.';
+ TableRelation = if ("Account Type" = const("G/L Account")) "G/L Account"
+ else
+ if ("Account Type" = const(Customer)) Customer
+ else
+ if ("Account Type" = const(Vendor)) Vendor
+ else
+ if ("Account Type" = const("Bank Account")) "Bank Account"
+ else
+ if ("Account Type" = const("Fixed Asset")) "Fixed Asset";
+ //This property is currently not supported
+ //TestTableRelation = true;
+ ValidateTableRelation = true;
+ }
+ field(11; "Customer Posting Group"; Code[20])
+ {
+ Caption = 'Customer Posting Group';
+ TableRelation = "Customer Posting Group";
+ }
+ field(12; "Vendor Posting Group"; Code[20])
+ {
+ Caption = 'Vendor Posting Group';
+ TableRelation = "Vendor Posting Group";
+ }
+ field(13; Root; Code[20])
+ {
+ Caption = 'Root';
+ }
+ field(14; "Detail Level"; Option)
+ {
+ Caption = 'Detail Level';
+ OptionCaption = 'Line,Account,Due Date';
+ OptionMembers = Line,Account,"Due Date";
+ }
+ field(16; Application; Option)
+ {
+ Caption = 'Application';
+ OptionCaption = 'None,Applied Entry,Entry Previous Step,Memorized Entry';
+ OptionMembers = "None","Applied Entry","Entry Previous Step","Memorized Entry";
+ }
+ field(17; "Memorize Entry"; Boolean)
+ {
+ Caption = 'Memorize Entry';
+ }
+ field(18; "Document Type"; Enum "Gen. Journal Document Type")
+ {
+ Caption = 'Document Type';
+ }
+ field(19; "Document No."; Option)
+ {
+ Caption = 'Document No.';
+ OptionCaption = 'Header No.,Document ID Line';
+ OptionMembers = "Header No.","Document ID Line";
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Payment Class", Line, Sign)
+ {
+ Clustered = true;
+ }
+ }
+
+ fieldgroups
+ {
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/app/src/XmlPorts/ImportExportParametersFR.XmlPort.al b/Apps/FR/PaymentManagementFR/app/src/XmlPorts/ImportExportParametersFR.XmlPort.al
new file mode 100644
index 0000000000..ec62592e97
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/app/src/XmlPorts/ImportExportParametersFR.XmlPort.al
@@ -0,0 +1,211 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+xmlport 10831 "Import/Export Parameters FR"
+{
+ Caption = 'Import/Export Parameters';
+ DefaultFieldsValidation = false;
+ Format = VariableText;
+
+ schema
+ {
+ textelement(Root)
+ {
+ tableelement("Payment Class"; "Payment Class FR")
+ {
+ XmlName = 'PaymentClass';
+ SourceTableView = sorting(Code);
+ fieldelement(Code; "Payment Class".Code)
+ {
+ }
+ fieldelement(Name; "Payment Class".Name)
+ {
+ }
+ fieldelement(HeaderNoSeries; "Payment Class"."Header No. Series")
+ {
+ }
+ fieldelement(Enable; "Payment Class".Enable)
+ {
+ }
+ fieldelement(LineNoSeries; "Payment Class"."Line No. Series")
+ {
+ }
+ fieldelement(Suggestions; "Payment Class".Suggestions)
+ {
+ }
+ fieldelement(UnrealizedVATReversal; "Payment Class"."Unrealized VAT Reversal")
+ {
+ }
+ fieldelement(SEPATransferType; "Payment Class"."SEPA Transfer Type")
+ {
+ }
+ }
+ tableelement("Payment Status"; "Payment Status FR")
+ {
+ XmlName = 'PaymentStatus';
+ SourceTableView = sorting("Payment Class", Line);
+ fieldelement(PaymentClass; "Payment Status"."Payment Class")
+ {
+ }
+ fieldelement(Line; "Payment Status".Line)
+ {
+ }
+ fieldelement(Name; "Payment Status".Name)
+ {
+ }
+ fieldelement(RIB; "Payment Status".RIB)
+ {
+ }
+ fieldelement(Look; "Payment Status".Look)
+ {
+ }
+ fieldelement(ReportMenu; "Payment Status".ReportMenu)
+ {
+ }
+ fieldelement(AcceptationCode; "Payment Status"."Acceptation Code")
+ {
+ }
+ fieldelement(Amount; "Payment Status".Amount)
+ {
+ }
+ fieldelement(Debit; "Payment Status".Debit)
+ {
+ }
+ fieldelement(Credit; "Payment Status".Credit)
+ {
+ }
+ fieldelement(BankAccount; "Payment Status"."Bank Account")
+ {
+ }
+ fieldelement(PaymentInProgress; "Payment Status"."Payment in Progress")
+ {
+ }
+ }
+ tableelement("Payment Step"; "Payment Step FR")
+ {
+ XmlName = 'PaymentStep';
+ SourceTableView = sorting("Payment Class", Line);
+ fieldelement(PaymentClass; "Payment Step"."Payment Class")
+ {
+ }
+ fieldelement(Line; "Payment Step".Line)
+ {
+ }
+ fieldelement(Name; "Payment Step".Name)
+ {
+ }
+ fieldelement(PreviousStatus; "Payment Step"."Previous Status")
+ {
+ }
+ fieldelement(NextStatus; "Payment Step"."Next Status")
+ {
+ }
+ fieldelement(ActionType; "Payment Step"."Action Type")
+ {
+ }
+ fieldelement(ReportNo; "Payment Step"."Report No.")
+ {
+ }
+ fieldelement(ExportType; "Payment Step"."Export Type")
+ {
+ }
+ fieldelement(ExportNo; "Payment Step"."Export No.")
+ {
+ }
+ fieldelement(VerifyLinesRIB; "Payment Step"."Verify Lines RIB")
+ {
+ }
+ fieldelement(HeaderNoSeries; "Payment Step"."Header Nos. Series")
+ {
+ }
+ fieldelement(ReasonCode; "Payment Step"."Reason Code")
+ {
+ }
+ fieldelement(SourceCode; "Payment Step"."Source Code")
+ {
+ }
+ fieldelement(AcceptationCode; "Payment Step"."Acceptation Code<>No")
+ {
+ }
+ fieldelement(Correction; "Payment Step".Correction)
+ {
+ }
+ fieldelement(VerifyHeaderRIB; "Payment Step"."Verify Header RIB")
+ {
+ }
+ fieldelement(VerifyDueDate; "Payment Step"."Verify Due Date")
+ {
+ }
+ fieldelement(RealizeVAT; "Payment Step"."Realize VAT")
+ {
+ }
+ }
+ tableelement("Payment Step Ledger"; "Payment Step Ledger FR")
+ {
+ XmlName = 'PaymentStepLedger';
+ SourceTableView = sorting("Payment Class", Line, Sign);
+ fieldelement(PaymentClass; "Payment Step Ledger"."Payment Class")
+ {
+ }
+ fieldelement(Line; "Payment Step Ledger".Line)
+ {
+ }
+ fieldelement(Sign; "Payment Step Ledger".Sign)
+ {
+ }
+ fieldelement(Description; "Payment Step Ledger".Description)
+ {
+ }
+ fieldelement(AccountingType; "Payment Step Ledger"."Accounting Type")
+ {
+ }
+ fieldelement(AccountType; "Payment Step Ledger"."Account Type")
+ {
+ }
+ fieldelement(AccountNo; "Payment Step Ledger"."Account No.")
+ {
+ }
+ fieldelement(CustomerPostingGroup; "Payment Step Ledger"."Customer Posting Group")
+ {
+ }
+ fieldelement(VendorPostingGroup; "Payment Step Ledger"."Vendor Posting Group")
+ {
+ }
+ fieldelement(Root; "Payment Step Ledger".Root)
+ {
+ }
+ fieldelement(DetailLevel; "Payment Step Ledger"."Detail Level")
+ {
+ }
+ fieldelement(Application; "Payment Step Ledger".Application)
+ {
+ }
+ fieldelement(MemorizeEntry; "Payment Step Ledger"."Memorize Entry")
+ {
+ }
+ fieldelement(DocumentType; "Payment Step Ledger"."Document Type")
+ {
+ }
+ fieldelement(DocumentNo; "Payment Step Ledger"."Document No.")
+ {
+ }
+ }
+ }
+ }
+
+ requestpage
+ {
+
+ layout
+ {
+ }
+
+ actions
+ {
+ }
+ }
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/app.json b/Apps/FR/PaymentManagementFR/test/app.json
new file mode 100644
index 0000000000..f7f41e47ec
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/app.json
@@ -0,0 +1,53 @@
+{
+ "id": "ed0f7522-50bb-4838-a1ed-a9f4d1b3d9d7",
+ "name": "Payment Management FR-Tests",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0",
+ "brief": "Tests for Payment Management FR extension.",
+ "description": "Tests for Payment Management FR extension.",
+ "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
+ "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
+ "help": "https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/france/how-to-export-general-ledger-entries-for-tax-audits",
+ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541",
+ "url": "https://go.microsoft.com/fwlink/?LinkId=724011",
+ "logo": "ExtensionLogo.png",
+ "dependencies": [
+ {
+ "id": "24f54185-e697-4e03-bae0-f134f2d69673",
+ "publisher": "Microsoft",
+ "name": "Payment Management FR",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5d86850b-0d76-4eca-bd7b-951ad998e997",
+ "name": "Tests-TestLibraries",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5095f467-0a01-4b99-99d1-9ff1237d286f",
+ "publisher": "Microsoft",
+ "name": "Library Variable Storage",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "application": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 144000,
+ "to": 144043
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "target": "OnPrem",
+ "features": [
+ "NoImplicitWith",
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/FR/PaymentManagementFR/test/extensionlogo.png b/Apps/FR/PaymentManagementFR/test/extensionlogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/FR/PaymentManagementFR/test/extensionlogo.png differ
diff --git a/Apps/FR/PaymentManagementFR/test/src/Dimension/ERMDimensionSubscriberFR.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/Dimension/ERMDimensionSubscriberFR.Codeunit.al
new file mode 100644
index 0000000000..45ce13305f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/Dimension/ERMDimensionSubscriberFR.Codeunit.al
@@ -0,0 +1,32 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using System.Reflection;
+
+codeunit 144000 "ERM Dimension Subscriber - FR"
+{
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryDim: Codeunit "Library - Dimension";
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Library - Dimension", 'OnVerifyShorcutDimCodesUpdatedOnDimSetIDValidationLocal', '', false, false)]
+ local procedure VerifyShorcutDimCodesUpdatedOnDimSetIDValidation(var TempAllObj: Record AllObj temporary; DimSetID: Integer; GlobalDim1ValueCode: Code[20]; GlobalDim2ValueCode: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Verifies local tables with "Dimension Set ID" field related to "Dimension Set Entry" and OnValidate trigger which updates shortcut dimensions
+
+ LibraryDim.VerifyShorcutDimCodesUpdatedOnDimSetIDValidation(
+ TempAllObj, PaymentHeader, PaymentHeader.FieldNo("Dimension Set ID"),
+ PaymentHeader.FieldNo("Shortcut Dimension 1 Code"), PaymentHeader.FieldNo("Shortcut Dimension 2 Code"),
+ DimSetID, GlobalDim1ValueCode, GlobalDim2ValueCode);
+ end;
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al
new file mode 100644
index 0000000000..7f534d8c21
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/NewObjectTests-Internal/CloudMigCountryTables.Codeunit.al
@@ -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.Bank.Payment;
+
+using Microsoft.Finance.FinancialReports;
+using Microsoft.Finance.ReceivablesPayables;
+using Microsoft.Sales.Document;
+
+codeunit 144005 "Cloud Mig Country Tables"
+{
+ procedure GetTablesThatShouldBeCloudMigrated(var ListOfTablesToMigrate: List of [Integer])
+ begin
+ ListOfTablesToMigrate.Add(Database::"Bank Account Buffer FR");
+ ListOfTablesToMigrate.Add(Database::"FR Acc. Schedule Line");
+ ListOfTablesToMigrate.Add(Database::"FR Acc. Schedule Name");
+ ListOfTablesToMigrate.Add(Database::"Payment Address FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Class FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Header Archive FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Header FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Line Archive FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Line FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Post. Buffer FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Status FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Step Ledger FR");
+ ListOfTablesToMigrate.Add(Database::"Payment Step FR");
+ ListOfTablesToMigrate.Add(Database::"Shipment Invoiced");
+ ListOfTablesToMigrate.Add(Database::"Unreal. CV Ledg. Entry Buffer");
+ end;
+}
\ No newline at end of file
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMBankAccountFR.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMBankAccountFR.Codeunit.al
new file mode 100644
index 0000000000..eb627d68b1
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMBankAccountFR.Codeunit.al
@@ -0,0 +1,251 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.TestLibraries.Utilities;
+#pragma warning disable AA0240
+
+codeunit 144007 "ERM Bank Account FR"
+{
+ // 1. Purpose of the test is to Post Payment Slip and verify created GL Entry for Customer Bank Account Code.
+ // 2. Purpose of the test is to Post Payment Slip and verify created GL Entry for Vendor Bank Account Code.
+ //
+ // Covers Test Cases for WI - 344163
+ // ---------------------------------------------
+ // Test Function Name TFS ID
+ // ---------------------------------------------
+ // PaymentSlipPostForCustomer 161444
+ // PaymentSlipPostForVendor 161443
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ BankBranchNoTxt: Label '12000';
+ AgencyCodeTxt: Label '03100';
+ BankAccountNoTxt: Label '00012123003';
+ DocumentNoErr: Label 'Document No. must %1 in %2.', Comment = '%1= Field Value, %2= Table Name.';
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler,PaymentClassListPageHandler')]
+ procedure PaymentSlipPostForCustomer()
+ var
+ GLEntry: Record "G/L Entry";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to Post Payment Slip and verify created GL Entry for Customer Bank Account Code.
+
+ // Setup And Exercise.
+ Initialize();
+
+ PaymentSlipPost(PaymentHeader, PaymentLine."Account Type"::Customer, CreateCustomer(), PaymentClass.Suggestions::Customer);
+
+ // Verify.
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+ GLEntry.SetRange("Document No.", PaymentLine."Document No.");
+ GLEntry.FindFirst();
+ GLEntry.TestField(Amount, PaymentLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler,PaymentClassListPageHandler')]
+ procedure PaymentSlipPostForVendor()
+ var
+ GLEntry: Record "G/L Entry";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to Post Payment Slip and verify created GL Entry for Vendor Bank Account Code.
+
+ // Setup And Exercise.
+ Initialize();
+ PaymentSlipPost(PaymentHeader, PaymentLine."Account Type"::Vendor, CreateVendor(), PaymentClass.Suggestions::Vendor);
+
+ // Verify.
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+ GLEntry.SetRange("Document No.", PaymentLine."Document No.");
+ GLEntry.FindFirst();
+ GLEntry.TestField(Amount, -PaymentLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler')]
+ procedure LastNoUsedUpdatesOnPaymentSlipLinesEnteredManually()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentClass: Record "Payment Class FR";
+ NoSeriesMgt: Codeunit "No. Series";
+ NoSeriesCode: Code[20];
+ begin
+ // [SCENARIO 575798] The Last No. Used in No. Series Line does update when the Payment Slip Lines are entered manually.
+
+ // [GIVEN] Create a Payment Header.
+ CreatePaymentHeader(PaymentHeader, PaymentClass.Suggestions::Vendor);
+
+ // [GIVEN] Create a Payment Line and Validate Account Type, Account No. and Amount.
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Validate("Account No.", CreateVendor());
+ PaymentLine.Validate(Amount, LibraryRandom.RandDec(10, 2));
+ PaymentLine.Modify(true);
+
+ // [GIVEN] Find Payment Class.
+ PaymentClass.Get(PaymentHeader."Payment Class");
+
+ // [GIVEN] Find and store Last No. Used.
+ NoSeriesCode := NoSeriesMgt.GetLastNoUsed(PaymentClass."Line No. Series");
+
+ // [THEN] Document No. in Payment Line must be same as Last No. Used.
+ Assert.AreEqual(
+ NoSeriesCode,
+ PaymentLine."Document No.",
+ StrSubstNo(
+ DocumentNoErr,
+ NoSeriesCode,
+ PaymentLine.TableName()));
+ end;
+
+ local procedure PaymentSlipPost(var PaymentHeader: Record "Payment Header FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Suggestions: Option)
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Setup.
+ CreatePaymentHeader(PaymentHeader, Suggestions);
+ CreatePaymentLine(PaymentHeader, AccountType, AccountNo);
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("No.", PaymentHeader."No.");
+
+ // Exercise.
+ PaymentSlip.Post.Invoke();
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateCustomer(): Code[20]
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ Customer: Record Customer;
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ LibraryFRLocalization.CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ Customer.Validate("Preferred Bank Account Code", CustomerBankAccount.Code);
+ Customer.Modify(true);
+ UpdateCustomerBankAccount(CustomerBankAccount);
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateVendor(): Code[20]
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryPurchase.CreateVendorBankAccount(VendorBankAccount, Vendor."No.");
+ Vendor.Validate("Preferred Bank Account Code", VendorBankAccount.Code);
+ Vendor.Modify(true);
+ UpdateVendorBankAccount(VendorBankAccount);
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR"; Suggestions: Option)
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ PaymentClass.SetRange(Suggestions, Suggestions);
+ PaymentClass.FindFirst();
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Payment Class", PaymentClass.Code);
+ PaymentHeader.Validate("No. Series", PaymentClass."Header No. Series");
+ PaymentHeader.Validate("Posting Date", WorkDate());
+ PaymentHeader.Validate("Document Date", WorkDate());
+ PaymentHeader.Validate("RIB Checked", true);
+ PaymentHeader.Modify(true);
+ end;
+
+ local procedure CreatePaymentLine(PaymentHeader: Record "Payment Header FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Validate(Amount, LibraryRandom.RandDec(10, 2)); // Using Random for Amount;
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure UpdateVendorBankAccount(var VendorBankAccount: Record "Vendor Bank Account")
+ begin
+ // Using hardcode for Bank Branch No.,Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ VendorBankAccount.Validate("Bank Branch No.", BankBranchNoTxt);
+ VendorBankAccount.Validate("Agency Code FR", AgencyCodeTxt);
+ VendorBankAccount.Validate("Bank Account No.", BankAccountNoTxt);
+ VendorBankAccount.Validate("RIB Key FR", 7);
+ VendorBankAccount.Modify();
+ end;
+
+ local procedure UpdateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account")
+ begin
+ // Using hardcode for Bank Branch No.,Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ CustomerBankAccount.Validate("Bank Branch No.", BankBranchNoTxt);
+ CustomerBankAccount.Validate("Agency Code FR", AgencyCodeTxt);
+ CustomerBankAccount.Validate("Bank Account No.", BankAccountNoTxt);
+ CustomerBankAccount.Validate("RIB Key FR", 7);
+ CustomerBankAccount.Modify();
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Message: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ "Code": Variant;
+ begin
+ LibraryVariableStorage.Dequeue(Code);
+ PaymentClassList.FILTER.SetFilter(Code, Code);
+ PaymentClassList.OK().Invoke();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMFRFeatureBugs.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMFRFeatureBugs.Codeunit.al
new file mode 100644
index 0000000000..ab84c1eb42
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMFRFeatureBugs.Codeunit.al
@@ -0,0 +1,236 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.TestLibraries.Utilities;
+
+codeunit 144008 "ERM FR Feature Bugs"
+{
+ // 1. Test to verify Dimension on Payment Slip flow form Vendor.
+ // 2. Test to verify Dimension on Payment Slip flow form Customer.
+ //
+ // Covers Test Cases for WI - 344026
+ // ----------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------
+ // BookValueAfterPostDepreciationAndDerogatoryFAJnl 343466
+ // DerogatoryAmountAfterPostDepreciationAndDerogatoryFAJnl 342860
+ // DerogatoryEntriesAfterPostDepreciationAndDerogatoryFAJnl 342818
+ // PostingDatesAfterPostDepreciationAndDerogatoryFAJnl 342877
+ // PostedSalesInvoiceWithDecimalLotTrackingAndProdBOM 341056
+ // SalesInvoiceWithShipmentOnSalesInvoiceReport 152143
+ // SalesInvoiceWithoutShipmentOnSalesInvoiceReport 152602
+ // ShipmentInvoicedForPostedSalesInvoiceGetShipmentLine 152142
+ // ShipmentInvoicedForMultiLinePostedSalesInvoice 152141
+ // ShipmentInvoicedForSingleLinePostedSalesInvoice 152140
+ //
+ // Covers Test Cases for WI - 344431.
+ // ----------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------
+ // VATProdPostingGroupVATRateChangePurchaseLine 300903
+ // DefaultDimensionCodeForVendorOnPaymentSlip 291748
+ // DefaultDimensionCodeForCustomerOnPaymentSlip 291748
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryDimension: Codeunit "Library - Dimension";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler')]
+ procedure DefaultDimensionCodeForVendorOnPaymentSlip()
+ var
+ DefaultDimension: Record "Default Dimension";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Test to verify Dimension on Payment Slip flow form Vendor.
+
+ // Setup: Create Vendor with dimension,Default dimension code on Payment Slip for Vendor.
+ Initialize();
+ CreateAndUpdateVendorWithDimension(DefaultDimension);
+ DefaultDimensionCodeOnPaymentSlip(
+ PaymentStepLedger.Sign::Credit, PaymentLine."Account Type"::Vendor, DefaultDimension."No.", DefaultDimension."Dimension Code");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler')]
+ procedure DefaultDimensionCodeForCustomerOnPaymentSlip()
+ var
+ DefaultDimension: Record "Default Dimension";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Test to verify Dimension on Payment Slip flow form Cusotmer.
+
+ // Setup: Create Customer with dimension,Default dimension code on Payment Slip for Customer.
+ Initialize();
+
+ CreateAndUpdateCustomerWithDimension(DefaultDimension);
+ DefaultDimensionCodeOnPaymentSlip(
+ PaymentStepLedger.Sign::Debit, PaymentLine."Account Type"::Customer, DefaultDimension."No.", DefaultDimension."Dimension Code");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler')]
+ procedure CreateAndPostPaymentSlipForIncompleteDimension()
+ var
+ DefaultDimension: Record "Default Dimension";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 308571] Creating 'Payment Line' for Vendor with empty 'Dimension Value Code' in 'Default Dimension' doesn't throw error
+ Initialize();
+
+
+ // [GIVEN] Created Vendor with 'Default Dimension' with empty 'Dimension Value Code'
+ CreateAndUpdateVendorWithIncompleteDimension(DefaultDimension);
+
+ // [WHEN] Create 'Payment Line' for that Vendor
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Validate("Account No.", DefaultDimension."No.");
+ PaymentLine.Modify(true);
+
+ // [THEN] No error thrown, and invalid Dimension Set Entry is not created
+ PaymentLine.TestField("Dimension Set ID", 0);
+ end;
+
+ local procedure DefaultDimensionCodeOnPaymentSlip(Sign: Option; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DimensionCode: Code[20])
+ var
+ DimensionSetEntry: Record "Dimension Set Entry";
+ DimensionSetID: Integer;
+ begin
+
+ CreatePaymentStatus(CreatePaymentClass(), Sign);
+
+ // Exercise: Create Payment Slip.
+ DimensionSetID := CreatePaymentSlip(AccountType, AccountNo);
+
+ // Verify: Verify Dimension Code on Dimension Set Entry.
+ DimensionSetEntry.SetRange("Dimension Set ID", DimensionSetID);
+ DimensionSetEntry.FindFirst();
+ DimensionSetEntry.TestField("Dimension Code", DimensionCode);
+ end;
+
+ local procedure Initialize()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ GenJournalLine.DeleteAll();
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateAndUpdateCustomerWithDimension(var DefaultDimension: Record "Default Dimension")
+ var
+ Customer: Record Customer;
+ Dimension: Record Dimension;
+ DimensionValue: Record "Dimension Value";
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ LibraryDimension.FindDimension(Dimension);
+ LibraryDimension.FindDimensionValue(DimensionValue, Dimension.Code);
+ LibraryDimension.CreateDefaultDimensionCustomer(DefaultDimension, Customer."No.", Dimension.Code, DimensionValue.Code);
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Vendor);
+ PaymentClass.Modify(true);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentStatus(PaymentClass: Text[30]; Sign: Option)
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass);
+ PaymentStatus.Validate(RIB, true);
+ PaymentStatus.Validate(Look, true);
+ PaymentStatus.Validate(ReportMenu, true);
+ PaymentStatus.Validate("Acceptation Code", true);
+ PaymentStatus.Validate(Debit, true);
+ PaymentStatus.Validate(Credit, true);
+ PaymentStatus.Validate("Bank Account", true);
+ PaymentStatus.Modify(true);
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass);
+ LibraryFRLocalization.CreatePaymentStepLedger(PaymentStepLedger, PaymentClass, Sign, PaymentStep.Line);
+ end;
+
+ local procedure CreatePaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]): Integer
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify(true);
+ exit(PaymentLine."Dimension Set ID");
+ end;
+
+ local procedure CreateAndUpdateVendorWithDimension(var DefaultDimension: Record "Default Dimension")
+ var
+ Dimension: Record Dimension;
+ DimensionValue: Record "Dimension Value";
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryDimension.FindDimension(Dimension);
+ LibraryDimension.FindDimensionValue(DimensionValue, Dimension.Code);
+ LibraryDimension.CreateDefaultDimensionVendor(DefaultDimension, Vendor."No.", Dimension.Code, DimensionValue.Code);
+ end;
+
+ local procedure CreateAndUpdateVendorWithIncompleteDimension(var DefaultDimension: Record "Default Dimension")
+ var
+ Dimension: Record Dimension;
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryDimension.CreateDimension(Dimension);
+ LibraryDimension.CreateDefaultDimensionVendor(DefaultDimension, Vendor."No.", Dimension.Code, '');
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ begin
+ PaymentClassList.OK().Invoke();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagement.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagement.Codeunit.al
new file mode 100644
index 0000000000..65a845b72f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagement.Codeunit.al
@@ -0,0 +1,3393 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.Ledger;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Ledger;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Finance.VAT.Ledger;
+using Microsoft.Finance.VAT.Setup;
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Foundation.PaymentTerms;
+using Microsoft.Inventory.Item;
+using Microsoft.Purchases.Document;
+using Microsoft.Purchases.History;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Document;
+using Microsoft.Sales.History;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+#pragma warning disable AA0210
+
+codeunit 144013 "ERM Payment Management"
+{
+ // // [FEATURE] [Payment Slip]
+ // 1. Verify report GL/Cust. Ledger Reconciliation after creating and posting Gen. Journal Line.
+ // 2. Verify report GL/Vend. Ledger Reconciliation after creating and posting Gen. Journal Line.
+ // 3-6. Verify Error on Posting Payment Slip of Customer and Vendor for Unrealized VAT Type First and Last.
+ // 7. Verify Applied Amount with calculate payment discount on Credit Memo without Currency for Vendor.
+ // 8. Verify Applied Amount with calculate payment discount on Credit Memo with Currency for Vendor.
+ // 9. Verify Applied Amount without calculate payment discount on Credit Memo with Currency for Vendor.
+ // 10. Verify Applied Amount without calculate payment discount on Credit Memo without Currency for Vendor.
+ // 11. Verify Applied Amount with calculate payment discount on Credit Memo without Currency for Customer.
+ // 12. Verify Applied Amount with calculate payment discount on Credit Memo with Currency for Customer.
+ // 13. Verify Applied Amount without calculate payment discount on Credit Memo with Currency for Customer.
+ // 14. Verify Applied Amount without calculate payment discount on Credit Memo without Currency for Customer.
+ // 15. Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Account in Payment Step Ledger for Customer.
+ // 16. Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Line in Payment Step Ledger for Customer.
+ // 17. Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Account in Payment Step Ledger for Vendor.
+ // 18. Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Line in Payment Step Ledger for Vendor.
+ // 19. Verify Error on deleting payment class when Payment Slip is created.
+ // 20-21. Verify Payment In Progress Amount on Customer Card when Payment In Progress field is set to True or False on Payment Status.
+ // 22-23. Verify Applied and UnApplied Amount on Invoice for Customer.
+ // 24. Verify that the deletion of an applied customer payment line unapplies the customer ledger entry the payment line was applied to; i.e the Applied-to ID field should be cleared.
+ // 25-26. Verify that whether a proper Due Date is suggested for manually generated payments for Customer and Vendor.
+ // 27-28. Verify that Post Payment Slip of Customer and Vendor for a second time gives an error.
+ //
+ // Covers Test Cases for WI - 344345
+ // ---------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ---------------------------------------------------------------------------------------------------
+ // GLCustLedgerReconciliationReport 169508
+ // GLVendLedgerReconciliationReport 169509
+ //
+ // Covers Test Cases: 344836
+ // ---------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ---------------------------------------------------------------------------------------------------
+ // PostPaymentSlipCustomerUnrealizedVATTypeFirstError 169497
+ // PostPaymentSlipCustomerUnrealizedVATTypeLastError 169498
+ // PostPaymentSlipVendorUnrealizedVATTypeFirstError 169499
+ // PostPaymentSlipVendorUnrealizedVATTypeLastError 169500
+ //
+ // Covers Test Cases: 345005
+ // ---------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ---------------------------------------------------------------------------------------------------
+ // AppliedAmtForVendOnPaymentSlipWithoutCurrency,
+ // AppliedAmtForVendOnPaymentSlipWithDiscOnCrMemo 156461,156462
+ // AppliedAmtForVendOnPaymentSlipWithCurrency,
+ // AppliedAmtForVendOnPaymentSlipWithoutDiscOnCrMemo 156464
+ // AppliedAmtForCustOnPaymentSlipWithoutCurrency,
+ // AppliedAmtForCustOnPaymentSlipWithDiscOnCrMemo 156465,156466
+ // AppliedAmtForCustOnPaymentSlipWithCurrency,
+ // AppliedAmtForCustOnPaymentSlipWithoutDiscOnCrMemo 156467
+ // PostCustomerPaymentWithDetailLevelAccount 169428,169431
+ // PostCustomerPaymentWithDetailLevelLine 169429,169430
+ // PostVendorPaymentWithDetailLevelAccount 169501,169503
+ // PostVendorPaymentWithDetailLevelLine 169502,169504
+ //
+ // Covers Test Cases for WI - 345067
+ // ------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ------------------------------------------------------------------------------------------------------------
+ // DeletePaymentClassWithCreatedPaymentSlipError, PaymentInProgressTrueOnCustomerCard 169531,169538
+ // PaymentInProgressFalseOnCustomerCard, ApplyAmountOnPaymentSlipForCustomer 169518,169515
+ // UnapplyAmountOnPaymentSlipForCustomer, DeleteAppliedCustomerPaymentLine 169516,169533,169534
+ // DueDateOnPaymentSlipForCustomer 169535,169536
+ //
+ // Covers Test Cases: TFS 100399
+ // ---------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ---------------------------------------------------------------------------------------------------
+ // NotPostPaymentSlipCustomerWithError 100399
+ // NotPostPaymentSlipVendorWithError 100399
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryDimension: Codeunit "Library - Dimension";
+ LibraryRandom: Codeunit "Library - Random";
+ FilterRangeTxt: Label '%1..%2', Comment = '%1 = No., %2 = No.';
+ PaymentClassNameTxt: Label 'Suggest Payments';
+ PaymentClassDeleteErr: Label 'You cannot delete this Payment Class because it is already in use.';
+ UnexpectedErr: Label 'Expected value does not match with Actual value.';
+ LineIsNotDeletedErr: Label 'Line is not deleted in Payment Slip %1', Comment = '%1 = No.';
+ PaymentLineIsNotCopiedErr: Label 'Payment Line is not copied from Payment Slip %1', Comment = '%1 = No.';
+ ValueIsIncorrectErr: Label 'Value %1 is incorrect for field %2.', Comment = '%1 = field, %2 = field';
+ StepLedgerGetErr: Label 'The Payment Step Ledger does not exist.';
+ EnqueueOpt: Option " ",Application,Verification;
+ Account_Type: Option "G/L Account",Customer,Vendor,"Bank Account","Fixed Asset";
+ CheckDimValuePostingLineErr: Label 'A dimension used in %1 %2 %3 has caused an error. Select a Dimension Value Code for the Dimension Code %4 for Vendor %5.', Comment = '%1 = Header No., %2 = TableCaption, %3 = LineNo, %4 = Code, %5 = No.';
+ CheckDimValuePostingHeaderErr: Label 'A dimension used in %1 has caused an error. Dimension %2 is blocked.', Comment = '%1 = No., %2 = Code';
+ PaymentSlipErr: Label 'Payment Slip must be posted without error of Document No.';
+ AppliesToIDMustBeBlankErr: Label 'Applies-to ID must be blank in Vendor Ledger Entry.';
+ DocumentNoErr: Label 'Document No. must be equal to %1', Comment = '%1 = Document No.';
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure AppliedAmtForVendOnPaymentSlipWithoutCurrency()
+ begin
+ // Verify Applied Amount with calculate payment discount on Credit Memo without Currency for Vendor.
+ PaymentDiscountOnPurchaseCrMemo('', true); // Using Blank for Currency Code, True for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure AppliedAmtForVendOnPaymentSlipWithDiscOnCrMemo()
+ begin
+ // Verify Applied Amount with calculate payment discount on Credit Memo with Currency for Vendor.
+ PaymentDiscountOnPurchaseCrMemo(LibraryERM.CreateCurrencyWithRandomExchRates(), true); // Using True for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure AppliedAmtForVendOnPaymentSlipWithCurrency()
+ begin
+ // Verify Applied Amount without calculate payment discount on Credit Memo with Currency for Vendor.
+ PaymentDiscountOnPurchaseCrMemo(LibraryERM.CreateCurrencyWithRandomExchRates(), false); // Using False for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure AppliedAmtForVendOnPaymentSlipWithoutDiscOnCrMemo()
+ begin
+ // Verify Applied Amount without calculate payment discount on Credit Memo without Currency for Vendor.
+ PaymentDiscountOnPurchaseCrMemo('', false); // Using Blank for Currency Code, False for Calc. Pmt. Discount,
+ end;
+
+ local procedure PaymentDiscountOnPurchaseCrMemo(CurrencyCode: Code[10]; CalcPmtDiscOnCrMemos: Boolean)
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ Vendor: Record Vendor;
+ PaymentSlip: TestPage "Payment Slip FR";
+ Amount: Decimal;
+ DiscountAmount: Decimal;
+ PaymentClassCode: Text[30];
+ begin
+ // Setup: Create Vnedor, update Payment Terms, create and post Purchase Invoice and Credit Memo through Gen Journal Line.
+ Initialize();
+
+ Amount := LibraryRandom.RandDecInRange(10, 1000, 2); // Using Random Dec In Range for Amount.
+ Vendor.Get(CreateVendor(CurrencyCode));
+ DiscountAmount := CalcPaymentTermDiscount(Vendor."Payment Terms Code", CalcPmtDiscOnCrMemos, Amount);
+ PaymentClassCode :=
+ PostGenJournalAndCreatePaymentSlip(
+ GenJournalLine."Account Type"::Vendor, Vendor."No.", PaymentClass.Suggestions::Vendor, -Amount); // Required partial amount for Cr. Memo.
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+ SuggestVendorPaymentLines(Vendor."No.", CurrencyCode, PaymentHeader);
+ LibraryVariableStorage.Enqueue(GenJournalLine."Document Type"::"Credit Memo"); // Enqueue for ApplyVendorEntriesModalPageHandler.
+ EnqueueValuesForHandler(EnqueueOpt::Verification, (-Amount + DiscountAmount)); // Enqueue for ApplyVendorEntriesModalPageHandler.
+
+ // Exercise: Application call from Payment Slip.
+ OpenPaymentSlip(PaymentSlip, PaymentHeader."No.");
+ PaymentSlipApplication(PaymentSlip); // Calculate Amount after payment discount.
+
+ // Verify: Verify Applied Amount on Applied Vendor Ledger Entry, Verification done by ApplyVendorEntriesModalPageHandler.
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure AppliedAmtForCustOnPaymentSlipWithoutCurrency()
+ begin
+ // Verify Applied Amount with calculate payment discount on Credit Memo without Currency for Customer.
+ PaymentDiscountOnSalesCrMemo('', true); // Using Blank for Currency Code, True for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure AppliedAmtForCustOnPaymentSlipWithDiscOnCrMemo()
+ begin
+ // Verify Applied Amount with calculate payment discount on Credit Memo with Currency for Customer.
+ PaymentDiscountOnSalesCrMemo(LibraryERM.CreateCurrencyWithRandomExchRates(), true); // Using True for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure AppliedAmtForCustOnPaymentSlipWithCurrency()
+ begin
+ // Verify Applied Amount without calculate payment discount on Credit Memo with Currency for Customer.
+ PaymentDiscountOnSalesCrMemo(LibraryERM.CreateCurrencyWithRandomExchRates(), false); // Using False for Calc. Pmt. Discount,
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure AppliedAmtForCustOnPaymentSlipWithoutDiscOnCrMemo()
+ begin
+ // Verify Applied Amount without calculate payment discount on Credit Memo without Currency for Customer.
+ PaymentDiscountOnSalesCrMemo('', false); // Using Blank for Currency Code, False for Calc. Pmt. Discount,
+ end;
+
+ local procedure PaymentDiscountOnSalesCrMemo(CurrencyCode: Code[10]; CalcPmtDiscOnCrMemos: Boolean)
+ var
+ Customer: Record Customer;
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ Amount: Decimal;
+ DiscountAmount: Decimal;
+ PaymentClassCode: Text[30];
+ begin
+ // Setup: Create Customer, update Payment Terms, create and post Sales Invoice and Credit Memo through Gen Journal Line.
+ Initialize();
+
+ Amount := LibraryRandom.RandDecInRange(10, 1000, 2); // Using Random Dec In Range for Amount.
+ Customer.Get(CreateCustomer(CurrencyCode));
+ DiscountAmount := CalcPaymentTermDiscount(Customer."Payment Terms Code", CalcPmtDiscOnCrMemos, Amount);
+ PaymentClassCode :=
+ PostGenJournalAndCreatePaymentSlip(
+ GenJournalLine."Account Type"::Customer, Customer."No.", PaymentClass.Suggestions::Customer, Amount); // Required partial amount for Cr. Memo.
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+ SuggestCustomerPaymentLines(Customer."No.", CurrencyCode, PaymentHeader);
+
+ LibraryVariableStorage.Enqueue(GenJournalLine."Document Type"::"Credit Memo");
+ EnqueueValuesForHandler(EnqueueOpt::Verification, Amount - DiscountAmount); // Enqueue for ApplyCustomerEntriesModalPageHandler.
+
+ // Exercise: Application call from Payment Slip.
+ OpenPaymentSlip(PaymentSlip, PaymentHeader."No.");
+ PaymentSlipApplication(PaymentSlip); // Calculate Amount after payment discount.
+
+ // Verify: Verify Applied Amount on Applied Customer Ledger Entry, Verification done by ApplyCustomerEntriesModalPageHandler.
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue')]
+ procedure PostCustomerPaymentWithDetailLevelAccount()
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ // Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Account in Payment Step Ledger for Customer.
+ PostPaymentSlipWithMultipleCustomer(PaymentStepLedger."Detail Level"::Account, 1); // 1 required for Number of Records.
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue')]
+ procedure PostCustomerPaymentWithDetailLevelLine()
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ // Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Line in Payment Step Ledger for Customer.
+ PostPaymentSlipWithMultipleCustomer(PaymentStepLedger."Detail Level"::Line, 2); // 2 required for Number of Records.
+ end;
+
+ local procedure PostPaymentSlipWithMultipleCustomer(DetailLevel: Option; NoOfRecord: Integer)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ CustomerNo: Code[20];
+ CustomerNo2: Code[20];
+ begin
+ // Setup: Create and Post two Sales Invoice with different customers, create setup for post Payment Slip and suggest customer payment.
+ Initialize();
+
+ CustomerNo := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" ");
+ CustomerNo2 := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" ");
+ PaymentClass.Get(SetupForPaymentSlipPost(DetailLevel, PaymentClass.Suggestions::Customer));
+ CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+
+ SuggestCustomerPaymentLines(StrSubstNo(FilterRangeTxt, CustomerNo, CustomerNo2), '', PaymentHeader); // For SuggestCustomerPaymentsFRRequestPageHandler
+
+ // Exercise and Verify.
+ PostPaymentSlipAndVerifyLedgers(PaymentHeader, NoOfRecord);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure PostVendorPaymentWithDetailLevelAccount()
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ // Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Account in Payment Step Ledger for Vendor.
+ PostPaymentSlipWithMultipleVendor(PaymentStepLedger."Detail Level"::Account, 1); // 1 required for Number of Records.
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure PostVendorPaymentWithDetailLevelLine()
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ // Verify Debit Amount and number of records on Bank Account Ledger and General Ledger in case of Detail Level is Line in Payment Step Ledger for Vendor.
+ PostPaymentSlipWithMultipleVendor(PaymentStepLedger."Detail Level"::Line, 2); // 2 required for Number of Records.
+ end;
+
+ local procedure PostPaymentSlipWithMultipleVendor(DetailLevel: Option; NoOfRecord: Integer)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ VendorNo: Code[20];
+ VendorNo2: Code[20];
+ begin
+ // Setup: Create and Post two Purchase Invoice with different vendors, create setup for post Payment Slip and suggest Vendor payment.
+ Initialize();
+
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo);
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo2);
+ PaymentClass.Get(SetupForPaymentSlipPost(DetailLevel, PaymentClass.Suggestions::Vendor));
+ CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+ SuggestVendorPaymentLines(StrSubstNo(FilterRangeTxt, VendorNo, VendorNo2), '', PaymentHeader);
+
+ // Exercise and Verify.
+ PostPaymentSlipAndVerifyLedgers(PaymentHeader, NoOfRecord);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler')]
+ procedure DeletePaymentClassWithCreatedPaymentSlipError()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ LineNo: Integer;
+ begin
+ // Verify Error on deleting payment class when Payment Slip is created.
+ // Setup: Create Payment Class, Setup and payment slip.
+ Initialize();
+
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer));
+ LibraryVariableStorage.Enqueue(PaymentClass.Code); // Enqueue value for PaymentClassListModalPageHandler.
+ CreateSetupForPaymentSlip(LineNo, PaymentClass.Code, false); // Using False for Payment In Progress.
+ CreatePaymentSlip(PaymentLine."Account Type"::Customer, CreateCustomer('')); // Blank currency code.
+
+ // Exercise.
+ asserterror PaymentClass.Delete(true);
+
+ // Verify: Verify Error on deleting payment class when Payment Slip is created.
+ Assert.ExpectedError(PaymentClassDeleteErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure PaymentInProgressTrueOnCustomerCard()
+ var
+ Customer: Record Customer;
+ PaymentInProgressLCY: Decimal;
+ begin
+ // Verify Payment In Progress Amount on Customer Card when Payment In Progress field is set to True on Payment Status.
+
+ // [GIVEN] Create Customer X
+ // [GIVEN] Create and post Sales Invoice for Customer X
+ // [GIVEN] Create Payment Class
+ // [GIVEN] Create Setup of Payment Class and Create Payment Slip with True for Payment In Progress field in Payment Status
+ Initialize();
+
+ PaymentInProgressLCY := PaymentInProgressOnCustomer(Customer, true);
+
+ // [WHEN] Calculate Payment in progress (LCY) for Customer X
+ Customer.CalcFields("Payment in progress (LCY) FR");
+
+ // [THEN] Payment in progress (LCY) for Customer X and the amount on payment lines for account no. = X are equal
+ Assert.AreEqual(Customer."Payment in progress (LCY) FR", PaymentInProgressLCY,
+ StrSubstNo(ValueIsIncorrectErr, Customer."Payment in progress (LCY) FR", Customer.FieldCaption("Payment in progress (LCY) FR")));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure PaymentInProgressFalseOnCustomerCard()
+ var
+ Customer: Record Customer;
+ begin
+ // Verify Payment In Progress Amount on Customer Card when Payment In Progress field is set to False on Payment Status.
+
+ // [GIVEN] Create Customer X
+ // [GIVEN] Create and post Sales Invoice for Customer X
+ // [GIVEN] Create Payment Class
+ // [GIVEN] Create Setup of Payment Class and Create Payment Slip with False for Payment In Progress field in Payment Status
+ Initialize();
+
+ PaymentInProgressOnCustomer(Customer, false);
+
+ // [WHEN] Calculate Payment in progress (LCY) for Customer X
+ Customer.CalcFields("Payment in progress (LCY) FR");
+
+ // [THEN] Payment in progress (LCY) for Customer X is 0
+ Assert.AreEqual(Customer."Payment in progress (LCY) FR", 0,
+ StrSubstNo(ValueIsIncorrectErr, Customer."Payment in progress (LCY) FR", Customer.FieldCaption("Payment in progress (LCY) FR")));
+ end;
+
+ local procedure PaymentInProgressOnCustomer(var Customer: Record Customer; PaymentInProgress: Boolean): Decimal
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ LineNo: Integer;
+ begin
+ // Setup: Create Customer, create and post Sales Invoice, Create Payment Class, Create Setup of Payment Class and Create Payment Slip.
+
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer));
+ LibraryVariableStorage.Enqueue(PaymentClass.Code); // Enqueue value for PaymentClassListModalPageHandler.
+ CreateSetupForPaymentSlip(LineNo, PaymentClass.Code, PaymentInProgress);
+ CreatePaymentSlip(PaymentLine."Account Type"::Customer, CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" "));
+
+ // Exercise.
+ ApplyPaymentSlip(PaymentClass.Code);
+
+ // Verify: Verify Payment In Progress Amount on Customer Card.
+ PaymentLine.SetRange("Payment Class", PaymentClass.Code);
+ PaymentLine.FindFirst();
+
+ Customer.Get(PaymentLine."Account No.");
+
+ exit(-PaymentLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure ApplyAmountOnPaymentSlipForCustomer()
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Verify Applied Amount on Invoice for Customer.
+ Initialize();
+
+ CreatePaymentSlipWithDiscount(PaymentSlip);
+
+ // Exercise: Application call from Payment Slip.
+ PaymentSlipApplication(PaymentSlip); // Calculate Amount after payment discount.
+
+ // Verify: Verify Applied Amount on Applied Customer Ledger Entry, Verification done in ApplyCustomerEntriesModalPageHandler.
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure UnapplyAmountOnPaymentSlipForCustomer()
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Verify UnApplied Amount on Invoice for Customer.
+ Initialize();
+
+ CreatePaymentSlipWithDiscount(PaymentSlip);
+ PaymentSlipApplication(PaymentSlip);
+
+ // Exercise: Apply Payment Slip again to Unapply Payment Slip.
+ ApplyPaymentSlip(Format(PaymentSlip."Payment Class"));
+
+ // Verify: Verify UnApplied Amount on Applied Customer Ledger Entry, Verification done in ApplyCustomerEntriesModalPageHandler.
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure DeleteAppliedCustomerPaymentLine()
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Verify that the deletion of an applied customer payment line unapplies the customer ledger entry the payment line was applied to; i.e the Applied-to ID field should be cleared.
+ // Setup: Create and Post Sales Invoice with Discount, Create Payment Class,
+ Initialize();
+
+ CreatePaymentSlipWithDiscount(PaymentSlip);
+ PaymentSlipApplication(PaymentSlip);
+
+ // Exercise:
+ FindAndDeletePaymentLine(Format(PaymentSlip."No."));
+
+ // Verify: Verify Applied To ID on Customer Ledger Entry table and Due Date on ApplyCustomerEntriesModalPageHandler.
+ CustLedgerEntry.SetRange("Customer No.", Format(PaymentSlip.Lines."Account No."));
+ CustLedgerEntry.SetRange("Document Type", CustLedgerEntry."Document Type"::Invoice);
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID", '');
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure DueDateOnPaymentSlipForCustomer()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CustomerNo: Code[20];
+ SummarizePer: Option " ",Customer,"Due date";
+ DueDate: Date;
+ begin
+ // Verify that whether a proper Due Date is suggested for manually generated payments for Customer.
+ // Setup & Exercise: Create and Post Sales Invoice, Create Payment Class, Setup and Create Payment Slip.
+ Initialize();
+
+ DueDate := CalcDate('<-' + Format(LibraryRandom.RandInt(5)) + 'M>', WorkDate());
+ CustomerNo := CreateCustomer(''); // Using blank currency.
+ CreatePaymentSlipAndSuggestCustomerPayment(CustomerNo, CustomerNo, DueDate, SummarizePer::Customer);
+
+ // Verify: Verify Due Date on Payment Line.
+ PaymentLine.SetRange("Account No.", CustomerNo);
+ PaymentLine.FindFirst();
+ PaymentLine.TestField("Due Date", WorkDate());
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipRemovePageHandler')]
+ procedure VerifyPaymentLineCanBeRemovedFromPaymentSlip()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentClass: Text[30];
+ LineNo: Integer;
+ begin
+ // Verify removing of Payment Line from copied Payment Slip
+ Initialize();
+
+
+ // Create Payment Slip and remove line
+ CreatePaymentOfLinesFromPostedPaymentSlip(PaymentClass, LineNo);
+
+ // Filter copied Payment Slip Lines
+ FindPaymentStep(PaymentStep, PaymentClass, LineNo);
+ FindPaymentHeader(PaymentHeader, PaymentClass, PaymentStep."Next Status");
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+
+ // Verify Payment Line is deleted from copied Payment Slip
+ Assert.IsTrue(PaymentLine.IsEmpty, StrSubstNo(LineIsNotDeletedErr, PaymentHeader."No."));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipRemovePageHandler')]
+ procedure PaymentLineIsAvailableForNewPaymentSlipAfterRemoving()
+ var
+ PaymentClass: Text[30];
+ LineNo: Integer;
+ begin
+ // Verify line removed from Payment Slip is available for a new Payment Slip
+ Initialize();
+
+
+ // Create and Payment Slip and remove line
+ CreatePaymentOfLinesFromPostedPaymentSlip(PaymentClass, LineNo);
+
+ // Create new copy of Payment Slip
+ LibraryVariableStorage.Enqueue(PaymentClass); // Enqueue value for PaymentSlipRemovePageHandler
+ LibraryVariableStorage.Enqueue(LineNo); // Enqueue value for PaymentSlipRemovePageHandler
+ LibraryFRLocalization.CreatePaymentSlip();
+
+ // Verification done in PaymentSlipRemovePageHandler
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue')]
+ procedure NotPostPaymentSlipCustomerWithError()
+ var
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentClass: Record "Payment Class FR";
+ PaymentClassCode: Text[30];
+ SellToCustomerNo: Code[20];
+ begin
+ // Verify that Posting of Payment Slip of Customer with error is not possible.
+
+ // Setup
+
+ PaymentClassCode := CreatePaymentClassWithSetup(PaymentClass.Suggestions::Customer);
+
+ SellToCustomerNo := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::First);
+ CreatePaymentSlipWithCustomerPayments(SellToCustomerNo, PaymentClassCode);
+
+ // Exercise & Verify
+ VerifyPostingError(PaymentClassCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure NotPostPaymentSlipVendorWithError()
+ var
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentClass: Record "Payment Class FR";
+ PaymentClassCode: Text[30];
+ BuyFromVendorNo: Code[20];
+ begin
+ // Verify that Posting of Payment Slip of of Vendor with error is not possible.
+
+ // Setup
+
+ PaymentClassCode := CreatePaymentClassWithSetup(PaymentClass.Suggestions::Vendor);
+
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::First, BuyFromVendorNo);
+ CreatePaymentSlipWithVendorPayments(BuyFromVendorNo, PaymentClassCode);
+
+ // Exercise & Verify
+ VerifyPostingError(PaymentClassCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue')]
+ procedure CustPaymentLineEntryNoAfterPostingWithMemorizeEntrySetup()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentClassCode: Text[30];
+ PaymentHeaderNo: Code[20];
+ begin
+ // [SCENARIO 123828] Payment Line's Debit/Credit Entry No. is filled after post Sales Invoice and Payment Slip with "Payment Ledger Entry"."Memorize Entry" = TRUE
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with "Payment Ledger Entry"."Memorize Entry" = TRUE
+ PaymentClassCode := SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Customer);
+ UpdatePaymentStepLedgerMemorizeEntry(PaymentClassCode, true);
+
+ // [WHEN] Post payment slip applied to sales invoice
+ CreatePostSlipAppliedToSalesInvoice(PaymentHeaderNo);
+
+ // [THEN] "Payment Slip Line"."Entry No. Debit" = Last Debit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Debit Memo" = Last Debit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Credit" = Last Credit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Credit Memo" = Last Credit G/L Entry No.
+ VerifyPaymentLineDebitCreditGLNo(PaymentHeaderNo, PaymentClassCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure VendPaymentLineEntryNoAfterPostingWithMemorizeEntrySetup()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentClassCode: Text[30];
+ PaymentHeaderNo: Code[20];
+ begin
+ // [SCENARIO 123828] Payment Line's Debit/Credit Entry No. is filled after post Purchase Invoice and Payment Slip with "Payment Ledger Entry"."Memorize Entry" = TRUE
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with "Payment Ledger Entry"."Memorize Entry" = TRUE
+ PaymentClassCode := SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor);
+ UpdatePaymentStepLedgerMemorizeEntry(PaymentClassCode, true);
+
+ // [WHEN] Post payment slip applied to purchase invoice
+ CreatePostSlipAppliedToPurchaseInvoice(PaymentHeaderNo);
+
+ // [THEN] "Payment Slip Line"."Entry No. Debit" = Last Debit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Debit Memo" = Last Debit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Credit" = Last Credit G/L Entry No.
+ // [THEN] "Payment Slip Line"."Entry No. Credit Memo" = Last Credit G/L Entry No.
+ VerifyPaymentLineDebitCreditGLNo(PaymentHeaderNo, PaymentClassCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler')]
+ procedure CustPaymentLineDimensionSetIDAfterSuggest()
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ CustomerNo: Code[20];
+ DimSetID: array[2] of Integer;
+ DocNo: array[2] of Code[20];
+ SuggestionsOption: Option "None",Customer,Vendor;
+ begin
+ // [FEATURE] [Dimension][Sales]
+ // [SCENARIO 375597] System copies "Dimension Set ID" from posted Sales Order to Payment Line on "Suggest Customer Payment".
+ Initialize();
+
+
+ // [GIVEN] Posted Sales Orders with "Dimension Set ID" = "X"
+ // [GIVEN] Posted Sales Orders with "Dimension Set ID" = "Y"
+ CustomerNo := LibrarySales.CreateCustomerNo();
+ DocNo[1] := PostSalesOrderWithDimensions(DimSetID[1], CustomerNo);
+ DocNo[2] := PostSalesOrderWithDimensions(DimSetID[2], CustomerNo);
+ CreatePaymentSlipBySuggest(SuggestionsOption::Customer);
+ OpenPaymentSlip(PaymentSlip, '');
+ EnqueueValuesForHandler(CustomerNo, '');
+
+ // [WHEN] Suggests Customer Payments
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+
+ // [THEN] First "Payment Line"."Dimension Set ID" = "X"
+ VerifyPaymentLineDimSetID(DimSetID[1], DocNo[1]);
+ // [THEN] Second "Payment Line"."Dimension Set ID" = "Y"
+ VerifyPaymentLineDimSetID(DimSetID[2], DocNo[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure VendPaymentLineDimensionSetIDAfterSuggest()
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ VendorNo: Code[20];
+ DimSetID: array[2] of Integer;
+ DocNo: array[2] of Code[20];
+ SuggestionsOption: Option "None",Customer,Vendor;
+ begin
+ // [FEATURE] [Dimension][Purchase]
+ // [SCENARIO 375597] System copies "Dimension Set ID" from posted Purchase Order to Payment Line on "Suggest Vendor Payment".
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Order with "Dimension Set ID" = "X"
+ // [GIVEN] Posted Purchase Order with "Dimension Set ID" = "Y"
+ VendorNo := LibraryPurchase.CreateVendorNo();
+ DocNo[1] := PostPurchaseOrderWithDimensions(DimSetID[1], VendorNo);
+ DocNo[2] := PostPurchaseOrderWithDimensions(DimSetID[2], VendorNo);
+ CreatePaymentSlipBySuggest(SuggestionsOption::Vendor);
+ OpenPaymentSlip(PaymentSlip, '');
+ EnqueueValuesForHandler(VendorNo, '');
+
+ // [WHEN] Suggests Vendor Payments
+ PaymentSlip.SuggestVendorPayments.Invoke();
+
+ // [THEN] First "Payment Line"."Dimension Set ID" = "X"
+ VerifyPaymentLineDimSetID(DimSetID[1], DocNo[1]);
+ // [THEN] Second "Payment Line"."Dimension Set ID" = "Y"
+ VerifyPaymentLineDimSetID(DimSetID[2], DocNo[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure PaymentSlipLineApplyVLEAppliesToIdEqualPaymentLineDocNo()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentLine: Record "Payment Line FR";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PurchInvHeader: Record "Purch. Inv. Header";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentHeaderNo: Code[20];
+ VendorNo: Code[20];
+ begin
+ // [FEATURE] [Apply] [Purchase]
+ // [SCENARIO 376303] Applies-to ID equals to Payment Line "No."/"Document No." when payment line applied to Vendor Ledger Entry
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with Line No. series defined (<> Header No. Series)
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+
+ // [GIVEN] Posted Purchase Invoice
+ PurchInvHeader.Get(
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo));
+
+ // [GIVEN] Payment Slip with Payment Line with Document No. = "Y"
+ PaymentHeaderNo := CreatePaymentSlip(PaymentLine."Account Type"::Vendor, VendorNo);
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(EnqueueOpt::Application, PurchInvHeader."Amount Including VAT");
+
+ // [WHEN] Payment Line applied to Vendor Ledger Entry of Posted Purchase Invoice
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Vendor Ledger Entry value of Applies-to ID = "Y"
+ LibraryERM.FindVendorLedgerEntry(VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice, PurchInvHeader."No.");
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID", PaymentLine."No." + '/' + PaymentLine."Document No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure PaymentSlipLineApplyCLEAppliesToIdEqualPaymentLineDocNo()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentLine: Record "Payment Line FR";
+ SalesInvoiceHeader: Record "Sales Invoice Header";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentHeaderNo: Code[20];
+ CustomerNo: Code[20];
+ begin
+ // [FEATURE] [Apply] [Sales]
+ // [SCENARIO 376303] Applies-to ID equals to Payment Line "No."/"Document No." when payment line applied to Customer Ledger Entry
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with Line No. series defined (<> Header No. Series)
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Customer));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+
+ // [GIVEN] Posted Sales Invoice
+ CustomerNo := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" ");
+ SalesInvoiceHeader.SetRange("Sell-to Customer No.", CustomerNo);
+ SalesInvoiceHeader.FindFirst();
+
+ // [GIVEN] Payment Slip with Payment Line with Document No. = "Y"
+ PaymentHeaderNo := CreatePaymentSlip(PaymentLine."Account Type"::Customer, CustomerNo);
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(EnqueueOpt::Application, SalesInvoiceHeader."Amount Including VAT");
+
+ // [WHEN] Payment Line applied to Customer Ledger Entry of Posted Sales Invoice
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Customer Ledger Entry value of Applies-to ID = "Y"
+ LibraryERM.FindCustomerLedgerEntry(CustLedgerEntry, CustLedgerEntry."Document Type"::Invoice, SalesInvoiceHeader."No.");
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID", PaymentLine."No." + '/' + PaymentLine."Document No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyVendorEntriesModalPageHandler')]
+ procedure PaymentSlipLineApplyVLEAppliesToIdEqualPaymentLineNoSlashLineNo()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentLine: Record "Payment Line FR";
+ PurchInvHeader: Record "Purch. Inv. Header";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentHeaderNo: Code[20];
+ VendorNo: Code[20];
+ begin
+ // [FEATURE] [Apply] [Purchase]
+ // [SCENARIO 376303] Applies-to ID equals to "Payment Line No./Payment Line Line No." when payment line applied to Vendor Ledger Entry and Payment Line "Document No." is empty
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with Line No. series not defined
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor));
+
+ // [GIVEN] Posted Purchase Invoice
+ PurchInvHeader.Get(
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo));
+
+ // [GIVEN] Payment Slip with Payment Line with Document No. = "", Payment Line No. = "Y", Paymen Line Line No. = "10000"
+ PaymentHeaderNo := CreatePaymentSlip(PaymentLine."Account Type"::Vendor, VendorNo);
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+ PaymentLine.Validate("Document No.", '');
+ PaymentLine.Modify(true);
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(EnqueueOpt::Application, PurchInvHeader."Amount Including VAT");
+
+ // [WHEN] Payment Line applied to Vendor Ledger Entry of Posted Purchase Invoice
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Vendor Ledger Entry value of Applies-to ID = "Y/10000"
+ LibraryERM.FindVendorLedgerEntry(VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice, PurchInvHeader."No.");
+ VendorLedgerEntry.TestField(
+ "Applies-to ID",
+ PaymentLine."No." + '/' + Format(PaymentLine."Line No."));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipPageCloseHandler')]
+ procedure VendLedgEntriesClosedAfterDelayedVATRealize()
+ var
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentClassCode: Text[30];
+ VendorNo: Code[20];
+ PaymentHeaderNo: Code[20];
+ PurchInvHeaderNo: Code[20];
+ LineNo: array[3] of Integer;
+ begin
+ // [FEATURE] [Unrealized VAT] [Purchase]
+ // [SCENARIO 376302] Vendor Ledger Entries should be closed with Payment Slips and delayed Unrealized VAT reversal setup
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Invoice for Vendor "V" with VAT Posting Setup and Unrealized VAT Type = Percentage
+ PurchInvHeaderNo := CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::Percentage, VendorNo);
+
+ // [GIVEN] Payment Slip Setup with delayed Unrealized VAT reversal
+ CreatePaymentSlipSetupWithDelayedVATRealize(PaymentClassCode, LineNo);
+
+ // [GIVEN] Posted Payment Slip for 1st Payment Step with suggested line for Posted Purchase Invoice
+ CreateSuggestAndPostPaymentSlip(VendorNo);
+
+ // [WHEN] Payment Slip "P" created by Create Payment Slip job for 2nd Payment Step is posted
+ PaymentHeaderNo :=
+ CreatePaymentSlipWithSourceCodeAndAccountNo(
+ CreateSourceCode(), LibraryERM.CreateBankAccountNo(), PaymentClassCode, LineNo[2]);
+
+ // [THEN] All Vendor Ledger Entries for Vendor "V" are closed
+ VerifyVendorLedgerEntriesClosed(VendorNo, 4);
+
+ // [THEN] VAT is Realized
+ VerifyRealizedVAT(PurchInvHeaderNo, PaymentHeaderNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipPageCloseHandler')]
+ procedure VendLedgEntriesClosedAfterDelayedVATRealizeAndNonDelayedVAT()
+ var
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentClassCode: Text[30];
+ VendorNo: Code[20];
+ PaymentHeaderNo: Code[20];
+ PurchInvHeaderNo: Code[20];
+ LineNo: array[3] of Integer;
+ begin
+ // [FEATURE] [Unrealized VAT] [Purchase]
+ // [SCENARIO 376302] Vendor Ledger Entries for Normal VAT and delayed Unrealized VAT should be closed with Payment Slips
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Invoice for Vendor "V" with Line of Unrealized VAT Type = Percentage and line of Unrealized VAT Type = ""
+ PurchInvHeaderNo :=
+ CreateAndPostPurchaseInvoiceWithMixedVATPostingSetup(VATPostingSetup."Unrealized VAT Type"::Percentage, VendorNo);
+
+ // [GIVEN] Payment Slip Setup with delayed Unrealized VAT reversal
+ CreatePaymentSlipSetupWithDelayedVATRealize(PaymentClassCode, LineNo);
+
+ // [GIVEN] Posted Payment Slip for 1st Payment Step with suggested line for Posted Purchase Invoice
+ CreateSuggestAndPostPaymentSlip(VendorNo);
+
+ // [WHEN] Payment Slip "P" created by Create Payment Slip job for 2nd Payment Step is posted
+ PaymentHeaderNo :=
+ CreatePaymentSlipWithSourceCodeAndAccountNo(
+ CreateSourceCode(), LibraryERM.CreateBankAccountNo(), PaymentClassCode, LineNo[2]);
+
+ // [THEN] All Vendor Ledger Entries for Vendor "V" are closed
+ VerifyVendorLedgerEntriesClosed(VendorNo, 4);
+
+ // [THEN] VAT is Realized
+ VerifyRealizedVAT(PurchInvHeaderNo, PaymentHeaderNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure CustPaymentLineDimensionAfterSuggestBlank()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Customer,"Due date";
+ CustomerNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Sales]
+ // [SCENARIO 381150] "Suggest Customer Payment" with "Summarize Per" option set to blank.
+ Initialize();
+
+
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "X"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "Y"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Customer Payments with blank "Summarize per" option
+ CreateCustomerPaymentSlip(CustomerNo, SummarizePer::" ");
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure CustPaymentLineDimensionAfterSuggestPerCustomer()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Customer,"Due date";
+ CustomerNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Sales]
+ // [SCENARIO 381150] "Suggest Customer Payment" with "Summarize Per" option set to "Customer".
+ Initialize();
+
+
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "X"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "Y"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Customer Payments with "Summarize per" option set to "Due Date"
+ CreateCustomerPaymentSlip(CustomerNo, SummarizePer::Customer);
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure CustPaymentLineDimensionAfterSuggestPerDueDate()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Customer,"Due date";
+ CustomerNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Sales]
+ // [SCENARIO 381150] "Suggest Customer Payment" with "Summarize Per" option set to "Due Date".
+ Initialize();
+
+
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "X"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Sales Order for first Customer with "Dimension Value" = "Y"
+ CreateCustomerWithDefaultDimensionsPostSalesOrder(CustomerNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Customer Payments with "Summarize per" option set to "Due Date"
+ CreateCustomerPaymentSlip(CustomerNo, SummarizePer::"Due date");
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Customer, CustomerNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure VendPaymentLineDimensionAfterSuggestBlank()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Vendor,"Due date";
+ VendorNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Purchase]
+ // [SCENARIO 381150] "Suggest Vendor Payment" with "Summarize Per" option set to blank.
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Order for first Vendor with "Dimension Value" = "X"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Purchase Order for second Vendor with "Dimension Value" = "Y"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Vendor Payments with blank "Summarize per" option
+ CreateVendorPaymentSlip(VendorNo, SummarizePer::" "); // SuggestVendorPaymentsFRSummarizedRequestPageHandler
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure VendPaymentLineDimensionAfterSuggestPerVendor()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Vendor,"Due date";
+ VendorNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Purchase]
+ // [SCENARIO 381150] "Suggest Vendor Payment" with "Summarize Per" option set to "Vendor".
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Order for first Vendor with "Dimension Value" = "X"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Purchase Order for second Vendor with "Dimension Value" = "Y"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Vendor Payments with "Summarize per" option equal to "Vendor"
+ CreateVendorPaymentSlip(VendorNo, SummarizePer::Vendor); // SuggestVendorPaymentsFRSummarizedRequestPageHandler
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure VendPaymentLineDimensionAfterSuggestPerDueDate()
+ var
+ DimensionValue: array[2] of Record "Dimension Value";
+ SummarizePer: Option " ",Vendor,"Due date";
+ VendorNo: array[2] of Code[20];
+ begin
+ // [FEATURE] [Dimension] [Purchase]
+ // [SCENARIO 381150] "Suggest Vendor Payment" with "Summarize Per" option set to "Due Date".
+ Initialize();
+
+
+ // [GIVEN] Posted Purchase Order for first Vendor with "Dimension Value" = "X"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[1], DimensionValue[1]);
+ // [GIVEN] Posted Purchase Order for second Vendor with "Dimension Value" = "Y"
+ CreateVendorWithDefaultDimensionsPostPurchaseOrder(VendorNo[2], DimensionValue[2]);
+
+ // [WHEN] Suggests Vendor Payments with "Summarize per" option equal to "Due Date"
+ CreateVendorPaymentSlip(VendorNo, SummarizePer::"Due date"); // SuggestVendorPaymentsFRSummarizedRequestPageHandler
+
+ // [THEN] First "Payment Line" has "Dimension Value" = "X"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[1], DimensionValue[1]);
+ // [THEN] Second "Payment Line" has "Dimension Value" = "Y"
+ VerifyPaymentLineDimensionValue(Account_Type::Vendor, VendorNo[2], DimensionValue[2]);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure PaymentSlipWithUpdatedExchangeRate()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ Vendor: Record Vendor;
+ Currency: Record Currency;
+ PostingDate: Date;
+ RateFactorY: Decimal;
+ begin
+ // [FEATURE] [FCY]
+ // [SCENARIO 381339] Suggest Vendor Payments function on the Payment Slip page when Currency Exch. Rate is updated.
+ Initialize();
+
+
+ // [GIVEN] Currency with updated Exchange Rate
+ CreateCurrencyWithDifferentExchangeRate(Currency, PostingDate, RateFactorY);
+
+ // [GIVEN] Post Purchase Invoice when Currency Factor = "X"
+ CreatePurchaseInvoiceWithCurrencyAndPost(Vendor, Currency, PostingDate);
+
+ // [WHEN] Suggest Payment Slip when Currency Factor = "Y"
+ CreatePaymentSlipWithCurrency(PaymentHeader, Vendor, Currency);
+
+ // [THEN] Payment Line contains updated Currency Factor = "Y"
+ VerifyPaymentLineCurrencyFactor(PaymentHeader, RateFactorY);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue')]
+ procedure CreateAndPostPaymentSlipForIncompleteDimensionLine()
+ var
+ DefaultDimension: Record "Default Dimension";
+ Dimension: Record Dimension;
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ LineNo: Integer;
+ LineNo2: Integer;
+ PmtHeaderNo: Code[20];
+ begin
+ // [SCENARIO 311493] Posting 'Payment Line' for Vendor with empty 'Dimension Value Code' in 'Default Dimension' throws error
+ Initialize();
+
+
+ // [GIVEN] Created Vendor with 'Default Dimension' with empty 'Dimension Value Code'
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryDimension.CreateDimension(Dimension);
+ LibraryDimension.CreateDefaultDimensionVendor(DefaultDimension, Vendor."No.", Dimension.Code, '');
+ DefaultDimension.Validate("Value Posting", DefaultDimension."Value Posting"::"Code Mandatory");
+ DefaultDimension.Modify(true);
+
+ // [GIVEN] Setup for Payment Slip
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Vendor));
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LineNo2 := CreateSetupForPaymentSlip(LineNo, PaymentClass.Code, true);
+ CreatePaymentStepLedgerForVendor(PaymentClass.Code, LineNo, LineNo2);
+
+ // [WHEN] Try to create and post Payment Slip with incompete Default Dimension
+ asserterror CreateAndPostNoApplyPaymentSlip(PmtHeaderNo, PaymentClass.Code, PaymentLine."Account Type"::Vendor, Vendor."No.");
+
+ // [THEN] An error is thrown: "A dimension used in has caused an error. Select a Dimension Value Code..."
+ Assert.ExpectedErrorCode('TestWrapped:Dialog');
+ Assert.ExpectedError(StrSubstNo(CheckDimValuePostingLineErr, PmtHeaderNo, PaymentLine.TableCaption(),
+ LineNo, Dimension.Code, Vendor."No."));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue')]
+ procedure CreateAndPostPaymentSlipForBlockedDimensionHeader()
+ var
+ Dimension: Record Dimension;
+ DimensionValue: Record "Dimension Value";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ LineNo: Integer;
+ LineNo2: Integer;
+ begin
+ // [SCENARIO 311493] Posting 'Payment Slip' for Vendor with blocked Dimension throws error
+ Initialize();
+
+
+ // [GIVEN] Created Vendor
+ LibraryPurchase.CreateVendor(Vendor);
+
+ // [GIVEN] Setup for Payment Slip
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Vendor));
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LineNo2 := CreateSetupForPaymentSlip(LineNo, PaymentClass.Code, true);
+ CreatePaymentStepLedgerForVendor(PaymentClass.Code, LineNo, LineNo2);
+
+ // [GIVEN] Create Payment Slip with Dimension
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ CreatePaymentSlip(PaymentLine."Account Type"::Vendor, Vendor."No.");
+ PaymentLine.SetFilter("Account Type", Format(PaymentLine."Account Type"::Vendor));
+ PaymentLine.SetFilter("Account No.", Vendor."No.");
+ PaymentLine.FindFirst();
+ PaymentHeader.SetFilter("No.", PaymentLine."No.");
+ PaymentHeader.FindFirst();
+ PaymentHeader.Validate("Dimension Set ID", LibraryDimension.CreateDimSet(0, DimensionValue."Dimension Code", DimensionValue.Code));
+ PaymentHeader.Modify(true);
+
+ // [GIVEN] Block Dimension
+ Dimension.SetFilter(Code, DimensionValue."Dimension Code");
+ Dimension.FindFirst();
+ LibraryDimension.BlockDimension(Dimension);
+
+ // [WHEN] Post Payment Slip with blocked Dimension
+ asserterror PostPaymentSlip(PaymentClass.Code);
+
+ // [THEN] An error is thrown: "A dimension used in has caused an error. Dimension is blocked."
+ Assert.ExpectedErrorCode('TestWrapped:Dialog');
+ Assert.ExpectedError(StrSubstNo(CheckDimValuePostingHeaderErr, PaymentHeader."No.", Dimension.Code));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithCustomerPaymentLineSummarizedPerCustomer()
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: array[2] of Record Customer;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Customer,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Customer Ledger Entry, when entries suggested using Summarize per Customer.
+ Initialize();
+
+
+ // [GIVEN] Customers "C1", "C2".
+ LibrarySales.CreateCustomer(Customer[1]);
+ LibrarySales.CreateCustomer(Customer[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2" and associated Customer Ledger Entries "CLE1", "CLE2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[1]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[2]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" suggested payment summarized per Customer "C1", "P2" suggested payment summarized per Customer "C2".
+ SuggestCustomerPaymentLines(Customer[1]."No.", SummarizePer::Customer, PaymentHeader[1]);
+ SuggestCustomerPaymentLines(Customer[2]."No.", SummarizePer::Customer, PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "CLE1" still has "Applies-to ID", while "CLE2"'s "Applies-to ID" is empty.
+ CustLedgerEntry.SetRange("Customer No.", Customer[1]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID");
+
+ CustLedgerEntry.SetRange("Customer No.", Customer[2]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithCustomerPaymentLineSummarizedPerDueDate()
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: array[2] of Record Customer;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Customer,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Customer Ledger Entry, when entries suggested using Summarize per Due date.
+ Initialize();
+
+
+ // [GIVEN] Customers "C1", "C2".
+ LibrarySales.CreateCustomer(Customer[1]);
+ LibrarySales.CreateCustomer(Customer[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2" and associated Customer Ledger Entries "CLE1", "CLE2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[1]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[2]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" suggested payment summarized per Due date, "P2" suggested payment summarized per Due date.
+ SuggestCustomerPaymentLines(Customer[1]."No.", SummarizePer::"Due date", PaymentHeader[1]);
+ SuggestCustomerPaymentLines(Customer[2]."No.", SummarizePer::"Due date", PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "CLE1" still has "Applies-to ID", while "CLE2"'s "Applies-to ID" is empty.
+ CustLedgerEntry.SetRange("Customer No.", Customer[1]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID");
+
+ CustLedgerEntry.SetRange("Customer No.", Customer[2]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithCustomerPaymentLine()
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: array[2] of Record Customer;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Customer,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Customer Ledger Entry, when entries suggested without summarization.
+ Initialize();
+
+
+ // [GIVEN] Customers "C1", "C2".
+ LibrarySales.CreateCustomer(Customer[1]);
+ LibrarySales.CreateCustomer(Customer[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2" and associated Customer Ledger Entries "CLE1", "CLE2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[1]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer[2]."No.", GenJournalLine."Document Type"::Invoice, LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" and "P2" suggested payment without summarization.
+ SuggestCustomerPaymentLines(Customer[1]."No.", SummarizePer::" ", PaymentHeader[1]);
+ SuggestCustomerPaymentLines(Customer[2]."No.", SummarizePer::" ", PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "CLE1" still has "Applies-to ID", while "CLE2"'s "Applies-to ID" is empty.
+ CustLedgerEntry.SetRange("Customer No.", Customer[1]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID");
+
+ CustLedgerEntry.SetRange("Customer No.", Customer[2]."No.");
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithVendorPaymentLineSummarizedPerVendor()
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ Vendor: array[2] of Record Vendor;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Vendor Ledger Entry, when entries suggested using Summarize per Vendor.
+ Initialize();
+
+
+ // [GIVEN] Vendors "C1", "C2".
+ LibraryPurchase.CreateVendor(Vendor[1]);
+ LibraryPurchase.CreateVendor(Vendor[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2" and associated Vendor Ledger Entries "VLE1", "VLE2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[1]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[2]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Vendor));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" suggested payment summarized per Vendor "C1", "P2" suggested payment summarized per Vendor "C2".
+ SuggestVendorPaymentLines(Vendor[1]."No.", SummarizePer::Vendor, PaymentHeader[1]);
+ SuggestVendorPaymentLines(Vendor[2]."No.", SummarizePer::Vendor, PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "VLE1" still has "Applies-to ID", while "VLE2"'s "Applies-to ID" is empty.
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[1]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID");
+
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[2]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithVendorPaymentLineSummarizedPerDueDate()
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ Vendor: array[2] of Record Vendor;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Customer,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Vendor Ledger Entry, when entries suggested using Summarize per Due date.
+ Initialize();
+
+
+ // [GIVEN] Vendors "C1", "C2".
+ LibraryPurchase.CreateVendor(Vendor[1]);
+ LibraryPurchase.CreateVendor(Vendor[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2" and associated Vendor Ledger Entries "VLE1", "VLE2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[1]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[2]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Vendor));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2" and associated Vendor Ledger Entries "VLE1", "VLE2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" suggested payment summarized per Due date, "P2" suggested payment summarized per Due date.
+ SuggestVendorPaymentLines(Vendor[1]."No.", SummarizePer::"Due date", PaymentHeader[1]);
+ SuggestVendorPaymentLines(Vendor[2]."No.", SummarizePer::"Due date", PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "VLE1" still has "Applies-to ID", while "VLE2"'s "Applies-to ID" is empty.
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[1]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID");
+
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[2]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandler')]
+ procedure DeletingPaymentSlipWithVendorPaymentLine()
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ Vendor: array[2] of Record Vendor;
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentLine: Record "Payment Line FR";
+ SummarizePer: Option " ",Customer,"Due date";
+ begin
+ // [SCENARIO 316414] Deleting Payment Slip doesn't lead to empty "Applies-to ID" of wrong Vendor Ledger Entry, when entries suggested without summarization.
+ Initialize();
+
+
+ // [GIVEN] Vendors "C1", "C2".
+ LibraryPurchase.CreateVendor(Vendor[1]);
+ LibraryPurchase.CreateVendor(Vendor[2]);
+ // [GIVEN] Gen. Jnl. Lines "G1", "G2".
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[1]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[2]."No.", GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Payment class with No. Series.
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Vendor));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Payment Slips "P1", "P2".
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[1]);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader[2]);
+ Commit();
+
+ // [GIVEN] "P1" and "P2" suggested payment without summarization.
+ SuggestVendorPaymentLines(Vendor[1]."No.", SummarizePer::" ", PaymentHeader[1]);
+ SuggestVendorPaymentLines(Vendor[2]."No.", SummarizePer::" ", PaymentHeader[2]);
+ PaymentLine.SetRange("No.", PaymentHeader[2]."No.");
+ PaymentLine.FindFirst();
+ VerifyLastNoUsedInNoSeries(PaymentClass."Line No. Series", PaymentLine."Document No."); // TFS 409091. Last No used is updated
+
+ // [WHEN] Paymen Slip "P2" is deleted.
+ PaymentHeader[2].Delete(true);
+
+ // [THEN] "VLE1" still has "Applies-to ID", while "VLE2"'s "Applies-to ID" is empty.
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[1]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID");
+
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor[2]."No.");
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure PostPaymentSlipAfterGettingDimError()
+ var
+ DefaultDimension: Record "Default Dimension";
+ Dimension: Record Dimension;
+ DimensionValue: Record "Dimension Value";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ Currency: Record Currency;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // [FEATURE] [UI]
+ // [SCENARIO 408792] Stan can post payment slip from the second attempt after getting the dimension error
+
+ Initialize();
+
+
+ // [GIVEN] USD currency with "Realized Gains Acc." = "X"
+ LibraryERM.CreateCurrency(Currency);
+ Currency.Validate("Realized Gains Acc.", LibraryERM.CreateGLAccountNo());
+ Currency.Modify(true);
+ LibraryERM.CreateExchangeRate(Currency.Code, WorkDate(), 1, LibraryRandom.RandDecInDecimalRange(5, 10, 2));
+
+ // [GIVEN] Department dimension is mandatory for G/L account "X"
+ LibraryDimension.CreateDimension(Dimension);
+ LibraryDimension.CreateDefaultDimensionGLAcc(DefaultDimension, Currency."Realized Gains Acc.", Dimension.Code, '');
+ DefaultDimension.Validate("Value Posting", DefaultDimension."Value Posting"::"Code Mandatory");
+ DefaultDimension.Modify(true);
+
+ // [GIVEN] Post Purchase Invoice with Currency = "X" and Currency Factor = 0.01
+ CreatePurchaseInvoiceWithCurrencyAndPost(Vendor, Currency, WorkDate());
+
+ // [GIVEN] Payment slip with posted purchase invoiced
+ CreatePaymentSlipForPurchInvApplication(PaymentHeader, Vendor, Currency);
+
+ // [GIVEN] Currency factor is changed to 0.02 to make posting to realized gains acc.
+ PaymentHeader.Validate("Currency Factor", PaymentHeader."Currency Factor" + 0.01);
+ PaymentHeader.Modify(true);
+
+ // [GIVEN] Get an error after posting the payment slip first time
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentHeader."Payment Class");
+ asserterror PaymentSlip.Post.Invoke();
+ Assert.ExpectedError('Select a Dimension Value Code');
+
+ // [GIVEN] Assign Department dimension for the payment slip
+ LibraryDimension.CreateDimensionValue(DimensionValue, Dimension.Code);
+ FindPaymentLine(PaymentLine, PaymentHeader."Payment Class", 0);
+ PaymentLine.Validate(
+ "Dimension Set ID", LibraryDimension.CreateDimSet(0, DimensionValue."Dimension Code", DimensionValue.Code));
+ PaymentLine.Modify(true);
+
+ // [WHEN] Post second time
+ PaymentSlip.Post.Invoke();
+
+ // [THEN] Payment slip has been posted
+ PaymentHeader.Find();
+ PaymentHeader.TestField("Status No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRSummarizedRequestPageHandlerVendor,ConfirmHandlerTrue')]
+ procedure NoSeriesShouldNotCauseIssueWithPaymentSlipWhenPosting()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ GLEntry: Record "G/L Entry";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ Vendor: array[2] of Record Vendor;
+ VendorPostingGroup: Record "Vendor Posting Group";
+ SuggestVendorPaymentsFR: Report "Suggest Vend. Payments";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // [FEATURE] [Payment Slip]
+ // [SCENARIO 539689] No. Series should not cause issue when posting Payment Slip.
+ Initialize();
+
+
+ // [GIVEN] Create two Vendors.
+ LibraryPurchase.CreateVendor(Vendor[1]);
+ LibraryPurchase.CreateVendor(Vendor[2]);
+
+ // [GIVEN] Create and Post two General Journals.
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[1]."No.",
+ GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor[2]."No.",
+ GenJournalLine."Document Type"::Invoice, -LibraryRandom.RandDec(10, 2), WorkDate());
+
+ // [GIVEN] Create Payment Class, Payment Slip Ledger.
+ PaymentClass.Get(SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor));
+
+ // [GIVEN] Modify Document No. in Payment Step Ledger.
+ PaymentStepLedger.SetRange("Payment Class", PaymentClass.Code);
+ PaymentStepLedger.ModifyAll("Document No.", PaymentStepLedger."Document No."::"Document ID Line");
+
+ // [GIVEN] Store Payment Class Code.
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+
+ // [GIVEN] Validate No. Series in Payment Class.
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+
+ // [GIVEN] Create Payment Header.
+ CreatePaymentHeader(PaymentHeader);
+ Commit();
+
+ // [GIVEN] Run Suggest Vendor Payments FR Report.
+ SuggestVendorPaymentsFR.SetGenPayLine(PaymentHeader);
+ SuggestVendorPaymentsFR.RunModal();
+
+ // [GIVEN] Find the first Payment Line.
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+
+ // [GIVEN] Open and Post Payment Slip.
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("No.", PaymentHeader."No.");
+ PaymentSlip.Post.Invoke();
+
+ //[GIVEN] Find the Vendor Posting Group.
+ VendorPostingGroup.Get(Vendor[1]."Vendor Posting Group");
+
+ // [THEN] Payment Slip must be posted and Amount must match in GL Entry.
+ GLEntry.SetRange("Document No.", PaymentLine."Document No.");
+ GLEntry.SetRange("G/L Account No.", VendorPostingGroup."Payables Account");
+ GLEntry.FindFirst();
+ Assert.AreEqual(PaymentLine.Amount, Abs(GLEntry.Amount), PaymentSlipErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPmtsFRRequestPageHandler')]
+ procedure AppliesToIDIsNotFilledIfNoPaymentLineIsCreatedBySugVendPmt()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentHeader: Record "Payment Header FR";
+ Vendor: Record Vendor;
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ SuggestVendorPaymentsFR: Report "Suggest Vend. Payments";
+ begin
+ // [SCENARIO 558277] Suggest Vendor Payment Summarize per Vendor doesn't fill
+ // Applies-to ID of Vendor Ledger Entries if no Payment Line in the Payment Slip.
+ Initialize();
+
+
+ // [GIVEN] Create a Vendor.
+ LibraryPurchase.CreateVendor(Vendor);
+
+ // [GIVEN] Create a Gen. Journal Line.
+ CreateGenJournalLine(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor."No.", GenJournalLine."Document Type"::Payment,
+ GenJournalLine."Bal. Account Type"::"G/L Account", LibraryERM.CreateGLAccountNo());
+
+ // [GIVEN] Validate Debit Amount in Gen. Journal Line.
+ GenJournalLine.Validate("Debit Amount", LibraryRandom.RandIntInRange(100, 100));
+ GenJournalLine.Modify(true);
+
+ // [GIVEN] Post Gen. Journal Line.
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Create a Gen. Journal Line.
+ CreateGenJournalLine(
+ GenJournalLine, GenJournalLine."Account Type"::Vendor, Vendor."No.", GenJournalLine."Document Type"::Invoice,
+ GenJournalLine."Bal. Account Type"::"G/L Account", LibraryERM.CreateGLAccountNo());
+
+ // [GIVEN] Validate Credit Amount in Gen. Journal Line.
+ GenJournalLine.Validate("Credit Amount", LibraryRandom.RandIntInRange(100, 100));
+ GenJournalLine.Modify(true);
+
+ // [GIVEN] Post Gen. Journal Line.
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Create a Payment Class.
+ CreatePaymentClassWithNoSeries(PaymentClass);
+
+ // [GIVEN] Create a Payment Status.
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+
+ // [GIVEN] Create a Payment Header.
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryVariableStorage.Enqueue(Format(Vendor."No."));
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ Commit();
+
+ // [GIVEN] Run Suggest Vendor Payments FR Report.
+ SuggestVendorPaymentsFR.SetGenPayLine(PaymentHeader);
+ SuggestVendorPaymentsFR.RunModal();
+
+ // [WHEN] Find Vendor Ledger Entry.
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor."No.");
+ VendorLedgerEntry.FindFirst();
+
+ // [THEN] Applies-to ID must be blank in Vendor Ledger Entry.
+ Assert.AreEqual('', VendorLedgerEntry."Applies-to ID", AppliesToIDMustBeBlankErr);
+
+ // [WHEN] Find Vendor Ledger Entry.
+ VendorLedgerEntry.SetRange("Vendor No.", Vendor."No.");
+ VendorLedgerEntry.FindLast();
+
+ // [THEN] Applies-to ID must be blank in Vendor Ledger Entry.
+ Assert.AreEqual('', VendorLedgerEntry."Applies-to ID", AppliesToIDMustBeBlankErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyCustomerEntriesModalPageHandler')]
+ procedure NoSeriesUpdatedWhenInsertPaylineManually()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentLine: Record "Payment Line FR";
+ SalesInvoiceHeader: Record "Sales Invoice Header";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ NoSeriesLine: Record "No. Series Line";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentHeaderNo: Code[20];
+ CustomerNo: Code[20];
+ begin
+ // [SCENARIO 561809]Last No. Used in No. Series line incremented when the Payment Slip lines are entered manually
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with Line No. series defined (<> Header No. Series)
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Customer));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+
+ // [GIVEN] Posted Sales Invoice
+ CustomerNo := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" ");
+ SalesInvoiceHeader.SetRange("Sell-to Customer No.", CustomerNo);
+ SalesInvoiceHeader.FindFirst();
+
+ // [GIVEN] Payment Slip with Payment Line with Document No. = "Y"
+ PaymentHeaderNo := CreatePaymentSlip(PaymentLine."Account Type"::Customer, CustomerNo);
+
+ // [GIVEN] Open the Payment Slip and enqueue the values for handler
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(EnqueueOpt::Application, SalesInvoiceHeader."Amount Including VAT");
+
+ // [WHEN] Payment Line applied to Customer Ledger Entry of Posted Sales Invoice
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Customer Ledger Entry value of Applies-to ID = "Y"
+ LibraryERM.FindCustomerLedgerEntry(CustLedgerEntry, CustLedgerEntry."Document Type"::Invoice, SalesInvoiceHeader."No.");
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+
+ // [THEN] Find the Line No. Series line
+ FindNoSeriesLine(NoSeriesLine, PaymentClass."Line No. Series");
+
+ // [THEN] Verify the No. Series Line Last No. used updated
+ Assert.AreEqual(PaymentLine."Document No.", NoSeriesLine."Last No. Used", StrSubstNo(DocumentNoErr, PaymentLine."Document No."));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ApplyVendorEntriesModalPageHandlerWithCancel')]
+ procedure DueDateOnPaymentSlipShouldNotClearUponClosingApplyVendorLedgerEntriesPages()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentLine: Record "Payment Line FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PurchInvHeader: Record "Purch. Inv. Header";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentSlipSubform: TestPage "Payment Slip Subform FR";
+ DueDate: Date;
+ PaymentHeaderNo: Code[20];
+ VendorNo: Code[20];
+ begin
+ // [SCENARIO 562947] Due Date on Payment Slip Line clears upon closing the Apply Vendor Entries page in the French version.
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup with Line No. series defined (<> Header No. Series)
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor));
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Modify(true);
+
+ // [GIVEN] Posted Purchase Invoice
+ PurchInvHeader.Get(
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo));
+
+ // [GIVEN] Payment Slip with Payment Line with Document No. = "Y"
+ PaymentHeaderNo := CreatePaymentSlip(PaymentLine."Account Type"::Vendor, VendorNo);
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+
+ // [THEN] Set Due Date to Blank on Payment Slip Subform
+ FindPaymentLine(PaymentSlipSubform, PaymentHeaderNo);
+ DueDate := PaymentSlipSubform."Due Date".AsDate();
+ PaymentSlipSubform."Due Date".SetValue(0D);
+ PaymentSlipSubform.Close();
+
+ // [WHEN] Payment Line applied to Vendor Ledger Entry of Posted Purchase Invoice
+ LibraryVariableStorage.Enqueue(EnqueueOpt::Application);
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Verify Due Date not Blank on Payment Slip Subform
+ FindPaymentLine(PaymentSlipSubform, PaymentHeaderNo);
+ PaymentSlipSubform."Due Date".AssertEquals(DueDate);
+ PaymentSlipSubform.Close();
+
+ // [WHEN] Payment Line not applied to Vendor Ledger Entry of Posted Purchase Invoice
+ LibraryVariableStorage.Enqueue(EnqueueOpt::" ");
+ PaymentSlipApplication(PaymentSlip);
+
+ // [THEN] Verify Due Date not Blank on Payment Slip Subform
+ FindPaymentLine(PaymentSlipSubform, PaymentHeaderNo);
+ PaymentSlipSubform."Due Date".AssertEquals(DueDate);
+ PaymentSlipSubform.Close();
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryTestInitialize.OnTestInitialize(CODEUNIT::"ERM Payment Management");
+ UpdateUnrealizedVATGeneralLedgerSetup();
+ LibraryVariableStorage.Clear();
+ ClearPaymentSlipData();
+ end;
+
+ local procedure ApplyPaymentSlip(PaymentClass: Text[30])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClass);
+ LibraryVariableStorage.Enqueue(EnqueueOpt::Application);
+ PaymentSlip.Lines.Application.Invoke(); // Invokes ApplyVendorEntriesModalPageHandler and ApplyCustomerEntriesModalPageHandler.
+ PaymentSlip.Close();
+ end;
+
+ local procedure CalcPaymentTermDiscount(PaymentTermsCode: Code[10]; CalcPmtDiscOnCrMemos: Boolean; Amount: Decimal): Decimal
+ var
+ PaymentTerms: Record "Payment Terms";
+ begin
+ PaymentTerms.Get(PaymentTermsCode);
+ PaymentTerms.Validate("Discount %", LibraryRandom.RandDec(50, 2)); // Using Random Dec for Discount %.
+ PaymentTerms.Validate("Calc. Pmt. Disc. on Cr. Memos", CalcPmtDiscOnCrMemos);
+ PaymentTerms.Modify(true);
+ exit(Round(Amount * (PaymentTerms."Discount %" / 100), LibraryERM.GetAmountRoundingPrecision()));
+ end;
+
+ local procedure CreateAndPostGeneralJournal(var GenJournalLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type"; Amount: Decimal; DueDate: Date)
+ begin
+ CreateGenJournalLine(
+ GenJournalLine, AccountType, AccountNo, DocumentType,
+ GenJournalLine."Bal. Account Type"::"Bank Account", LibraryERM.CreateBankAccountNo());
+ GenJournalLine.Validate("External Document No.", GenJournalLine."Document No.");
+ GenJournalLine.Validate(Amount, Amount);
+ GenJournalLine.Validate("Due Date", DueDate);
+ GenJournalLine.Modify(true);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+ end;
+
+ local procedure CreateAndPostNoApplyPaymentSlip(var PaymentHeaderNo: Code[20]; PaymentClass: Text[30]; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ CreatePaymentSlip(AccountType, AccountNo);
+ PaymentLine.SetFilter("Account Type", Format(AccountType));
+ PaymentLine.SetFilter("Account No.", AccountNo);
+ PaymentLine.FindFirst();
+ PaymentHeaderNo := PaymentLine."No.";
+ PostPaymentSlip(PaymentClass);
+ end;
+
+ local procedure CreateAndPostPurchaseInvoice(UnrealizedVATType: Option; var VendorNo: Code[20]): Code[20]
+ var
+ PurchaseHeader: Record "Purchase Header";
+ VATPostingSetup: Record "VAT Posting Setup";
+ begin
+ CreateVatPostingSetup(VATPostingSetup, UnrealizedVATType);
+ CreatePurchaseHeaderWithLine(PurchaseHeader, VATPostingSetup);
+ VendorNo := PurchaseHeader."Buy-from Vendor No.";
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ end;
+
+ local procedure CreateAndPostPurchaseInvoiceWithMixedVATPostingSetup(UnrealizedVATType: Option; var VendorNo: Code[20]): Code[20]
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ VATPostingSetup: array[2] of Record "VAT Posting Setup";
+ VATProductPostingGroup: Record "VAT Product Posting Group";
+ GLAccount: Record "G/L Account";
+ begin
+ CreateVatPostingSetup(VATPostingSetup[1], UnrealizedVATType);
+ LibraryERM.CreateVATProductPostingGroup(VATProductPostingGroup);
+ LibraryERM.CreateVATPostingSetup(VATPostingSetup[2], VATPostingSetup[1]."VAT Bus. Posting Group", VATProductPostingGroup.Code);
+ VATPostingSetup[2].Validate("Unrealized VAT Type", VATPostingSetup[2]."Unrealized VAT Type"::" ");
+ VATPostingSetup[2].Validate("Purchase VAT Account", LibraryERM.CreateGLAccountNo());
+ VATPostingSetup[2].Modify(true);
+
+ CreatePurchaseHeaderWithLine(PurchaseHeader, VATPostingSetup[1]);
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine, PurchaseHeader, PurchaseLine.Type::"G/L Account",
+ LibraryERM.CreateGLAccountWithVATPostingSetup(VATPostingSetup[2], GLAccount."Gen. Posting Type"::Purchase),
+ LibraryRandom.RandDec(10, 2));
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDecInRange(100, 200, 2));
+ PurchaseLine.Modify(true);
+ VendorNo := PurchaseHeader."Buy-from Vendor No.";
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ end;
+
+ local procedure CreateAndPostSalesInvoice(UnrealizedVATType: Option): Code[20]
+ var
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ VATPostingSetup: Record "VAT Posting Setup";
+ begin
+ CreateVatPostingSetup(VATPostingSetup, UnrealizedVATType);
+ LibrarySales.CreateSalesHeader(
+ SalesHeader, SalesHeader."Document Type"::Invoice, LibrarySales.CreateCustomerWithVATBusPostingGroup(
+ VATPostingSetup."VAT Bus. Posting Group"));
+ LibrarySales.CreateSalesLine(
+ SalesLine, SalesHeader, SalesLine.Type::Item, CreateItem(VATPostingSetup."VAT Prod. Posting Group"),
+ LibraryRandom.RandDec(10, 2)); // Use random value for Quantity.
+ SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 2)); // Use random value for Unit Price.
+ SalesLine.Modify(true);
+ LibrarySales.PostSalesDocument(SalesHeader, true, true);
+ exit(SalesHeader."Sell-to Customer No.");
+ end;
+
+ local procedure PostSalesOrderWithDimensions(var DimSetID: Integer; CustomerNo: Code[20]): Code[20]
+ var
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ DimensionValue: Record "Dimension Value";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Order, CustomerNo);
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ DimSetID := LibraryDimension.CreateDimSet(DimSetID, DimensionValue."Dimension Code", DimensionValue.Code);
+ SalesHeader.Validate("Dimension Set ID", DimSetID);
+ SalesHeader.Modify(true);
+ LibrarySales.CreateSalesLine(SalesLine, SalesHeader, SalesLine.Type::Item, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(100));
+ SalesLine.Validate("Unit Price", LibraryRandom.RandInt(100));
+ SalesLine.Modify(true);
+ exit(LibrarySales.PostSalesDocument(SalesHeader, true, true));
+ end;
+
+ local procedure PostPurchaseOrderWithDimensions(var DimSetID: Integer; VendorNo: Code[20]): Code[20]
+ var
+ PurchHeader: Record "Purchase Header";
+ PurchLine: Record "Purchase Line";
+ DimensionValue: Record "Dimension Value";
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchHeader, PurchHeader."Document Type"::Order, VendorNo);
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ DimSetID := LibraryDimension.CreateDimSet(DimSetID, DimensionValue."Dimension Code", DimensionValue.Code);
+ PurchHeader.Validate("Dimension Set ID", DimSetID);
+ PurchHeader.Modify(true);
+ LibraryPurchase.CreatePurchaseLine(PurchLine, PurchHeader, PurchLine.Type::Item, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(100));
+ PurchLine.Validate("Direct Unit Cost", LibraryRandom.RandInt(100));
+ PurchLine.Modify(true);
+ exit(LibraryPurchase.PostPurchaseDocument(PurchHeader, true, true));
+ end;
+
+ local procedure CreateCustomer(CurrencyCode: Code[10]): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ Customer.Validate("Currency Code", CurrencyCode);
+ Customer.Modify(true);
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateGeneralJournalBatch(var GenJournalBatch: Record "Gen. Journal Batch")
+ var
+ GenJournalTemplate: Record "Gen. Journal Template";
+ begin
+ GenJournalTemplate.SetRange(Type, GenJournalTemplate.Type::General);
+ LibraryERM.FindGenJournalTemplate(GenJournalTemplate);
+ LibraryERM.CreateGenJournalBatch(GenJournalBatch, GenJournalTemplate.Name);
+ end;
+
+ local procedure CreateGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type"; BalAccountType: Enum "Gen. Journal Account Type"; BalAccountNo: Code[20])
+ var
+ GenJournalBatch: Record "Gen. Journal Batch";
+ begin
+ CreateGeneralJournalBatch(GenJournalBatch);
+ LibraryERM.CreateGeneralJnlLine(
+ GenJournalLine, GenJournalBatch."Journal Template Name", GenJournalBatch.Name, DocumentType, AccountType, AccountNo,
+ LibraryRandom.RandDec(10, 2)); // Taken random Amount.
+ GenJournalLine.Validate("Bal. Account Type", BalAccountType);
+ GenJournalLine.Validate("Bal. Account No.", BalAccountNo);
+ GenJournalLine.Modify(true);
+ end;
+
+ local procedure CreateItem(VATProdPostingGroup: Code[20]): Code[20]
+ var
+ Item: Record Item;
+ begin
+ LibraryInventory.CreateItem(Item);
+ Item.Validate("VAT Prod. Posting Group", VATProdPostingGroup);
+ Item.Modify(true);
+ exit(Item."No.");
+ end;
+
+ local procedure CreatePaymentClass(Suggestions: Option): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Validate("Unrealized VAT Reversal", PaymentClass."Unrealized VAT Reversal"::Delayed);
+ PaymentClass.Validate(Suggestions, Suggestions);
+ PaymentClass.Modify(true);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR")
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Account No.", LibraryERM.CreateBankAccountNo());
+ PaymentHeader.Modify(true);
+ end;
+
+ local procedure CreatePaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify(true);
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreatePaymentSlipBySuggest(Suggestion: Option) PaymentClassCode: Text[30]
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ PaymentClassCode := CreatePaymentClass(Suggestion);
+ CreatePaymentStatus(PaymentStatus, PaymentClassCode, PaymentClassNameTxt, false); // Using False for Payment In Progress.
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+ end;
+
+ local procedure CreatePaymentSlipAndSuggestCustomerPayment(CustomerNo: Code[20]; CustomerNo2: Code[20]; DueDate: Date; SummarizePer: Option) PaymentClassCode: Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentClassCode :=
+ SetupForPaymentOnPaymentSlip(
+ GenJournalLine."Account Type"::Customer, CustomerNo, CustomerNo2,
+ LibraryRandom.RandDec(10, 2), PaymentClass.Suggestions::Customer, DueDate);
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClassCode);
+ LibraryVariableStorage.Enqueue(StrSubstNo(FilterRangeTxt, CustomerNo, CustomerNo2));
+ LibraryVariableStorage.Enqueue(SummarizePer);
+
+ // Exercise.
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ end;
+
+ local procedure CreatePaymentSlipWithDiscount(var PaymentSlip: TestPage "Payment Slip FR")
+ var
+ Customer: Record Customer;
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStatus: Record "Payment Status FR";
+ Amount: Decimal;
+ DiscountAmount: Decimal;
+ begin
+ // Setup: Create Customer, update Payment Terms, create and post Sales Invoice from Gen Journal Line.
+ Amount := LibraryRandom.RandDecInRange(100, 200, 2); // Using Random Dec In Range for Amount.
+ Customer.Get(CreateCustomer('')); // Using blank for Currency.
+ DiscountAmount := CalcPaymentTermDiscount(Customer."Payment Terms Code", false, Amount); // Using False for Calc. Pmt. Disc. on Cr. Memos field.
+ CreateAndPostGeneralJournal(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, Customer."No.", GenJournalLine."Document Type"::Invoice, Amount, WorkDate());
+ CreatePaymentStatus(PaymentStatus, CreatePaymentClass(PaymentClass.Suggestions::Customer), PaymentClassNameTxt, false); // Using False for Payment In Progress
+ LibraryVariableStorage.Enqueue(PaymentStatus."Payment Class"); // Enqueue value for PaymentClassListModalPageHandler.
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ Commit(); // Required for execute report.
+ OpenPaymentSlip(PaymentSlip, PaymentHeader."No.");
+ EnqueueValuesForHandler(Customer."No.", ''); // Enqueue for SuggestCustomerPaymentsFRRequestPageHandler.
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ EnqueueValuesForHandler(EnqueueOpt::Verification, (Amount - DiscountAmount)); // Enqueue for ApplyCustomerEntriesModalPageHandler.
+ LibraryVariableStorage.Enqueue(GenJournalLine."Document Type"::Invoice); // Enqueue for ApplyCustomerEntriesModalPageHandler.
+ end;
+
+ local procedure CreatePaymentStatus(var PaymentStatus: Record "Payment Status FR"; PaymentClass: Text[30]; Name: Text[50]; PaymentInProgress: Boolean)
+ begin
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass);
+ PaymentStatus.Validate(Name, Name);
+ PaymentStatus.Validate("Payment in Progress", PaymentInProgress);
+ PaymentStatus.Modify(true);
+ end;
+
+ local procedure CreatePaymentStatusWithOptions(var PaymentStatus: Record "Payment Status FR"; PaymentClass: Text[30]; RIB: Boolean; Look: Boolean; ReportMenu: Boolean; Amount: Boolean; Debit: Boolean; Credit: Boolean; BankAccount: Boolean; PaymentInProgress: Boolean; AcceptationCode: Boolean)
+ begin
+ CreatePaymentStatus(PaymentStatus, PaymentClass, LibraryUtility.GenerateGUID(), PaymentInProgress);
+ PaymentStatus.Validate(RIB, RIB);
+ PaymentStatus.Validate(Look, Look);
+ PaymentStatus.Validate(ReportMenu, ReportMenu);
+ PaymentStatus.Validate(Amount, Amount);
+ PaymentStatus.Validate(Debit, Debit);
+ PaymentStatus.Validate(Credit, Credit);
+ PaymentStatus.Validate("Bank Account", BankAccount);
+ PaymentStatus.Validate("Acceptation Code", AcceptationCode);
+ PaymentStatus.Modify(true);
+ end;
+
+ local procedure CreatePaymentStep(PaymentClass: Text[30]; Name: Text[50]; PreviousStatus: Integer; NextStatus: Integer; ActionType: Enum "Payment Step Action Type FR"; RealizeVAT: Boolean): Integer
+ var
+ PaymentStep: Record "Payment Step FR";
+ NoSeries: Record "No. Series";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass);
+ PaymentStep.Validate(Name, Name);
+ PaymentStep.Validate("Previous Status", PreviousStatus);
+ PaymentStep.Validate("Next Status", NextStatus);
+ PaymentStep.Validate("Action Type", ActionType);
+ PaymentStep.Validate("Source Code", CreateSourceCode());
+ PaymentStep.Validate("Header Nos. Series", NoSeries.Code);
+ PaymentStep.Validate("Realize VAT", RealizeVAT);
+ PaymentStep.Modify(true);
+ exit(PaymentStep.Line);
+ end;
+
+ local procedure CreatePaymentStepLedger(var PaymentStepLedger: Record "Payment Step Ledger FR"; PaymentClass: Text[30]; Sign: Option; AccountingType: Option; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Application: Option; LineNo: Integer)
+ begin
+ LibraryFRLocalization.CreatePaymentStepLedger(PaymentStepLedger, PaymentClass, Sign, LineNo);
+ PaymentStepLedger.Validate(Description, PaymentClass);
+ PaymentStepLedger.Validate("Accounting Type", AccountingType);
+ PaymentStepLedger.Validate("Account Type", AccountType);
+ PaymentStepLedger.Validate("Account No.", AccountNo);
+ PaymentStepLedger.Validate(Application, Application);
+ PaymentStepLedger.Modify(true);
+ end;
+
+ local procedure CreatePaymentStepLedgerWithDocumentType(var PaymentStepLedger: Record "Payment Step Ledger FR"; PaymentClass: Text[30]; Sign: Option; AccountingType: Option; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Application: Option; LineNo: Integer; DocumentType: Enum "Gen. Journal Document Type")
+ begin
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClass, Sign,
+ AccountingType, AccountType, AccountNo, Application, LineNo);
+ PaymentStepLedger.Validate("Document Type", DocumentType);
+ PaymentStepLedger.Modify(true);
+ end;
+
+ local procedure CreatePaymentSlipSetupWithDelayedVATRealize(var PaymentClassCode: Text[30]; var LineNo: array[3] of Integer)
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ PaymentClassCode := CreatePaymentClass(PaymentClass.Suggestions::Vendor);
+ LibraryVariableStorage.Enqueue(PaymentClassCode);
+ CreateSetupForPaymentSlipWithDelayedVATRealize(LineNo, PaymentClassCode);
+ CreatePaymentStepLedgerForVendorWithMemorizeVATRealize(PaymentClassCode, LineNo);
+ end;
+
+ local procedure CreatePaymentSlipWithSourceCodeAndAccountNo(SourceCode: Code[10]; AccountNo: Code[20]; PaymentClassCode: Code[30]; LineNo: Integer): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ LibraryFRLocalization.CreatePaymentSlip();
+ FindPaymentHeader(PaymentHeader, PaymentClassCode, LineNo);
+ PaymentHeader.Validate("Source Code", SourceCode);
+ PaymentHeader.Validate("Account No.", AccountNo);
+ PaymentHeader.Modify(true);
+ PostPaymentSlipHeaderNo(PaymentHeader."No.");
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreatePaymentSlipForPurchInvApplication(var PaymentHeader: Record "Payment Header FR"; Vendor: Record Vendor; Currency: Record Currency)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentClass.Get(SetupForPmtSlipAppliedToPurchInv(PaymentStepLedger."Detail Level"::Account));
+ CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Currency Code", Currency.Code);
+ PaymentHeader.Modify(true);
+
+ OpenPaymentSlip(PaymentSlip, PaymentHeader."No.");
+ EnqueueValuesForHandler(Vendor."No.", Currency.Code); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+ Commit();
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure CreateSetupForPaymentSlip(var LineNo: Integer; PaymentClass: Text[30]; PaymentInProgress: Boolean) LineNo2: Integer
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStatus2: Record "Payment Status FR";
+ PaymentStatus3: Record "Payment Status FR";
+ PaymentStatus4: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ // Hardcoded values required for Payment Class setup due to avoid Import Parameter setup through automation.
+ CreatePaymentStatus(PaymentStatus, PaymentClass, 'New Document In Creation', PaymentInProgress);
+ CreatePaymentStatus(PaymentStatus2, PaymentClass, 'Document Created', PaymentInProgress);
+ CreatePaymentStatus(PaymentStatus3, PaymentClass, 'Payment In Creation', PaymentInProgress);
+ CreatePaymentStatus(PaymentStatus4, PaymentClass, 'Payment Created', PaymentInProgress);
+
+ // Create Payment Step.
+ LineNo :=
+ CreatePaymentStep(
+ PaymentClass, 'Step1: Creation of documents', PaymentStatus.Line, PaymentStatus2.Line, PaymentStep."Action Type"::Ledger, false); // FALSE for Realize VAT.
+ CreatePaymentStep(
+ PaymentClass, 'Step2: Documents created', PaymentStatus2.Line, PaymentStatus3.Line,
+ PaymentStep."Action Type"::"Create New Document", false); // FALSE for Realize VAT.
+ LineNo2 :=
+ CreatePaymentStep(
+ PaymentClass, 'Step3: Creation of payment', PaymentStatus3.Line, PaymentStatus4.Line,
+ PaymentStep."Action Type"::Ledger, true); // TRUE for Realize VAT.
+ end;
+
+ local procedure CreateSetupForPaymentSlipWithDelayedVATRealize(var LineNo: array[3] of Integer; PaymentClass: Text[30])
+ var
+ PaymentStatus: array[5] of Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ LineNoDel: Integer;
+ begin
+ CreatePaymentStatusWithOptions(PaymentStatus[1], PaymentClass, true, true, false, false, true, false, true, false, true);
+ CreatePaymentStatusWithOptions(PaymentStatus[2], PaymentClass, true, true, true, false, true, false, true, true, true);
+ CreatePaymentStatusWithOptions(PaymentStatus[3], PaymentClass, false, false, false, false, true, false, false, false, false);
+ CreatePaymentStatusWithOptions(PaymentStatus[4], PaymentClass, true, true, true, false, true, false, true, true, false);
+ CreatePaymentStatusWithOptions(PaymentStatus[5], PaymentClass, false, false, true, false, true, false, false, false, false);
+
+ // Step1: Creation of documents
+ LineNoDel :=
+ CreatePaymentStep(
+ PaymentClass, LibraryUtility.GenerateGUID(), PaymentStatus[1].Line,
+ PaymentStatus[2].Line, PaymentStep."Action Type"::Ledger, false);
+
+ LineNo[1] :=
+ CreatePaymentStep(
+ PaymentClass, LibraryUtility.GenerateGUID(), PaymentStatus[1].Line,
+ PaymentStatus[2].Line, PaymentStep."Action Type"::Ledger, false);
+
+ PaymentStep.Get(PaymentClass, LineNoDel);
+ PaymentStep.Delete();
+
+ // Step2: Documents created
+ LineNo[2] :=
+ CreatePaymentStep(
+ PaymentClass, LibraryUtility.GenerateGUID(), PaymentStatus[2].Line, PaymentStatus[4].Line,
+ PaymentStep."Action Type"::"Create New Document", false);
+
+ // Step3: Creation of payment
+ LineNo[3] :=
+ CreatePaymentStep(
+ PaymentClass, LibraryUtility.GenerateGUID(), PaymentStatus[4].Line, PaymentStatus[5].Line,
+ PaymentStep."Action Type"::Ledger, true); // TRUE for Realize VAT.
+ end;
+
+ local procedure CreatePaymentStepLedgerForVendor(PaymentClass: Text[30]; LineNo: Integer; LineNo2: Integer)
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentStepLedger2: Record "Payment Step Ledger FR";
+ PaymentStepLedger3: Record "Payment Step Ledger FR";
+ PaymentStepLedger4: Record "Payment Step Ledger FR";
+ begin
+ // Create Payment Step Ledger for Vendor.
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClass, PaymentStepLedger.Sign::Debit, PaymentStepLedger."Accounting Type"::"Payment Line Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::"Applied Entry", LineNo); // Blank value for G/L Account No.
+ CreatePaymentStepLedger(
+ PaymentStepLedger2, PaymentClass, PaymentStepLedger.Sign::Credit, PaymentStepLedger."Accounting Type"::"Associated G/L Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::None, LineNo); // Blank value for G/L Account No.
+ CreatePaymentStepLedger(
+ PaymentStepLedger3, PaymentClass, PaymentStepLedger.Sign::Debit, PaymentStepLedger."Accounting Type"::"Setup Account",
+ PaymentStepLedger."Account Type"::"G/L Account", LibraryERM.CreateGLAccountNo(), PaymentStepLedger.Application::None, LineNo2);
+ CreatePaymentStepLedger(
+ PaymentStepLedger4, PaymentClass, PaymentStepLedger.Sign::Credit, PaymentStepLedger."Accounting Type"::"Setup Account",
+ PaymentStepLedger."Account Type"::"Bank Account", LibraryERM.CreateBankAccountNo(), PaymentStepLedger.Application::None, LineNo2);
+ end;
+
+ local procedure CreatePaymentStepLedgerForVendorWithMemorizeVATRealize(PaymentClass: Text[30]; LineNo: array[3] of Integer)
+ var
+ PaymentStepLedger: array[4] of Record "Payment Step Ledger FR";
+ begin
+ CreatePaymentStepLedgerWithDocumentType(
+ PaymentStepLedger[1], PaymentClass, PaymentStepLedger[1].Sign::Debit,
+ PaymentStepLedger[1]."Accounting Type"::"Payment Line Account", PaymentStepLedger[1]."Account Type"::"G/L Account",
+ '', PaymentStepLedger[1].Application::"Applied Entry", LineNo[1], PaymentStepLedger[1]."Document Type"::Payment);
+
+ CreatePaymentStepLedgerWithDocumentType(
+ PaymentStepLedger[2], PaymentClass, PaymentStepLedger[2].Sign::Credit,
+ PaymentStepLedger[2]."Accounting Type"::"Payment Line Account", PaymentStepLedger[2]."Account Type"::"G/L Account",
+ '', PaymentStepLedger[2].Application::None, LineNo[1], PaymentStepLedger[2]."Document Type"::" ");
+ PaymentStepLedger[2].Validate("Memorize Entry", true);
+ PaymentStepLedger[2].Modify(true);
+
+ CreatePaymentStepLedgerWithDocumentType(
+ PaymentStepLedger[3], PaymentClass, PaymentStepLedger[3].Sign::Debit,
+ PaymentStepLedger[3]."Accounting Type"::"Payment Line Account", PaymentStepLedger[3]."Account Type"::"G/L Account",
+ '', PaymentStepLedger[3].Application::"Memorized Entry", LineNo[3], PaymentStepLedger[3]."Document Type"::Payment);
+
+ CreatePaymentStepLedgerWithDocumentType(
+ PaymentStepLedger[4], PaymentClass, PaymentStepLedger[4].Sign::Credit,
+ PaymentStepLedger[4]."Accounting Type"::"Header Payment Account", PaymentStepLedger[4]."Account Type"::"G/L Account",
+ '', PaymentStepLedger[4].Application::None, LineNo[3], PaymentStepLedger[4]."Document Type"::Payment);
+ end;
+
+ local procedure CreateSourceCode(): Code[10]
+ var
+ SourceCode: Record "Source Code";
+ begin
+ LibraryERM.CreateSourceCode(SourceCode);
+ exit(SourceCode.Code);
+ end;
+
+ local procedure CreateSuggestAndPostPaymentSlip(VendorNo: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ CreatePaymentHeader(PaymentHeader);
+ Commit();
+ SuggestVendorPaymentLines(VendorNo, '', PaymentHeader);
+ PostPaymentSlipHeaderNo(PaymentHeader."No.");
+ end;
+
+ local procedure CreateVatPostingSetup(var VATPostingSetup: Record "VAT Posting Setup"; UnrealizedVATType: Option)
+ var
+ VATBusinessPostingGroup: Record "VAT Business Posting Group";
+ VATProductPostingGroup: Record "VAT Product Posting Group";
+ begin
+ LibraryERM.CreateVATBusinessPostingGroup(VATBusinessPostingGroup);
+ LibraryERM.CreateVATProductPostingGroup(VATProductPostingGroup);
+ LibraryERM.CreateVATPostingSetup(VATPostingSetup, VATBusinessPostingGroup.Code, VATProductPostingGroup.Code);
+ VATPostingSetup.Validate("VAT Calculation Type", VATPostingSetup."VAT Calculation Type"::"Normal VAT");
+ VATPostingSetup.Validate("VAT %", LibraryRandom.RandInt(10));
+ VATPostingSetup.Validate("Unrealized VAT Type", UnrealizedVATType);
+ VATPostingSetup.Validate("Purch. VAT Unreal. Account", LibraryERM.CreateGLAccountNo());
+ VATPostingSetup.Validate("Sales VAT Unreal. Account", LibraryERM.CreateGLAccountNo());
+ VATPostingSetup.Validate("Sales VAT Account", LibraryERM.CreateGLAccountNo());
+ VATPostingSetup.Validate("Purchase VAT Account", LibraryERM.CreateGLAccountNo());
+ VATPostingSetup.Modify(true);
+ end;
+
+ local procedure CreateVendor(CurrencyCode: Code[10]): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ Vendor.Validate("Currency Code", CurrencyCode);
+ Vendor.Modify(true);
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreatePaymentClassWithSetup(Suggestions: Option) PaymentClassCode: Text[30]
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStatus2: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ LineNo: Integer;
+ begin
+ PaymentClassCode := CreatePaymentClass(Suggestions);
+
+ // Hardcoded values required for Payment Class setup due to avoid Import Parameter setup through automation.
+ CreatePaymentStatus(PaymentStatus, PaymentClassCode, 'In Progress', false);
+ CreatePaymentStatus(PaymentStatus2, PaymentClassCode, 'Posted', false);
+
+ // Create Payment Step.
+ LineNo := CreatePaymentStep(
+ PaymentClassCode, 'Posting', PaymentStatus.Line, PaymentStatus2.Line, PaymentStep."Action Type"::Ledger, false);
+
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClassCode, PaymentStepLedger.Sign::Credit,
+ PaymentStepLedger."Accounting Type"::"Header Payment Account",
+ PaymentStepLedger."Account Type"::"G/L Account", LibraryERM.CreateGLAccountNo(), PaymentStepLedger.Application::None, LineNo);
+ PaymentStepLedger.Validate("Detail Level", PaymentStepLedger."Detail Level"::Account);
+ PaymentStepLedger.Modify();
+ end;
+
+ local procedure CreatePostSlipAppliedToSalesInvoice(var PaymentHeaderNo: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentSlip: TestPage "Payment Slip FR";
+ CustomerNo: Code[20];
+ begin
+ CustomerNo := CreateAndPostSalesInvoice(VATPostingSetup."Unrealized VAT Type"::" ");
+ CreatePaymentHeader(PaymentHeader);
+ PaymentHeaderNo := PaymentHeader."No.";
+
+ Commit();
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(CustomerNo, '');
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+
+ PaymentSlip.Post.Invoke();
+ end;
+
+ local procedure CreatePostSlipAppliedToPurchaseInvoice(var PaymentHeaderNo: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ PaymentSlip: TestPage "Payment Slip FR";
+ VendorNo: Code[20];
+ begin
+ CreateAndPostPurchaseInvoice(VATPostingSetup."Unrealized VAT Type"::" ", VendorNo);
+ CreatePaymentHeader(PaymentHeader);
+ PaymentHeaderNo := PaymentHeader."No.";
+
+ Commit();
+ OpenPaymentSlip(PaymentSlip, PaymentHeaderNo);
+ EnqueueValuesForHandler(VendorNo, '');
+ PaymentSlip.SuggestVendorPayments.Invoke();
+
+ PaymentSlip.Post.Invoke();
+ end;
+
+ local procedure CreatePurchaseHeaderWithLine(var PurchaseHeader: Record "Purchase Header"; VATPostingSetup: Record "VAT Posting Setup")
+ var
+ PurchaseLine: Record "Purchase Line";
+ GLAccount: Record "G/L Account";
+ begin
+ LibraryPurchase.CreatePurchHeader(
+ PurchaseHeader, PurchaseHeader."Document Type"::Invoice, LibraryPurchase.CreateVendorWithVATBusPostingGroup(
+ VATPostingSetup."VAT Bus. Posting Group"));
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine, PurchaseHeader, PurchaseLine.Type::"G/L Account",
+ LibraryERM.CreateGLAccountWithVATPostingSetup(VATPostingSetup, GLAccount."Gen. Posting Type"::Purchase),
+ LibraryRandom.RandDec(10, 2));
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDecInRange(100, 200, 2));
+ PurchaseLine.Modify(true);
+ end;
+
+ local procedure CreateVendorPaymentSlip(VendorNo: array[2] of Code[20]; SummarizePer: Option " ",Vendor,"Due date")
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ SuggestionsOption: Option "None",Customer,Vendor;
+ begin
+ CreatePaymentSlipBySuggest(SuggestionsOption::Vendor);
+ OpenPaymentSlip(PaymentSlip, '');
+
+ EnqueueValuesForHandler(StrSubstNo('%1|%2', VendorNo[1], VendorNo[2]), SummarizePer);
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure CreateCustomerPaymentSlip(CustomerNo: array[2] of Code[20]; SummarizePer: Option " ",Customer,"Due date")
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ SuggestionsOption: Option "None",Customer,Vendor;
+ begin
+ CreatePaymentSlipBySuggest(SuggestionsOption::Customer);
+ OpenPaymentSlip(PaymentSlip, '');
+
+ EnqueueValuesForHandler(StrSubstNo('%1|%2', CustomerNo[1], CustomerNo[2]), SummarizePer);
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ end;
+
+ local procedure CreateCustomerWithDefaultDimensionsPostSalesOrder(var CustomerNo: Code[20]; var DimensionValue: Record "Dimension Value")
+ var
+ DefaultDimension: Record "Default Dimension";
+ begin
+ CustomerNo := LibrarySales.CreateCustomerNo();
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ LibraryDimension.CreateDefaultDimensionCustomer(DefaultDimension, CustomerNo, DimensionValue."Dimension Code", DimensionValue.Code);
+ PostSalesOrder(CustomerNo);
+ end;
+
+ local procedure CreateVendorWithDefaultDimensionsPostPurchaseOrder(var VendorNo: Code[20]; var DimensionValue: Record "Dimension Value")
+ var
+ DefaultDimension: Record "Default Dimension";
+ begin
+ VendorNo := LibraryPurchase.CreateVendorNo();
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ LibraryDimension.CreateDefaultDimensionVendor(DefaultDimension, VendorNo, DimensionValue."Dimension Code", DimensionValue.Code);
+ PostPurchaseOrder(VendorNo);
+ end;
+
+ local procedure CreateCurrencyWithDifferentExchangeRate(var Currency: Record Currency; var PostingDate: Date; var RateFactorY: Decimal)
+ var
+ RateFactorX: Decimal;
+ begin
+ PostingDate := WorkDate() - 1;
+ LibraryERM.CreateCurrency(Currency);
+ RateFactorX := LibraryRandom.RandDecInDecimalRange(1, 5, 2);
+ RateFactorY := LibraryRandom.RandDecInDecimalRange(6, 10, 2);
+ LibraryERM.CreateExchangeRate(Currency.Code, PostingDate, RateFactorX, RateFactorX);
+ LibraryERM.CreateExchangeRate(Currency.Code, WorkDate(), RateFactorY, RateFactorY);
+ end;
+
+ local procedure CreatePaymentSlipWithCurrency(var PaymentHeader: Record "Payment Header FR"; Vendor: Record Vendor; Currency: Record Currency)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentClass.Get(
+ SetupForPaymentSlipPost(
+ PaymentStepLedger."Detail Level"::Account, PaymentClass.Suggestions::Vendor)); // Enqueue value for PaymentClassListModalPageHandler.
+ CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Currency Code", Currency.Code);
+ PaymentHeader.Modify(true);
+
+ OpenPaymentSlip(PaymentSlip, PaymentHeader."No.");
+ EnqueueValuesForHandler(Vendor."No.", Currency.Code); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+ Commit(); // Required for execute report.
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure CreatePurchaseInvoiceWithCurrencyAndPost(var Vendor: Record Vendor; Currency: Record Currency; PostingDate: Date): Code[20]
+ var
+ VATPostingSetup: Record "VAT Posting Setup";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ VendorPostingGroup: Record "Vendor Posting Group";
+ GLAccount: Record "G/L Account";
+ VATBusinessPostingGroup: Record "VAT Business Posting Group";
+ Item: Record Item;
+ begin
+ LibraryERM.CreateVATBusinessPostingGroup(VATBusinessPostingGroup);
+ Vendor.Get(LibraryPurchase.CreateVendorWithVATBusPostingGroup(VATBusinessPostingGroup.Code));
+
+ LibraryInventory.CreateItem(Item);
+ LibraryERM.CreateVATPostingSetup(VATPostingSetup, Vendor."VAT Bus. Posting Group", Item."VAT Prod. Posting Group");
+
+ VendorPostingGroup.Get(Vendor."Vendor Posting Group");
+ GLAccount.Get(VendorPostingGroup."Invoice Rounding Account");
+ LibraryERM.CreateVATPostingSetup(VATPostingSetup, Vendor."VAT Bus. Posting Group", GLAccount."VAT Prod. Posting Group");
+ VATPostingSetup."Purchase VAT Account" := LibraryERM.CreateGLAccountNo();
+ VATPostingSetup.Modify();
+
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, Vendor."No.");
+ PurchaseHeader.Validate("Posting Date", PostingDate);
+ PurchaseHeader.Validate("Currency Code", Currency.Code);
+ PurchaseHeader.Modify(true);
+
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, Item."No.",
+ LibraryRandom.RandDec(10, 2)); // Use random value for Quantity.
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDecInRange(100, 200, 2)); // Use random value for Unit Price.
+ PurchaseLine.Modify(true);
+
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ end;
+
+ local procedure EnqueueValuesForHandler(Value: Variant; Value2: Variant)
+ begin
+ LibraryVariableStorage.Enqueue(Value);
+ LibraryVariableStorage.Enqueue(Value2);
+ end;
+
+ local procedure FindAndDeletePaymentLine(No: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", No);
+ PaymentLine.FindFirst();
+ PaymentLine.Delete(true);
+ end;
+
+ local procedure VerifyVATEntryBaseAndAmount(PaymentHeaderNo: Code[20]; BaseValue: Decimal; AmountValue: Decimal)
+ var
+ VATEntry: Record "VAT Entry";
+ begin
+ FindVATEntry(VATEntry, PaymentHeaderNo);
+ VATEntry.TestField(Base, BaseValue);
+ VATEntry.TestField(Amount, AmountValue);
+ end;
+
+ local procedure VerifyVendorLedgerEntriesClosed(VendorNo: Code[20]; "Count": Integer)
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ begin
+ VendorLedgerEntry.Init();
+ VendorLedgerEntry.SetRange("Vendor No.", VendorNo);
+ VendorLedgerEntry.SetRange(Open, false);
+ Assert.RecordCount(VendorLedgerEntry, Count);
+ end;
+
+ [PageHandler]
+ procedure PaymentSlipPageCloseHandler(var PaymentSlip: TestPage "Payment Slip FR")
+ begin
+ PaymentSlip.Close();
+ end;
+
+ local procedure PaymentSlipApplication(PaymentSlip: TestPage "Payment Slip FR")
+ begin
+ PaymentSlip.Lines.First();
+ PaymentSlip.Lines.Application.Invoke();
+ end;
+
+ local procedure PostGenJournalAndCreatePaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Suggestions: Option; Amount: Decimal): Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ CreateAndPostGeneralJournal(GenJournalLine, AccountType, AccountNo, GenJournalLine."Document Type"::Invoice, Amount, WorkDate());
+ CreateAndPostGeneralJournal(
+ GenJournalLine, AccountType, AccountNo, GenJournalLine."Document Type"::"Credit Memo", -Amount / 2, WorkDate()); // Required less amount to invoice.
+ PaymentClass.Get(CreatePaymentClass(Suggestions));
+ CreatePaymentStatus(PaymentStatus, PaymentClass.Code, PaymentClassNameTxt, false); // Using False for Payment In Progress.
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure PostPaymentSlip(PaymentClass: Text[30])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClass);
+ PaymentSlip.Post.Invoke(); // Invoke ConfirmHandlerTrue.
+ end;
+
+ local procedure PostPaymentSlipHeaderNo(HeaderNo: Code[20])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.GotoKey(HeaderNo);
+ PaymentSlip.Post.Invoke();
+ end;
+
+ local procedure PostPaymentSlipAndVerifyLedgers(PaymentHeader: Record "Payment Header FR"; NoOfRecord: Integer)
+ begin
+ // Exercise.
+ PostPaymentSlipHeaderNo(PaymentHeader."No.");
+ // Verify: Verify Debit Amount on Bank Account Ledger and General Ledger and number of records.
+ PaymentHeader.CalcFields("Amount (LCY)");
+ VerifyBankAccountLedgerEntry(PaymentHeader, NoOfRecord);
+ VerifyGenLedgerEntry(PaymentHeader, NoOfRecord);
+ end;
+
+ local procedure PostSalesOrder(CustomerNo: Code[20]): Code[20]
+ var
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Order, CustomerNo);
+ LibrarySales.CreateSalesLine(SalesLine, SalesHeader, SalesLine.Type::Item, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(100));
+ SalesLine.Validate("Unit Price", LibraryRandom.RandInt(100));
+ SalesLine.Modify(true);
+ exit(LibrarySales.PostSalesDocument(SalesHeader, true, true));
+ end;
+
+ local procedure PostPurchaseOrder(VendorNo: Code[20]): Code[20]
+ var
+ PurchHeader: Record "Purchase Header";
+ PurchLine: Record "Purchase Line";
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchHeader, PurchHeader."Document Type"::Order, VendorNo);
+ LibraryPurchase.CreatePurchaseLine(PurchLine, PurchHeader, PurchLine.Type::Item, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(100));
+ PurchLine.Validate("Direct Unit Cost", LibraryRandom.RandInt(100));
+ PurchLine.Modify(true);
+ exit(LibraryPurchase.PostPurchaseDocument(PurchHeader, true, true));
+ end;
+
+ local procedure SetupForPaymentSlipPost(DetailLevel: Option; Suggestions: Option): Text[30]
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStatus2: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentStepLedger2: Record "Payment Step Ledger FR";
+ PaymentClass: Text[30];
+ LineNo: Integer;
+ begin
+ PaymentClass := CreatePaymentClass(Suggestions);
+ CreatePaymentStatus(PaymentStatus, PaymentClass, PaymentClassNameTxt, false); // Using False for Payment In Progress.
+ CreatePaymentStatus(PaymentStatus2, PaymentClass, 'Post', false); // Using False for Payment In Progress.
+ LineNo :=
+ CreatePaymentStep(PaymentClass, 'Step1: Post', PaymentStatus.Line, PaymentStatus2.Line, PaymentStep."Action Type"::Ledger, false); // FALSE for Realize VAT.
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClass, PaymentStepLedger.Sign::Debit, PaymentStepLedger."Accounting Type"::"Header Payment Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::None, LineNo); // Blank value for G/L Account No.
+ PaymentStepLedger.Validate("Detail Level", DetailLevel);
+ PaymentStepLedger.Modify(true);
+ CreatePaymentStepLedger(
+ PaymentStepLedger2, PaymentClass, PaymentStepLedger2.Sign::Credit, PaymentStepLedger2."Accounting Type"::"Payment Line Account",
+ PaymentStepLedger2."Account Type"::"G/L Account", '', PaymentStepLedger2.Application::"Applied Entry", LineNo); // Blank value for G/L Account No.
+ LibraryVariableStorage.Enqueue(PaymentClass);
+ exit(PaymentClass);
+ end;
+
+ local procedure SetupForPmtSlipAppliedToPurchInv(DetailLevel: Option): Text[30]
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStatus2: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentStepLedger2: Record "Payment Step Ledger FR";
+ DummyPaymentClass: Record "Payment Class FR";
+ PaymentClass: Text[30];
+ LineNo: Integer;
+ begin
+ PaymentClass := CreatePaymentClass(DummyPaymentClass.Suggestions::Vendor);
+ CreatePaymentStatus(PaymentStatus, PaymentClass, PaymentClassNameTxt, false);
+ CreatePaymentStatus(PaymentStatus2, PaymentClass, LibraryUtility.GenerateGUID(), false);
+ LineNo :=
+ CreatePaymentStep(PaymentClass, LibraryUtility.GenerateGUID(),
+ PaymentStatus.Line, PaymentStatus2.Line, PaymentStep."Action Type"::Ledger, false);
+ CreatePaymentStepLedger(
+ PaymentStepLedger2, PaymentClass, PaymentStepLedger2.Sign::Debit, PaymentStepLedger2."Accounting Type"::"Payment Line Account",
+ PaymentStepLedger2."Account Type"::"G/L Account", '', PaymentStepLedger2.Application::"Applied Entry", LineNo);
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClass, PaymentStepLedger.Sign::Credit, PaymentStepLedger."Accounting Type"::"Header Payment Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::None, LineNo);
+ PaymentStepLedger.Validate("Detail Level", DetailLevel);
+ PaymentStepLedger.Modify(true);
+ LibraryVariableStorage.Enqueue(PaymentClass);
+ exit(PaymentClass);
+ end;
+
+ local procedure SetupForPaymentOnPaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; AccountNo2: Code[20]; Amount: Decimal; Suggestion: Option; DueDate: Date) PaymentClassCode: Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ CreateAndPostGeneralJournal(GenJournalLine, AccountType, AccountNo, GenJournalLine."Document Type"::Invoice, Amount, DueDate);
+ CreateAndPostGeneralJournal(GenJournalLine, AccountType, AccountNo2, GenJournalLine."Document Type"::Invoice, Amount, WorkDate());
+ PaymentClassCode := CreatePaymentSlipBySuggest(Suggestion);
+ end;
+
+ local procedure SuggestCustomerPaymentLines(Value: Variant; Value2: Variant; PaymentHeader: Record "Payment Header FR")
+ var
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ begin
+ EnqueueValuesForHandler(Value, Value2);
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+ SuggestCustomerPayments.RunModal();
+ end;
+
+ local procedure SuggestVendorPaymentLines(Value: Variant; Value2: Variant; PaymentHeader: Record "Payment Header FR")
+ var
+ SuggestVendorPaymentsFR: Report "Suggest Vend. Payments";
+ begin
+ EnqueueValuesForHandler(Value, Value2);
+ SuggestVendorPaymentsFR.SetGenPayLine(PaymentHeader);
+ SuggestVendorPaymentsFR.RunModal();
+ end;
+
+ local procedure OpenPaymentSlip(var PaymentSlip: TestPage "Payment Slip FR"; No: Text[50])
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("No.", No);
+ end;
+
+ local procedure UpdateUnrealizedVATGeneralLedgerSetup()
+ var
+ GeneralLedgerSetup: Record "General Ledger Setup";
+ begin
+ GeneralLedgerSetup.Get();
+ GeneralLedgerSetup.Validate("Unrealized VAT", true);
+ GeneralLedgerSetup.Modify(true);
+ end;
+
+ local procedure UpdatePaymentStepLedgerMemorizeEntry(PaymentClassCode: Text[30]; MemorizeEntry: Boolean)
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ PaymentStepLedger.SetRange("Payment Class", PaymentClassCode);
+ PaymentStepLedger.ModifyAll("Memorize Entry", MemorizeEntry);
+ end;
+
+ local procedure VerifyBankAccountLedgerEntry(PaymentHeader: Record "Payment Header FR"; NoOfRecord: Integer)
+ var
+ BankAccountLedgerEntry: Record "Bank Account Ledger Entry";
+ BankAmount: Decimal;
+ begin
+ BankAccountLedgerEntry.SetRange("Document No.", PaymentHeader."No.");
+ BankAccountLedgerEntry.FindSet();
+ repeat
+ BankAmount += BankAccountLedgerEntry."Debit Amount";
+ until BankAccountLedgerEntry.Next() = 0;
+ Assert.AreEqual(Abs(PaymentHeader."Amount (LCY)"), BankAmount, UnexpectedErr);
+ Assert.AreEqual(BankAccountLedgerEntry.Count, NoOfRecord, UnexpectedErr);
+ end;
+
+ local procedure VerifyGenLedgerEntry(PaymentHeader: Record "Payment Header FR"; NoOfRecord: Integer)
+ var
+ GLEntry: Record "G/L Entry";
+ GLAmount: Decimal;
+ begin
+ GLEntry.SetRange("Document No.", PaymentHeader."No.");
+ GLEntry.SetFilter("Debit Amount", '<>%1', 0);
+ GLEntry.FindSet();
+ repeat
+ GLAmount += GLEntry."Debit Amount";
+ until GLEntry.Next() = 0;
+ Assert.AreEqual(Abs(PaymentHeader."Amount (LCY)"), GLAmount, UnexpectedErr);
+ Assert.AreEqual(GLEntry.Count, NoOfRecord, UnexpectedErr);
+ end;
+
+ local procedure ClearPaymentSlipData()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentClass.DeleteAll();
+ PaymentHeader.DeleteAll();
+ PaymentLine.DeleteAll();
+ end;
+
+ local procedure CreatePaymentOfLinesFromPostedPaymentSlip(var PaymentClassCode: Text[30]; var LineNo: Integer)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::None));
+ PaymentClassCode := PaymentClass.Code;
+ CreateSetupForPaymentSlip(LineNo, PaymentClassCode, false);
+
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ CreatePaymentSlip(PaymentLine."Account Type"::Customer, CreateCustomer(''));
+ PostPaymentSlip(PaymentClassCode);
+
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentSlipRemovePageHandler
+ LibraryVariableStorage.Enqueue(LineNo); // Enqueue value for PaymentSlipRemovePageHandler
+ LibraryFRLocalization.CreatePaymentSlip();
+ end;
+
+ local procedure CreatePaymentSlipWithCustomerPayments(CustomerNo: Code[20]; PaymentClassCode: Text[30])
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ SetupPaymentSlip(PaymentClassCode, PaymentLine."Account Type"::Customer, CustomerNo);
+
+ Commit();
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClassCode);
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ end;
+
+ local procedure CreatePaymentSlipWithVendorPayments(VendorNo: Code[20]; PaymentClassCode: Text[30])
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ SetupPaymentSlip(PaymentClassCode, PaymentLine."Account Type"::Vendor, VendorNo);
+
+ Commit();
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClassCode);
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure SetPaymentHeaderBankAccountNo(PaymentClassCode: Text[30])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ PaymentHeader.SetRange("Payment Class", PaymentClassCode);
+ PaymentHeader.FindFirst();
+ PaymentHeader.Validate("Account No.", LibraryERM.CreateBankAccountNo());
+ PaymentHeader.Modify();
+ end;
+
+ local procedure SetupPaymentSlip(PaymentClassCode: Text[30]; AccountType: Enum "Gen. Journal Account Type"; CustomerVendorNo: Code[20])
+ begin
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ CreatePaymentSlip(AccountType, CustomerVendorNo);
+
+ SetPaymentHeaderBankAccountNo(PaymentClassCode);
+
+ LibraryVariableStorage.Enqueue(CustomerVendorNo);
+ LibraryVariableStorage.Enqueue(false);
+ end;
+
+ local procedure FindPaymentStep(var PaymentStep: Record "Payment Step FR"; PaymentClass: Text[30]; LineNo: Integer)
+ begin
+ PaymentStep.SetRange("Payment Class", PaymentClass);
+ PaymentStep.SetRange("Previous Status", LineNo);
+ PaymentStep.FindFirst();
+ end;
+
+ local procedure FindPaymentHeader(var PaymentHeader: Record "Payment Header FR"; PaymentClass: Text[30]; LineNo: Integer)
+ begin
+ PaymentHeader.SetRange("Payment Class", PaymentClass);
+ PaymentHeader.SetRange("Status No.", LineNo);
+ PaymentHeader.FindFirst();
+ end;
+
+ local procedure FindPaymentLine(var PaymentLine: Record "Payment Line FR"; PaymentClass: Text[30]; LineNo: Integer)
+ begin
+ PaymentLine.SetRange("Payment Class", PaymentClass);
+ if LineNo <> 0 then
+ PaymentLine.SetRange("Status No.", LineNo);
+ PaymentLine.FindFirst();
+ end;
+
+ local procedure FindVATEntry(var VATEntry: Record "VAT Entry"; DocumentNo: Code[20])
+ begin
+ VATEntry.SetRange("Document No.", DocumentNo);
+ VATEntry.FindFirst();
+ end;
+
+ local procedure GetLastDebitGLEntryNo(PaymentHeaderNo: Code[20]): Integer
+ var
+ GLEntry: Record "G/L Entry";
+ begin
+ GLEntry.SetRange("Document No.", PaymentHeaderNo);
+ GLEntry.SetRange("Credit Amount", 0);
+ GLEntry.FindLast();
+ exit(GLEntry."Entry No.");
+ end;
+
+ local procedure GetLastCreditGLEntryNo(PaymentHeaderNo: Code[20]): Integer
+ var
+ GLEntry: Record "G/L Entry";
+ begin
+ GLEntry.SetRange("Document No.", PaymentHeaderNo);
+ GLEntry.SetRange("Debit Amount", 0);
+ GLEntry.FindLast();
+ exit(GLEntry."Entry No.");
+ end;
+
+ local procedure VerifyCopyLinkInPaymentLine(PaymentClass: Text[30]; LineNo: Integer)
+ var
+ SourcePaymentLine: Record "Payment Line FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ FindPaymentLine(SourcePaymentLine, PaymentClass, LineNo);
+
+ Assert.IsTrue(
+ PaymentLine.Get(SourcePaymentLine."Copied To No.", SourcePaymentLine."Copied To Line"),
+ StrSubstNo(PaymentLineIsNotCopiedErr, SourcePaymentLine."No."));
+ Assert.IsTrue(
+ PaymentLine.IsCopy,
+ StrSubstNo(ValueIsIncorrectErr, PaymentLine.IsCopy, SourcePaymentLine.FieldCaption(IsCopy)));
+ Assert.AreEqual(
+ SourcePaymentLine."Account Type", PaymentLine."Account Type",
+ StrSubstNo(ValueIsIncorrectErr, PaymentLine."Account Type", SourcePaymentLine.FieldCaption("Account Type")));
+ Assert.AreEqual(
+ SourcePaymentLine."Account No.", PaymentLine."Account No.",
+ StrSubstNo(ValueIsIncorrectErr, PaymentLine."Account No.", SourcePaymentLine.FieldCaption("Account No.")));
+ end;
+
+ local procedure VerifyPostingError(PaymentClassCode: Text[30])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentManagement: Codeunit "Payment Management FR";
+ begin
+ PaymentStep.SetRange("Payment Class", PaymentClassCode);
+ PaymentStep.FindLast();
+ PaymentStep.SetRecFilter();
+
+ PaymentHeader.SetRange("Payment Class", PaymentClassCode);
+ PaymentHeader.FindFirst();
+
+ asserterror PaymentManagement.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+ Assert.ExpectedError(StepLedgerGetErr);
+
+ Clear(PaymentManagement);
+ asserterror PaymentManagement.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+ Assert.ExpectedError(StepLedgerGetErr);
+ end;
+
+ local procedure VerifyPaymentLineDebitCreditGLNo(PaymentHeaderNo: Code[20]; PaymentClassCode: Text[30])
+ var
+ PaymentLine: Record "Payment Line FR";
+ LastDebitGLEntryNo: Integer;
+ LastCreditGLEntryNo: Integer;
+ begin
+ LastDebitGLEntryNo := GetLastDebitGLEntryNo(PaymentHeaderNo);
+ LastCreditGLEntryNo := GetLastCreditGLEntryNo(PaymentHeaderNo);
+ FindPaymentLine(PaymentLine, PaymentClassCode, 0);
+ Assert.AreEqual(LastDebitGLEntryNo, PaymentLine."Entry No. Debit", PaymentLine.FieldCaption("Entry No. Debit"));
+ Assert.AreEqual(LastDebitGLEntryNo, PaymentLine."Entry No. Debit Memo", PaymentLine.FieldCaption("Entry No. Debit Memo"));
+ Assert.AreEqual(LastCreditGLEntryNo, PaymentLine."Entry No. Credit", PaymentLine.FieldCaption("Entry No. Credit"));
+ Assert.AreEqual(LastCreditGLEntryNo, PaymentLine."Entry No. Credit Memo", PaymentLine.FieldCaption("Entry No. Credit Memo"));
+ end;
+
+ local procedure VerifyPaymentLineDimSetID(DimSetID: Integer; AppliestoDocNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("Applies-to Doc. No.", AppliestoDocNo);
+ PaymentLine.FindFirst();
+ PaymentLine.TestField("Dimension Set ID", DimSetID);
+ end;
+
+ local procedure VerifyRealizedVAT(PurchInvHeaderNo: Code[20]; PaymentHeaderNo: Code[20])
+ var
+ VATEntryInvoice: Record "VAT Entry";
+ begin
+ FindVATEntry(VATEntryInvoice, PurchInvHeaderNo);
+ VATEntryInvoice.TestField("Remaining Unrealized Amount", 0);
+ VATEntryInvoice.TestField("Remaining Unrealized Base", 0);
+ VATEntryInvoice.Next();
+ VATEntryInvoice.TestField("Remaining Unrealized Amount", 0);
+ VATEntryInvoice.TestField("Remaining Unrealized Base", 0);
+
+ VerifyVATEntryBaseAndAmount(
+ PaymentHeaderNo, VATEntryInvoice."Unrealized Base", VATEntryInvoice."Unrealized Amount");
+ end;
+
+ local procedure VerifyPaymentLineDimensionValue(AccountType: Option; AccountNo: Code[20]; DimensionValue: Record "Dimension Value")
+ var
+ PaymentLine: Record "Payment Line FR";
+ TempDimSetEntry: Record "Dimension Set Entry" temporary;
+ DimensionManagement: Codeunit DimensionManagement;
+ begin
+ PaymentLine.SetRange("Account Type", AccountType);
+ PaymentLine.SetRange("Account No.", AccountNo);
+ PaymentLine.FindFirst();
+ DimensionManagement.GetDimensionSet(TempDimSetEntry, PaymentLine."Dimension Set ID");
+ TempDimSetEntry.SetRange("Dimension Code", DimensionValue."Dimension Code");
+ TempDimSetEntry.SetRange("Dimension Value Code", DimensionValue.Code);
+ Assert.RecordIsNotEmpty(TempDimSetEntry);
+ end;
+
+ local procedure VerifyPaymentLineCurrencyFactor(var PaymentHeader: Record "Payment Header FR"; RateFactor: Decimal)
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+ PaymentLine.TestField("Currency Factor", RateFactor);
+ end;
+
+ local procedure VerifyLastNoUsedInNoSeries(NoSeriesCode: Code[20]; LastNoUsed: Code[20])
+ var
+ NoSeriesLine: Record "No. Series Line";
+ begin
+ NoSeriesLine.SetRange("Series Code", NoSeriesCode);
+ NoSeriesLine.FindFirst();
+ NoSeriesLine.TestField("Last No. Used", LastNoUsed);
+ end;
+
+ local procedure CreatePaymentClassWithNoSeries(var PaymentClass: Record "Payment Class FR")
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate("Header No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Validate("Line No. Series", LibraryERM.CreateNoSeriesCode());
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Vendor);
+ PaymentClass.Validate("Unrealized VAT Reversal", PaymentClass."Unrealized VAT Reversal"::Application);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Credit Transfer");
+ PaymentClass.Modify(true);
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyCustomerEntriesModalPageHandler(var ApplyCustomerEntries: TestPage "Apply Customer Entries")
+ var
+ AppliedAmount: Variant;
+ DocumentType: Variant;
+ OptionValue: Variant;
+ OptionString: Option " ",Application,Verification;
+ EnqueueOption: Option;
+ begin
+ LibraryVariableStorage.Dequeue(OptionValue);
+ EnqueueOption := OptionValue;
+ case EnqueueOption of
+ OptionString::Application:
+ ApplyCustomerEntries."Set Applies-to ID".Invoke();
+ OptionString::Verification:
+ begin
+ LibraryVariableStorage.Dequeue(AppliedAmount);
+ LibraryVariableStorage.Dequeue(DocumentType);
+ ApplyCustomerEntries.AppliedAmount.AssertEquals(AppliedAmount); // Applied Amount
+ ApplyCustomerEntries."Document Type".AssertEquals(DocumentType);
+ end;
+ end;
+ ApplyCustomerEntries.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyVendorEntriesModalPageHandler(var ApplyVendorEntries: TestPage "Apply Vendor Entries")
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ AppliedAmount: Variant;
+ OptionValue: Variant;
+ OptionString: Option " ",Application,Verification;
+ EnqueueOption: Option;
+ begin
+ LibraryVariableStorage.Dequeue(OptionValue);
+ EnqueueOption := OptionValue;
+ case EnqueueOption of
+ OptionString::Application:
+ ApplyVendorEntries.ActionSetAppliesToID.Invoke();
+ OptionString::Verification:
+ begin
+ LibraryVariableStorage.Dequeue(AppliedAmount);
+ ApplyVendorEntries.AppliedAmount.AssertEquals(AppliedAmount); // Applied Amount
+ ApplyVendorEntries.Last();
+ ApplyVendorEntries."Document Type".AssertEquals(Format(VendorLedgerEntry."Document Type"::"Credit Memo"));
+ end;
+ end;
+ ApplyVendorEntries.OK().Invoke();
+ end;
+
+ local procedure FindNoSeriesLine(var NoSeriesLine: Record "No. Series Line"; NoSeriesCode: Code[20])
+ begin
+ NoSeriesLine.SetRange("Series Code", NoSeriesCode);
+ NoSeriesLine.FindFirst();
+ end;
+
+ local procedure FindPaymentLine(var PaymentSlipSubform: TestPage "Payment Slip Subform FR"; PaymentHeaderNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+ PaymentSlipSubform.OpenEdit();
+ PaymentSlipSubform.GotoRecord(PaymentLine);
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyVendorEntriesModalPageHandlerWithCancel(var ApplyVendorEntries: TestPage "Apply Vendor Entries")
+ var
+ OptionValue: Variant;
+ OptionString: Option " ",Application,Verification;
+ EnqueueOption: Option;
+ begin
+ LibraryVariableStorage.Dequeue(OptionValue);
+ EnqueueOption := OptionValue;
+ case EnqueueOption of
+ OptionString::Application:
+ begin
+ ApplyVendorEntries.ActionSetAppliesToID.Invoke();
+ ApplyVendorEntries.OK().Invoke();
+ end;
+ OptionString::" ":
+ ApplyVendorEntries.Cancel().Invoke();
+ end;
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListModalPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ "Code": Variant;
+ begin
+ LibraryVariableStorage.Dequeue(Code);
+ PaymentClassList.FILTER.SetFilter(Code, Code);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentLinesListModalPageHandler(var PaymentLinesList: TestPage "Payment Lines List FR")
+ begin
+ PaymentLinesList.OK().Invoke(); // Invokes PaymentSlipPageHandler.
+ end;
+
+ [StrMenuHandler]
+ procedure CreatePaymentSlipStrMenuHandler(Option: Text[1024]; var Choice: Integer; Instruction: Text[1024])
+ begin
+ Choice := 1; // Invokes PaymentLinesListModalPageHandler.
+ end;
+
+ [RequestPageHandler]
+ procedure GLCustLedgerReconciliationRequestPageHandler(var GLCustLedgerReconciliation: TestRequestPage "GL/Cust Ledger Reconciliation")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ GLCustLedgerReconciliation.Customer.SetFilter("No.", No);
+ GLCustLedgerReconciliation.Customer.SetFilter("Date Filter", Format(WorkDate()));
+ GLCustLedgerReconciliation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure GLVendLedgerReconciliationRequestPageHandler(var GLVendLedgerReconciliation: TestRequestPage "GL/Vend Ledger Reconciliation")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ GLVendLedgerReconciliation.Vendor.SetFilter("No.", No);
+ GLVendLedgerReconciliation.Vendor.SetFilter("Date Filter", Format(WorkDate()));
+ GLVendLedgerReconciliation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustomerPaymentsRequestPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ var
+ CurrencyFilter: Variant;
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(CurrencyFilter);
+ SuggestCustomerPayments.Customer.SetFilter("No.", No);
+ SuggestCustomerPayments.LastPaymentDate.SetValue(CalcDate('<1M>', WorkDate())); // Required month end date.
+ SuggestCustomerPayments.Currency_Filter.SetValue(CurrencyFilter);
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustomerPaymentsSummarizedRequestPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ var
+ No: Variant;
+ SummarizePer: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(SummarizePer);
+ SuggestCustomerPayments.LastPaymentDate.SetValue(WorkDate());
+ SuggestCustomerPayments.Summarize_Per.SetValue(SummarizePer);
+ SuggestCustomerPayments.Customer.SetFilter("No.", No);
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPaymentsFRRequestPageHandler(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ CurrencyFilter: Variant;
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(CurrencyFilter);
+ SuggestVendorPaymentsFR.Vendor.SetFilter("No.", No);
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(CalcDate('<1M>', WorkDate())); // Required month end date.
+ SuggestVendorPaymentsFR.Currency_Filter.SetValue(CurrencyFilter);
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [PageHandler]
+ procedure PaymentSlipPageHandler(var PaymentSlip: TestPage "Payment Slip FR")
+ begin
+ PaymentSlip.Post.Invoke(); // Invokes ConfirmHandlerTrue.
+ end;
+
+ [PageHandler]
+ procedure PaymentSlipRemovePageHandler(var PaymentSlip: TestPage "Payment Slip FR")
+ var
+ PaymentClass: Variant;
+ LineNo: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(PaymentClass);
+ LibraryVariableStorage.Dequeue(LineNo);
+ VerifyCopyLinkInPaymentLine(PaymentClass, LineNo);
+
+ PaymentSlip.Lines.Remove.Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPaymentsFRSummarizedRequestPageHandler(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ No: Variant;
+ SummarizePer: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(SummarizePer);
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(WorkDate());
+ SuggestVendorPaymentsFR.Summarize_Per.SetValue(SummarizePer);
+ SuggestVendorPaymentsFR.Vendor.SetFilter("No.", No);
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPaymentsFRSummarizedRequestPageHandlerVendor(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(WorkDate());
+ SuggestVendorPaymentsFR.Summarize_Per.SetValue(SummarizePer::Vendor);
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPmtsFRRequestPageHandler(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(WorkDate());
+ SuggestVendorPaymentsFR.Summarize_Per.SetValue(SummarizePer::Vendor);
+ SuggestVendorPaymentsFR.Vendor.SetFilter("No.", LibraryVariableStorage.DequeueText());
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandlerTrue(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagementII.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagementII.Codeunit.al
new file mode 100644
index 0000000000..3ff386f660
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentManagementII.Codeunit.al
@@ -0,0 +1,1056 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.VAT.Ledger;
+using Microsoft.Finance.VAT.Setup;
+using Microsoft.Foundation.AuditCodes;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Inventory.Item;
+using Microsoft.Purchases.Document;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Setup;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Document;
+using Microsoft.Sales.Receivables;
+using Microsoft.Sales.Setup;
+using System.TestLibraries.Utilities;
+
+codeunit 144017 "ERM Payment Management II"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ // [FEATURE] [Payment Slip]
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ FilterRangeTxt: Label '%1..%2', Comment = '%1 = No., %2 = No.';
+ PaymentClassNameTxt: Label 'Suggest Payments';
+ FieldEnableMsg: Label 'Field must not be enabled';
+ DocumentCreatedCapLbl: Label 'Document Created';
+ HeaderTxt: Label 'A transfer to your bank account (RIB : %1 %2 %3) has been done on %4.', Comment = '%1 = SWIFT Code, %2 = Agency Code, %3 = IBAN, %4 = Work Date';
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler')]
+ procedure CustomerNoOnPaymentLineWithCurrency()
+ var
+ PaymentClassCode: Text[30];
+ CurrencyCode: Code[10];
+ CustomerNo: Code[20];
+ CustomerNo2: Code[20];
+ begin
+ // Verify Customer No. on Payment Line when Currency is not blank on Payment Header.
+
+ // Setup & Exercise: Create Currency, Customers, Create payment Header.
+ Initialize();
+
+ CurrencyCode := CreateCurrency();
+ CustomerNo := CreateCustomer(CurrencyCode, ''); // Blank for VAT Bus Posting group.
+ CustomerNo2 := CreateCustomer('', ''); // Blank for currency and VAT Bus Posting group.
+ PaymentClassCode := CreatePaymentSlipAndSuggestCustomerPayment(CurrencyCode, CustomerNo, CustomerNo2);
+
+ // Verify: Verify Customer No. on Payment Line.
+ FindPaymentLineAndVerifyAccountNo(PaymentClassCode, CustomerNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler')]
+ procedure CustomerNoOnPaymentLineWithoutCurrency()
+ var
+ PaymentClassCode: Text[30];
+ CustomerNo: Code[20];
+ CustomerNo2: Code[20];
+ begin
+ // Verify Customer No. on Payment Line when Currency is blank on Payment Header.
+
+ // Setup & Exercise: Create Currency, Customers, Create payment Header.
+ Initialize();
+
+ CustomerNo := CreateCustomer(CreateCurrency(), ''); // Blank for VAT Bus Posting group.
+ CustomerNo2 := CreateCustomer('', ''); // Blank for currency and VAT Bus Posting group.
+ PaymentClassCode := CreatePaymentSlipAndSuggestCustomerPayment('', CustomerNo, CustomerNo2);
+
+ // Verify: Verify Customer No. on Payment Line.
+ FindPaymentLineAndVerifyAccountNo(PaymentClassCode, CustomerNo2);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipPageHandler')]
+ procedure PostPaymentSlipWithCurrency()
+ var
+ CurrencyCode: Code[10];
+ OldInvoiceRounding: Boolean;
+ PaymentClassCode: Text[30];
+ begin
+ // Verify Customer Ledger Entry after posting the Payment Slip with Unrealized VAT Reversal is Application on Payment Class.
+
+ // Setup: Create VAT Posting Setup, Payment Class, Bank Account, GL Account, Setup for Payment Slip and Create and Post Sales Invoice.
+ Initialize();
+
+ OldInvoiceRounding := UpdateInvoiceRoundingSalesReceivableSetup(false);
+ CurrencyCode := CreateCurrency();
+ PaymentClassCode := PostSalesInvoiceAndSuggestCustomerPayment(CurrencyCode);
+ PostPaymentSlip(PaymentClassCode);
+
+ // Exercise: Create new Payment Slip.
+ CODEUNIT.Run(CODEUNIT::"Payment Management FR"); // Invoke CreatePaymentSlipStrMenuHandler.
+
+ // Verify: Verify Customer Ledger Entry after payment.
+ VerifyCustomerLedgerEntry(PaymentClassCode, CurrencyCode);
+
+ // Tear Down: Rollback setup value.
+ UpdateInvoiceRoundingSalesReceivableSetup(OldInvoiceRounding);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestCustomerPaymentsRequestPageHandler,ConfirmHandlerTrue,CreatePaymentSlipStrMenuHandler,PaymentLinesListModalPageHandler,PaymentSlipPageHandler')]
+ procedure PostPaymentSlipWithoutCurrency()
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentClassCode: Text[30];
+ begin
+ // Verify VAT Entry after posting the Payment Slip with Partial Amount.
+
+ // Setup: Create VAT Posting Setup, Payment Class, Bank Account, GL Account, Setup for Payment Slip and Create and Post Sales Invoice.
+ Initialize();
+
+ PaymentClassCode := PostSalesInvoiceAndSuggestCustomerPayment(''); // // Blank for currency.
+ FindPaymentLineAndUpdateAmount(PaymentLine, PaymentClassCode);
+ PostPaymentSlip(PaymentClassCode);
+
+ // Exercise: Create new Payment Slip.
+ CODEUNIT.Run(CODEUNIT::"Payment Management FR"); // Invoke CreatePaymentSlipStrMenuHandler.
+
+ // Verify: Verify VAT Entry after payment.
+ VerifyVATEntry(PaymentLine."Account No.", CalculateAmount(PaymentLine."Account No."));
+ end;
+
+ [Test]
+ procedure RealizeVATEnabledOnPaymentStepCard()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepCard: TestPage "Payment Step Card FR";
+ begin
+ // Verify that the Realize VAT field is disabled when the Unrealized VAT Reversal is set to Delayed and Action Type field is changed from Ledger to None.
+
+ // Setup: Create Payment Class, payment Status, Payment Step.
+ Initialize();
+
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer, PaymentClass."Unrealized VAT Reversal"::Delayed));
+ CreatePaymentStatus(PaymentStatus, PaymentClass.Code, PaymentClass.Code);
+ CreatePaymentStep(
+ PaymentClass.Code, PaymentClass.Code, PaymentStatus.Line, PaymentStatus.Line, PaymentStep."Action Type"::Ledger, false, 0); // FALSE for Realize VAT.
+ PaymentStepCard.OpenEdit();
+ PaymentStepCard.FILTER.SetFilter("Payment Class", PaymentClass.Code);
+
+ // Exercise: Update Action Type on Payment Step Card.
+ PaymentStepCard."Action Type".SetValue(PaymentStep."Action Type"::None);
+
+ // Verify: Verify that the Realize VAT field is disabled when Action Type field is changed from Ledger to None.
+ Assert.IsFalse(PaymentStepCard."Realize VAT".Enabled(), FieldEnableMsg);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure UnapplyVendorLedgerEntryAfterDeletePaymentLine()
+ var
+ PaymentLine: Record "Payment Line FR";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ PaymentClassCode: Text[30];
+ VendorNo: Code[20];
+ begin
+ // Verify that the deletion of an applied Vendor Payment Line unapplies the vendor ledger entry the payment line was applied.
+
+ // Setup: Create and post Purchase Invoice, create Payment Header and Suggest Vendor Payment.
+ Initialize();
+
+ PaymentClassCode := PostPurchaseInvoiceAndSuggestVendorPayment(''); // Blank for Currency.
+ FindPaymentLine(PaymentLine, PaymentClassCode);
+ VendorNo := PaymentLine."Account No.";
+
+ // Exercise.
+ PaymentLine.Delete(true);
+
+ // Verify: Verify Applies - to - ID is blank when Payment Line is deleted.
+ VendorLedgerEntry.SetRange("Vendor No.", VendorNo);
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.TestField("Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure UpdateDebitAmountOnPaymentLine()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CurrencyCode: Code[10];
+ OldInvoiceRounding: Boolean;
+ PaymentClassCode: Text[30];
+ begin
+ // Verify that the Debit Amount can be modified on Vendor Payment when Currency Code is not equal to blank.
+
+ // Setup: Create and post Purchase Invoice, Create Payment Header and Suggest Vendor Payment.
+ Initialize();
+
+ OldInvoiceRounding := UpdateInvoiceRoundingPurchasePayableSetup(false);
+ CurrencyCode := CreateCurrency();
+ PaymentClassCode := PostPurchaseInvoiceAndSuggestVendorPayment(CurrencyCode);
+
+ // Exercise & Verify: Debit Amount is updated successfully on Payment Line
+ FindPaymentLineAndUpdateAmount(PaymentLine, PaymentClassCode);
+
+ // Tear Down: Roll back setup value.
+ UpdateInvoiceRoundingPurchasePayableSetup(OldInvoiceRounding);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure VendorNoOnPaymentLineWithCurrency()
+ var
+ PaymentClassCode: Text[30];
+ CurrencyCode: Code[10];
+ VendorNo: Code[20];
+ VendorNo2: Code[20];
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ // Verify Vendor No. on Payment Line when Currency is not blank on Payment Header.
+
+ // Setup & Exercise: Create Currency, Customers, Create payment Header.
+ Initialize();
+
+ CurrencyCode := CreateCurrency();
+ VendorNo := CreateVendor(CurrencyCode);
+ VendorNo2 := CreateVendor('');
+ PaymentClassCode :=
+ CreatePaymentSlipAndSuggestVendorPayment(VendorNo, VendorNo2, CurrencyCode, WorkDate(), SummarizePer::" ", StrSubstNo(
+ FilterRangeTxt, VendorNo, VendorNo2));
+
+ // Verify: Verify Vendor No. on Payment Line.
+ FindPaymentLineAndVerifyAccountNo(PaymentClassCode, VendorNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure VendorNoOnPaymentLineWithoutCurrency()
+ var
+ PaymentClassCode: Text[30];
+ VendorNo: Code[20];
+ VendorNo2: Code[20];
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ // Verify Vendor No. on Payment Line when Currency is not blank on Payment Header.
+
+ // Setup & Exercise: Create Currency, Customers, Create payment Header.
+ Initialize();
+
+ VendorNo := CreateVendor(CreateCurrency());
+ VendorNo2 := CreateVendor(''); // Blank for Currency.
+ PaymentClassCode :=
+ CreatePaymentSlipAndSuggestVendorPayment(VendorNo, VendorNo2, '', WorkDate(), SummarizePer::" ", StrSubstNo(
+ FilterRangeTxt, VendorNo, VendorNo2)); // Blank for Currency.
+
+ // Verify: Verify Vendor No. on Payment Line.
+ FindPaymentLineAndVerifyAccountNo(PaymentClassCode, VendorNo2);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler')]
+ procedure SuggestedDueDateOnPaymentLine()
+ var
+ PaymentLine: Record "Payment Line FR";
+ DueDate: Date;
+ SummarizePer: Option " ",Vendor,"Due date";
+ VendorNo: Code[20];
+ begin
+ // Verify proper Due Date is suggested automatically for combined payments for Vendors when Summarize Per is Vendor.
+
+ // Setup: Create Vendor, Create payment Slip.
+ Initialize();
+
+ DueDate := CalcDate('<-' + Format(LibraryRandom.RandInt(5)) + 'M>', WorkDate());
+ VendorNo := CreateVendor('');
+ CreatePaymentSlipAndSuggestVendorPayment(VendorNo, VendorNo, '', DueDate, SummarizePer::Vendor, ''); // Blank for Currency and VendorFilter.
+
+ // Verify: Verify Due date on Payment Line.
+ PaymentLine.SetRange("Account No.", VendorNo);
+ PaymentLine.FindFirst();
+ PaymentLine.TestField("Due Date", DueDate);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue,BillReportPageHandler')]
+ procedure PrintReportBillWithPaymentSlip()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentClassCode: Text[30];
+ Amount: Decimal;
+ begin
+ // Setup: Create Payment Slip Setup with Status and Steps. Create Payment Slip.
+
+ PaymentClassCode := CreatePaymentSlipSetup(PaymentClass.Suggestions::None, REPORT::"Bill FR");
+ Amount := LibraryRandom.RandDec(10, 2);
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ CreatePaymentSlipHeaderAndLine(PaymentLine."Account Type"::Customer, CreateCustomer('', ''), '', -Amount);
+
+ // Exercise: Print Report Bill.
+ PrintPaymentSlip(PaymentClassCode);
+
+ // Verify: Verify Amount in Report Bill is correct.
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists(
+ 'FORMAT_Amount_0___Precision_2___Standard_Format_0___', '****' + Format(Amount, 0, ''));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,ConfirmHandlerTrue,DraftNoticeRequestPageHandler')]
+ procedure ReportDraftNoticeBankAccountInformation()
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ CompanyInfo: Record "Company Information";
+ PaymentClass: Record "Payment Class FR";
+ PaymentLine: Record "Payment Line FR";
+ BankAccount: Record "Bank Account";
+ PaymentClassCode: Text[30];
+ begin
+ // Verify bank account information in Report Draft Notice refers to SWIFT and IBAN.
+
+ // Setup: Set SWIFT Code and IBAN for Company and Vendor Bank Account, create Payment Slip.
+ CompanyInfo.Get();
+
+ CreateBankAccountWithSEPAInfo(BankAccount);
+ CreateVendorWithVendorBankAccount(VendorBankAccount);
+
+ PaymentClassCode := CreatePaymentSlipSetup(PaymentClass.Suggestions::None, REPORT::"Draft notice FR");
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ CreatePaymentSlipHeaderAndLine(
+ PaymentLine."Account Type"::Vendor, VendorBankAccount."Vendor No.", BankAccount."No.", LibraryRandom.RandDec(10, 2));
+
+ // Exercise: Print Report Draft Notice.
+ PrintPaymentSlip(PaymentClassCode);
+
+ // Verify: Verify the Bank Account information refers to SWIFT Code and IBAN.
+ VerifyBankAccountInfo(BankAccount, VendorBankAccount);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListModalPageHandler,SuggestVendorPaymentsFRRequestPageHandler,ConfirmHandlerTrue')]
+ procedure CancelPaymentFile()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStatusExported: Record "Payment Status FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ PaymentClassCode: Text[30];
+ begin
+ // [FEATURE] [Export] [Cancel]
+ // [SCENARIO 291934] "Payment Header"."File Exporte Completed" becomes FALSE when Stan cancels export payment file
+ Initialize();
+
+
+ // [GIVEN] Payment Slip Setup "X" with steps "StepF" and "StepC"
+ // [GIVEN] "StepF"."Action Type" = File.
+ // [GIVEN] "StepC"."Action Type" = "Cancel File" and start status = "StepF"
+ PaymentClassCode := PostPurchaseInvoiceAndSuggestVendorPayment(''); // Blank for Currency.
+ CreatePaymentStatus(PaymentStatusExported, PaymentClassCode, LibraryUtility.GenerateGUID());
+
+ CreatePaymentStep(
+ PaymentClassCode, LibraryUtility.GenerateGUID(),
+ 0, PaymentStatusExported.Line, PaymentStep."Action Type"::File, false, 0);
+ CreatePaymentStep(
+ PaymentClassCode, LibraryUtility.GenerateGUID(),
+ PaymentStatusExported.Line, 0, PaymentStep."Action Type"::"Cancel File", false, 0);
+
+ // [GIVEN] Payment header with generated payment file having "Status" = "StepF", "File Export Completed" = TRUE
+ PaymentHeader.SetRange("Payment Class", PaymentClassCode);
+ PaymentHeader.FindFirst();
+ PaymentHeader."Status No." := PaymentStatusExported.Line;
+ PaymentHeader."File Export Completed" := true;
+ PaymentHeader.Modify();
+
+ // [WHEN] Post header with "Cance payment file" selection
+ OpenPaymentSlip(PaymentSlip, PaymentClassCode);
+ PaymentSlip.Post.Invoke();
+
+ // [THEN] Payment header with "Status" = 0, "File Export Completed" = FALSE
+ PaymentHeader.FindFirst();
+ PaymentHeader.TestField("Status No.", 0);
+ PaymentHeader.TestField("File Export Completed", false);
+ end;
+
+ local procedure Initialize()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ LibraryTestInitialize.OnTestInitialize(CODEUNIT::"ERM Payment Management II");
+ LibraryERM.SetUnrealizedVAT(true);
+ PaymentClass.DeleteAll();
+ PaymentHeader.DeleteAll();
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CalculateAmount(No: Code[20]) Amount: Decimal
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ VATPostingSetup: Record "VAT Posting Setup";
+ begin
+ Customer.Get(No);
+ VATPostingSetup.SetRange("VAT Bus. Posting Group", Customer."VAT Bus. Posting Group");
+ VATPostingSetup.FindFirst();
+ Amount := Round(PaymentLine.Amount * VATPostingSetup."VAT %" / (100 + VATPostingSetup."VAT %"));
+ end;
+
+ local procedure CreateAndPostGeneralJournal(var GenJournalLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DueDate: Date; Amount: Decimal)
+ var
+ GenJournalBatch: Record "Gen. Journal Batch";
+ begin
+ CreateGeneralJournalBatch(GenJournalBatch);
+ LibraryERM.CreateGeneralJnlLine(
+ GenJournalLine, GenJournalBatch."Journal Template Name", GenJournalBatch.Name,
+ GenJournalLine."Document Type"::Invoice, AccountType, AccountNo,
+ LibraryRandom.RandDec(10, 2)); // Taken random Amount.
+ GenJournalLine.Validate("Bal. Account Type", GenJournalLine."Bal. Account Type"::"Bank Account");
+ GenJournalLine.Validate("Bal. Account No.", CreateBankAccount());
+ GenJournalLine.Validate("External Document No.", GenJournalLine."Document No.");
+ GenJournalLine.Validate(Amount, Amount);
+ GenJournalLine.Validate("Due Date", DueDate);
+ GenJournalLine.Modify(true);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+ end;
+
+ local procedure CreateAndPostPurchaseInvoice(CurrencyCode: Code[10]): Code[20]
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ VATPostingSetup: Record "VAT Posting Setup";
+ begin
+ CreateVATPostingSetup(VATPostingSetup);
+ LibraryPurchase.CreatePurchHeader(
+ PurchaseHeader, PurchaseHeader."Document Type"::Invoice, CreateVendorWithVATBusPostingGroup(
+ VATPostingSetup."VAT Bus. Posting Group"));
+ PurchaseHeader.Validate("Currency Code", CurrencyCode);
+ PurchaseHeader.Modify(true);
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, CreateItem(VATPostingSetup."VAT Prod. Posting Group"),
+ LibraryRandom.RandDec(10, 2)); // Use random value for Quantity.
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(100, 2)); // Use random value for Unit Price.
+ PurchaseLine.Modify(true);
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true);
+ exit(PurchaseHeader."Buy-from Vendor No.");
+ end;
+
+ local procedure CreateAndPostSalesInvoice(CurrencyCode: Code[10]): Code[20]
+ var
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ VATPostingSetup: Record "VAT Posting Setup";
+ begin
+ CreateVATPostingSetup(VATPostingSetup);
+ LibrarySales.CreateSalesHeader(
+ SalesHeader, SalesHeader."Document Type"::Order, CreateCustomer(CurrencyCode,
+ VATPostingSetup."VAT Bus. Posting Group"));
+ LibrarySales.CreateSalesLine(
+ SalesLine, SalesHeader, SalesLine.Type::Item, CreateItem(VATPostingSetup."VAT Prod. Posting Group"),
+ LibraryRandom.RandDec(10, 2)); // Use random value for Quantity.
+ SalesLine.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 2)); // Use random value for Unit Price.
+ SalesLine.Modify(true);
+ LibrarySales.PostSalesDocument(SalesHeader, true, true);
+ exit(SalesHeader."Sell-to Customer No.");
+ end;
+
+ local procedure CreateAndUpdatePaymentHeader(CurrencyCode: Code[10])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Currency Code", CurrencyCode);
+ PaymentHeader.Modify(true);
+ end;
+
+ local procedure CreatePaymentSlipAndSuggestCustomerPayment(CurrencyCode: Code[10]; CustomerNo: Code[20]; CustomerNo2: Code[20]) PaymentClassCode: Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ // Setup.
+ PaymentClassCode :=
+ SetupForPaymentOnPaymentSlip(
+ GenJournalLine."Account Type"::Customer, CustomerNo, CustomerNo2,
+ LibraryRandom.RandDec(10, 2), PaymentClass.Suggestions::Customer, CurrencyCode, WorkDate());
+ OpenPaymentSlip(PaymentSlip, PaymentClassCode);
+ EnqueueValuesForHandler(StrSubstNo(FilterRangeTxt, CustomerNo, CustomerNo2), CurrencyCode, SummarizePer::" "); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+
+ // Exercise.
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ end;
+
+ local procedure CreatePaymentSlipAndSuggestVendorPayment(VendorNo: Code[20]; VendorNo2: Code[20]; CurrencyCode: Code[10]; DueDate: Date; SummarizePer: Option; VendorFilter: Text[30]) PaymentClassCode: Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ PaymentClass: Record "Payment Class FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Setup.
+ PaymentClassCode :=
+ SetupForPaymentOnPaymentSlip(
+ GenJournalLine."Account Type"::Vendor, VendorNo, VendorNo2,
+ -LibraryRandom.RandDec(10, 2), PaymentClass.Suggestions::Vendor, CurrencyCode, DueDate);
+ OpenPaymentSlip(PaymentSlip, PaymentClassCode);
+ EnqueueValuesForHandler(VendorFilter, CurrencyCode, SummarizePer); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+
+ // Exercise.
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure CreateBankAccount(): Code[20]
+ var
+ BankAccount: Record "Bank Account";
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ exit(BankAccount."No.");
+ end;
+
+ local procedure CreateBankAccountWithSEPAInfo(var BankAccount: Record "Bank Account")
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate("SWIFT Code", LibraryUtility.GenerateGUID());
+ BankAccount.Validate(IBAN, LibraryUtility.GenerateGUID());
+ BankAccount.Modify(true);
+ end;
+
+ local procedure CreateCustomer(CurrencyCode: Code[10]; VATBusPostingGroup: Code[20]): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ Customer.Validate("Currency Code", CurrencyCode);
+ Customer.Validate("VAT Bus. Posting Group", VATBusPostingGroup);
+ Customer.Modify(true);
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateCurrency(): Code[10]
+ var
+ Currency: Record Currency;
+ begin
+ LibraryERM.CreateCurrency(Currency);
+ LibraryERM.CreateRandomExchangeRate(Currency.Code);
+ exit(Currency.Code);
+ end;
+
+ local procedure CreateGeneralJournalBatch(var GenJournalBatch: Record "Gen. Journal Batch")
+ var
+ GenJournalTemplate: Record "Gen. Journal Template";
+ begin
+ GenJournalTemplate.SetRange(Type, GenJournalTemplate.Type::General);
+ LibraryERM.FindGenJournalTemplate(GenJournalTemplate);
+ LibraryERM.CreateGenJournalBatch(GenJournalBatch, GenJournalTemplate.Name);
+ end;
+
+ local procedure CreateGLAccount(): Code[20]
+ var
+ GLAccount: Record "G/L Account";
+ begin
+ LibraryERM.CreateGLAccount(GLAccount);
+ exit(GLAccount."No.");
+ end;
+
+ local procedure CreateItem(VATProdPostingGroup: Code[20]): Code[20]
+ var
+ Item: Record Item;
+ begin
+ LibraryInventory.CreateItem(Item);
+ Item.Validate("VAT Prod. Posting Group", VATProdPostingGroup);
+ Item.Modify(true);
+ exit(Item."No.");
+ end;
+
+ local procedure CreatePaymentClass(Suggestions: Option; UnrealizedVATReversal: Option): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Validate("Unrealized VAT Reversal", UnrealizedVATReversal);
+ PaymentClass.Validate(Suggestions, Suggestions);
+ PaymentClass.Modify(true);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentStatus(var PaymentStatus: Record "Payment Status FR"; PaymentClass: Text[30]; Name: Text[50])
+ begin
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass);
+ PaymentStatus.Validate(Name, Name);
+ PaymentStatus.Modify(true);
+ end;
+
+ local procedure CreatePaymentStep(PaymentClass: Text[30]; Name: Text[50]; PreviousStatus: Integer; NextStatus: Integer; ActionType: Enum "Payment Step Action Type FR"; RealizeVAT: Boolean; ReportNo: Integer): Integer
+ var
+ PaymentStep: Record "Payment Step FR";
+ NoSeries: Record "No. Series";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass);
+ PaymentStep.Validate(Name, Name);
+ PaymentStep.Validate("Previous Status", PreviousStatus);
+ PaymentStep.Validate("Next Status", NextStatus);
+ PaymentStep.Validate("Action Type", ActionType);
+ PaymentStep.Validate("Source Code", CreateSourceCode());
+ PaymentStep.Validate("Header Nos. Series", NoSeries.Code);
+ PaymentStep.Validate("Realize VAT", RealizeVAT);
+ PaymentStep.Validate("Report No.", ReportNo);
+ PaymentStep.Modify(true);
+ exit(PaymentStep.Line);
+ end;
+
+ local procedure CreatePaymentStepLedger(var PaymentStepLedger: Record "Payment Step Ledger FR"; PaymentClass: Text[30]; Sign: Option; AccountingType: Option; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Application: Option; Line: Integer)
+ begin
+ LibraryFRLocalization.CreatePaymentStepLedger(PaymentStepLedger, PaymentClass, Sign, Line);
+ PaymentStepLedger.Validate(Description, PaymentClass);
+ PaymentStepLedger.Validate("Accounting Type", AccountingType);
+ PaymentStepLedger.Validate("Account Type", AccountType);
+ PaymentStepLedger.Validate("Account No.", AccountNo);
+ PaymentStepLedger.Validate(Application, Application);
+ PaymentStepLedger.Modify(true);
+ end;
+
+ local procedure CreateSetupForPaymentSlip(var LineNo: Integer; PaymentClass: Text[30]) LineNo2: Integer
+ var
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStatus2: Record "Payment Status FR";
+ PaymentStatus3: Record "Payment Status FR";
+ PaymentStatus4: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ // Hardcoded values required for Payment Class setup due to avoid Import Parameter setup through automation.
+ CreatePaymentStatus(PaymentStatus, PaymentClass, 'New Document In Creation');
+ CreatePaymentStatus(PaymentStatus2, PaymentClass, DocumentCreatedCapLbl);
+ CreatePaymentStatus(PaymentStatus3, PaymentClass, 'Payment In Creation');
+ CreatePaymentStatus(PaymentStatus4, PaymentClass, 'Payment Created');
+
+ // Create Payment Step.
+ LineNo :=
+ CreatePaymentStep(
+ PaymentClass, 'Step1: Creation of documents', PaymentStatus.Line, PaymentStatus2.Line, PaymentStep."Action Type"::Ledger, false,
+ 0); // FALSE for Realize VAT.
+ CreatePaymentStep(
+ PaymentClass, 'Step2: Documents created', PaymentStatus2.Line, PaymentStatus3.Line,
+ PaymentStep."Action Type"::"Create New Document", false, 0); // FALSE for Realize VAT.
+ LineNo2 :=
+ CreatePaymentStep(
+ PaymentClass, 'Step3: Creation of payment', PaymentStatus3.Line, PaymentStatus4.Line,
+ PaymentStep."Action Type"::Ledger, true, 0); // TRUE for Realize VAT.
+ end;
+
+ local procedure CreatePaymentStepLedgerForCustomer(PaymentClass: Text[30]; LineNo: Integer; LineNo2: Integer)
+ var
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ PaymentStepLedger2: Record "Payment Step Ledger FR";
+ PaymentStepLedger3: Record "Payment Step Ledger FR";
+ PaymentStepLedger4: Record "Payment Step Ledger FR";
+ begin
+ // Create Payment Step Ledger for Customer.
+ CreatePaymentStepLedger(
+ PaymentStepLedger, PaymentClass, PaymentStepLedger.Sign::Debit, PaymentStepLedger."Accounting Type"::"Associated G/L Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::None, LineNo); // Blank value for G/L Account No.
+ CreatePaymentStepLedger(
+ PaymentStepLedger2, PaymentClass, PaymentStepLedger.Sign::Credit, PaymentStepLedger."Accounting Type"::"Payment Line Account",
+ PaymentStepLedger."Account Type"::"G/L Account", '', PaymentStepLedger.Application::"Applied Entry", LineNo); // Blank value for G/L Account No.
+ CreatePaymentStepLedger(
+ PaymentStepLedger3, PaymentClass, PaymentStepLedger.Sign::Debit, PaymentStepLedger."Accounting Type"::"Setup Account",
+ PaymentStepLedger."Account Type"::"Bank Account", CreateBankAccount(), PaymentStepLedger.Application::None, LineNo2);
+ CreatePaymentStepLedger(
+ PaymentStepLedger4, PaymentClass, PaymentStepLedger.Sign::Credit, PaymentStepLedger."Accounting Type"::"Setup Account",
+ PaymentStepLedger."Account Type"::"G/L Account", CreateGLAccount(), PaymentStepLedger.Application::None, LineNo2);
+ end;
+
+ local procedure CreatePaymentSlip(Suggestion: Option; CurrencyCode: Code[10]) PaymentClassCode: Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ PaymentClassCode := CreatePaymentClass(Suggestion, PaymentClass."Unrealized VAT Reversal"::Application);
+ CreatePaymentStatus(PaymentStatus, PaymentClassCode, PaymentClassNameTxt);
+ LibraryVariableStorage.Enqueue(PaymentClassCode); // Enqueue value for PaymentClassListModalPageHandler.
+ CreateAndUpdatePaymentHeader(CurrencyCode);
+ Commit(); // Required for execute report.
+ end;
+
+ local procedure CreatePaymentSlipSetup(Suggestion: Option; ReportNo: Integer) PaymentClassCode: Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ PaymentClassCode := CreatePaymentClass(Suggestion, PaymentClass."Unrealized VAT Reversal"::Application);
+ CreatePaymentStatus(PaymentStatus, PaymentClassCode, PaymentClassNameTxt);
+ UpdatePaymentStatusParameters(PaymentStatus, true, true);
+ CreatePaymentStep(
+ PaymentClassCode, LibraryUtility.GenerateGUID(), 0, 0, PaymentStep."Action Type"::Report, false, ReportNo); // FALSE for Realize VAT.
+ end;
+
+ local procedure CreatePaymentSlipHeaderAndLine(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; BankAccountNo: Code[20]; LineAmount: Decimal): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ if BankAccountNo <> '' then begin
+ PaymentHeader.Validate("Account No.", BankAccountNo);
+ PaymentHeader.Modify(true);
+ end;
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Validate(Amount, LineAmount);
+ PaymentLine.Modify(true);
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreateSourceCode(): Code[10]
+ var
+ SourceCode: Record "Source Code";
+ begin
+ LibraryERM.CreateSourceCode(SourceCode);
+ exit(SourceCode.Code);
+ end;
+
+ local procedure CreateVATPostingSetup(var VATPostingSetup: Record "VAT Posting Setup")
+ var
+ VATBusinessPostingGroup: Record "VAT Business Posting Group";
+ VATProductPostingGroup: Record "VAT Product Posting Group";
+ begin
+ LibraryERM.CreateVATBusinessPostingGroup(VATBusinessPostingGroup);
+ LibraryERM.CreateVATProductPostingGroup(VATProductPostingGroup);
+ LibraryERM.CreateVATPostingSetup(VATPostingSetup, VATBusinessPostingGroup.Code, VATProductPostingGroup.Code);
+ VATPostingSetup.Validate("VAT Calculation Type", VATPostingSetup."VAT Calculation Type"::"Normal VAT");
+ VATPostingSetup.Validate("VAT %", LibraryRandom.RandInt(10));
+ VATPostingSetup.Validate("Unrealized VAT Type", VATPostingSetup."Unrealized VAT Type"::Percentage);
+ VATPostingSetup.Validate("Purch. VAT Unreal. Account", CreateGLAccount());
+ VATPostingSetup.Validate("Sales VAT Unreal. Account", CreateGLAccount());
+ VATPostingSetup.Validate("Sales VAT Account", CreateGLAccount());
+ VATPostingSetup.Validate("Purchase VAT Account", CreateGLAccount());
+ VATPostingSetup.Modify(true);
+ end;
+
+ local procedure CreateVendorWithVATBusPostingGroup(VATBusPostingGroup: Code[20]): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ Vendor.Validate("VAT Bus. Posting Group", VATBusPostingGroup);
+ Vendor.Modify(true);
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreateVendor(CurrencyCode: Code[10]): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ Vendor.Validate("Currency Code", CurrencyCode);
+ Vendor.Modify(true);
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreateVendorWithVendorBankAccount(var VendorBankAccount: Record "Vendor Bank Account")
+ var
+ Vendor: Record Vendor;
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryPurchase.CreateVendorBankAccount(VendorBankAccount, Vendor."No.");
+ VendorBankAccount.Validate("SWIFT Code", LibraryUtility.GenerateGUID());
+ VendorBankAccount.Validate(IBAN, LibraryUtility.GenerateGUID());
+ VendorBankAccount.Modify(true);
+ Vendor.Validate("Preferred Bank Account Code", VendorBankAccount.Code);
+ Vendor.Modify(true);
+ end;
+
+ local procedure EnqueueValuesForHandler(Value: Variant; Value2: Variant; Value3: Variant)
+ begin
+ LibraryVariableStorage.Enqueue(Value);
+ LibraryVariableStorage.Enqueue(Value2);
+ LibraryVariableStorage.Enqueue(Value3);
+ end;
+
+ local procedure FindPaymentLine(var PaymentLine: Record "Payment Line FR"; PaymentClass: Text[30])
+ begin
+ PaymentLine.SetRange("Payment Class", PaymentClass);
+ PaymentLine.FindFirst();
+ end;
+
+ local procedure FindCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; DocumentNo: Code[20])
+ begin
+ CustLedgerEntry.SetRange("Document Type", CustLedgerEntry."Document Type"::" ");
+ CustLedgerEntry.SetRange("Document No.", DocumentNo);
+ CustLedgerEntry.FindFirst();
+ end;
+
+ local procedure FindPaymentLineAndUpdateAmount(var PaymentLine: Record "Payment Line FR"; PaymentClass: Text[30])
+ begin
+ FindPaymentLine(PaymentLine, PaymentClass);
+ PaymentLine.Validate("Debit Amount", PaymentLine."Debit Amount" / 2);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure PostPaymentSlip(PaymentClass: Text[30])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ OpenPaymentSlip(PaymentSlip, PaymentClass);
+ PaymentSlip.Post.Invoke(); // Invoke ConfirmHandlerTrue.
+ end;
+
+ local procedure PostSalesInvoiceAndSuggestCustomerPayment(CurrencyCode: Code[10]): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ SellToCustomerNo: Code[20];
+ LineNo: Integer;
+ LineNo2: Integer;
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ // Create VAT Posting Setup, Payment Class, Bank Account, GL Account, Setup for Payment Slip and Create and Post Sales Invoice.
+ SellToCustomerNo := CreateAndPostSalesInvoice(CurrencyCode);
+ PaymentClass.Get(CreatePaymentClass(PaymentClass.Suggestions::Customer, PaymentClass."Unrealized VAT Reversal"::Application));
+ LineNo2 := CreateSetupForPaymentSlip(LineNo, PaymentClass.Code);
+ CreatePaymentStepLedgerForCustomer(PaymentClass.Code, LineNo, LineNo2);
+
+ LibraryVariableStorage.Enqueue(PaymentClass.Code); // Enqueue value for PaymentClassListModalPageHandler.
+ CreateAndUpdatePaymentHeader(CurrencyCode);
+ Commit(); // Required for execute report.
+
+ OpenPaymentSlip(PaymentSlip, PaymentClass.Code);
+ EnqueueValuesForHandler(SellToCustomerNo, CurrencyCode, SummarizePer::" "); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+ PaymentSlip.SuggestCustomerPayments.Invoke();
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure PostPurchaseInvoiceAndSuggestVendorPayment(CurrencyCode: Code[10]) PaymentClassCode: Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ VendorNo: Code[20];
+ SummarizePer: Option " ",Vendor,"Due date";
+ begin
+ VendorNo := CreateAndPostPurchaseInvoice(CurrencyCode);
+ PaymentClassCode := CreatePaymentSlip(PaymentClass.Suggestions::Vendor, CurrencyCode);
+ OpenPaymentSlip(PaymentSlip, PaymentClassCode);
+ EnqueueValuesForHandler(VendorNo, CurrencyCode, SummarizePer::" "); // Enqueue for SuggestVendorPaymentsFRRequestPageHandler.
+ PaymentSlip.SuggestVendorPayments.Invoke();
+ end;
+
+ local procedure FindPaymentLineAndVerifyAccountNo(PaymentClassCode: Text[30]; AccountNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ FindPaymentLine(PaymentLine, PaymentClassCode);
+ PaymentLine.TestField("Account No.", AccountNo);
+ end;
+
+ local procedure OpenPaymentSlip(var PaymentSlip: TestPage "Payment Slip FR"; PaymentClass: Text[30])
+ begin
+ PaymentSlip.OpenView();
+ PaymentSlip.FILTER.SetFilter("Payment Class", PaymentClass);
+ end;
+
+ local procedure SetupForPaymentOnPaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; AccountNo2: Code[20]; Amount: Decimal; Suggestion: Option; CurrencyCode: Code[10]; DueDate: Date) PaymentClassCode: Text[30]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ CreateAndPostGeneralJournal(GenJournalLine, AccountType, AccountNo, DueDate, Amount);
+ CreateAndPostGeneralJournal(GenJournalLine, AccountType, AccountNo2, WorkDate(), Amount);
+ PaymentClassCode := CreatePaymentSlip(Suggestion, CurrencyCode);
+ end;
+
+ local procedure UpdateInvoiceRoundingSalesReceivableSetup(InvoiceRounding: Boolean) OldInvoiceRounding: Boolean
+ var
+ SalesReceivablesSetup: Record "Sales & Receivables Setup";
+ begin
+ SalesReceivablesSetup.Get();
+ OldInvoiceRounding := SalesReceivablesSetup."Invoice Rounding";
+ SalesReceivablesSetup.Validate("Invoice Rounding", InvoiceRounding);
+ SalesReceivablesSetup.Modify(true);
+ end;
+
+ local procedure UpdateInvoiceRoundingPurchasePayableSetup(InvoiceRounding: Boolean) OldInvoiceRounding: Boolean
+ var
+ PurchasesPayablesSetup: Record "Purchases & Payables Setup";
+ begin
+ PurchasesPayablesSetup.Get();
+ OldInvoiceRounding := PurchasesPayablesSetup."Invoice Rounding";
+ PurchasesPayablesSetup.Validate("Invoice Rounding", InvoiceRounding);
+ PurchasesPayablesSetup.Modify(true);
+ end;
+
+ local procedure UpdatePaymentStatusParameters(var PaymentStatus: Record "Payment Status FR"; ShowRib: Boolean; ShowAmount: Boolean)
+ begin
+ PaymentStatus.Validate(RIB, ShowRib);
+ PaymentStatus.Validate(Amount, ShowAmount);
+ PaymentStatus.Modify(true);
+ end;
+
+ local procedure PrintPaymentSlip(PaymentClass: Text[30])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ OpenPaymentSlip(PaymentSlip, PaymentClass);
+ PaymentSlip.Print.Invoke(); // Invoke ConfirmHandlerTrue.
+ end;
+
+ local procedure VerifyCustomerLedgerEntry(PaymentClassCode: Text[30]; CurrencyCode: Code[10])
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ OpenPaymentSlip(PaymentSlip, PaymentClassCode);
+ PaymentSlip.FILTER.SetFilter("Status Name", DocumentCreatedCapLbl);
+ FindCustomerLedgerEntry(CustLedgerEntry, Format(PaymentSlip."No."));
+ FindPaymentLine(PaymentLine, PaymentClassCode);
+ CustLedgerEntry.CalcFields(Amount, "Amount (LCY)");
+ CustLedgerEntry.TestField(Amount, PaymentLine.Amount);
+ CustLedgerEntry.TestField("Amount (LCY)", LibraryERM.ConvertCurrency(PaymentLine.Amount, CurrencyCode, '', WorkDate()));
+ end;
+
+ local procedure VerifyVATEntry(BillToPayToNo: Code[20]; Amount: Decimal)
+ var
+ VATEntry: Record "VAT Entry";
+ begin
+ VATEntry.SetRange("Bill-to/Pay-to No.", BillToPayToNo);
+ VATEntry.FindFirst();
+ VATEntry.TestField(Amount, Amount);
+ end;
+
+ local procedure VerifyBankAccountInfo(BankAccount: Record "Bank Account"; VendorBankAccount: Record "Vendor Bank Account")
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.Get();
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader__SWIFT_Code__Caption', BankAccount.FieldCaption("SWIFT Code"));
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader__IBAN__Caption', BankAccount.FieldCaption(IBAN));
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader_SWIFT_Code', BankAccount."SWIFT Code");
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader_IBAN', BankAccount.IBAN);
+ LibraryReportDataset.AssertElementWithValueExists(
+ 'HeaderText1',
+ StrSubstNo(HeaderTxt, VendorBankAccount."SWIFT Code", VendorBankAccount."Agency Code FR", VendorBankAccount.IBAN, WorkDate()));
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListModalPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ "Code": Variant;
+ begin
+ LibraryVariableStorage.Dequeue(Code);
+ PaymentClassList.FILTER.SetFilter(Code, Code);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentLinesListModalPageHandler(var PaymentLinesList: TestPage "Payment Lines List FR")
+ begin
+ PaymentLinesList.OK().Invoke(); // Invokes PaymentSlipPageHandler.
+ end;
+
+ [StrMenuHandler]
+ procedure CreatePaymentSlipStrMenuHandler(Option: Text[1024]; var Choice: Integer; Instruction: Text[1024])
+ begin
+ Choice := 1; // Invokes PaymentLinesListModalPageHandler.
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustomerPaymentsRequestPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ var
+ CurrencyFilter: Variant;
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(CurrencyFilter);
+ SuggestCustomerPayments.Customer.SetFilter("No.", No);
+ SuggestCustomerPayments.LastPaymentDate.SetValue(WorkDate()); // Required month end date.
+ SuggestCustomerPayments.Currency_Filter.SetValue(CurrencyFilter);
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPaymentsFRRequestPageHandler(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ CurrencyFilter: Variant;
+ No: Variant;
+ SummarizePer: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ LibraryVariableStorage.Dequeue(CurrencyFilter);
+ LibraryVariableStorage.Dequeue(SummarizePer);
+ SuggestVendorPaymentsFR.Vendor.SetFilter("No.", No);
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(CalcDate('<1M>', WorkDate())); // Required month end date.
+ SuggestVendorPaymentsFR.Currency_Filter.SetValue(CurrencyFilter);
+ SuggestVendorPaymentsFR.Summarize_Per.SetValue(SummarizePer);
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [PageHandler]
+ procedure PaymentSlipPageHandler(var PaymentSlip: TestPage "Payment Slip FR")
+ begin
+ PaymentSlip.Post.Invoke(); // Invokes ConfirmHandlerTrue.
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandlerTrue(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [RequestPageHandler]
+ procedure BillReportPageHandler(var Bill: TestRequestPage "Bill FR")
+ begin
+ Bill.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure DraftNoticeRequestPageHandler(var DraftNotice: TestRequestPage "Draft notice FR")
+ begin
+ DraftNotice.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentSlip.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentSlip.Codeunit.al
new file mode 100644
index 0000000000..d386d401ad
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentSlip.Codeunit.al
@@ -0,0 +1,358 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Foundation.PaymentTerms;
+using Microsoft.Inventory.Item;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Document;
+using Microsoft.Sales.History;
+using Microsoft.Sales.Receivables;
+using System;
+using System.IO;
+using System.TestLibraries.Utilities;
+
+codeunit 144018 "ERM Payment Slip"
+{
+ // // [FEATURE] [Payment Slip]
+ // 1.Check that programm populates correct value on payment header as on posted sales invoice through suggest customer payment report.
+ //
+ // Bug = 324389
+ // ----------------------------------------------------------------
+ // Test Function Name
+ // ----------------------------------------------------------------
+ // CheckAmountLCYOnPaymentHeader
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryRandom: Codeunit "Library - Random";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ Library_Utility: Codeunit "Library - Utility";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ TransferTypeExportedErr: Label 'Wrong exported SEPA Transfer Type';
+ TransferTypeTok: Label '"%1"', Comment = '%1 = SEPA Transfer Type';
+
+ [Test]
+ [HandlerFunctions('SuggestCustomerPaymentRequestPageHandler')]
+ procedure CheckAmountLCYOnPaymentHeader()
+ var
+ PaymentClass: Record "Payment Class FR";
+ SalesHeader: Record "Sales Header";
+ PaymentHeader: Record "Payment Header FR";
+ Customer: Record Customer;
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ LibraryERM: Codeunit "Library - ERM";
+ PostedDocumentNo: Code[20];
+ begin
+ // Check that programm populates correct value on payment header as on posted sales invoice through suggest customer payment report.
+
+ // Setup: Create payment slip setup & Create and post sales invoice.
+ Initialize();
+
+ CreatePaymentClass(PaymentClass);
+ CreatePaymentStatus(PaymentClass.Code, true);
+ CreateCustomerWithPaymentTermsCode(Customer);
+ CreateSalesInvoice(SalesHeader, Customer."No.");
+ PostedDocumentNo := LibrarySales.PostSalesDocument(SalesHeader, true, true);
+ CreatePaymentHeader(PaymentHeader, PaymentClass.Code);
+ LibraryVariableStorage.Enqueue(Customer."No.");
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+
+ // Exercise: Run Suggest Customer Payments report.
+ Commit();
+ LibraryERM.FindCustomerLedgerEntry(CustLedgerEntry, SalesHeader."Document Type"::Invoice, PostedDocumentNo);
+ LibraryVariableStorage.Enqueue(CustLedgerEntry."Due Date");
+ SuggestCustomerPayments.Run();
+
+ // Verify: Verify Payment Header Amount LCY as on Posted Sales Invoice.
+ VerifyAmountOnPaymentHeader(PostedDocumentNo, PaymentHeader."No.");
+ end;
+
+ [Test]
+ procedure PaymentClassExport()
+ var
+ PaymentClass: Record "Payment Class FR";
+ StreamReader: DotNet StreamReader;
+ Name: Text[50];
+ begin
+ // [FEATURE] [SEPA]
+ // [SCENARIO 376206] Export Payment Class via XML Port "Import/Export Parameters"
+
+ Name := Library_Utility.GenerateGUID();
+
+ // [GIVEN] Payment Class "A" with "SEPA Transfer Type" = "Credit Transfer"
+ InitPaymentClassWithSEPATransferType(PaymentClass, PaymentClass."SEPA Transfer Type"::"Credit Transfer", Name);
+ // [GIVEN] Payment Class "B" with "SEPA Transfer Type" = "Direct Debit"
+ InitPaymentClassWithSEPATransferType(PaymentClass, PaymentClass."SEPA Transfer Type"::"Direct Debit", Name);
+
+ // [WHEN] Export Payment Classes "A" and "B" via XML Port "Import/Export Parameters"
+ PaymentClass.SetRange(Name, Name);
+ StreamReader := StreamReader.StreamReader(ExportPaymentClass(PaymentClass));
+
+ // [THEN] Exported Payment Class "A" line has "Credit Transfer" entry
+ VerifyExportPaymentClassLine(StreamReader, Format(PaymentClass."SEPA Transfer Type"::"Credit Transfer"));
+
+ // [THEN] Exported Payment Class "B" line has "Direct Debit" entry
+ VerifyExportPaymentClassLine(StreamReader, Format(PaymentClass."SEPA Transfer Type"::"Direct Debit"));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentStepConfirmHandler')]
+ procedure PaymentInProgressIsTrueWhenStepNextStatusWithTrueValue()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentManagement: Codeunit "Payment Management FR";
+ Status: array[2] of Integer;
+ begin
+ // [SCENARIO 381553] "Payment in Progress" = TRUE after step next status with "Payment in Progress" = TRUE, "Action Type" = "None"
+ Initialize();
+
+
+ // [GIVEN] Payment class with two status: "S1" with "Payment in Progress" = FALSE, "S2" with "Payment in Progress" = TRUE
+ // [GIVEN] Payment step: "Previous Status" = "S1", "Next Status" = "S2", "Action Type" := "None"
+ CreatePaymentClassWithTwoStatus(PaymentStep, Status, false, true);
+ // [GIVEN] Payment with "Status No." = "S1"
+ CreatePaymentHeaderWithLine(PaymentHeader, PaymentStep."Payment Class");
+
+ // [WHEN] Process payment's next step.
+ PaymentManagement.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // [THEN] Payment Line's "Status No." = "S2", "Payment in Progress" = TRUE
+ VerifyPaymentLine(PaymentHeader."No.", Status[2], true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentStepConfirmHandler')]
+ procedure PaymentInProgressIsFalseWhenStepNextStatusWithFalseValue()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentManagement: Codeunit "Payment Management FR";
+ Status: array[2] of Integer;
+ begin
+ // [SCENARIO 381553] "Payment in Progress" = FALSE after step next status with "Payment in Progress" = FALSE, "Action Type" = "None"
+ Initialize();
+
+
+ // [GIVEN] Payment class with two status: "S1" with "Payment in Progress" = TRUE, "S2" with "Payment in Progress" = FALSE
+ // [GIVEN] Payment step: "Previous Status" = "S1", "Next Status" = "S2", "Action Type" := "None"
+ CreatePaymentClassWithTwoStatus(PaymentStep, Status, true, false);
+ // [GIVEN] Payment with "Status No." = "S1"
+ CreatePaymentHeaderWithLine(PaymentHeader, PaymentStep."Payment Class");
+
+ // [WHEN] Process payment's next step.
+ PaymentManagement.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // [THEN] Payment Line's "Status No." = "S2", "Payment in Progress" = FALSE
+ VerifyPaymentLine(PaymentHeader."No.", Status[2], false);
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreatePaymentClassWithTwoStatus(var PaymentStep: Record "Payment Step FR"; var Status: array[2] of Integer; PaymentInProgress1: Boolean; PaymentInProgress2: Boolean)
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ CreatePaymentClass(PaymentClass);
+ Status[1] := CreatePaymentStatus(PaymentClass.Code, PaymentInProgress1);
+ Status[2] := CreatePaymentStatus(PaymentClass.Code, PaymentInProgress2);
+ CreatePaymentStep(PaymentStep, PaymentClass.Code, Status[1], Status[2]);
+ end;
+
+ local procedure CreateCustomerWithPaymentTermsCode(var Customer: Record Customer)
+ var
+ PaymentTerms: Record "Payment Terms";
+ begin
+#pragma warning disable AA0210
+ PaymentTerms.SetFilter("Discount %", '<>%1', 0);
+#pragma warning restore AA0210
+ PaymentTerms.FindFirst();
+ LibrarySales.CreateCustomer(Customer);
+ Customer.Validate("Payment Terms Code", PaymentTerms.Code);
+ Customer.Modify(true);
+ end;
+
+ local procedure CreateSalesInvoice(var SalesHeader: Record "Sales Header"; CustomerNo: Code[20])
+ var
+ Item: Record Item;
+ SalesLine: Record "Sales Line";
+ LibraryInventory: Codeunit "Library - Inventory";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Invoice, CustomerNo);
+ LibrarySales.CreateSalesLine(
+ SalesLine, SalesHeader, SalesLine.Type::Item, LibraryInventory.CreateItem(Item), LibraryRandom.RandDec(10, 2));
+ SalesLine.Validate("Unit Price", LibraryRandom.RandDec(100, 2));
+ SalesLine.Modify(true);
+ end;
+
+ local procedure CreatePaymentClass(var PaymentClass: Record "Payment Class FR")
+ var
+ LibraryUtility: Codeunit "Library - Utility";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Customer);
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Modify(true);
+ end;
+
+ local procedure CreatePaymentHeaderWithLine(var PaymentHeader: Record "Payment Header FR"; PaymentClassCode: Text[30])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ CreatePaymentHeader(PaymentHeader, PaymentClassCode);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR"; PaymentClassCode: Text[30])
+ var
+ PostingOffset: Text[10];
+ begin
+ InitPaymentHeader(PaymentHeader);
+
+ PaymentHeader.Validate("Payment Class", PaymentClassCode);
+
+ PostingOffset := Format(LibraryRandom.RandInt(5)) + 'D';
+ PaymentHeader.Validate("Posting Date", CalcDate('<' + PostingOffset + '>', WorkDate()));
+ PaymentHeader.Validate("Document Date", CalcDate('<' + PostingOffset + '>', WorkDate()));
+
+ PaymentHeader.Modify(true);
+ end;
+
+ local procedure CreatePaymentStatus(PaymentClassCode: Text[30]; NewPaymentInProgress: Boolean): Integer
+ var
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClassCode);
+ PaymentStatus.Validate(RIB, true);
+ PaymentStatus.Validate(Debit, true);
+ PaymentStatus.Validate(Credit, true);
+ PaymentStatus.Validate("Bank Account", true);
+ PaymentStatus.Validate("Payment in Progress", NewPaymentInProgress);
+ PaymentStatus.Modify(true);
+ exit(PaymentStatus.Line);
+ end;
+
+ local procedure CreatePaymentStep(var PaymentStep: Record "Payment Step FR"; PaymentClassCode: Text[30]; PreviousStatus: Integer; NextStatus: Integer)
+ begin
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClassCode);
+ PaymentStep.Validate("Previous Status", PreviousStatus);
+ PaymentStep.Validate("Next Status", NextStatus);
+ PaymentStep.Validate("Action Type", PaymentStep."Action Type"::None);
+ PaymentStep.Modify(true);
+ end;
+
+ local procedure ExportPaymentClass(var PaymentClass: Record "Payment Class FR"): Text
+ var
+ FileMgt: Codeunit "File Management";
+ ServerFile: File;
+ Fileoutstream: OutStream;
+ ServerFileName: Text;
+ begin
+ ServerFileName := FileMgt.ServerTempFileName('');
+ ServerFile.Create(ServerFileName);
+ ServerFile.CreateOutStream(Fileoutstream);
+ XMLPORT.Export(XMLPORT::"Import/Export Parameters FR", Fileoutstream, PaymentClass);
+ ServerFile.Close();
+ exit(ServerFileName);
+ end;
+
+ local procedure InitPaymentClassWithSEPATransferType(var PaymentClass: Record "Payment Class FR"; SEPATransferType: Option; Name: Text[50])
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Name := Name;
+ PaymentClass."SEPA Transfer Type" := SEPATransferType;
+ PaymentClass.Modify();
+ end;
+
+ local procedure InitPaymentHeader(var PaymentHeader: Record "Payment Header FR")
+ begin
+ PaymentHeader.Init();
+ PaymentHeader.Validate(
+ "No.",
+ CopyStr(
+ Library_Utility.GenerateRandomCode(PaymentHeader.FieldNo("No."), DATABASE::"Payment Header FR"),
+ 1,
+ Library_Utility.GetFieldLength(DATABASE::"Payment Header FR", PaymentHeader.FieldNo("No."))));
+ PaymentHeader.Insert(true);
+ end;
+
+ local procedure VerifyAmountOnPaymentHeader(DocumentNo: Code[20]; PaymentHeaderCode: Code[20])
+ var
+ SalesInvoiceHeader: Record "Sales Invoice Header";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ SalesInvoiceHeader.Get(DocumentNo);
+ SalesInvoiceHeader.CalcFields("Amount Including VAT");
+ PaymentHeader.Get(PaymentHeaderCode);
+ PaymentHeader.CalcFields("Amount (LCY)");
+ PaymentHeader.TestField("Amount (LCY)", -1 * SalesInvoiceHeader."Amount Including VAT");
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustomerPaymentRequestPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ var
+ CustomerNo: Variant;
+ DueDate: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(CustomerNo);
+ LibraryVariableStorage.Dequeue(DueDate);
+ SuggestCustomerPayments.LastPaymentDate.SetValue(DueDate);
+ SuggestCustomerPayments.Customer.SetFilter("No.", CustomerNo);
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+ local procedure VerifyExportPaymentClassLine(StreamReader: DotNet StreamReader; SEPATransferType: Text)
+ var
+ DotNetString: DotNet String;
+ LinePart: Text[1024];
+ begin
+ DotNetString := StreamReader.ReadLine();
+ Assert.AreEqual(7, StrLen(DelChr(DotNetString, '=', DelChr(DotNetString, '=', ','))), '');
+ LinePart := DotNetString.Substring(DotNetString.LastIndexOf(',') + 1);
+ Assert.AreEqual(StrSubstNo(TransferTypeTok, SEPATransferType), LinePart, TransferTypeExportedErr);
+ end;
+
+ local procedure VerifyPaymentLine(PaymentHeaderNo: Code[20]; ExpectedStatusNo: Integer; ExpectedPaymentInProgress: Boolean)
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.SetRange("No.", PaymentHeaderNo);
+ PaymentLine.FindFirst();
+ Assert.AreEqual(ExpectedStatusNo, PaymentLine."Status No.", PaymentLine.FieldCaption("Status No."));
+ Assert.AreEqual(ExpectedPaymentInProgress, PaymentLine."Payment in Progress", PaymentLine.FieldCaption("Payment in Progress"));
+ end;
+
+ [ConfirmHandler]
+ procedure PaymentStepConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentToleranceFR.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentToleranceFR.Codeunit.al
new file mode 100644
index 0000000000..707639d2b0
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMPaymentToleranceFR.Codeunit.al
@@ -0,0 +1,666 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Finance.ReceivablesPayables;
+using Microsoft.Foundation.PaymentTerms;
+using Microsoft.Inventory.Item;
+using Microsoft.Purchases.Document;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Reports;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Document;
+using Microsoft.Sales.Receivables;
+using Microsoft.Sales.Reports;
+using System.TestLibraries.Utilities;
+
+codeunit 144019 "ERM Payment Tolerance FR"
+{
+ // // [FEATURE] [Payment Tolerance]
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ IsInitialized := false;
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryJournals: Codeunit "Library - Journals";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ LibrarySetupStorage: Codeunit "Library - Setup Storage";
+ IsInitialized: Boolean;
+ ConfirmMessageForPaymentQst: Label 'Do you want to change all open entries for every customer and vendor that are not blocked';
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyCustomerEntriesPageHandler,PaymentToleranceWarningPageHandler,ConfirmHandler')]
+ procedure PmtToleranceWarningPaymentLineCustomer()
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ InvoiceAmount: Decimal;
+ begin
+ // [SCENARIO 121976] Posted Sales Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ Initialize();
+
+ InvoiceAmount := LibraryRandom.RandDec(100, 2);
+
+ // [GIVEN] Posted Sales Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ UpdateGeneralLedgerSetup();
+ CreateCustomerWithPaymentTerm(Customer);
+ UpdateCustomerPostingGroup(Customer."Customer Posting Group");
+ LibraryJournals.CreateGenJournalLineWithBatch(
+ GenJournalLine, GenJournalLine."Document Type"::Invoice,
+ GenJournalLine."Account Type"::Customer, Customer."No.", InvoiceAmount);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Created Payment Slip with Payment line where "Credit Amount" = "A"
+ CreatePaymentSlipWithAmount(PaymentLine, PaymentLine."Account Type"::Customer, Customer."No.", InvoiceAmount);
+ // [GIVEN] Same "Applies-to-ID" is set on Payment Line and Sales Invoice
+ SetAppliesToIDPaymentLine(PaymentLine, Customer."No.", GenJournalLine."Document No.");
+
+ // [WHEN] Set "Credit Amount" = "A" - "PT" on Payment Line
+ PaymentLine.Validate("Credit Amount", CalcPaymentAmountWithToleranceCustomer(InvoiceAmount, Customer."No."));
+
+ // [THEN] Warning dialog appeared and accepted
+ // [THEN] "Credit Amount" = "A" - "PT" on Payment Line
+ Assert.AreEqual(
+ CalcPaymentAmountWithToleranceCustomer(InvoiceAmount, Customer."No."),
+ PaymentLine."Credit Amount",
+ PaymentLine.FieldCaption("Credit Amount"));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyVendorEntriesPageHandler,PaymentToleranceWarningPageHandler,ConfirmHandler')]
+ procedure PmtToleranceWarningPaymentLineVendor()
+ var
+ Vendor: Record Vendor;
+ PaymentLine: Record "Payment Line FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ InvoiceAmount: Decimal;
+ begin
+ // [SCENARIO 121976] Posted Purchase Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ Initialize();
+
+ InvoiceAmount := -LibraryRandom.RandDec(100, 2);
+
+ // [GIVEN] Posted Purchase Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ UpdateGeneralLedgerSetup();
+ CreateVendorWithPaymentTerm(Vendor);
+ UpdateVendorPostingGroup(Vendor."Vendor Posting Group");
+ LibraryJournals.CreateGenJournalLineWithBatch(
+ GenJournalLine, GenJournalLine."Document Type"::Invoice,
+ GenJournalLine."Account Type"::Vendor, Vendor."No.", InvoiceAmount);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Created Payment Slip with Payment line where "Credit Amount" = "A"
+ CreatePaymentSlipWithAmount(PaymentLine, PaymentLine."Account Type"::Vendor, Vendor."No.", InvoiceAmount);
+ // [GIVEN] Same "Applies-to-ID" is set on Payment Line and Purchase Invoice
+ SetAppliesToIDPaymentLine(PaymentLine, Vendor."No.", GenJournalLine."Document No.");
+
+ // [WHEN] Set "Credit Amount" = "A" - "PT" on Payment Line
+ PaymentLine.Validate("Credit Amount", CalcPaymentAmountWithToleranceVendor(InvoiceAmount, Vendor."No."));
+
+ // [THEN] Warning dialog appeared and accepted
+ // [THEN] "Credit Amount" = "A" - "PT" on Payment Line
+ Assert.AreEqual(
+ CalcPaymentAmountWithToleranceVendor(InvoiceAmount, Vendor."No."),
+ PaymentLine."Credit Amount",
+ PaymentLine.FieldCaption("Credit Amount"));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyCustomerEntriesPageHandler,PaymentToleranceWarningPageHandler,ConfirmHandler')]
+ procedure PmtTolWarningOnPmntLineAfterAppliesToIdCustomer()
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ InvoiceAmount: Decimal;
+ begin
+ // [FEATURE] [Payment Slip] [Application] [Sales]
+ // [SCENARIO 363455] Accept Payment Tolerance Warning dialog on applying customer entries
+ Initialize();
+
+ InvoiceAmount := LibraryRandom.RandDec(100, 2);
+
+ // [GIVEN] Posted Sales Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ UpdateGeneralLedgerSetup();
+ CreateCustomerWithPaymentTerm(Customer);
+ UpdateCustomerPostingGroup(Customer."Customer Posting Group");
+ LibraryJournals.CreateGenJournalLineWithBatch(
+ GenJournalLine, GenJournalLine."Document Type"::Invoice,
+ GenJournalLine."Account Type"::Customer, Customer."No.", InvoiceAmount);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Created Payment Slip with Payment line where "Credit Amount" = "A"
+ CreatePaymentSlipWithAmount(PaymentLine, PaymentLine."Account Type"::Customer, Customer."No.", InvoiceAmount);
+ // [GIVEN] Set "Credit Amount" = "A" - "PT" on Payment Line
+ PaymentLine.Validate("Credit Amount", CalcPaymentAmountWithToleranceCustomer(InvoiceAmount, Customer."No."));
+ // [WHEN] Same "Applies-to-ID" is set on Payment Line and Sales Invoice
+ SetAppliesToIDPaymentLine(PaymentLine, Customer."No.", GenJournalLine."Document No.");
+
+ // [THEN] Warning dialog appeared and accepted
+ // [THEN] "Credit Amount" = "A" - "PT" on Payment Line
+ Assert.AreEqual(
+ CalcPaymentAmountWithToleranceCustomer(InvoiceAmount, Customer."No."),
+ PaymentLine."Credit Amount",
+ PaymentLine.FieldCaption("Credit Amount"));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyVendorEntriesPageHandler,PaymentToleranceWarningPageHandler,ConfirmHandler')]
+ procedure PmtTolWarningOnPmntLineAfterAppliesToIdVendor()
+ var
+ Vendor: Record Vendor;
+ PaymentLine: Record "Payment Line FR";
+ GenJournalLine: Record "Gen. Journal Line";
+ InvoiceAmount: Decimal;
+ begin
+ // [FEATURE] [Payment Slip] [Application] [Purchases]
+ // [SCENARIO 363455] Accept Payment Tolerance Warning dialog on applying vendor entries in Payment Slip
+ Initialize();
+
+ InvoiceAmount := -LibraryRandom.RandDec(100, 2);
+
+ // [GIVEN] Posted Purchase Invoice with Amount "A" and Possible Payment Tolerance "PT"
+ UpdateGeneralLedgerSetup();
+ CreateVendorWithPaymentTerm(Vendor);
+ UpdateVendorPostingGroup(Vendor."Vendor Posting Group");
+ LibraryJournals.CreateGenJournalLineWithBatch(
+ GenJournalLine, GenJournalLine."Document Type"::Invoice,
+ GenJournalLine."Account Type"::Vendor, Vendor."No.", InvoiceAmount);
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+
+ // [GIVEN] Created Payment Slip with Payment line where "Credit Amount" = "A"
+ CreatePaymentSlipWithAmount(PaymentLine, PaymentLine."Account Type"::Vendor, Vendor."No.", InvoiceAmount);
+ // [GIVEN] Set "Credit Amount" = "A" - "PT" on Payment Line
+ PaymentLine.Validate("Credit Amount", CalcPaymentAmountWithToleranceVendor(InvoiceAmount, Vendor."No."));
+ // [WHEN] Same "Applies-to-ID" is set on Payment Line and Purchase Invoice
+ SetAppliesToIDPaymentLine(PaymentLine, Vendor."No.", GenJournalLine."Document No.");
+
+ // [THEN] Warning dialog appeared and accepted
+ // [THEN] "Credit Amount" = "A" - "PT" on Payment Line
+ Assert.AreEqual(
+ CalcPaymentAmountWithToleranceVendor(InvoiceAmount, Vendor."No."),
+ PaymentLine."Credit Amount",
+ PaymentLine.FieldCaption("Credit Amount"));
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler,PaymentToleranceWarningPageHandler,VendorBalanceRequestPageHandler')]
+ procedure VendorDetaiTriallBalanceOnPmtTolerance()
+ var
+ Vendor: Record Vendor;
+ GenJournalLine: Record "Gen. Journal Line";
+ VendorLedgerEntryInv: Record "Vendor Ledger Entry";
+ VendorLedgerEntryPmt: Record "Vendor Ledger Entry";
+ ApplicationDate: Date;
+ PostedInvoiceNo: Code[20];
+ PostedPmtNo: Code[20];
+ InvoiceAmount: Decimal;
+ AmountToApply: Decimal;
+ MaxPaymentToleranceAmt: Decimal;
+ begin
+ // [FEATURE] [Application] [Purchases]
+ // [SCENARIO 379007] Print Vendor Detail Trial Balance Report in case of Payment Tolerance
+ Initialize();
+
+
+ // [GIVEN] Setup Max Payment Tolerance Amount
+ InvoiceAmount := LibraryRandom.RandDecInRange(10, 500, 2);
+ MaxPaymentToleranceAmt := GetMaxPaymentTolerance(InvoiceAmount);
+
+ // [GIVEN] Posted Purchase Invoice
+ LibraryPurchase.CreateVendor(Vendor);
+ ApplicationDate := LibraryRandom.RandDate(10);
+ PostedInvoiceNo := PostPurchaseInvoiceWithTolerance(Vendor."No.", InvoiceAmount, ApplicationDate);
+ LibraryERM.FindVendorLedgerEntry(VendorLedgerEntryInv, VendorLedgerEntryInv."Document Type"::Invoice, PostedInvoiceNo);
+
+ // [GIVEN] Posted Payment
+ AmountToApply := Round(InvoiceAmount - MaxPaymentToleranceAmt / 2);
+ GenJournalLine."Account Type" := GenJournalLine."Account Type"::Vendor;
+ PostedPmtNo := CreateAndPostPayment(GenJournalLine, Vendor."No.", ApplicationDate, AmountToApply);
+ LibraryERM.FindVendorLedgerEntry(VendorLedgerEntryPmt, VendorLedgerEntryPmt."Document Type"::Payment, PostedPmtNo);
+
+ // [GIVEN] Apply Vendor Payment to Vendor Invoice using Payment Tolerance
+ LibraryERM.SetAppliestoIdVendor(VendorLedgerEntryInv);
+ LibraryERM.SetAppliestoIdVendor(VendorLedgerEntryPmt);
+ VendorLedgerEntryPmt.Validate("Accepted Payment Tolerance", MaxPaymentToleranceAmt);
+ VendorLedgerEntryPmt.Modify(true);
+ LibraryERM.PostVendLedgerApplication(VendorLedgerEntryPmt);
+
+ // [WHEN] Vendor Detail Trial Balance Report Run on Next Period
+ RunVendorDetailedBalance(Vendor."No.", ApplicationDate);
+
+ // [THEN] Report shows the zero balance - Nothing to Output
+ LibraryReportDataset.LoadDataSetFile();
+ Assert.AreEqual(0, LibraryReportDataset.RowCount(), 'Balance is Not Zero');
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler,PaymentToleranceWarningPageHandler,CustomerBalanceRequestPageHandler')]
+ procedure CustomerDetaiTriallBalanceOnPmtTolerance()
+ var
+ Customer: Record Customer;
+ GenJournalLine: Record "Gen. Journal Line";
+ CustLedgerEntryInv: Record "Cust. Ledger Entry";
+ CustLedgerEntryPmt: Record "Cust. Ledger Entry";
+ ApplicationDate: Date;
+ PostedInvoiceNo: Code[20];
+ PostedPmtNo: Code[20];
+ InvoiceAmount: Decimal;
+ AmountToApply: Decimal;
+ MaxPaymentToleranceAmt: Decimal;
+ begin
+ // [FEATURE] [Application] [Sales]
+ // [SCENARIO 379007] Print Customer Detail Trial Balance Report in case of Payment Tolerance
+ Initialize();
+
+
+ // [GIVEN] Setup Max Payment Tolerance Amount
+ InvoiceAmount := LibraryRandom.RandDecInRange(10, 500, 2);
+ MaxPaymentToleranceAmt := GetMaxPaymentTolerance(InvoiceAmount);
+
+ // [GIVEN] Posted Sales Invoice
+ LibrarySales.CreateCustomer(Customer);
+ ApplicationDate := LibraryRandom.RandDate(10);
+ PostedInvoiceNo := PostSalesInvoiceWithTolerance(Customer."No.", InvoiceAmount, ApplicationDate);
+ LibraryERM.FindCustomerLedgerEntry(CustLedgerEntryInv, CustLedgerEntryInv."Document Type"::Invoice, PostedInvoiceNo);
+
+ // [GIVEN] Posted Payment
+ AmountToApply := Round(InvoiceAmount - MaxPaymentToleranceAmt / 2);
+ GenJournalLine."Account Type" := GenJournalLine."Account Type"::Customer;
+ PostedPmtNo := CreateAndPostPayment(GenJournalLine, Customer."No.", ApplicationDate, -AmountToApply);
+ LibraryERM.FindCustomerLedgerEntry(CustLedgerEntryPmt, CustLedgerEntryPmt."Document Type"::Payment, PostedPmtNo);
+
+ // [GIVEN] Apply Customer Payment to Sales Invoice using Payment Tolerance
+ LibraryERM.SetAppliestoIdCustomer(CustLedgerEntryInv);
+ LibraryERM.SetAppliestoIdCustomer(CustLedgerEntryPmt);
+ CustLedgerEntryPmt.Validate("Accepted Payment Tolerance", MaxPaymentToleranceAmt);
+ CustLedgerEntryPmt.Modify(true);
+ LibraryERM.PostCustLedgerApplication(CustLedgerEntryPmt);
+
+ // [WHEN] Customer Detail Trial Balance Report Run on Next Period
+ RunCustomerDetailedBalance(Customer."No.", ApplicationDate);
+
+ // [THEN] Report shows the zero balance - Nothing to Output
+ LibraryReportDataset.LoadDataSetFile();
+ Assert.AreEqual(0, LibraryReportDataset.RowCount(), 'Balance is Not Zero');
+ end;
+
+ local procedure Initialize()
+ var
+ LibraryERMCountryData: Codeunit "Library - ERM Country Data";
+ begin
+ LibraryTestInitialize.OnTestInitialize(CODEUNIT::"ERM Payment Tolerance FR");
+ LibrarySetupStorage.Restore();
+
+ // Lazy Setup.
+ if IsInitialized then
+ exit;
+ LibraryTestInitialize.OnBeforeTestSuiteInitialize(CODEUNIT::"ERM Payment Tolerance FR");
+
+ IsInitialized := true;
+ LibrarySales.SetCreditWarningsToNoWarnings();
+ LibraryERMCountryData.UpdateGeneralLedgerSetup();
+ LibraryERMCountryData.UpdateGeneralPostingSetup();
+ LibrarySetupStorage.Save(DATABASE::"General Ledger Setup");
+ Commit();
+ LibraryTestInitialize.OnAfterTestSuiteInitialize(CODEUNIT::"ERM Payment Tolerance FR");
+ end;
+
+ local procedure CreateAndPostPayment(var GenJournalLine: Record "Gen. Journal Line"; DocNo: Code[20]; ApplicationDate: Date; Amount: Decimal): Code[20]
+ begin
+ LibraryJournals.CreateGenJournalLineWithBatch(
+ GenJournalLine,
+ GenJournalLine."Document Type"::Payment,
+ GenJournalLine."Account Type", DocNo,
+ Amount);
+ GenJournalLine.Validate("Posting Date", ApplicationDate);
+ GenJournalLine.Modify();
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+ exit(GenJournalLine."Document No.");
+ end;
+
+ local procedure CreateCustomerWithPaymentTerm(var Customer: Record Customer) DiscountDays: Integer
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ DiscountDays := LibraryRandom.RandInt(5); // Using Random Value for Days.
+ Customer.Validate("Payment Terms Code", CreatePaymentTerms(DiscountDays));
+ Customer.Modify(true);
+ end;
+
+ local procedure CreateVendorWithPaymentTerm(var Vendor: Record Vendor) DiscountDays: Integer
+ begin
+ LibraryPurchase.CreateVendor(Vendor);
+ DiscountDays := LibraryRandom.RandInt(5); // Using Random Value for Days.
+ Vendor.Validate("Payment Terms Code", CreatePaymentTerms(DiscountDays));
+ Vendor.Modify(true);
+ end;
+
+ local procedure CreatePaymentTerms(DiscountDateCalculationDays: Integer): Code[10]
+ var
+ PaymentTerms: Record "Payment Terms";
+ begin
+ LibraryERM.CreatePaymentTerms(PaymentTerms);
+ Evaluate(PaymentTerms."Due Date Calculation", '<' + Format(LibraryRandom.RandInt(2)) + 'M>');
+ Evaluate(PaymentTerms."Discount Date Calculation", '<' + Format(DiscountDateCalculationDays) + 'D>');
+ PaymentTerms.Validate("Due Date Calculation", PaymentTerms."Due Date Calculation");
+ PaymentTerms.Validate("Discount Date Calculation", PaymentTerms."Discount Date Calculation");
+ PaymentTerms.Validate("Discount %", LibraryRandom.RandDec(5, 2));
+ PaymentTerms.Modify(true);
+ exit(PaymentTerms.Code);
+ end;
+
+ local procedure CreatePaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]): Integer
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify(true);
+ exit(PaymentLine."Dimension Set ID");
+ end;
+
+ local procedure CreatePaymentSlipWithAmount(var PaymentLine: Record "Payment Line FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; PaymentAmount: Decimal)
+ begin
+ CreatePaymentSlip(AccountType, AccountNo);
+ FindPaymentLine(PaymentLine, AccountType, AccountNo);
+ PaymentLine.Validate("Credit Amount", PaymentAmount);
+ PaymentLine.Validate("Posting Date", PaymentLine."Due Date" - 5);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure EnqueueValuesForRequestPageHandler(No: Variant; DateFilter: Variant)
+ begin
+ LibraryVariableStorage.Enqueue(No);
+ LibraryVariableStorage.Enqueue(DateFilter);
+ end;
+
+ local procedure FindCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type")
+ begin
+ CustLedgerEntry.SetRange("Document Type", DocumentType);
+ CustLedgerEntry.SetRange("Customer No.", CustomerNo);
+ CustLedgerEntry.FindFirst();
+ CustLedgerEntry.CalcFields("Remaining Amount", Amount);
+ end;
+
+ local procedure FindVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; DocumentType: Enum "Gen. Journal Document Type")
+ begin
+ VendorLedgerEntry.SetRange("Document Type", DocumentType);
+ VendorLedgerEntry.SetRange("Vendor No.", VendorNo);
+ VendorLedgerEntry.FindFirst();
+ VendorLedgerEntry.CalcFields("Remaining Amount", Amount);
+ end;
+
+ local procedure FindPaymentLine(var PaymentLine: Record "Payment Line FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20])
+ begin
+ PaymentLine.SetRange("Account Type", AccountType);
+ PaymentLine.SetRange("Account No.", AccountNo);
+ PaymentLine.FindFirst();
+ end;
+
+ local procedure GetMaxPaymentTolerance(InvoiceAmount: Decimal) MaxPaymentToleranceAmount: Decimal
+ var
+ GeneralLedgerSetup: Record "General Ledger Setup";
+ begin
+ UpdateGeneralLedgerSetup();
+ RunChangePaymentTolerance('', LibraryRandom.RandDecInRange(2, 10, 2), LibraryRandom.RandDecInRange(2, 10, 2));
+ GeneralLedgerSetup.Get();
+ MaxPaymentToleranceAmount := Round(InvoiceAmount * GeneralLedgerSetup."Payment Tolerance %" / 100);
+ GeneralLedgerSetup."Max. Payment Tolerance Amount" := MaxPaymentToleranceAmount;
+ GeneralLedgerSetup.Modify();
+ exit(MaxPaymentToleranceAmount);
+ end;
+
+ local procedure PostPurchaseInvoiceWithTolerance(VendorNo: Code[20]; var InvoiceAmount: Decimal; ApplicationDate: Date): Code[20]
+ var
+ Item: Record Item;
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ begin
+ LibraryInventory.CreateItem(Item);
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, VendorNo);
+ LibraryPurchase.CreatePurchaseLine(PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, Item."No.",
+ LibraryRandom.RandIntInRange(2, 10));
+ PurchaseHeader.SetHideValidationDialog(true);
+ PurchaseHeader.Validate("Posting Date", ApplicationDate);
+ PurchaseLine.Validate("Direct Unit Cost", InvoiceAmount);
+ PurchaseLine.Modify(true);
+ PurchaseHeader.CalcFields("Amount Including VAT");
+ InvoiceAmount := PurchaseHeader."Amount Including VAT";
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, false, true));
+ end;
+
+ local procedure PostSalesInvoiceWithTolerance(CustomerNo: Code[20]; var InvoiceAmount: Decimal; ApplicationDate: Date): Code[20]
+ var
+ Item: Record Item;
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ begin
+ LibraryInventory.CreateItem(Item);
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Invoice, CustomerNo);
+ LibrarySales.CreateSalesLine(SalesLine, SalesHeader, SalesLine.Type::Item, Item."No.",
+ LibraryRandom.RandIntInRange(2, 10));
+ SalesHeader.SetHideValidationDialog(true);
+ SalesHeader.Validate("Posting Date", ApplicationDate);
+ SalesLine.Validate("Unit Price", InvoiceAmount);
+ SalesLine.Modify(true);
+ SalesHeader.CalcFields("Amount Including VAT");
+ InvoiceAmount := SalesHeader."Amount Including VAT";
+ exit(LibrarySales.PostSalesDocument(SalesHeader, false, true));
+ end;
+
+ local procedure RunChangePaymentTolerance(CurrencyCode: Code[10]; PaymentTolerance: Decimal; MaxPmtToleranceAmount: Decimal)
+ var
+ ChangePaymentTolerance: Report "Change Payment Tolerance";
+ begin
+ Clear(ChangePaymentTolerance);
+ ChangePaymentTolerance.InitializeRequest(false, CurrencyCode, PaymentTolerance, MaxPmtToleranceAmount);
+ ChangePaymentTolerance.UseRequestPage(false);
+ ChangePaymentTolerance.Run();
+ end;
+
+ local procedure RunVendorDetailedBalance(VendorNo: Code[20]; ApplicationDate: Date)
+ var
+ DateFilter: Code[30];
+ begin
+ DateFilter := StrSubstNo('%1..%2', CalcDate('', ApplicationDate), CalcDate('', ApplicationDate));
+ EnqueueValuesForRequestPageHandler(VendorNo, DateFilter);
+ REPORT.Run(REPORT::"Vendor Detail Trial Balance FR");
+ end;
+
+ local procedure RunCustomerDetailedBalance(CustomerNo: Code[20]; ApplicationDate: Date)
+ var
+ DateFilter: Code[30];
+ begin
+ DateFilter := StrSubstNo('%1..%2', CalcDate('', ApplicationDate), CalcDate('', ApplicationDate));
+ EnqueueValuesForRequestPageHandler(CustomerNo, DateFilter);
+ REPORT.Run(REPORT::"Customer Detail Trial Balance");
+ end;
+
+ local procedure CalcPaymentAmountWithToleranceCustomer(InvoiceAmount: Decimal; AccountNo: Code[20]): Decimal
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ MaxPaymentTolerance: Decimal;
+ begin
+ FindCustomerLedgerEntry(CustLedgerEntry, AccountNo, CustLedgerEntry."Document Type"::Invoice);
+ MaxPaymentTolerance := CustLedgerEntry."Max. Payment Tolerance" / 2; // Use for Verify partial Payment Tolerance Amount.
+ exit(InvoiceAmount - MaxPaymentTolerance)
+ end;
+
+ local procedure CalcPaymentAmountWithToleranceVendor(InvoiceAmount: Decimal; AccountNo: Code[20]): Decimal
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ MaxPaymentTolerance: Decimal;
+ begin
+ FindVendorLedgerEntry(VendorLedgerEntry, AccountNo, VendorLedgerEntry."Document Type"::Invoice);
+ MaxPaymentTolerance := VendorLedgerEntry."Max. Payment Tolerance" / 2; // Use for Verify partial Payment Tolerance Amount.
+ exit(InvoiceAmount - MaxPaymentTolerance)
+ end;
+
+ local procedure CreateGLAccountNo(): Code[20]
+ var
+ GLAccount: Record "G/L Account";
+ begin
+ LibraryERM.CreateGLAccount(GLAccount);
+ exit(GLAccount."No.");
+ end;
+
+ local procedure SetAppliesToIDPaymentLine(var PaymentLine: Record "Payment Line FR"; AccountNo: Code[20]; DocumentNo: Code[20])
+ begin
+ LibraryVariableStorage.Enqueue(AccountNo);
+ LibraryVariableStorage.Enqueue(DocumentNo);
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", PaymentLine);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure UpdateCustomerPostingGroup(PostingGroupCode: Code[20])
+ var
+ CustomerPostingGroup: Record "Customer Posting Group";
+ begin
+ CustomerPostingGroup.Get(PostingGroupCode);
+ CustomerPostingGroup.Validate("Payment Disc. Debit Acc.", CreateGLAccountNo());
+ CustomerPostingGroup.Validate("Payment Disc. Credit Acc.", CreateGLAccountNo());
+ CustomerPostingGroup.Validate("Payment Tolerance Debit Acc.", CreateGLAccountNo());
+ CustomerPostingGroup.Validate("Payment Tolerance Credit Acc.", CreateGLAccountNo());
+ CustomerPostingGroup.Modify(true);
+ end;
+
+ local procedure UpdateVendorPostingGroup(PostingGroupCode: Code[20])
+ var
+ VendorPostingGroup: Record "Vendor Posting Group";
+ begin
+ VendorPostingGroup.Get(PostingGroupCode);
+ VendorPostingGroup.Validate("Payment Disc. Debit Acc.", CreateGLAccountNo());
+ VendorPostingGroup.Validate("Payment Disc. Credit Acc.", CreateGLAccountNo());
+ VendorPostingGroup.Validate("Payment Tolerance Debit Acc.", CreateGLAccountNo());
+ VendorPostingGroup.Validate("Payment Tolerance Credit Acc.", CreateGLAccountNo());
+ VendorPostingGroup.Modify(true);
+ end;
+
+ local procedure UpdateGeneralLedgerSetup()
+ var
+ GeneralLedgerSetup: Record "General Ledger Setup";
+ begin
+ GeneralLedgerSetup.Get();
+ GeneralLedgerSetup.Validate(
+ "Payment Tolerance Posting", GeneralLedgerSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts");
+ GeneralLedgerSetup.Validate(
+ "Pmt. Disc. Tolerance Posting", GeneralLedgerSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts");
+ GeneralLedgerSetup.Validate("Payment Tolerance Warning", true);
+ GeneralLedgerSetup.Validate("Pmt. Disc. Tolerance Warning", true);
+ GeneralLedgerSetup.Modify(true);
+
+ // Using Random Number for Payment Tolerance Percentage and Maximum Payment Tolerance Amount.
+ RunChangePaymentTolerance('', LibraryRandom.RandDec(10, 2), LibraryRandom.RandDec(10, 2));
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := not (Question = ConfirmMessageForPaymentQst);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentToleranceWarningPageHandler(var PaymentToleranceWarning: Page "Payment Tolerance Warning"; var Response: Action)
+ begin
+ // Modal Page Handler for Payment Tolerance Warning.
+ PaymentToleranceWarning.InitializeOption(1);
+ Response := ACTION::Yes
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ begin
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyCustomerEntriesPageHandler(var ApplyCustomerEntries: TestPage "Apply Customer Entries")
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ CustomerNo: Variant;
+ DocumentNo: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(CustomerNo);
+ CustLedgerEntry.SetRange("Customer No.", CustomerNo);
+ LibraryVariableStorage.Dequeue(DocumentNo);
+ CustLedgerEntry.SetRange("Document No.", DocumentNo);
+ CustLedgerEntry.FindFirst();
+
+ ApplyCustomerEntries.GotoRecord(CustLedgerEntry);
+ ApplyCustomerEntries."Set Applies-to ID".Invoke();
+ ApplyCustomerEntries.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyVendorEntriesPageHandler(var ApplyVendorrEntries: TestPage "Apply Vendor Entries")
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ VendorNo: Variant;
+ DocumentNo: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(VendorNo);
+ VendorLedgerEntry.SetRange("Vendor No.", VendorNo);
+ LibraryVariableStorage.Dequeue(DocumentNo);
+ VendorLedgerEntry.SetRange("Document No.", DocumentNo);
+ VendorLedgerEntry.FindFirst();
+
+ ApplyVendorrEntries.GotoRecord(VendorLedgerEntry);
+ ApplyVendorrEntries.ActionSetAppliesToID.Invoke();
+ ApplyVendorrEntries.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure CustomerBalanceRequestPageHandler(var CustomerDetailTrialBalance: TestRequestPage "Customer Detail Trial Balance")
+ begin
+ CustomerDetailTrialBalance.Customer.SetFilter("No.", LibraryVariableStorage.DequeueText());
+ CustomerDetailTrialBalance.Customer.SetFilter("Date Filter", LibraryVariableStorage.DequeueText());
+ CustomerDetailTrialBalance.ExcludeBalanceOnly.SetValue(false);
+ CustomerDetailTrialBalance.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure VendorBalanceRequestPageHandler(var VendorDetailTrialBalance: TestRequestPage "Vendor Detail Trial Balance FR")
+ begin
+ VendorDetailTrialBalance.Vendor.SetFilter("No.", LibraryVariableStorage.DequeueText());
+ VendorDetailTrialBalance.Vendor.SetFilter("Date Filter", LibraryVariableStorage.DequeueText());
+ VendorDetailTrialBalance.ExcludeBalanceOnly.SetValue(false);
+ VendorDetailTrialBalance.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMSEPA.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMSEPA.Codeunit.al
new file mode 100644
index 0000000000..bb8a3a58c5
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/ERMSEPA.Codeunit.al
@@ -0,0 +1,302 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Inventory.Item;
+using Microsoft.Purchases.Document;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Document;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+codeunit 144020 "ERM SEPA"
+{
+ // 1. Test to Verify XML Data after print Payment Slip using report Remittance.
+ // 2. Test to Verify XML Data after print Payment Slip using report Withdraw recapitulation.
+ // 3. Test to Verify XML Data after print Payment Slip using report Draft recapitulation.
+ //
+ // Covers Test Cases for WI - 344201
+ // ------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ------------------------------------------------------------------------------------
+ // PaymentSlipUsingReportRemittance 217031
+ // PaymentSlipUsingReportWithdrawRecapitulation 217030
+ // PaymentSlipUsingReportDraftRecapitulation 217028
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ IBANLbl: Label 'Payment_Lines_IBAN';
+ SWIFTCodeLbl: Label 'Payment_Lines__SWIFT_Code_';
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyCustomerEntriesPageHandler,RemittanceRequestPageHandler,ConfirmHandler')]
+ procedure PaymentSlipUsingReportRemittance()
+ begin
+ // Test to Verify XML Data after print Payment Slip using report Remittance.
+ PaymentSlipUsingAccountTypeCustomer(REPORT::"Remittance FR", 'Payment_Line_IBAN', 'Payment_Line__SWIFT_Code_');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyCustomerEntriesPageHandler,WithdrawRecapitulationRequestPageHandler,ConfirmHandler')]
+ procedure PaymentSlipUsingReportWithdrawRecapitulation()
+ begin
+ // Test to Verify XML Data after print Payment Slip using report Withdraw recapitulation.
+ PaymentSlipUsingAccountTypeCustomer(REPORT::"Withdraw recapitulation FR", IBANLbl, SWIFTCodeLbl);
+ end;
+
+ local procedure PaymentSlipUsingAccountTypeCustomer(ReportID: Integer; Caption: Text; Caption2: Text)
+ var
+ PaymentLine: Record "Payment Line FR";
+ SalesHeader: Record "Sales Header";
+ begin
+ // Setup: Create Setup for Payment Slip, create and post Sales Order and create Payment Slip.
+ Initialize();
+ CreateSalesOrder(SalesHeader);
+ LibraryVariableStorage.Enqueue(SetupForPaymentSlip(ReportID)); // Enqueue Payment Class Code for PaymentClassListPageHandler.
+ LibraryVariableStorage.Enqueue(LibrarySales.PostSalesDocument(SalesHeader, true, true)); // Enqueue Sales Invoice Header No for ApplyCustomerEntriesPageHandler.
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer, SalesHeader."Sell-to Customer No.");
+
+ // Exercise: Print Payment Slip.
+ PrintPaymentSlip(PaymentLine."No.");
+
+ // Verify: Verify values of Payment_Line_IBAN, Payment_Line__SWIFT_Code_ and PaymtHeader__No__ on report.
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader__No__', PaymentLine."No.");
+ LibraryReportDataset.AssertElementWithValueExists(Caption, PaymentLine.IBAN);
+ LibraryReportDataset.AssertElementWithValueExists(Caption2, PaymentLine."SWIFT Code");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassListPageHandler,ApplyVendorEntriesPageHandler,ConfirmHandler,DraftRecapitulationRequestPageHandler')]
+ procedure PaymentSlipUsingReportDraftRecapitulation()
+ var
+ PaymentLine: Record "Payment Line FR";
+ PurchaseHeader: Record "Purchase Header";
+ begin
+ // Test to Verify XML Data after print Payment Slip using report Draft recapitulation.
+
+ // Setup: Create Setup for Payment Slip. Create and post Purchase Order and create Payment Slip.
+ Initialize();
+
+ CreatePurchaseOrder(PurchaseHeader);
+ LibraryVariableStorage.Enqueue(SetupForPaymentSlip(REPORT::"Draft recapitulation FR")); // Enqueue Payment Class Code for PaymentClassListPageHandler.
+ LibraryVariableStorage.Enqueue(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true)); // Enqueue Purchase Invoice Header No for ApplyVendorEntriesPageHandler.
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Vendor, PurchaseHeader."Buy-from Vendor No.");
+
+ // Exercise: Print Payment Slip.
+ PrintPaymentSlip(PaymentLine."No.");
+
+ // Verify: Verify values of Payment_Lines_IBAN, Payment_Lines__SWIFT_Code_ and PaymtHeader__No__ on report.
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists('PaymtHeader__No__', PaymentLine."No.");
+ LibraryReportDataset.AssertElementWithValueExists(IBANLbl, PaymentLine.IBAN);
+ LibraryReportDataset.AssertElementWithValueExists(SWIFTCodeLbl, PaymentLine."SWIFT Code");
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateCustomerBankAccount(): Code[20]
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ CompanyInformation: Record "Company Information";
+ Customer: Record Customer;
+ begin
+ CompanyInformation.Get();
+ LibrarySales.CreateCustomer(Customer);
+ LibraryFRLocalization.CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ CustomerBankAccount.Validate(IBAN, CompanyInformation.IBAN);
+ CustomerBankAccount.Validate("SWIFT Code", LibraryUtility.GenerateGUID());
+ CustomerBankAccount.Validate("Country/Region Code", CompanyInformation."Country/Region Code");
+ CustomerBankAccount.Modify(true);
+ exit(CustomerBankAccount."Customer No.");
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ NoSeries: Record "No. Series";
+ PaymentClass: Record "Payment Class FR";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate("Header No. Series", NoSeries.Code);
+ PaymentClass.Modify(true);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePurchaseOrder(var PurchaseHeader: Record "Purchase Header")
+ var
+ Item: Record Item;
+ PurchaseLine: Record "Purchase Line";
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Order, CreateVendorBankAccount());
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine, PurchaseHeader, PurchaseLine.Type::Item, LibraryInventory.CreateItem(
+ Item), LibraryRandom.RandDec(10, 2)); // Take random Quantity.
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDec(100, 2)); // Take random Direct Unit Cost.
+ PurchaseLine.Modify(true);
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentLine: Record "Payment Line FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", AccountType);
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure CreatePaymentStep(PaymentClass: Code[30]; ReportNo: Integer)
+ var
+ PaymentStep: Record "Payment Step FR";
+ begin
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass);
+ PaymentStep.Validate("Action Type", PaymentStep."Action Type"::Report);
+ PaymentStep.Validate("Report No.", ReportNo);
+ PaymentStep.Modify(true);
+ end;
+
+ local procedure CreateSalesOrder(var SalesHeader: Record "Sales Header")
+ var
+ Item: Record Item;
+ SalesLine: Record "Sales Line";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Order, CreateCustomerBankAccount());
+ LibrarySales.CreateSalesLine(
+ SalesLine, SalesHeader, SalesLine.Type::Item, LibraryInventory.CreateItem(
+ Item), LibraryRandom.RandDec(10, 2)); // Take random Quantity.
+ SalesLine.Validate("Unit Price", LibraryRandom.RandDec(100, 2)); // Take random Unit Price.
+ SalesLine.Modify(true);
+ end;
+
+ local procedure CreateVendorBankAccount(): Code[20]
+ var
+ CompanyInformation: Record "Company Information";
+ Vendor: Record Vendor;
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ CompanyInformation.Get();
+ LibraryPurchase.CreateVendor(Vendor);
+ LibraryPurchase.CreateVendorBankAccount(VendorBankAccount, Vendor."No.");
+ VendorBankAccount.Validate(IBAN, CompanyInformation.IBAN);
+ VendorBankAccount.Validate("Country/Region Code", CompanyInformation."Country/Region Code");
+ VendorBankAccount.Validate("SWIFT Code", LibraryUtility.GenerateGUID());
+ VendorBankAccount.Modify(true);
+ exit(VendorBankAccount."Vendor No.");
+ end;
+
+ local procedure PrintPaymentSlip(No: Code[20])
+ var
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("No.", No);
+ PaymentSlip.Lines.Application.Invoke();
+ Commit();
+ PaymentSlip.Print.Invoke();
+ PaymentSlip.Close();
+ end;
+
+ local procedure SetupForPaymentSlip(ReportID: Integer) PaymentClass: Text[30]
+ var
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ PaymentClass := CreatePaymentClass();
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass);
+ CreatePaymentStep(PaymentClass, ReportID);
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyCustomerEntriesPageHandler(var ApplyCustomerEntries: TestPage "Apply Customer Entries")
+ var
+ DocumentNo: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(DocumentNo);
+ ApplyCustomerEntries.FILTER.SetFilter("Document No.", DocumentNo);
+ ApplyCustomerEntries."Set Applies-to ID".Invoke();
+ ApplyCustomerEntries.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyVendorEntriesPageHandler(var ApplyVendorEntries: TestPage "Apply Vendor Entries")
+ var
+ DocumentNo: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(DocumentNo);
+ ApplyVendorEntries.FILTER.SetFilter("Document No.", DocumentNo);
+ ApplyVendorEntries.ActionSetAppliesToID.Invoke();
+ ApplyVendorEntries.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassListPageHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ "Code": Variant;
+ begin
+ LibraryVariableStorage.Dequeue(Code);
+ PaymentClassList.FILTER.SetFilter(Code, Code);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [RequestPageHandler]
+ procedure DraftRecapitulationRequestPageHandler(var DraftRecapitulation: TestRequestPage "Draft recapitulation FR")
+ begin
+ DraftRecapitulation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure RemittanceRequestPageHandler(var Remittance: TestRequestPage "Remittance FR")
+ begin
+ Remittance.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawRecapitulationRequestPageHandler(var WithdrawRecapitulation: TestRequestPage "Withdraw recapitulation FR")
+ begin
+ WithdrawRecapitulation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA02DDFunctionalTest.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA02DDFunctionalTest.Codeunit.al
new file mode 100644
index 0000000000..df35fe4fef
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA02DDFunctionalTest.Codeunit.al
@@ -0,0 +1,950 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Bank.Setup;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+codeunit 144022 "SEPA.02 DD Functional Test"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryXMLRead: Codeunit "Library - XML Read";
+ SEPA_PartnerType: Option ,Company,Person;
+ UnexpectedEmptyNodeErr: Label 'Unexpected empty value for node <%1> of subtree <%2>.', Comment = '%1 = Node Name, %2 = Subtree Root Name';
+ OneToManyNotAllowedErr: Label 'You cannot export a SEPA customer payment that is applied to multiple documents.';
+ ErrorsExistErr: Label 'The file export has one or more errors. For each of the lines to be exported, resolve any errors that are displayed in the File Export Errors FactBox.';
+ MissingMandateErr: Label 'Mandate ID must have a value in the currently selected record.';
+ UnappliedLinesNotAllowedErr: Label 'Payment slip line %1 must be applied to a customer invoice.', Comment = '%1 = No.';
+ BankAccErr: Label 'You must use customer bank account, %1, which you specified in the selected direct debit mandate.', Comment = '%1 = code';
+ AccTypeErr: Label 'Only customer transactions are allowed.';
+ PartnerTypeErr: Label 'The customer''s Partner Type, Company, must be equal to the Partner Type, Person, specified in the collection.';
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler,SuggestCustPaymentsReqPageHandler')]
+ procedure SuggestCustPayments()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ PaymentHeader: Record "Payment Header FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentHeader(PaymentHeader, SEPA_PartnerType::Company);
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", '');
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", SEPADirectDebitMandate.ID);
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", '');
+
+ // Exercise.
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+ Customer.SetRange("No.", Customer."No.");
+ SuggestCustomerPayments.SetTableView(Customer);
+ SuggestCustomerPayments.RunModal();
+
+ // Verify.
+ VerifyPaymentLines(PaymentHeader, Customer);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler,SuggestCustPaymentsReqPageHandler')]
+ procedure SuggestCustPaymentsDiffPartnerType()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ Customer1: Record Customer;
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreateCustomerWithInvoice(Customer1, CustLedgerEntry, SEPA_PartnerType::Person);
+ CreatePaymentHeader(PaymentHeader, SEPA_PartnerType::Person);
+
+ // Exercise.
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+ Customer.SetFilter("No.", '%1|%2', Customer."No.", Customer1."No.");
+ Customer.SetRange("Partner Type", Customer."Partner Type");
+ Commit();
+ SuggestCustomerPayments.SetTableView(Customer);
+ SuggestCustomerPayments.RunModal();
+
+ // Verify.
+ VerifyPaymentLines(PaymentHeader, Customer);
+ PaymentHeader.Find();
+ PaymentHeader.TestField("Partner Type", SEPA_PartnerType::Company);
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.SetRange("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.SetRange("Account No.", Customer1."No.");
+ Assert.IsTrue(PaymentLine.IsEmpty, 'No payment lines should be created for customer ' + Customer1."No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithoutApplication()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.",
+ PaymentLine."Line No.", StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No."), 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithAppliesToDocNo()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithAppliesToID()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine.Validate("Applies-to ID", PaymentLine."Document No.");
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineOneToManyNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to ID" := PaymentLine."Document No.";
+ PaymentLine.Modify();
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+ CreateCustomerLedgerEntry(CustLedgerEntry, PaymentLine."Account No.", '');
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", OneToManyNotAllowedErr, 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineDiffThanInvoiceNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ CustLedgerEntry."Document Type" := CustLedgerEntry."Document Type"::"Credit Memo";
+ CustLedgerEntry.Modify();
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ PaymentLine.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", UnappliedLinesNotAllowedErr, 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineDiffThanCustomerNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", AccTypeErr, 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateBankAccCodeOnPmtLine()
+ var
+ Customer: Record Customer;
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+
+ // Exercise.
+ asserterror PaymentLine.Validate("Bank Account Code", CustomerBankAccount.Code);
+
+ // Verify.
+ Assert.ExpectedError(StrSubstNo(BankAccErr, PaymentLine."Bank Account Code"));
+ VerifyCollectionWasDeleted(PaymentHeader);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateMandateIdOnPmtLineWithBankAcc()
+ var
+ Customer: Record Customer;
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, CustLedgerEntry."Customer No.", CustomerBankAccount.Code);
+
+ // Exercise.
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Verify.
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateMandateIdOnPmtLineWithoutBankAcc()
+ var
+ Customer: Record Customer;
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, CustLedgerEntry."Customer No.", CustomerBankAccount.Code);
+
+ // Exercise.
+ PaymentLine.Validate("Bank Account Code", '');
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Verify.
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLineExportErrors()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", MissingMandateErr, 1);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLineDeleteExportErrors()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+ Assert.ExpectedError(ErrorsExistErr);
+
+ // Exercise.
+ PaymentLine.Delete(true);
+
+ // Verify.
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", MissingMandateErr, 0);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLinePartnerTypeError()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID",
+ SEPA_PartnerType::Person);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.",
+ PartnerTypeErr, 1);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ReplaceClosedMandate()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ SEPADirectDebitMandate.Get(CustLedgerEntry."Direct Debit Mandate ID");
+ SEPADirectDebitMandate.Validate(Closed, true);
+ SEPADirectDebitMandate.Modify(true);
+ Clear(SEPADirectDebitMandate);
+
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", Customer."Preferred Bank Account Code");
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+ VerifySEPAMandate(PaymentLine."Direct Debit Mandate ID", 1);
+ end;
+
+ local procedure CreateSEPABankAccount(var BankAccount: Record "Bank Account")
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate(Balance, LibraryRandom.RandIntInRange(100000, 1000000));
+ BankAccount.Validate("Bank Account No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Bank Account No."), DATABASE::"Bank Account"));
+ BankAccount.Validate("Country/Region Code", 'FR');
+ BankAccount.Validate(IBAN, LibraryUtility.GenerateRandomCode(BankAccount.FieldNo(IBAN), DATABASE::"Bank Account"));
+ BankAccount.Validate("SEPA Direct Debit Exp. Format", FindSEPADDPaymentFormat());
+ BankAccount.Validate("Direct Debit Msg. Nos.", LibraryERM.CreateNoSeriesCode());
+ BankAccount.Validate("SWIFT Code", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("SWIFT Code"), DATABASE::"Bank Account"));
+ BankAccount.Validate("Creditor No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Creditor No."), DATABASE::"Bank Account"));
+ BankAccount.Modify(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportSecondPmtHeaderWithoutError()
+ var
+ Customer: Record Customer;
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentLine: array[2] of Record "Payment Line FR";
+ CustLedgerEntry: array[2] of Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // [SCENARIO 460340] FR local - not possible to re-create a payment file in Payment Slip 2 if an error exists in Payment Slip 1
+ // [GIVEN] Create customer with 2 Invoices
+ CreateCustomerWithTwoInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+
+ // [GIVEN] Create Payment slip of first Invoice
+ CreatePaymentSlip(PaymentHeader[1], PaymentLine[1], Customer."No.", CustLedgerEntry[1]."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+
+ // [GIVEN] Update credit amount on Payment Line and set Applies-to ID on Cust. Ledger Entry on first CLE entry
+ PaymentLine[1].Validate("Applies-to ID", PaymentLine[1]."Document No.");
+ CustLedgerEntry[1].CalcFields("Remaining Amount");
+ PaymentLine[1].Validate("Credit Amount", CustLedgerEntry[1]."Remaining Amount");
+ PaymentLine[1].Modify();
+ CustLedgerEntry[1]."Applies-to ID" := PaymentLine[1]."Document No.";
+ CustLedgerEntry[1].Modify();
+
+ // [GIVEN] Update Posting date and Document date to get error during Generate XML file
+ PaymentHeader[1].Validate("Posting Date", CalcDate('<-1D>', WorkDate()));
+ PaymentHeader[1].Validate("Document Date", CalcDate('<-1D>', WorkDate()));
+ PaymentHeader[1].Modify();
+
+ // [VERIFY] Verify error will come on SEPA export file of first Cust Ledger Entry
+ asserterror ExportSEPAFile(PaymentHeader[1]);
+
+ // [GIVEN] Create Second Payment Slip and update Applies to id and Credit amount.
+ CreatePaymentSlip(PaymentHeader[2], PaymentLine[2], Customer."No.", CustLedgerEntry[2]."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine[2].Validate("Applies-to ID", PaymentLine[2]."Document No.");
+ CustLedgerEntry[2].CalcFields("Remaining Amount");
+ PaymentLine[2].Validate("Credit Amount", CustLedgerEntry[2]."Remaining Amount");
+ PaymentLine[2].Modify();
+ CustLedgerEntry[2]."Applies-to ID" := PaymentLine[2]."Document No.";
+ CustLedgerEntry[2].Modify();
+
+ // [GIVEN] Export SEPA file of second payment slip
+ SEPAFilePath := ExportSEPAFile(PaymentHeader[2]);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // [VERIFY] Verify file exported successfully
+ VerifySEPADDXmlFile(PaymentHeader[2], PaymentLine[2], GetMessageToRecipient(CustLedgerEntry[2]));
+ VerifySEPAMandate(CustLedgerEntry[2]."Direct Debit Mandate ID", 1);
+
+ // [GIVEN] Clean data
+ PaymentHeader[1].Delete(true);
+ PaymentHeader[2].Delete(true);
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Name, '');
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Validate(Enable, true);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Customer);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Direct Debit");
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass.Code);
+ PaymentStep.Name := 'Export File';
+ PaymentStep."Action Type" := PaymentStep."Action Type"::File;
+ PaymentStep."Export Type" := PaymentStep."Export Type"::XMLport;
+ PaymentStep."Export No." := XMLPORT::"SEPA DD pain.008.001.02";
+ PaymentStep.Modify();
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR"; SEPAPartnerType: Option)
+ var
+ BankAccount: Record "Bank Account";
+ PaymentClassCode: Code[30];
+ begin
+ PaymentClassCode := CreatePaymentClass();
+ LibraryVariableStorage.Enqueue(PaymentClassCode);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Account Type", PaymentHeader."Account Type"::"Bank Account");
+ CreateSEPABankAccount(BankAccount);
+ PaymentHeader.Validate("Account No.", BankAccount."No.");
+ PaymentHeader.Validate("Partner Type", SEPAPartnerType);
+ PaymentHeader.Modify();
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR"; CustomerNo: Code[20]; MandateID: Code[35]; SEPAPartnerType: Option)
+ begin
+ CreatePaymentHeader(PaymentHeader, SEPAPartnerType);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.Validate("Account No.", CustomerNo);
+ PaymentLine.Validate("Credit Amount", LibraryRandom.RandDec(100, 2));
+ PaymentLine.Validate("Direct Debit Mandate ID", MandateID);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure CreateCustomerWithInvoice(var Customer: Record Customer; var CustLedgerEntry: Record "Cust. Ledger Entry"; SEPAPartnerType: Option)
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ CreateCustomerAddress(Customer);
+ CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", CustomerBankAccount.Code);
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", SEPADirectDebitMandate.ID);
+ Customer.Validate("Preferred Bank Account Code", CustomerBankAccount.Code);
+ Customer.Validate("Partner Type", SEPAPartnerType);
+ Customer.Modify(true);
+ end;
+
+ local procedure ExportSEPAFile(var PaymentHeader: Record "Payment Header FR") ExportedFilePath: Text
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ DirectDebitCollectionEntry: Record "Direct Debit Collection Entry";
+ OutStr: OutStream;
+ File: File;
+ begin
+ DirectDebitCollection.CreateRecord(PaymentHeader."No.", PaymentHeader."Account No.", PaymentHeader."Partner Type");
+ DirectDebitCollection."Source Table ID" := DATABASE::"Payment Header FR";
+ DirectDebitCollection.Modify();
+ DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No.");
+ ExportedFilePath := TemporaryPath + LibraryUtility.GenerateGUID() + '.xml';
+ File.Create(ExportedFilePath);
+ File.CreateOutStream(OutStr);
+ XMLPORT.Export(XMLPORT::"SEPA DD pain.008.001.02", OutStr, DirectDebitCollectionEntry);
+ File.Close();
+ end;
+
+ local procedure CreateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account"; CustomerNo: Code[20])
+ begin
+ LibrarySales.CreateCustomerBankAccount(CustomerBankAccount, CustomerNo);
+ CustomerBankAccount.IBAN := LibraryUtility.GenerateGUID();
+ CustomerBankAccount."SWIFT Code" := LibraryUtility.GenerateGUID();
+ CustomerBankAccount.Modify();
+ end;
+
+ local procedure CreateCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; SEPADirectDebitMandateID: Code[35])
+ var
+ GenJournalBatch: Record "Gen. Journal Batch";
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ LibraryERM.SelectGenJnlBatch(GenJournalBatch);
+ LibraryERM.ClearGenJournalLines(GenJournalBatch);
+ LibraryERM.CreateGeneralJnlLine(GenJournalLine, GenJournalBatch."Journal Template Name", GenJournalBatch.Name,
+ GenJournalLine."Document Type"::Invoice, GenJournalLine."Account Type"::Customer,
+ CustomerNo, LibraryRandom.RandDec(1000, 2));
+ GenJournalLine."Direct Debit Mandate ID" := SEPADirectDebitMandateID;
+ GenJournalLine."Payment Method Code" := '';
+ GenJournalLine.Modify();
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+ CustLedgerEntry.SetRange("Customer No.", GenJournalLine."Account No.");
+ CustLedgerEntry.SetRange("Document No.", GenJournalLine."Document No.");
+ CustLedgerEntry.FindLast();
+ end;
+
+ local procedure CreateCustomerAddress(var Customer: Record Customer)
+ begin
+ Customer.Validate(Address, LibraryUtility.GenerateRandomCode(Customer.FieldNo(Address), DATABASE::Customer));
+ Customer.Validate("Country/Region Code", 'FR');
+ Customer.Validate(City, LibraryUtility.GenerateRandomCode(Customer.FieldNo(City), DATABASE::Customer));
+ Customer.Validate("Post Code", LibraryUtility.GenerateRandomCode(Customer.FieldNo("Post Code"), DATABASE::Customer));
+ Customer.Modify(true);
+ end;
+
+ local procedure CreateDirectDebitMandate(var SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; CustomerNo: Code[20]; CustomerBankAccountCode: Code[20])
+ begin
+ SEPADirectDebitMandate.Init();
+ SEPADirectDebitMandate."Customer No." := CustomerNo;
+ SEPADirectDebitMandate."Customer Bank Account Code" := CustomerBankAccountCode;
+ SEPADirectDebitMandate."Valid From" := WorkDate();
+ SEPADirectDebitMandate."Valid To" := WorkDate() + LibraryRandom.RandIntInRange(300, 600);
+ SEPADirectDebitMandate."Date of Signature" := WorkDate();
+ SEPADirectDebitMandate."Expected Number of Debits" := LibraryRandom.RandInt(10);
+ SEPADirectDebitMandate.Insert(true);
+ end;
+
+ local procedure FindSEPADDPaymentFormat(): Code[20]
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+#pragma warning disable AA0210
+ BankExportImportSetup.SetRange("Processing XMLport ID", XMLPORT::"SEPA DD pain.008.001.02");
+#pragma warning restore AA0210
+ BankExportImportSetup.FindFirst();
+ exit(BankExportImportSetup.Code);
+ end;
+
+ local procedure GetMessageToRecipient(CustLedgerEntry: Record "Cust. Ledger Entry"): Text
+ begin
+ exit(CustLedgerEntry.Description + ' ;' + CustLedgerEntry."Document No.");
+ end;
+
+ local procedure VerifySEPADDXmlFile(PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR"; MsgToRecipient: Text)
+ begin
+ VerifyXmlFileDeclarationAndVersion();
+ VerifyGroupHeader(PaymentLine);
+ VerifyInitiatingParty();
+ VerifyPaymentInformationHeader(PaymentLine);
+ VerifyCreditor(PaymentHeader, MsgToRecipient);
+ VerifyDebitor(PaymentLine);
+ end;
+
+ local procedure VerifyXmlFileDeclarationAndVersion()
+ begin
+ LibraryXMLRead.VerifyXMLDeclaration('1.0', 'UTF-8', 'no');
+ LibraryXMLRead.VerifyAttributeValue('Document', 'xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.008.001.02');
+ end;
+
+ local procedure VerifyGroupHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory/required elements
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'MsgId');
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'CreDtTm');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'NbOfTxs', '1');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'CtrlSum', Format(PaymentLine."Credit Amount", 0, 9));
+ end;
+
+ local procedure VerifyInitiatingParty()
+ var
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ VerifyCompanyNameAndPostalAddress(CompanyInformation, 'InitgPty');
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Id', CompanyInformation."VAT Registration No.");
+ end;
+
+ local procedure VerifyCompanyNameAndPostalAddress(CompanyInformation: Record "Company Information"; SubtreeRootNodeName: Text)
+ begin
+ VerifyNameAndPostalAddress(
+ SubtreeRootNodeName, CompanyInformation.Name, CompanyInformation.Address,
+ CompanyInformation."Post Code", CompanyInformation.City, CompanyInformation."Country/Region Code");
+ end;
+
+ local procedure VerifyPaymentInformationHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory elements
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'PmtMtd', 'DD'); // Hardcoded to 'TRF' by the FR SEPA standard
+
+ // Optional element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'BtchBookg', 'false');
+ // PmtTpInf/InstrPrty removed due to BUG: 267559
+ LibraryXMLRead.VerifyElementAbsenceInSubtree('PmtTpInf', 'InstrPrty');
+
+ // Mandatory element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ReqdColltnDt', PaymentLine."Posting Date");
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ChrgBr', 'SLEV'); // Hardcoded by FR SEPA standard
+ end;
+
+ local procedure VerifyCreditor(PaymentHeader: Record "Payment Header FR"; MsgToRecipient: Text)
+ var
+ BankAccount: Record "Bank Account";
+ CompanyInformation: Record "Company Information";
+ begin
+ BankAccount.Get(PaymentHeader."Account No.");
+ CompanyInformation.Get();
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAcct', 'IBAN', BankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAgt', 'BIC', BankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Othr', 'Id', BankAccount."Creditor No.");
+ LibraryXMLRead.VerifyNodeValueInSubtree('SchmeNm', 'Prtry', 'SEPA');
+ LibraryXMLRead.VerifyNodeValueInSubtree('Cdtr', 'Nm', CompanyInformation.Name);
+ LibraryXMLRead.VerifyNodeValue('Ustrd', MsgToRecipient);
+ end;
+
+ local procedure VerifyDebitor(PaymentLine: Record "Payment Line FR")
+ var
+ Customer: Record Customer;
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ Customer.Get(PaymentLine."Account No.");
+ CustomerBankAccount.Get(Customer."No.", PaymentLine."Bank Account Code");
+ SEPADirectDebitMandate.Get(PaymentLine."Direct Debit Mandate ID");
+
+ VerifyNameAndPostalAddress(
+ 'DrctDbtTxInf', Customer.Name, Customer.Address, Customer."Post Code", Customer.City, Customer."Country/Region Code");
+ // DrctDbtTxInf/PmtTpInf removed due to BUG: 267559
+ LibraryXMLRead.VerifyNodeAbsenceInSubtree('DrctDbtTxInf', 'PmtTpInf');
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTxInf', 'InstdAmt', PaymentLine."Credit Amount");
+ LibraryXMLRead.VerifyAttributeValueInSubtree('DrctDbtTxInf', 'InstdAmt', 'Ccy', 'EUR');
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTx', 'MndtId', SEPADirectDebitMandate.ID);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTx', 'DtOfSgntr', SEPADirectDebitMandate."Date of Signature");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Dbtr', 'BICOrBEI', CustomerBankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAcct', 'IBAN', CustomerBankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAgt', 'BIC', CustomerBankAccount."SWIFT Code");
+ end;
+
+ local procedure VerifyNameAndPostalAddress(SubtreeRootNodeName: Text; Name: Text; Address: Text; PostCode: Text; City: Text; CountryRegionCode: Text)
+ begin
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'Nm', Name);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'StrtNm', Address);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'PstCd', PostCode);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'TwnNm', City);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'Ctry', CountryRegionCode);
+ end;
+
+ local procedure VerifyNodeExistsAndNotEmpty(SubtreeRootName: Text[30]; NodeName: Text[30])
+ begin
+ Assert.AreNotEqual(
+ '', LibraryXMLRead.GetNodeValueInSubtree(SubtreeRootName, NodeName), StrSubstNo(UnexpectedEmptyNodeErr, NodeName, SubtreeRootName));
+ end;
+
+ local procedure VerifyPaymentErrors(SourceTableID: Integer; PaymentDocNo: Code[20]; LineNo: Integer; ExpErrorText: Text; ExpCount: Integer)
+ var
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ begin
+ PaymentJnlExportErrorText.SetRange("Journal Template Name", '');
+ PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(SourceTableID));
+ PaymentJnlExportErrorText.SetRange("Document No.", PaymentDocNo);
+ PaymentJnlExportErrorText.SetRange("Journal Line No.", LineNo);
+ PaymentJnlExportErrorText.SetRange("Error Text", ExpErrorText);
+ Assert.AreEqual(ExpCount, PaymentJnlExportErrorText.Count, 'Error: ' + ExpErrorText + ', was encountered unexpectedly.');
+ end;
+
+ local procedure VerifyCollectionWasDeleted(PaymentHeader: Record "Payment Header FR")
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ begin
+ DirectDebitCollection.SetRange(Identifier, PaymentHeader."No.");
+ Assert.IsTrue(DirectDebitCollection.IsEmpty(), 'Collection should be empty');
+ end;
+
+ local procedure VerifyPaymentLines(PaymentHeader: Record "Payment Header FR"; Customer: Record Customer)
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentLine: Record "Payment Line FR";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ CustLedgerEntry.SetRange("Customer No.", Customer."No.");
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ Assert.AreEqual(CustLedgerEntry.Count, PaymentLine.Count, 'Wrong number of payment lines.');
+
+ CustLedgerEntry.FindSet();
+ repeat
+ PaymentLine.SetRange("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.SetRange("Account No.", CustLedgerEntry."Customer No.");
+ PaymentLine.SetRange("Applies-to Doc. Type", CustLedgerEntry."Document Type");
+ PaymentLine.SetRange("Applies-to Doc. No.", CustLedgerEntry."Document No.");
+ PaymentLine.SetRange("Direct Debit Mandate ID", CustLedgerEntry."Direct Debit Mandate ID");
+ Assert.AreEqual(1, PaymentLine.Count, PaymentLine.GetFilters);
+ PaymentLine.FindFirst();
+ if SEPADirectDebitMandate.Get(CustLedgerEntry."Direct Debit Mandate ID") then
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code")
+ else
+ PaymentLine.TestField("Bank Account Code", Customer."Preferred Bank Account Code");
+ until CustLedgerEntry.Next() = 0;
+ end;
+
+ local procedure VerifySEPAMandate(SEPADirectDebitMandateID: Text[35]; ExpCounter: Integer)
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ SEPADirectDebitMandate.Get(SEPADirectDebitMandateID);
+ SEPADirectDebitMandate.TestField("Debit Counter", ExpCounter);
+ end;
+
+ local procedure CreateCustomerWithTwoInvoice(var Customer: Record Customer; var CustLedgerEntry: array[2] of Record "Cust. Ledger Entry"; SEPAPartnerType: Option)
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ CreateCustomerAddress(Customer);
+ CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", CustomerBankAccount.Code);
+ CreateCustomerLedgerEntry(CustLedgerEntry[1], Customer."No.", SEPADirectDebitMandate.ID);
+ CreateCustomerLedgerEntry(CustLedgerEntry[2], Customer."No.", SEPADirectDebitMandate.ID);
+ Customer.Validate("Preferred Bank Account Code", CustomerBankAccount.Code);
+ Customer.Validate("Partner Type", SEPAPartnerType);
+ Customer.Modify(true);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ PaymentClassCode: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(PaymentClassCode);
+ PaymentClassList.GotoKey(PaymentClassCode);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustPaymentsReqPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ begin
+ SuggestCustomerPayments.LastPaymentDate.SetValue(WorkDate());
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTFunctionalTest.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTFunctionalTest.Codeunit.al
new file mode 100644
index 0000000000..7b400a09b3
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTFunctionalTest.Codeunit.al
@@ -0,0 +1,521 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Bank.Setup;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Vendor;
+using System.TestLibraries.Utilities;
+using System.Text;
+
+codeunit 144023 "SEPA.03 CT Functional Test"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ // [FEATURE] [SEPA] [Credit Transfer]
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ StringConversionManagement: Codeunit StringConversionManagement;
+ LibraryXMLRead: Codeunit "Library - XML Read";
+ LibraryXPathXMLReader: Codeunit "Library - XPath XML Reader";
+ isInitialized: Boolean;
+ UnexpectedEmptyNodeErr: Label 'Unexpected empty value for node <%1> of subtree <%2>.', Comment = '%1 = Node Name, %2 = Subtree Root Name';
+ SEPACTCode: Code[20];
+ ElementIsMissingErr: Label 'Element <%1> is missing.', Comment = '%1 = Ustrd';
+ FileExportHasErrorsErr: Label 'The file export has one or more errors';
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandlerYes')]
+ procedure LocalDataExported()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ GenJournalBatch: Record "Gen. Journal Batch";
+ GenJournalTemplate: Record "Gen. Journal Template";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ Initialize();
+
+
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+ PaymentLine.Amount := -PaymentLine.Amount; // Inject an error
+ PaymentLine.Modify();
+
+ PaymentStep.Init();
+ PaymentStep."Payment Class" := PaymentHeader."Payment Class";
+ PaymentStep."Previous Status" := PaymentHeader."Status No.";
+ PaymentStep."Action Type" := PaymentStep."Action Type"::File;
+ PaymentStep."Export Type" := PaymentStep."Export Type"::XMLport;
+ PaymentStep."Export No." := XMLPORT::"SEPA CT pain.001.001.03";
+ PaymentStep.Insert();
+
+ // Must exist a rec with same Document No.
+ LibraryERM.FindGenJournalTemplate(GenJournalTemplate);
+ LibraryERM.FindGenJournalBatch(GenJournalBatch, GenJournalTemplate.Name);
+ LibraryERM.CreateGeneralJnlLine(
+ GenJnlLine, GenJournalTemplate.Name, GenJournalBatch.Name, "Gen. Journal Document Type"::" ",
+ "Gen. Journal Account Type"::"G/L Account", '', 0);
+ GenJnlLine."Document No." := PaymentHeader."No.";
+ GenJnlLine.Modify();
+
+ // Excercise
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify. Error message is about File Export Errors
+ Assert.ExpectedError(FileExportHasErrorsErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileDeclarationAndVersion()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyXmlFileDeclarationAndVersion();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileGroupHeader()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyGroupHeader(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileInitiatingParty()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyInitiatingParty();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFilePaymentInformationHeader()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyPaymentInformationHeader(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileDebitor()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyDebitor(PaymentHeader);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileCreditor()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyCreditor(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileCreditorPreserveNonLatinChars()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ SetPreserveNonLatinCharacters(true);
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyCreditor(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure ExportSEPACTSvcLvlCd()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ ExportedFilePath: Text;
+ begin
+ // [SCENARIO 344720] SEPA Export File contains element PmtInf/PmtTpInf/SvcLvl/Cd with value 'SEPA'.
+ Initialize();
+
+
+ // [GIVEN] Payment Slip.
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+
+ // [WHEN] Export SEPA CT file.
+ ExportedFilePath := ExportSEPAFile(PaymentHeader);
+
+ // [THEN] SEPA CT file contains element PmtInf/PmtTpInf/SvcLvl/Cd with value 'SEPA'.
+ LibraryXPathXMLReader.Initialize(ExportedFilePath, GetISO20022V03NameSpace());
+ LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'SEPA');
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryTestInitialize.OnTestInitialize(CODEUNIT::"SEPA.03 CT Functional Test");
+ if isInitialized then
+ exit;
+ LibraryTestInitialize.OnBeforeTestSuiteInitialize(CODEUNIT::"SEPA.03 CT Functional Test");
+
+ SEPACTCode := FindSEPACTPaymentFormat();
+ AllowSEPAOnCompanyCountryCode();
+ isInitialized := true;
+ LibraryTestInitialize.OnAfterTestSuiteInitialize(CODEUNIT::"SEPA.03 CT Functional Test");
+ end;
+
+ [TransactionModel(TransactionModel::None)]
+ local procedure AllowSEPAOnCountryCode(CountryRegionCode: Code[10])
+ var
+ CountryRegion: Record "Country/Region";
+ begin
+ CountryRegion.Get(CountryRegionCode);
+ if not CountryRegion."SEPA Allowed" then begin
+ CountryRegion.Validate("SEPA Allowed", true);
+ CountryRegion.Modify(true);
+ end;
+ end;
+
+ local procedure AllowSEPAOnCompanyCountryCode()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.Get();
+ AllowSEPAOnCountryCode(CompanyInfo."Country/Region Code");
+ end;
+
+ local procedure CreateSEPABankAccount(var BankAccount: Record "Bank Account")
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate(Balance, LibraryRandom.RandIntInRange(100000, 1000000));
+ BankAccount.Validate("Bank Account No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Bank Account No."), DATABASE::"Bank Account"));
+ BankAccount.Validate("Country/Region Code", GetASEPACountryCode());
+ BankAccount.Validate(IBAN, 'ES7620770024003102575766');
+ BankAccount.Validate("Payment Export Format", SEPACTCode);
+ BankAccount.Validate("Credit Transfer Msg. Nos.", LibraryERM.CreateNoSeriesCode());
+ BankAccount.Validate("SWIFT Code", 'BSCHESMM');
+ BankAccount.Modify(true);
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ NoSeries: Record "No. Series";
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Name, '');
+ PaymentClass.Validate("Header No. Series", NoSeries.Code);
+ PaymentClass.Validate(Enable, true);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Vendor);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Credit Transfer");
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR")
+ var
+ BankAccount: Record "Bank Account";
+ PaymentClassCode: Text[30];
+ begin
+ PaymentClassCode := CreatePaymentClass();
+ LibraryVariableStorage.Enqueue(PaymentClassCode);
+
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Account Type", PaymentHeader."Account Type"::"Bank Account");
+ CreateSEPABankAccount(BankAccount);
+ PaymentHeader.Validate("Account No.", BankAccount."No.");
+ PaymentHeader.Validate("Bank Country/Region Code", BankAccount."Country/Region Code");
+ PaymentHeader.Validate(IBAN, 'CH6309000000250097798');
+ PaymentHeader.Validate("SWIFT Code", 'INGBNL2A');
+ PaymentHeader.Modify(true);
+
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Validate("Account No.", CreateVendor());
+ PaymentLine.Validate(Amount, LibraryRandom.RandDecInRange(1, 1000, 1));
+ PaymentLine.Validate("Due Date", CalcDate('<1D>', PaymentLine."Due Date"));
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure CreateVendor(): Code[20]
+ var
+ BankAccount: Record "Bank Account";
+ PostCode: Record "Post Code";
+ Vendor: Record Vendor;
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ CreateSEPABankAccount(BankAccount);
+
+ LibraryPurchase.CreateVendor(Vendor);
+ VendorBankAccount.Init();
+ VendorBankAccount.Validate(Code, BankAccount.Name);
+ VendorBankAccount.Validate("Vendor No.", Vendor."No.");
+ VendorBankAccount.Insert(true);
+
+ VendorBankAccount.Validate(Name, BankAccount.Name);
+ VendorBankAccount.Validate("Bank Account No.", BankAccount.Name);
+ VendorBankAccount.Validate("Country/Region Code", BankAccount."Country/Region Code");
+ VendorBankAccount.Validate(IBAN, BankAccount.IBAN);
+ VendorBankAccount.Validate("SWIFT Code", BankAccount."SWIFT Code");
+ VendorBankAccount.Modify(true);
+
+ Vendor.Validate("Country/Region Code", BankAccount."Country/Region Code");
+ Vendor.Validate("Preferred Bank Account Code", BankAccount."No.");
+ Vendor.Validate(Address, '´Š¢sterbrogade ´Š¢´Š¢');
+ // for testing non latin characters
+ PostCode.SetRange("Country/Region Code", Vendor."Country/Region Code");
+ PostCode.FindFirst();
+ Vendor.Validate("Post Code", PostCode.Code);
+ Vendor.Validate(City, PostCode.City);
+ Vendor.Modify(true);
+
+ exit(Vendor."No.");
+ end;
+
+ local procedure ExportSEPAFile(var PaymentHeader: Record "Payment Header FR") ExportedFilePath: Text
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ OutStr: OutStream;
+ File: File;
+ begin
+ GenJnlLine.SetRange("Journal Template Name", '');
+ GenJnlLine.SetRange("Journal Batch Name", '');
+ GenJnlLine.SetRange("Document No.", PaymentHeader."No.");
+ ExportedFilePath := TemporaryPath + LibraryUtility.GenerateGUID() + '.xml';
+ File.Create(ExportedFilePath);
+ File.CreateOutStream(OutStr);
+ XMLPORT.Export(XMLPORT::"SEPA CT pain.001.001.03", OutStr, GenJnlLine);
+ File.Close();
+ end;
+
+ local procedure FindSEPACTPaymentFormat(): Code[20]
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+#pragma warning disable AA0210
+ BankExportImportSetup.SetRange("Processing XMLport ID", XMLPORT::"SEPA CT pain.001.001.03");
+#pragma warning restore AA0210
+ BankExportImportSetup.FindFirst();
+ exit(BankExportImportSetup.Code);
+ end;
+
+ local procedure GetASEPACountryCode(): Code[10]
+ var
+ CountryRegion: Record "Country/Region";
+ PostCode: Record "Post Code";
+ begin
+ PostCode.Reset();
+ PostCode.FindSet();
+ PostCode.Next(LibraryRandom.RandInt(PostCode.Count));
+ CountryRegion.Get(PostCode."Country/Region Code");
+ AllowSEPAOnCountryCode(CountryRegion.Code);
+ exit(CountryRegion.Code);
+ end;
+
+ local procedure GetPreserveNonLatinCharacters(): Boolean
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ BankExportImportSetup.Get(SEPACTCode);
+ exit(BankExportImportSetup."Preserve Non-Latin Characters");
+ end;
+
+ local procedure GetISO20022V03NameSpace(): Text
+ begin
+ exit('urn:iso:std:iso:20022:tech:xsd:pain.001.001.03');
+ end;
+
+ local procedure InitializeTestDataAndExportSEPAFile(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR")
+ var
+ ExportedFilePath: Text;
+ begin
+ Initialize();
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+ ExportedFilePath := ExportSEPAFile(PaymentHeader);
+ LibraryXMLRead.Initialize(ExportedFilePath);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ PaymentClassCode: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(PaymentClassCode);
+ PaymentClassList.GotoKey(PaymentClassCode);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ local procedure SetPreserveNonLatinCharacters(Preserve: Boolean)
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ BankExportImportSetup.Get(SEPACTCode);
+ if not (BankExportImportSetup."Preserve Non-Latin Characters" = Preserve) then begin
+ BankExportImportSetup.Validate("Preserve Non-Latin Characters", Preserve);
+ BankExportImportSetup.Modify(true);
+ end;
+ end;
+
+ local procedure VerifyDebitor(PaymentHeader: Record "Payment Header FR")
+ var
+ BankAccount: Record "Bank Account";
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ VerifyCompanyNameAndPostalAddress(CompanyInformation, 'Dbtr');
+
+ BankAccount.Get(PaymentHeader."Account No.");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Dbtr', 'BICOrBEI', BankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAcct', 'IBAN', BankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAgt', 'BIC', BankAccount."SWIFT Code");
+ end;
+
+ local procedure VerifyCreditor(PaymentLine: Record "Payment Line FR")
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor.Get(PaymentLine."Account No.");
+ VerifyNameAndPostalAddress(
+ 'Cdtr', Vendor.Name, Vendor.Address, Vendor."Post Code", Vendor.City, Vendor."Country/Region Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAcct', 'IBAN', PaymentLine.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtTrfTxInf', 'InstdAmt', PaymentLine.Amount);
+ LibraryXMLRead.VerifyAttributeValueInSubtree('CdtTrfTxInf', 'InstdAmt', 'Ccy', 'EUR');
+ asserterror LibraryXMLRead.VerifyNodeValue('Ustrd', '');
+ Assert.ExpectedError(StrSubstNo(ElementIsMissingErr, 'Ustrd'));
+ end;
+
+ local procedure VerifyGroupHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory/required elements
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'MsgId');
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'CreDtTm');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'NbOfTxs', '1');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'CtrlSum', PaymentLine.Amount);
+ end;
+
+ local procedure VerifyInitiatingParty()
+ var
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Nm', CompanyInformation.Name);
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Id', CompanyInformation."VAT Registration No.");
+ // TFSID: 327225 Removal of 'PstlAdr' tag since the scheme has been changed
+ LibraryXMLRead.VerifyNodeAbsenceInSubtree('InitgPty', 'PstlAdr');
+ end;
+
+ local procedure VerifyPaymentInformationHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory elements
+ VerifyNodeExistsAndNotEmpty('PmtInf', 'PmtInfId');
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'PmtMtd', 'TRF'); // Hardcoded to 'TRF' by the FR SEPA standard
+
+ // Optional element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'BtchBookg', 'false');
+
+ // Mandatory element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ReqdExctnDt', PaymentLine."Posting Date");
+
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ChrgBr', 'SLEV'); // Hardcoded by FR SEPA standard
+ end;
+
+ local procedure VerifyCompanyNameAndPostalAddress(CompanyInformation: Record "Company Information"; SubtreeRootNodeName: Text)
+ begin
+ VerifyNameAndPostalAddress(
+ SubtreeRootNodeName, CompanyInformation.Name, CompanyInformation.Address,
+ CompanyInformation."Post Code", CompanyInformation.City, CompanyInformation."Country/Region Code");
+ end;
+
+ local procedure VerifyNameAndPostalAddress(SubtreeRootNodeName: Text; Name: Text; Address: Text; PostCode: Text; City: Text; CountryRegionCode: Text)
+ begin
+ VerifyNodeValue(SubtreeRootNodeName, 'Nm', Name);
+ VerifyNodeValue(SubtreeRootNodeName, 'StrtNm', Address);
+ VerifyNodeValue(SubtreeRootNodeName, 'PstCd', PostCode);
+ VerifyNodeValue(SubtreeRootNodeName, 'TwnNm', City);
+ VerifyNodeValue(SubtreeRootNodeName, 'Ctry', CountryRegionCode);
+ end;
+
+ local procedure VerifyNodeExistsAndNotEmpty(SubtreeRootName: Text; NodeName: Text)
+ begin
+ Assert.AreNotEqual(
+ '', LibraryXMLRead.GetNodeValueInSubtree(SubtreeRootName, NodeName), StrSubstNo(UnexpectedEmptyNodeErr, NodeName, SubtreeRootName));
+ end;
+
+ local procedure VerifyNodeValue(SubtreeRootNodeName: Text; NodeName: Text; ExpectedValue: Text)
+ begin
+ if not GetPreserveNonLatinCharacters() then
+ ExpectedValue := StringConversionManagement.WindowsToASCII(ExpectedValue);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, NodeName, ExpectedValue);
+ end;
+
+ local procedure VerifyXmlFileDeclarationAndVersion()
+ begin
+ LibraryXMLRead.VerifyXMLDeclaration('1.0', 'UTF-8', 'no');
+ LibraryXMLRead.VerifyAttributeValue('Document', 'xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.001.001.03');
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandlerYes(Question: Text; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTUnitTest.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTUnitTest.Codeunit.al
new file mode 100644
index 0000000000..64b8f61daa
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA03CTUnitTest.Codeunit.al
@@ -0,0 +1,1007 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Bank.Setup;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Posting;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+codeunit 144024 "SEPA.03 CT Unit Test"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ // [FEATURE] [UT]
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ AmountMustBePositiveErr: Label 'The amount must be positive.';
+ AppliedDocNoListErr: Label 'Wrong list of applied document numbers.';
+ BufferEntryCountErr: Label 'Wrong count of export buffer entries.';
+ PaymentExportSetupCode: Code[20];
+ isInitialized: Boolean;
+ EditableFieldErr: Label 'Wrong property Editable on Field %1.', Comment = '%1 = field';
+ ExportErrorTextErr: Label 'Wrong export error text. Expected:<%1> Actual:<%2>. ', Comment = '%1 = Only transactions in euro (EUR) are allowed, %2 = Error Text';
+ FieldValueErr: Label 'Wrong value in <%1>.', Comment = '%1 = field name';
+ JnlLinesHaveErrorsErr: Label 'The file export has one or more errors.';
+ TransInEURAllowedErr: Label 'Only transactions in euro (EUR) are allowed';
+ VisibleFieldErr: Label 'Wrong property Visible on Field %1.', Comment = '%1 = field';
+
+ [Test]
+ procedure AppliedDocListCust()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ DocumentNo: array[2] of Code[20];
+ begin
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Customer;
+ PaymentLine."Account No." := LibrarySales.CreateCustomerNo();
+ PaymentLine."Applies-to ID" := LibraryUtility.GenerateGUID();
+
+ DocumentNo[1] := InsertCustLedgEntry(CustLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+ DocumentNo[2] := InsertCustLedgEntry(CustLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+
+ VerifyAppliedDocNoList(PaymentLine, DocumentNo);
+ end;
+
+ [Test]
+ procedure AppliedDocListVend()
+ var
+ PaymentLine: Record "Payment Line FR";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ DocumentNo: array[2] of Code[35];
+ begin
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Vendor;
+ PaymentLine."Account No." := LibraryPurchase.CreateVendorNo();
+ PaymentLine."Applies-to ID" := LibraryUtility.GenerateGUID();
+
+ DocumentNo[1] := InsertVendLedgEntry(VendLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+ DocumentNo[2] := InsertVendLedgEntry(VendLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+
+ VerifyAppliedDocNoList(PaymentLine, DocumentNo);
+ end;
+
+ [Test]
+ procedure AppliedDocListEmptyCust()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ DocumentNo: array[2] of Code[20];
+ begin
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Customer;
+ PaymentLine."Account No." := LibrarySales.CreateCustomerNo();
+ PaymentLine."Applies-to ID" := '';
+ PaymentLine."Applies-to Doc. No." := '';
+
+ DocumentNo[1] := InsertCustLedgEntry(CustLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+ DocumentNo[2] := InsertCustLedgEntry(CustLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+
+ Assert.AreEqual('', PaymentLine.GetAppliedDocNoList(MaxStrLen(CustLedgEntry."Document No.")), AppliedDocNoListErr);
+ end;
+
+ [Test]
+ procedure AppliedDocListEmptyVend()
+ var
+ PaymentLine: Record "Payment Line FR";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ DocumentNo: array[2] of Code[35];
+ begin
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Vendor;
+ PaymentLine."Account No." := LibraryPurchase.CreateVendorNo();
+ PaymentLine."Applies-to ID" := '';
+ PaymentLine."Applies-to Doc. No." := '';
+
+ DocumentNo[1] := InsertVendLedgEntry(VendLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+ DocumentNo[2] := InsertVendLedgEntry(VendLedgEntry, PaymentLine."Account No.", PaymentLine."Applies-to ID");
+
+ Assert.AreEqual('', PaymentLine.GetAppliedDocNoList(MaxStrLen(VendLedgEntry."Document No.")), AppliedDocNoListErr);
+ end;
+
+ [Test]
+ procedure AppliedDocNoListCust()
+ var
+ PaymentLine: Record "Payment Line FR";
+ CustLedgEntry: Record "Cust. Ledger Entry";
+ begin
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Customer;
+ PaymentLine."Account No." := LibrarySales.CreateCustomerNo();
+
+ InsertCustLedgEntry(CustLedgEntry, PaymentLine."Account No.", '');
+
+ PaymentLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"::"Credit Memo";
+ PaymentLine."Applies-to Doc. No." := CustLedgEntry."Document No.";
+
+ Assert.AreEqual(
+ CustLedgEntry."Document No.", PaymentLine.GetAppliedDocNoList(MaxStrLen(CustLedgEntry."Document No.")), AppliedDocNoListErr);
+ end;
+
+ [Test]
+ procedure AppliedDocNoListVend()
+ var
+ PaymentLine: Record "Payment Line FR";
+ VendLedgEntry: Record "Vendor Ledger Entry";
+ begin
+ // [FEATURE] [Purchase]
+ // [SCENARIO 227892] Purchase invoice's "External Document No." is used as an applied Document No. for export (generate) payment slip file
+
+ PaymentLine.Init();
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Vendor;
+ PaymentLine."Account No." := LibraryPurchase.CreateVendorNo();
+
+ InsertVendLedgEntry(VendLedgEntry, PaymentLine."Account No.", '');
+
+ PaymentLine."Applies-to Doc. Type" := PaymentLine."Applies-to Doc. Type"::Invoice;
+ PaymentLine."Applies-to Doc. No." := VendLedgEntry."Document No.";
+
+ Assert.AreEqual(
+ VendLedgEntry."External Document No.", PaymentLine.GetAppliedDocNoList(MaxStrLen(VendLedgEntry."External Document No.")),
+ AppliedDocNoListErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure BankInfoEditableForGLAccount()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::"G/L Account");
+ PaymentLine.Modify();
+
+ VerifyBankInfoEditable(PaymentHeader, true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure BankInfoNotEditableForCustomer()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineCust(PaymentLine, PaymentHeader."No.", Customer);
+
+ VerifyBankInfoEditable(PaymentHeader, false);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure BankInfoNotEditableForVendor()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ VerifyBankInfoEditable(PaymentHeader, false);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure BankInfoNotVisibleWithNoRIBOnStatus()
+ begin
+ Initialize();
+
+
+ BankInfoVisibleDependsOnRIB(false);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure BankInfoVisibleWithRIBOnStatus()
+ begin
+ Initialize();
+
+
+ BankInfoVisibleDependsOnRIB(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure CustVendLinesInBuffer()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLineCust: Record "Payment Line FR";
+ PaymentLineVend: Record "Payment Line FR";
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ Vendor: Record Vendor;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineCust(PaymentLineCust, PaymentHeader."No.", Customer);
+ CreatePaymentLineVend(PaymentLineVend, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ Assert.AreEqual(2, TempPaymentExportData.Count, BufferEntryCountErr);
+ TempPaymentExportData.FindFirst();
+ Assert.AreEqual(
+ Customer.Name, TempPaymentExportData."Recipient Name",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Name")));
+ Assert.AreEqual(
+ PaymentLineCust.Amount, TempPaymentExportData.Amount,
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName(Amount)));
+ TempPaymentExportData.FindLast();
+ Assert.AreEqual(
+ Vendor.Name, TempPaymentExportData."Recipient Name",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Name")));
+ Assert.AreEqual(
+ PaymentLineVend.Amount, TempPaymentExportData.Amount,
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName(Amount)));
+ end;
+
+ [Test]
+ procedure DeletePaymentLineWithExportErrors()
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ begin
+ Initialize();
+
+
+ InsertPaymentLinesWithExportErrors(PaymentLine, LibraryUtility.GenerateGUID(), 3);
+
+ PaymentJnlExportErrorText.SetRange("Journal Template Name", '');
+ PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(DATABASE::"Payment Header FR"));
+ PaymentJnlExportErrorText.SetRange("Document No.", PaymentLine."No.");
+ PaymentJnlExportErrorText.SetRange("Journal Line No.", PaymentLine."Line No.");
+ Assert.AreEqual(3, PaymentJnlExportErrorText.Count, 'Wrong Error Text count');
+
+ PaymentLine.Delete(true);
+ Assert.AreEqual(0, PaymentJnlExportErrorText.Count, 'Should not be Error Text records');
+
+ PaymentJnlExportErrorText.SetRange("Journal Line No.");
+ Assert.AreEqual(6, PaymentJnlExportErrorText.Count, 'Wrong remaining Error Text count');
+ end;
+
+ [Test]
+ procedure DeletePaymentSlipWithExportErrors()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ NotDeletedDocumentNo: Code[20];
+ begin
+ Initialize();
+
+
+ InsertPaymentLinesWithExportErrors(PaymentLine, LibraryUtility.GenerateGUID(), 1);
+ NotDeletedDocumentNo := PaymentLine."No.";
+
+ PaymentHeader."No." := LibraryUtility.GenerateGUID();
+ PaymentHeader.Insert();
+ InsertPaymentLinesWithExportErrors(PaymentLine, PaymentHeader."No.", 2);
+
+ PaymentJnlExportErrorText.SetRange("Journal Template Name", '');
+ PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(DATABASE::"Payment Header FR"));
+ PaymentJnlExportErrorText.SetRange("Document No.", PaymentHeader."No.");
+ Assert.AreEqual(6, PaymentJnlExportErrorText.Count, 'Wrong Error Text count');
+
+ PaymentHeader.Delete(true);
+ Assert.AreEqual(0, PaymentJnlExportErrorText.Count, 'Should not be Error Text records');
+
+ PaymentJnlExportErrorText.SetRange("Document No.", NotDeletedDocumentNo);
+ Assert.AreEqual(3, PaymentJnlExportErrorText.Count, 'Wrong not deleted Error Text count');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure ExportErrorOnPaymentSlipPage()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ Vendor: Record Vendor;
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+ PaymentLine.Amount := -PaymentLine.Amount;
+ PaymentLine.Modify();
+
+ asserterror FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+ Assert.ExpectedError(JnlLinesHaveErrorsErr);
+
+ PaymentSlip.OpenEdit();
+ PaymentSlip.GotoKey(PaymentHeader."No.");
+ PaymentSlip.Lines.First();
+ PaymentSlip.Lines."Has Payment Export Error".AssertEquals(true);
+ PaymentSlip."Payment Journal Errors".First();
+ PaymentSlip."Payment Journal Errors"."Error Text".AssertEquals(AmountMustBePositiveErr);
+ Assert.IsFalse(PaymentSlip."Payment Journal Errors".Next(), 'Just one error expected');
+ PaymentSlip.Close();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure NonEURPmtLineInBuffer()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ Vendor: Record Vendor;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Currency Code", FindCurrency());
+ PaymentHeader.Modify(true);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ asserterror FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+ Assert.ExpectedError(JnlLinesHaveErrorsErr);
+
+ PaymentJnlExportErrorText.SetRange("Journal Template Name", '');
+ PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(DATABASE::"Payment Header FR"));
+ PaymentJnlExportErrorText.SetRange("Document No.", PaymentLine."No.");
+ PaymentJnlExportErrorText.SetRange("Journal Line No.", PaymentLine."Line No.");
+ Assert.AreEqual(1, PaymentJnlExportErrorText.Count, BufferEntryCountErr);
+ PaymentJnlExportErrorText.FindFirst();
+ Assert.IsTrue(
+ StrPos(PaymentJnlExportErrorText."Error Text", TransInEURAllowedErr) <> 0,
+ StrSubstNo(ExportErrorTextErr, TransInEURAllowedErr, PaymentJnlExportErrorText."Error Text"));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure OnePmtLineInBuffer()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ Assert.AreEqual(1, TempPaymentExportData.Count, BufferEntryCountErr);
+ Assert.AreEqual(
+ PaymentLine.Amount, TempPaymentExportData.Amount,
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName(Amount)));
+ Assert.AreEqual(
+ 'EUR', TempPaymentExportData."Currency Code",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Currency Code")));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentStepsLookupHandler,ConfirmationNoHandler')]
+ procedure PickOneOfManyPaymentSteps()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentMgt: Codeunit "Payment Management FR";
+ ExpectedPickedLine: Integer;
+ begin
+ Initialize();
+
+
+ PrepareHeaderWithNoReportSteps(PaymentHeader, PaymentStep);
+
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::Report, PaymentStep);
+ ExpectedPickedLine := PaymentStep.Line;
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report);
+ Assert.IsFalse(PaymentMgt.PickPaymentStep(PaymentHeader, PaymentStep), '1 Step. Not confirmed');
+
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::Report, PaymentStep);
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report);
+ Assert.IsTrue(PaymentMgt.PickPaymentStep(PaymentHeader, PaymentStep), '2 Steps. Pick first');
+ Assert.AreEqual(ExpectedPickedLine, PaymentStep.Line, 'Wrong pick');
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmationYesHandler')]
+ procedure PickOnePaymentStep()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentMgt: Codeunit "Payment Management FR";
+ ExpectedPickedLine: Integer;
+ begin
+ Initialize();
+
+
+ PrepareHeaderWithNoReportSteps(PaymentHeader, PaymentStep);
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report);
+ Assert.IsFalse(PaymentMgt.PickPaymentStep(PaymentHeader, PaymentStep), 'No Steps to pick');
+
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::Report, PaymentStep);
+ ExpectedPickedLine := PaymentStep.Line;
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::Report);
+ Assert.IsTrue(PaymentMgt.PickPaymentStep(PaymentHeader, PaymentStep), '1 Step. Confirmed');
+ Assert.AreEqual(ExpectedPickedLine, PaymentStep.Line, 'Wrong pick');
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure ThreePmtLinesInBuffer()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ Assert.AreEqual(3, TempPaymentExportData.Count, BufferEntryCountErr);
+ TempPaymentExportData.FindLast();
+ Assert.AreEqual(
+ Vendor.Name, TempPaymentExportData."Recipient Name",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Name")));
+ Assert.AreEqual(
+ PaymentLine.Amount, TempPaymentExportData.Amount,
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName(Amount)));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure RecipientIsPassedToBuffer()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ TempPaymentExportData.FindFirst();
+ // Recipient
+ Assert.AreEqual(
+ Vendor.Name, TempPaymentExportData."Recipient Name",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Name")));
+ Assert.AreEqual(
+ Vendor.Address, TempPaymentExportData."Recipient Address",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Address")));
+ Assert.AreEqual(
+ Vendor."Post Code", TempPaymentExportData."Recipient Post Code",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Post Code")));
+ Assert.AreEqual(
+ Vendor.City, TempPaymentExportData."Recipient City",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient City")));
+ Assert.AreEqual(
+ Vendor."Country/Region Code", TempPaymentExportData."Recipient Country/Region Code",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Country/Region Code")));
+ // Recipient Bank
+ Assert.AreEqual(
+ DelChr(PaymentLine."SWIFT Code"), TempPaymentExportData."Recipient Bank BIC",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Bank BIC")));
+ Assert.AreEqual(
+ DelChr(PaymentLine.IBAN), TempPaymentExportData."Recipient Bank Acc. No.",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Bank Acc. No.")));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure SenderIsPassedToBuffer()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ TempPaymentExportData.FindFirst();
+ // Sender Bank
+ Assert.AreEqual(
+ DelChr(PaymentHeader."SWIFT Code"), TempPaymentExportData."Sender Bank BIC",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Bank BIC")));
+ Assert.AreEqual(
+ DelChr(PaymentHeader.IBAN), TempPaymentExportData."Sender Bank Account No.",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Recipient Bank Acc. No.")));
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure TransferDateWhenNoAppliesTo()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ TempPaymentExportData: Record "Payment Export Data" temporary;
+ begin
+ Initialize();
+
+
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+
+ FillExportBuffer(PaymentHeader."No.", TempPaymentExportData);
+
+ TempPaymentExportData.FindFirst();
+ Assert.AreEqual(
+ PaymentLine."Posting Date", TempPaymentExportData."Transfer Date",
+ StrSubstNo(FieldValueErr, TempPaymentExportData.FieldName("Transfer Date")));
+ end;
+
+ [Test]
+ procedure PaymentStepsNewActionAvailable()
+ var
+ PaymentStep: Record "Payment Step FR";
+ PaymentSteps: TestPage "Payment Steps FR";
+ "Code": Code[20];
+ begin
+ // [FEATURE] [UI] [Payment Step]
+ // [SCENARIO 263818] New action must be available at Payment Steps page
+ Initialize();
+
+
+ // [GIVEN] Payment Steps page
+ PaymentSteps.OpenEdit();
+
+ // [WHEN] Click New
+ PaymentSteps.New();
+
+ // [THEN] New Payment Step record created
+ Code := LibraryUtility.GenerateGUID();
+ PaymentSteps.Name.Value := Code;
+ PaymentSteps.OK().Invoke();
+
+ PaymentStep.SetRange(Name, Code);
+ PaymentStep.FindFirst();
+ Clear(PaymentStep);
+ end;
+
+ local procedure Initialize()
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ if not isInitialized then begin
+ PaymentExportSetupCode := 'SEPA exp setup';
+ BankExportImportSetup.Init();
+ BankExportImportSetup.Code := PaymentExportSetupCode;
+ BankExportImportSetup."Preserve Non-Latin Characters" := true;
+ BankExportImportSetup."Check Export Codeunit" := CODEUNIT::"SEPA CT-Check Line";
+ BankExportImportSetup.Insert();
+ isInitialized := true;
+ end;
+ end;
+
+ local procedure AddPaymentStep(PaymentHeader: Record "Payment Header FR"; ActionType: Enum "Payment Step Action Type FR"; var PaymentStep: Record "Payment Step FR")
+ begin
+ PaymentStep."Payment Class" := PaymentHeader."Payment Class";
+ PaymentStep."Previous Status" := PaymentHeader."Status No.";
+ PaymentStep."Action Type" := ActionType;
+ PaymentStep.Line += 1;
+ PaymentStep.Insert();
+ end;
+
+ local procedure BankInfoVisibleDependsOnRIB(RIB: Boolean)
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentStatus: Record "Payment Status FR";
+ Vendor: Record Vendor;
+ begin
+ CreatePaymentHeader(PaymentHeader);
+ CreatePaymentLineVend(PaymentLine, PaymentHeader."No.", Vendor);
+ PaymentStatus.Get(PaymentHeader."Payment Class", PaymentHeader."Status No.");
+ PaymentStatus.RIB := RIB;
+ PaymentStatus.Modify();
+
+ VerifyBankInfoVisible(PaymentHeader, RIB);
+ end;
+
+ local procedure CreateBankAccount(): Code[20]
+ var
+ BankAccount: Record "Bank Account";
+ NoSeries: Record "No. Series";
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate(IBAN, 'FR14 2004 1010 0505 0001 3M02 606');
+ BankAccount.Validate("SWIFT Code", LibraryUtility.GenerateGUID());
+ BankAccount.Validate("Bank Account No.", LibraryUtility.GenerateGUID());
+ BankAccount."Payment Export Format" := PaymentExportSetupCode;
+ NoSeries.FindFirst();
+ BankAccount.Validate("Credit Transfer Msg. Nos.", NoSeries.Code);
+ BankAccount.Modify(true);
+ exit(BankAccount."No.");
+ end;
+
+ local procedure CreatePaymentClass(var PaymentClass: Record "Payment Class FR")
+ var
+ NoSeries: Record "No. Series";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Name, '');
+ PaymentClass.Validate("Header No. Series", NoSeries.Code);
+ PaymentClass.Validate(Enable, true);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Vendor);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Credit Transfer");
+ PaymentClass.Modify(true);
+
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR")
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ CreatePaymentClass(PaymentClass);
+ LibraryVariableStorage.Enqueue(PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader."Account Type" := PaymentHeader."Account Type"::"Bank Account";
+ PaymentHeader.Validate("Account No.", CreateBankAccount());
+ PaymentHeader.Modify(true);
+ end;
+
+ local procedure CreatePaymentLineCust(var PaymentLine: Record "Payment Line FR"; PaymentDocNo: Code[20]; var Customer: Record Customer)
+ begin
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentDocNo);
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Customer;
+ LibrarySales.CreateCustomer(Customer);
+ PaymentLine.Validate("Account No.", Customer."No.");
+ CreateCustomerBankAccount(Customer."No."); // create two bank accounts and pick the second one
+ PaymentLine.Validate("Bank Account Code", CreateCustomerBankAccount(Customer."No."));
+ PaymentLine.Validate(Amount, LibraryRandom.RandDec(1000, 2));
+ PaymentLine.Modify();
+ end;
+
+ local procedure CreatePaymentLineVend(var PaymentLine: Record "Payment Line FR"; PaymentDocNo: Code[20]; var Vendor: Record Vendor)
+ begin
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentDocNo);
+ PaymentLine."Account Type" := PaymentLine."Account Type"::Vendor;
+ Clear(Vendor);
+ LibraryPurchase.CreateVendor(Vendor);
+ PaymentLine.Validate("Account No.", Vendor."No.");
+ CreateVendorBankAccount(Vendor."No."); // create two bank accounts and pick the second one
+ PaymentLine.Validate("Bank Account Code", CreateVendorBankAccount(Vendor."No."));
+ PaymentLine.Validate(Amount, LibraryRandom.RandDec(1000, 2));
+ PaymentLine.Modify();
+ end;
+
+ local procedure CreateCustomerBankAccount(CustomerNo: Code[20]): Code[20]
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ LibrarySales.CreateCustomerBankAccount(CustomerBankAccount, CustomerNo);
+ CustomerBankAccount.Validate(IBAN, 'FR29 4515 9000 053J 1300 0000 051');
+ CustomerBankAccount."SWIFT Code" := LibraryUtility.GenerateGUID();
+ CustomerBankAccount.Name := 'CustomerBankAcc';
+ CustomerBankAccount.Modify(true);
+ exit(CustomerBankAccount.Code);
+ end;
+
+ local procedure CreateVendorBankAccount(VendorNo: Code[20]): Code[20]
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ LibraryPurchase.CreateVendorBankAccount(VendorBankAccount, VendorNo);
+ VendorBankAccount.Validate(IBAN, 'FR29 4515 9000 053J 1300 0000 051');
+ VendorBankAccount."SWIFT Code" := LibraryUtility.GenerateGUID();
+ VendorBankAccount.Name := 'VendorBankAcc';
+ VendorBankAccount.Modify(true);
+ exit(VendorBankAccount.Code);
+ end;
+
+ local procedure FillExportBuffer(PaymentDocNo: Code[20]; var PaymentExportData: Record "Payment Export Data")
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ SEPACTFillExportBuffer: Codeunit "SEPA CT-Fill Export Buffer";
+ begin
+ GenJnlLine.SetRange("Document No.", PaymentDocNo);
+ SEPACTFillExportBuffer.FillExportBuffer(GenJnlLine, PaymentExportData);
+ end;
+
+ local procedure FindCurrency(): Code[10]
+ var
+ Currency: Record Currency;
+ begin
+ LibraryERM.FindCurrency(Currency);
+ exit(Currency.Code);
+ end;
+
+ local procedure InsertCustLedgEntry(var CustLedgEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; AppliesToID: Code[50]): Code[20]
+ begin
+ PostSalesCreditMemo(CustLedgEntry, CustomerNo, LibraryRandom.RandDec(1000, 2));
+ CustLedgEntry."Applies-to ID" := AppliesToID;
+ CustLedgEntry.Modify();
+ exit(CustLedgEntry."Document No.");
+ end;
+
+ local procedure InsertVendLedgEntry(var VendLedgEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; AppliesToID: Code[50]): Code[35]
+ begin
+ PostPurchaseInvoice(VendLedgEntry, VendorNo, LibraryRandom.RandDec(1000, 2));
+ VendLedgEntry."Applies-to ID" := AppliesToID;
+ VendLedgEntry.Modify();
+ exit(VendLedgEntry."External Document No.");
+ end;
+
+ local procedure InsertPaymentLinesWithExportErrors(var PaymentLine: Record "Payment Line FR"; DocumentNo: Code[20]; NoOfLines: Integer)
+ var
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ I: Integer;
+ ErrorLineNo: Integer;
+ begin
+ for I := 1 to NoOfLines do begin
+ PaymentLine.Init();
+ PaymentLine."No." := DocumentNo;
+ PaymentLine."Line No." += 10000;
+ PaymentLine.Insert();
+
+ PaymentJnlExportErrorText.Init();
+ PaymentJnlExportErrorText."Journal Template Name" := '';
+ PaymentJnlExportErrorText."Journal Batch Name" := Format(DATABASE::"Payment Header FR");
+ PaymentJnlExportErrorText."Document No." := PaymentLine."No.";
+ PaymentJnlExportErrorText."Journal Line No." := PaymentLine."Line No.";
+ for ErrorLineNo := 1 to 3 do begin
+ PaymentJnlExportErrorText."Line No." := ErrorLineNo;
+ PaymentJnlExportErrorText.Insert();
+ end;
+ end;
+ end;
+
+ local procedure PostDocument(DocumentType: Enum "Gen. Journal Document Type"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; LineAmount: Decimal): Code[20]
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ GLAccount: Record "G/L Account";
+ GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line";
+ begin
+ GenJournalLine.Init();
+ GenJournalLine.Validate("Posting Date", Today);
+ GenJournalLine.Validate("Document Type", DocumentType);
+ GenJournalLine.Validate("Account Type", AccountType);
+ GenJournalLine.Validate("Account No.", AccountNo);
+ GenJournalLine.Validate(Amount, -LineAmount);
+ GenJournalLine.Validate(
+ "Document No.", LibraryUtility.GenerateRandomCode(GenJournalLine.FieldNo("Document No."), DATABASE::"Gen. Journal Line"));
+ GenJournalLine.Validate(
+ "External Document No.",
+ CopyStr(LibraryUtility.GenerateRandomText(MaxStrLen(GenJournalLine."External Document No.")), 1, MaxStrLen(GenJournalLine."External Document No.")));
+ GenJournalLine.Validate("Source Code", LibraryERM.FindGeneralJournalSourceCode());
+ // Unused but required for AU, NZ builds
+ GenJournalLine.Validate("Bal. Account Type", GenJournalLine."Bal. Account Type"::"G/L Account");
+ if GenJournalLine."Account Type" = GenJournalLine."Account Type"::Customer then
+ GLAccount.SetRange("Gen. Posting Type", GLAccount."Gen. Posting Type"::Sale)
+ else
+ GLAccount.SetRange("Gen. Posting Type", GLAccount."Gen. Posting Type"::Purchase);
+ LibraryERM.FindGLAccount(GLAccount);
+ GenJournalLine.Validate("Bal. Account No.", GLAccount."No.");
+
+ GenJnlPostLine.RunWithCheck(GenJournalLine);
+ exit(GenJournalLine."Document No.");
+ end;
+
+ local procedure PostPurchaseInvoice(var VendLedgEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20]; Amount: Decimal)
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ DocumentNo: Code[20];
+ begin
+ DocumentNo := PostDocument(GenJournalLine."Document Type"::Invoice, GenJournalLine."Account Type"::Vendor, VendorNo, Amount);
+ VendLedgEntry.SetRange("Document No.", DocumentNo);
+ VendLedgEntry.FindLast();
+ end;
+
+ local procedure PostSalesCreditMemo(var CustLedgEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; Amount: Decimal)
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ DocumentNo: Code[20];
+ begin
+ DocumentNo :=
+ PostDocument(GenJournalLine."Document Type"::"Credit Memo", GenJournalLine."Account Type"::Customer, CustomerNo, Amount);
+ CustLedgEntry.SetRange("Document No.", DocumentNo);
+ CustLedgEntry.FindLast();
+ end;
+
+ local procedure PrepareHeaderWithNoReportSteps(var PaymentHeader: Record "Payment Header FR"; var PaymentStep: Record "Payment Step FR")
+ begin
+ PaymentHeader."Payment Class" := LibraryUtility.GenerateGUID();
+ PaymentHeader."Status No." := 0;
+
+ PaymentStep.SetRange("Payment Class", PaymentHeader."Payment Class");
+ PaymentStep.DeleteAll();
+
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::None, PaymentStep);
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::File, PaymentStep);
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::Ledger, PaymentStep);
+ AddPaymentStep(PaymentHeader, PaymentStep."Action Type"::"Create New Document", PaymentStep);
+ end;
+
+ local procedure VerifyAppliedDocNoList(PaymentLine: Record "Payment Line FR"; DocumentNo: array[2] of Code[35])
+ var
+ Delimiter: Text[2];
+ ExpectedList: Text;
+ List: Text;
+ TotalLen: Integer;
+ begin
+ Delimiter := ', ';
+ ExpectedList := DocumentNo[1] + Delimiter + DocumentNo[2];
+ TotalLen := StrLen(ExpectedList);
+
+ List := PaymentLine.GetAppliedDocNoList(TotalLen);
+ // 'docno000001, docno000002|'
+ Assert.AreEqual(ExpectedList, List, AppliedDocNoListErr);
+
+ List := PaymentLine.GetAppliedDocNoList(TotalLen + 1);
+ // 'docno000001, docno000002 |'
+ Assert.AreEqual(ExpectedList, List, AppliedDocNoListErr);
+
+ List := PaymentLine.GetAppliedDocNoList(0);
+ // '|docno000001, docno000002'
+ Assert.AreEqual(ExpectedList, List, AppliedDocNoListErr);
+
+ List := PaymentLine.GetAppliedDocNoList(-1);
+ // | 'docno000001, docno000002'
+ Assert.AreEqual(ExpectedList, List, AppliedDocNoListErr);
+
+ List := PaymentLine.GetAppliedDocNoList(1);
+ // ' |docno000001, docno000002'
+ Assert.AreEqual(' ' + ExpectedList, List, AppliedDocNoListErr);
+
+ List := PaymentLine.GetAppliedDocNoList(TotalLen - 1);
+ // 'docno000001 |docno000002'
+ Assert.AreEqual(DocumentNo[1], DelChr(CopyStr(List, 1, TotalLen - 1)), AppliedDocNoListErr);
+ Assert.AreEqual(DocumentNo[2], DelChr(CopyStr(List, TotalLen)), AppliedDocNoListErr);
+ end;
+
+ local procedure VerifyBankInfoEditable(PaymentHeader: Record "Payment Header FR"; Editable: Boolean)
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.GotoRecord(PaymentHeader);
+ PaymentSlip.Lines.First();
+ Assert.IsTrue(
+ PaymentSlip.Lines."Bank Account Code".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("Bank Account Code")));
+ Assert.AreEqual(Editable, PaymentSlip.Lines.IBAN.Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption(IBAN)));
+ Assert.AreEqual(
+ Editable, PaymentSlip.Lines."SWIFT Code".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("SWIFT Code")));
+ Assert.AreEqual(
+ Editable, PaymentSlip.Lines."Bank Account Name".Editable(),
+ StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("Bank Account Name")));
+ Assert.AreEqual(
+ Editable, PaymentSlip.Lines."Bank Account No.".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("Bank Account No.")));
+ Assert.AreEqual(
+ Editable, PaymentSlip.Lines."Bank Branch No.".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("Bank Branch No.")));
+ Assert.AreEqual(
+ Editable, PaymentSlip.Lines."Agency Code".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("Agency Code")));
+ Assert.AreEqual(Editable, PaymentSlip.Lines."RIB Key".Editable(), StrSubstNo(EditableFieldErr, PaymentLine.FieldCaption("RIB Key")));
+ // "Bank City" is not visible by default, so "Bank City".EDITABLE is not supported.
+ // Assert.AreEqual(Editable,PaymentSlip.Lines."Bank City".Editable(),STRSUBSTNO(NotEditableFieldErr,PaymentLine.FIELDCAPTION("Bank City")));
+ end;
+
+ local procedure VerifyBankInfoVisible(PaymentHeader: Record "Payment Header FR"; RIB: Boolean)
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ PaymentSlip.OpenEdit();
+ PaymentSlip.GotoRecord(PaymentHeader);
+ PaymentSlip.Lines.First();
+ Assert.AreEqual(
+ RIB, PaymentSlip.Lines."Bank Account Name".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("Bank Account Name")));
+ Assert.AreEqual(
+ RIB, PaymentSlip.Lines."Bank Account No.".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("Bank Account No.")));
+ Assert.AreEqual(
+ RIB, PaymentSlip.Lines."Bank Branch No.".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("Bank Branch No.")));
+ Assert.AreEqual(RIB, PaymentSlip.Lines."Agency Code".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("Agency Code")));
+ Assert.AreEqual(RIB, PaymentSlip.Lines."RIB Key".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("RIB Key")));
+ Assert.AreEqual(RIB, PaymentSlip.Lines."RIB Checked".Visible(), StrSubstNo(VisibleFieldErr, PaymentLine.FieldCaption("RIB Checked")));
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ "Code": Variant;
+ begin
+ LibraryVariableStorage.Dequeue(Code);
+ PaymentClassList.GotoKey(Code);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentStepsLookupHandler(var PaymentSteps: Page "Payment Steps FR"; var Response: Action)
+ begin
+ Response := ACTION::LookupOK;
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmationNoHandler(Question: Text; var Reply: Boolean)
+ begin
+ Reply := false;
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmationYesHandler(Question: Text; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA08DDFunctionalTest.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA08DDFunctionalTest.Codeunit.al
new file mode 100644
index 0000000000..08b1718016
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA08DDFunctionalTest.Codeunit.al
@@ -0,0 +1,952 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Bank.Setup;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Company;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+codeunit 144029 "SEPA.08 DD Functional Test"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryXMLRead: Codeunit "Library - XML Read";
+ SEPA_PartnerType: Option ,Company,Person;
+ UnexpectedEmptyNodeErr: Label 'Unexpected empty value for node <%1> of subtree <%2>.', Comment = '%1 = Node Name, %2 = Subtree Root Name';
+ OneToManyNotAllowedErr: Label 'You cannot export a SEPA customer payment that is applied to multiple documents.';
+ ErrorsExistErr: Label 'The file export has one or more errors. For each of the lines to be exported, resolve any errors that are displayed in the File Export Errors FactBox.';
+ MissingMandateErr: Label 'Mandate ID must have a value in the currently selected record.';
+ UnappliedLinesNotAllowedErr: Label 'Payment slip line %1 must be applied to a customer invoice.', Comment = '%1 = No.';
+ BankAccErr: Label 'You must use customer bank account, %1, which you specified in the selected direct debit mandate.', Comment = '%1 = Code';
+ AccTypeErr: Label 'Only customer transactions are allowed.';
+ PartnerTypeErr: Label 'The customer''s Partner Type, Company, must be equal to the Partner Type, Person, specified in the collection.';
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler,SuggestCustPaymentsReqPageHandler')]
+ procedure SuggestCustPayments()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ PaymentHeader: Record "Payment Header FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentHeader(PaymentHeader, SEPA_PartnerType::Company);
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", '');
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", SEPADirectDebitMandate.ID);
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", '');
+
+ // Exercise.
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+ Customer.SetRange("No.", Customer."No.");
+ SuggestCustomerPayments.SetTableView(Customer);
+ SuggestCustomerPayments.RunModal();
+
+ // Verify.
+ VerifyPaymentLines(PaymentHeader, Customer);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler,SuggestCustPaymentsReqPageHandler')]
+ procedure SuggestCustPaymentsDiffPartnerType()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ Customer1: Record Customer;
+ SuggestCustomerPayments: Report "Suggest Cust. Payments";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreateCustomerWithInvoice(Customer1, CustLedgerEntry, SEPA_PartnerType::Person);
+ CreatePaymentHeader(PaymentHeader, SEPA_PartnerType::Person);
+
+ // Exercise.
+ SuggestCustomerPayments.SetGenPayLine(PaymentHeader);
+ Customer.SetFilter("No.", '%1|%2', Customer."No.", Customer1."No.");
+ Customer.SetRange("Partner Type", Customer."Partner Type");
+ Commit();
+ SuggestCustomerPayments.SetTableView(Customer);
+ SuggestCustomerPayments.RunModal();
+
+ // Verify.
+ VerifyPaymentLines(PaymentHeader, Customer);
+ PaymentHeader.Find();
+ PaymentHeader.TestField("Partner Type", SEPA_PartnerType::Company);
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.SetRange("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.SetRange("Account No.", Customer1."No.");
+ Assert.IsTrue(PaymentLine.IsEmpty, 'No payment lines should be created for customer ' + Customer1."No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithoutApplication()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ Customer: Record Customer;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.",
+ PaymentLine."Line No.", StrSubstNo(UnappliedLinesNotAllowedErr, PaymentLine."Line No."), 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithAppliesToDocNo()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineWithAppliesToID()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine.Validate("Applies-to ID", PaymentLine."Document No.");
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineOneToManyNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to ID" := PaymentLine."Document No.";
+ PaymentLine.Modify();
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+ CreateCustomerLedgerEntry(CustLedgerEntry, PaymentLine."Account No.", '');
+ CustLedgerEntry."Applies-to ID" := PaymentLine."Document No.";
+ CustLedgerEntry.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", OneToManyNotAllowedErr, 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineDiffThanInvoiceNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ CustLedgerEntry."Document Type" := CustLedgerEntry."Document Type"::"Credit Memo";
+ CustLedgerEntry.Modify();
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ PaymentLine.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", UnappliedLinesNotAllowedErr, 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportPmtLineDiffThanCustomerNotAllowed()
+ var
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Modify();
+
+ // Exercise.
+ asserterror ExportSEPAFile(PaymentHeader);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", AccTypeErr, 1);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateBankAccCodeOnPmtLine()
+ var
+ Customer: Record Customer;
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+
+ // Exercise.
+ asserterror PaymentLine.Validate("Bank Account Code", CustomerBankAccount.Code);
+
+ // Verify.
+ Assert.ExpectedError(StrSubstNo(BankAccErr, PaymentLine."Bank Account Code"));
+ VerifyCollectionWasDeleted(PaymentHeader);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateMandateIdOnPmtLineWithBankAcc()
+ var
+ Customer: Record Customer;
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, CustLedgerEntry."Customer No.", CustomerBankAccount.Code);
+
+ // Exercise.
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Verify.
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ValidateMandateIdOnPmtLineWithoutBankAcc()
+ var
+ Customer: Record Customer;
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ CreateCustomerBankAccount(CustomerBankAccount, CustLedgerEntry."Customer No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, CustLedgerEntry."Customer No.", CustomerBankAccount.Code);
+
+ // Exercise.
+ PaymentLine.Validate("Bank Account Code", '');
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Verify.
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code");
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLineExportErrors()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", MissingMandateErr, 1);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLineDeleteExportErrors()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", '', SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+ Assert.ExpectedError(ErrorsExistErr);
+
+ // Exercise.
+ PaymentLine.Delete(true);
+
+ // Verify.
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.", MissingMandateErr, 0);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure CheckPmtLinePartnerTypeError()
+ var
+ Customer: Record Customer;
+ PaymentStep: Record "Payment Step FR";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID",
+ SEPA_PartnerType::Person);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Modify();
+
+ // Exercise.
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify.
+ Assert.ExpectedError(ErrorsExistErr);
+ VerifyPaymentErrors(DATABASE::"Payment Header FR", PaymentHeader."No.", PaymentLine."Line No.",
+ PartnerTypeErr, 1);
+ VerifyCollectionWasDeleted(PaymentHeader);
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+
+ // Clean data
+ PaymentHeader.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ReplaceClosedMandate()
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ Customer: Record Customer;
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // Setup.
+
+ CreateCustomerWithInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+ SEPADirectDebitMandate.Get(CustLedgerEntry."Direct Debit Mandate ID");
+ SEPADirectDebitMandate.Validate(Closed, true);
+ SEPADirectDebitMandate.Modify(true);
+ Clear(SEPADirectDebitMandate);
+
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", Customer."Preferred Bank Account Code");
+ CreatePaymentSlip(PaymentHeader, PaymentLine, Customer."No.", CustLedgerEntry."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine."Applies-to Doc. Type" := CustLedgerEntry."Document Type";
+ PaymentLine."Applies-to Doc. No." := CustLedgerEntry."Document No.";
+ CustLedgerEntry.CalcFields("Remaining Amount");
+ PaymentLine.Validate("Credit Amount", CustLedgerEntry."Remaining Amount");
+ PaymentLine.Validate("Direct Debit Mandate ID", SEPADirectDebitMandate.ID);
+ PaymentLine.Modify(true);
+
+ // Exercise.
+ SEPAFilePath := ExportSEPAFile(PaymentHeader);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // Verify.
+ VerifySEPADDXmlFile(PaymentHeader, PaymentLine, GetMessageToRecipient(CustLedgerEntry));
+ VerifySEPAMandate(CustLedgerEntry."Direct Debit Mandate ID", 0);
+ VerifySEPAMandate(PaymentLine."Direct Debit Mandate ID", 1);
+ end;
+
+ local procedure CreateSEPABankAccount(var BankAccount: Record "Bank Account")
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate(Balance, LibraryRandom.RandIntInRange(100000, 1000000));
+ BankAccount.Validate("Bank Account No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Bank Account No."), DATABASE::"Bank Account"));
+ BankAccount.Validate("Country/Region Code", 'FR');
+ BankAccount.Validate(IBAN, LibraryUtility.GenerateRandomCode(BankAccount.FieldNo(IBAN), DATABASE::"Bank Account"));
+ BankAccount.Validate("SEPA Direct Debit Exp. Format", FindSEPADDPaymentFormat());
+ BankAccount.Validate("Direct Debit Msg. Nos.", LibraryERM.CreateNoSeriesCode());
+ BankAccount.Validate("SWIFT Code", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("SWIFT Code"), DATABASE::"Bank Account"));
+ BankAccount.Validate("Creditor No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Creditor No."), DATABASE::"Bank Account"));
+ BankAccount.Modify(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandler')]
+ procedure ExportSecondPmtHeaderWithoutError()
+ var
+ Customer: Record Customer;
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentLine: array[2] of Record "Payment Line FR";
+ CustLedgerEntry: array[2] of Record "Cust. Ledger Entry";
+ SEPAFilePath: Text;
+ begin
+ // [SCENARIO 460340] FR local - not possible to re-create a payment file in Payment Slip 2 if an error exists in Payment Slip 1
+ // [GIVEN] Create customer with 2 Invoices
+
+ CreateCustomerWithTwoInvoice(Customer, CustLedgerEntry, SEPA_PartnerType::Company);
+
+ // [GIVEN] Create Payment slip of first Invoice
+ CreatePaymentSlip(PaymentHeader[1], PaymentLine[1], Customer."No.", CustLedgerEntry[1]."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+
+ // [GIVEN] Update credit amount on Payment Line and set Applies-to ID on Cust. Ledger Entry on first CLE entry
+ PaymentLine[1].Validate("Applies-to ID", PaymentLine[1]."Document No.");
+ CustLedgerEntry[1].CalcFields("Remaining Amount");
+ PaymentLine[1].Validate("Credit Amount", CustLedgerEntry[1]."Remaining Amount");
+ PaymentLine[1].Modify();
+ CustLedgerEntry[1]."Applies-to ID" := PaymentLine[1]."Document No.";
+ CustLedgerEntry[1].Modify();
+
+ // [GIVEN] Update Posting date and Document date to get error during Generate XML file
+ PaymentHeader[1].Validate("Posting Date", CalcDate('<-1D>', WorkDate()));
+ PaymentHeader[1].Validate("Document Date", CalcDate('<-1D>', WorkDate()));
+ PaymentHeader[1].Modify();
+
+ // [VERIFY] Verify error will come on SEPA export file of first Cust Ledger Entry
+ asserterror ExportSEPAFile(PaymentHeader[1]);
+
+ // [GIVEN] Create Second Payment Slip and update Applies to id and Credit amount.
+ CreatePaymentSlip(PaymentHeader[2], PaymentLine[2], Customer."No.", CustLedgerEntry[2]."Direct Debit Mandate ID", SEPA_PartnerType::Company);
+ PaymentLine[2].Validate("Applies-to ID", PaymentLine[2]."Document No.");
+ CustLedgerEntry[2].CalcFields("Remaining Amount");
+ PaymentLine[2].Validate("Credit Amount", CustLedgerEntry[2]."Remaining Amount");
+ PaymentLine[2].Modify();
+ CustLedgerEntry[2]."Applies-to ID" := PaymentLine[2]."Document No.";
+ CustLedgerEntry[2].Modify();
+
+ // [GIVEN] Export SEPA file of second payment slip
+ SEPAFilePath := ExportSEPAFile(PaymentHeader[2]);
+ Commit();
+ LibraryXMLRead.Initialize(SEPAFilePath);
+
+ // [VERIFY] Verify file exported successfully
+ VerifySEPADDXmlFile(PaymentHeader[2], PaymentLine[2], GetMessageToRecipient(CustLedgerEntry[2]));
+ VerifySEPAMandate(CustLedgerEntry[2]."Direct Debit Mandate ID", 1);
+
+ // [GIVEN] Clean data
+ PaymentHeader[1].Delete(true);
+ PaymentHeader[2].Delete(true);
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Name, '');
+ PaymentClass.Validate("Header No. Series", LibraryUtility.GetGlobalNoSeriesCode());
+ PaymentClass.Validate(Enable, true);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Customer);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Direct Debit");
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ LibraryFRLocalization.CreatePaymentStep(PaymentStep, PaymentClass.Code);
+ PaymentStep.Name := 'Export File';
+ PaymentStep."Action Type" := PaymentStep."Action Type"::File;
+ PaymentStep."Export Type" := PaymentStep."Export Type"::XMLport;
+ PaymentStep."Export No." := XMLPORT::"SEPA DD pain.008.001.08";
+ PaymentStep.Modify();
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR"; SEPAPartnerType: Option)
+ var
+ BankAccount: Record "Bank Account";
+ PaymentClassCode: Code[30];
+ begin
+ PaymentClassCode := CreatePaymentClass();
+ LibraryVariableStorage.Enqueue(PaymentClassCode);
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Account Type", PaymentHeader."Account Type"::"Bank Account");
+ CreateSEPABankAccount(BankAccount);
+ PaymentHeader.Validate("Account No.", BankAccount."No.");
+ PaymentHeader.Validate("Partner Type", SEPAPartnerType);
+ PaymentHeader.Modify();
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR"; CustomerNo: Code[20]; MandateID: Code[35]; SEPAPartnerType: Option)
+ begin
+ CreatePaymentHeader(PaymentHeader, SEPAPartnerType);
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.Validate("Account No.", CustomerNo);
+ PaymentLine.Validate("Credit Amount", LibraryRandom.RandDec(100, 2));
+ PaymentLine.Validate("Direct Debit Mandate ID", MandateID);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure CreateCustomerWithInvoice(var Customer: Record Customer; var CustLedgerEntry: Record "Cust. Ledger Entry"; SEPAPartnerType: Option)
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ CreateCustomerAddress(Customer);
+ CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", CustomerBankAccount.Code);
+ CreateCustomerLedgerEntry(CustLedgerEntry, Customer."No.", SEPADirectDebitMandate.ID);
+ Customer.Validate("Preferred Bank Account Code", CustomerBankAccount.Code);
+ Customer.Validate("Partner Type", SEPAPartnerType);
+ Customer.Modify(true);
+ end;
+
+ local procedure ExportSEPAFile(var PaymentHeader: Record "Payment Header FR") ExportedFilePath: Text
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ DirectDebitCollectionEntry: Record "Direct Debit Collection Entry";
+ OutStr: OutStream;
+ File: File;
+ begin
+ DirectDebitCollection.CreateRecord(PaymentHeader."No.", PaymentHeader."Account No.", PaymentHeader."Partner Type");
+ DirectDebitCollection."Source Table ID" := DATABASE::"Payment Header FR";
+ DirectDebitCollection.Modify();
+ DirectDebitCollectionEntry.SetRange("Direct Debit Collection No.", DirectDebitCollection."No.");
+ ExportedFilePath := TemporaryPath + LibraryUtility.GenerateGUID() + '.xml';
+ File.Create(ExportedFilePath);
+ File.CreateOutStream(OutStr);
+ XMLPORT.Export(XMLPORT::"SEPA DD pain.008.001.08", OutStr, DirectDebitCollectionEntry);
+ File.Close();
+ end;
+
+ local procedure CreateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account"; CustomerNo: Code[20])
+ begin
+ LibrarySales.CreateCustomerBankAccount(CustomerBankAccount, CustomerNo);
+ CustomerBankAccount.IBAN := LibraryUtility.GenerateGUID();
+ CustomerBankAccount."SWIFT Code" := LibraryUtility.GenerateGUID();
+ CustomerBankAccount.Modify();
+ end;
+
+ local procedure CreateCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; CustomerNo: Code[20]; SEPADirectDebitMandateID: Code[35])
+ var
+ GenJournalBatch: Record "Gen. Journal Batch";
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ LibraryERM.SelectGenJnlBatch(GenJournalBatch);
+ LibraryERM.ClearGenJournalLines(GenJournalBatch);
+ LibraryERM.CreateGeneralJnlLine(GenJournalLine, GenJournalBatch."Journal Template Name", GenJournalBatch.Name,
+ GenJournalLine."Document Type"::Invoice, GenJournalLine."Account Type"::Customer,
+ CustomerNo, LibraryRandom.RandDec(1000, 2));
+ GenJournalLine."Direct Debit Mandate ID" := SEPADirectDebitMandateID;
+ GenJournalLine."Payment Method Code" := '';
+ GenJournalLine.Modify();
+ LibraryERM.PostGeneralJnlLine(GenJournalLine);
+ CustLedgerEntry.SetRange("Customer No.", GenJournalLine."Account No.");
+ CustLedgerEntry.SetRange("Document No.", GenJournalLine."Document No.");
+ CustLedgerEntry.FindLast();
+ end;
+
+ local procedure CreateCustomerAddress(var Customer: Record Customer)
+ begin
+ Customer.Validate(Address, LibraryUtility.GenerateRandomCode(Customer.FieldNo(Address), DATABASE::Customer));
+ Customer.Validate("Country/Region Code", 'FR');
+ Customer.Validate(City, LibraryUtility.GenerateRandomCode(Customer.FieldNo(City), DATABASE::Customer));
+ Customer.Validate("Post Code", LibraryUtility.GenerateRandomCode(Customer.FieldNo("Post Code"), DATABASE::Customer));
+ Customer.Modify(true);
+ end;
+
+ local procedure CreateDirectDebitMandate(var SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate"; CustomerNo: Code[20]; CustomerBankAccountCode: Code[20])
+ begin
+ SEPADirectDebitMandate.Init();
+ SEPADirectDebitMandate."Customer No." := CustomerNo;
+ SEPADirectDebitMandate."Customer Bank Account Code" := CustomerBankAccountCode;
+ SEPADirectDebitMandate."Valid From" := WorkDate();
+ SEPADirectDebitMandate."Valid To" := WorkDate() + LibraryRandom.RandIntInRange(300, 600);
+ SEPADirectDebitMandate."Date of Signature" := WorkDate();
+ SEPADirectDebitMandate."Expected Number of Debits" := LibraryRandom.RandInt(10);
+ SEPADirectDebitMandate.Insert(true);
+ end;
+
+ local procedure FindSEPADDPaymentFormat(): Code[20]
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+#pragma warning disable AA0210
+ BankExportImportSetup.SetFilter("Processing XMLport ID", '%1', XMLPORT::"SEPA DD pain.008.001.08");
+#pragma warning restore AA0210
+ BankExportImportSetup.FindFirst();
+ exit(BankExportImportSetup.Code);
+ end;
+
+ local procedure GetMessageToRecipient(CustLedgerEntry: Record "Cust. Ledger Entry"): Text
+ begin
+ exit(CustLedgerEntry.Description + ' ;' + CustLedgerEntry."Document No.");
+ end;
+
+ local procedure VerifySEPADDXmlFile(PaymentHeader: Record "Payment Header FR"; PaymentLine: Record "Payment Line FR"; MsgToRecipient: Text)
+ begin
+ VerifyXmlFileDeclarationAndVersion();
+ VerifyGroupHeader(PaymentLine);
+ VerifyInitiatingParty();
+ VerifyPaymentInformationHeader(PaymentLine);
+ VerifyCreditor(PaymentHeader, MsgToRecipient);
+ VerifyDebitor(PaymentLine);
+ end;
+
+ local procedure VerifyXmlFileDeclarationAndVersion()
+ begin
+ LibraryXMLRead.VerifyXMLDeclaration('1.0', 'UTF-8', 'no');
+ LibraryXMLRead.VerifyAttributeValue('Document', 'xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.008.001.08');
+ end;
+
+ local procedure VerifyGroupHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory/required elements
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'MsgId');
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'CreDtTm');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'NbOfTxs', '1');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'CtrlSum', Format(PaymentLine."Credit Amount", 0, 9));
+ end;
+
+ local procedure VerifyInitiatingParty()
+ var
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ VerifyCompanyNameAndPostalAddress(CompanyInformation, 'InitgPty');
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Id', CompanyInformation."VAT Registration No.");
+ end;
+
+ local procedure VerifyCompanyNameAndPostalAddress(CompanyInformation: Record "Company Information"; SubtreeRootNodeName: Text)
+ begin
+ VerifyNameAndPostalAddress(
+ SubtreeRootNodeName, CompanyInformation.Name, CompanyInformation.Address,
+ CompanyInformation."Post Code", CompanyInformation.City, CompanyInformation."Country/Region Code");
+ end;
+
+ local procedure VerifyPaymentInformationHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory elements
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'PmtMtd', 'DD'); // Hardcoded to 'TRF' by the FR SEPA standard
+
+ // Optional element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'BtchBookg', 'false');
+ // PmtTpInf/InstrPrty removed due to BUG: 267559
+ LibraryXMLRead.VerifyElementAbsenceInSubtree('PmtTpInf', 'InstrPrty');
+
+ // Mandatory element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ReqdColltnDt', PaymentLine."Posting Date");
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ChrgBr', 'SLEV'); // Hardcoded by FR SEPA standard
+ end;
+
+ local procedure VerifyCreditor(PaymentHeader: Record "Payment Header FR"; MsgToRecipient: Text)
+ var
+ BankAccount: Record "Bank Account";
+ CompanyInformation: Record "Company Information";
+ begin
+ BankAccount.Get(PaymentHeader."Account No.");
+ CompanyInformation.Get();
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAcct', 'IBAN', BankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAgt', 'BICFI', BankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Othr', 'Id', BankAccount."Creditor No.");
+ LibraryXMLRead.VerifyNodeValueInSubtree('SchmeNm', 'Prtry', 'SEPA');
+ LibraryXMLRead.VerifyNodeValueInSubtree('Cdtr', 'Nm', CompanyInformation.Name);
+ LibraryXMLRead.VerifyNodeValue('Ustrd', MsgToRecipient);
+ end;
+
+ local procedure VerifyDebitor(PaymentLine: Record "Payment Line FR")
+ var
+ Customer: Record Customer;
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ Customer.Get(PaymentLine."Account No.");
+ CustomerBankAccount.Get(Customer."No.", PaymentLine."Bank Account Code");
+ SEPADirectDebitMandate.Get(PaymentLine."Direct Debit Mandate ID");
+
+ VerifyNameAndPostalAddress(
+ 'DrctDbtTxInf', Customer.Name, Customer.Address, Customer."Post Code", Customer.City, Customer."Country/Region Code");
+ // DrctDbtTxInf/PmtTpInf removed due to BUG: 267559
+ LibraryXMLRead.VerifyNodeAbsenceInSubtree('DrctDbtTxInf', 'PmtTpInf');
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTxInf', 'InstdAmt', PaymentLine."Credit Amount");
+ LibraryXMLRead.VerifyAttributeValueInSubtree('DrctDbtTxInf', 'InstdAmt', 'Ccy', 'EUR');
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTx', 'MndtId', SEPADirectDebitMandate.ID);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DrctDbtTx', 'DtOfSgntr', SEPADirectDebitMandate."Date of Signature");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Dbtr', 'AnyBIC', CustomerBankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAcct', 'IBAN', CustomerBankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAgt', 'BICFI', CustomerBankAccount."SWIFT Code");
+ end;
+
+ local procedure VerifyNameAndPostalAddress(SubtreeRootNodeName: Text; Name: Text; Address: Text; PostCode: Text; City: Text; CountryRegionCode: Text)
+ begin
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'Nm', Name);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'StrtNm', Address);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'PstCd', PostCode);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'TwnNm', City);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, 'Ctry', CountryRegionCode);
+ end;
+
+ local procedure VerifyNodeExistsAndNotEmpty(SubtreeRootName: Text[30]; NodeName: Text[30])
+ begin
+ Assert.AreNotEqual(
+ '', LibraryXMLRead.GetNodeValueInSubtree(SubtreeRootName, NodeName), StrSubstNo(UnexpectedEmptyNodeErr, NodeName, SubtreeRootName));
+ end;
+
+ local procedure VerifyPaymentErrors(SourceTableID: Integer; PaymentDocNo: Code[20]; LineNo: Integer; ExpErrorText: Text; ExpCount: Integer)
+ var
+ PaymentJnlExportErrorText: Record "Payment Jnl. Export Error Text";
+ begin
+ PaymentJnlExportErrorText.SetRange("Journal Template Name", '');
+ PaymentJnlExportErrorText.SetRange("Journal Batch Name", Format(SourceTableID));
+ PaymentJnlExportErrorText.SetRange("Document No.", PaymentDocNo);
+ PaymentJnlExportErrorText.SetRange("Journal Line No.", LineNo);
+ PaymentJnlExportErrorText.SetRange("Error Text", ExpErrorText);
+ Assert.AreEqual(ExpCount, PaymentJnlExportErrorText.Count, 'Error: ' + ExpErrorText + ', was encountered unexpectedly.');
+ end;
+
+ local procedure VerifyCollectionWasDeleted(PaymentHeader: Record "Payment Header FR")
+ var
+ DirectDebitCollection: Record "Direct Debit Collection";
+ begin
+ DirectDebitCollection.SetRange(Identifier, PaymentHeader."No.");
+ asserterror DirectDebitCollection.FindFirst();
+ Clear(DirectDebitCollection);
+ end;
+
+ local procedure VerifyPaymentLines(PaymentHeader: Record "Payment Header FR"; Customer: Record Customer)
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentLine: Record "Payment Line FR";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ CustLedgerEntry.SetRange("Customer No.", Customer."No.");
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ Assert.AreEqual(CustLedgerEntry.Count, PaymentLine.Count, 'Wrong number of payment lines.');
+
+ CustLedgerEntry.FindSet();
+ repeat
+ PaymentLine.SetRange("Account Type", PaymentLine."Account Type"::Customer);
+ PaymentLine.SetRange("Account No.", CustLedgerEntry."Customer No.");
+ PaymentLine.SetRange("Applies-to Doc. Type", CustLedgerEntry."Document Type");
+ PaymentLine.SetRange("Applies-to Doc. No.", CustLedgerEntry."Document No.");
+ PaymentLine.SetRange("Direct Debit Mandate ID", CustLedgerEntry."Direct Debit Mandate ID");
+ Assert.AreEqual(1, PaymentLine.Count, PaymentLine.GetFilters);
+ PaymentLine.FindFirst();
+ if SEPADirectDebitMandate.Get(CustLedgerEntry."Direct Debit Mandate ID") then
+ PaymentLine.TestField("Bank Account Code", SEPADirectDebitMandate."Customer Bank Account Code")
+ else
+ PaymentLine.TestField("Bank Account Code", Customer."Preferred Bank Account Code");
+ until CustLedgerEntry.Next() = 0;
+ end;
+
+ local procedure VerifySEPAMandate(SEPADirectDebitMandateID: Text[35]; ExpCounter: Integer)
+ var
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ SEPADirectDebitMandate.Get(SEPADirectDebitMandateID);
+ SEPADirectDebitMandate.TestField("Debit Counter", ExpCounter);
+ end;
+
+ local procedure CreateCustomerWithTwoInvoice(var Customer: Record Customer; var CustLedgerEntry: array[2] of Record "Cust. Ledger Entry"; SEPAPartnerType: Option)
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ SEPADirectDebitMandate: Record "SEPA Direct Debit Mandate";
+ begin
+ LibrarySales.CreateCustomer(Customer);
+ CreateCustomerAddress(Customer);
+ CreateCustomerBankAccount(CustomerBankAccount, Customer."No.");
+ CreateDirectDebitMandate(SEPADirectDebitMandate, Customer."No.", CustomerBankAccount.Code);
+ CreateCustomerLedgerEntry(CustLedgerEntry[1], Customer."No.", SEPADirectDebitMandate.ID);
+ CreateCustomerLedgerEntry(CustLedgerEntry[2], Customer."No.", SEPADirectDebitMandate.ID);
+ Customer.Validate("Preferred Bank Account Code", CustomerBankAccount.Code);
+ Customer.Validate("Partner Type", SEPAPartnerType);
+ Customer.Modify(true);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ PaymentClassCode: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(PaymentClassCode);
+ PaymentClassList.GotoKey(PaymentClassCode);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustPaymentsReqPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ begin
+ SuggestCustomerPayments.LastPaymentDate.SetValue(WorkDate());
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA09CTFunctionalTest.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA09CTFunctionalTest.Codeunit.al
new file mode 100644
index 0000000000..b6197ae56a
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/SEPA09CTFunctionalTest.Codeunit.al
@@ -0,0 +1,522 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Bank.Setup;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Purchases.Vendor;
+using System.TestLibraries.Utilities;
+using System.Text;
+
+codeunit 144030 "SEPA.09 CT Functional Test"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ // [FEATURE] [SEPA] [Credit Transfer]
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFRLocalization: Codeunit "Library - Localization FR";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ StringConversionManagement: Codeunit StringConversionManagement;
+ LibraryXMLRead: Codeunit "Library - XML Read";
+ LibraryXPathXMLReader: Codeunit "Library - XPath XML Reader";
+ isInitialized: Boolean;
+ UnexpectedEmptyNodeErr: Label 'Unexpected empty value for node <%1> of subtree <%2>.', Comment = '%1 = Node Name, %2 = Subtree Root Name';
+ SEPACTCode: Code[20];
+ ElementIsMissingErr: Label 'Element <%1> is missing.', Comment = '%1 = Ustrd';
+ FileExportHasErrorsErr: Label 'The file export has one or more errors';
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler,ConfirmHandlerYes')]
+ procedure LocalDataExported()
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ GenJournalBatch: Record "Gen. Journal Batch";
+ GenJournalTemplate: Record "Gen. Journal Template";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentMgt: Codeunit "Payment Management FR";
+ begin
+ Initialize();
+
+
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+ PaymentLine.Amount := -PaymentLine.Amount; // Inject an error
+ PaymentLine.Modify();
+
+ PaymentStep.Init();
+ PaymentStep."Payment Class" := PaymentHeader."Payment Class";
+ PaymentStep."Previous Status" := PaymentHeader."Status No.";
+ PaymentStep."Action Type" := PaymentStep."Action Type"::File;
+ PaymentStep."Export Type" := PaymentStep."Export Type"::XMLport;
+ PaymentStep."Export No." := XMLPORT::"SEPA CT pain.001.001.09";
+ PaymentStep.Insert();
+
+ // Must exist a rec with same Document No.
+ LibraryERM.FindGenJournalTemplate(GenJournalTemplate);
+ LibraryERM.FindGenJournalBatch(GenJournalBatch, GenJournalTemplate.Name);
+ LibraryERM.CreateGeneralJnlLine(
+ GenJnlLine, GenJournalTemplate.Name, GenJournalBatch.Name, "Gen. Journal Document Type"::" ",
+ "Gen. Journal Account Type"::"G/L Account", '', 0);
+ GenJnlLine."Document No." := PaymentHeader."No.";
+ GenJnlLine.Modify();
+
+ // Excercise
+ PaymentStep.SetRange("Action Type", PaymentStep."Action Type"::File);
+ asserterror PaymentMgt.ProcessPaymentSteps(PaymentHeader, PaymentStep);
+
+ // Verify. Error message is about File Export Errors
+ Assert.ExpectedError(FileExportHasErrorsErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileDeclarationAndVersion()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyXmlFileDeclarationAndVersion();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileGroupHeader()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyGroupHeader(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileInitiatingParty()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyInitiatingParty();
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFilePaymentInformationHeader()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyPaymentInformationHeader(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileDebitor()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyDebitor(PaymentHeader);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileCreditor()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyCreditor(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure XmlFileCreditorPreserveNonLatinChars()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+
+ SetPreserveNonLatinCharacters(true);
+ InitializeTestDataAndExportSEPAFile(PaymentHeader, PaymentLine);
+ VerifyCreditor(PaymentLine);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentClassHandler')]
+ procedure ExportSEPACTSvcLvlCd()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ ExportedFilePath: Text;
+ begin
+ // [SCENARIO 344720] SEPA Export File contains element PmtInf/PmtTpInf/SvcLvl/Cd with value 'SEPA'.
+ Initialize();
+
+
+ // [GIVEN] Payment Slip.
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+
+ // [WHEN] Export SEPA CT file.
+ ExportedFilePath := ExportSEPAFile(PaymentHeader);
+
+ // [THEN] SEPA CT file contains element PmtInf/PmtTpInf/SvcLvl/Cd with value 'SEPA'.
+ LibraryXPathXMLReader.Initialize(ExportedFilePath, GetISO20022V03NameSpace());
+ LibraryXPathXMLReader.VerifyNodeValueByXPath('//PmtInf/PmtTpInf/SvcLvl/Cd', 'SEPA');
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryTestInitialize.OnTestInitialize(CODEUNIT::"SEPA.09 CT Functional Test");
+ if isInitialized then
+ exit;
+ LibraryTestInitialize.OnBeforeTestSuiteInitialize(CODEUNIT::"SEPA.09 CT Functional Test");
+
+ SEPACTCode := FindSEPACTPaymentFormat();
+ AllowSEPAOnCompanyCountryCode();
+ isInitialized := true;
+ LibraryTestInitialize.OnAfterTestSuiteInitialize(CODEUNIT::"SEPA.09 CT Functional Test");
+ end;
+
+ [TransactionModel(TransactionModel::None)]
+ local procedure AllowSEPAOnCountryCode(CountryRegionCode: Code[10])
+ var
+ CountryRegion: Record "Country/Region";
+ begin
+ CountryRegion.Get(CountryRegionCode);
+ if not CountryRegion."SEPA Allowed" then begin
+ CountryRegion.Validate("SEPA Allowed", true);
+ CountryRegion.Modify(true);
+ end;
+ end;
+
+ local procedure AllowSEPAOnCompanyCountryCode()
+ var
+ CompanyInfo: Record "Company Information";
+ begin
+ CompanyInfo.Get();
+ AllowSEPAOnCountryCode(CompanyInfo."Country/Region Code");
+ end;
+
+ local procedure CreateSEPABankAccount(var BankAccount: Record "Bank Account")
+ begin
+ LibraryERM.CreateBankAccount(BankAccount);
+ BankAccount.Validate(Balance, LibraryRandom.RandIntInRange(100000, 1000000));
+ BankAccount.Validate("Bank Account No.", LibraryUtility.GenerateRandomCode(BankAccount.FieldNo("Bank Account No."), DATABASE::"Bank Account"));
+ BankAccount.Validate("Country/Region Code", GetASEPACountryCode());
+ BankAccount.Validate(IBAN, 'ES7620770024003102575766');
+ BankAccount.Validate("Payment Export Format", SEPACTCode);
+ BankAccount.Validate("Credit Transfer Msg. Nos.", LibraryERM.CreateNoSeriesCode());
+ BankAccount.Validate("SWIFT Code", 'BSCHESMM');
+ BankAccount.Modify(true);
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ NoSeries: Record "No. Series";
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ begin
+ NoSeries.FindFirst();
+ LibraryFRLocalization.CreatePaymentClass(PaymentClass);
+ PaymentClass.Validate(Name, '');
+ PaymentClass.Validate("Header No. Series", NoSeries.Code);
+ PaymentClass.Validate(Enable, true);
+ PaymentClass.Validate(Suggestions, PaymentClass.Suggestions::Vendor);
+ PaymentClass.Validate("SEPA Transfer Type", PaymentClass."SEPA Transfer Type"::"Credit Transfer");
+ PaymentClass.Modify(true);
+ LibraryFRLocalization.CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR")
+ var
+ BankAccount: Record "Bank Account";
+ PaymentClassCode: Code[30];
+ begin
+ PaymentClassCode := CreatePaymentClass();
+ LibraryVariableStorage.Enqueue(PaymentClassCode);
+
+ LibraryFRLocalization.CreatePaymentHeader(PaymentHeader);
+ PaymentHeader.Validate("Account Type", PaymentHeader."Account Type"::"Bank Account");
+ CreateSEPABankAccount(BankAccount);
+ PaymentHeader.Validate("Account No.", BankAccount."No.");
+ PaymentHeader.Validate("Bank Country/Region Code", BankAccount."Country/Region Code");
+ PaymentHeader.Validate(IBAN, 'CH6309000000250097798');
+ PaymentHeader.Validate("SWIFT Code", 'INGBNL2A');
+ PaymentHeader.Modify(true);
+
+ LibraryFRLocalization.CreatePaymentLine(PaymentLine, PaymentHeader."No.");
+ PaymentLine.Validate("Account Type", PaymentLine."Account Type"::Vendor);
+ PaymentLine.Validate("Account No.", CreateVendor());
+ PaymentLine.Validate(Amount, LibraryRandom.RandDecInRange(1, 1000, 1));
+ PaymentLine.Validate("Due Date", CalcDate('<1D>', PaymentLine."Due Date"));
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure CreateVendor(): Code[20]
+ var
+ BankAccount: Record "Bank Account";
+ PostCode: Record "Post Code";
+ Vendor: Record Vendor;
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ CreateSEPABankAccount(BankAccount);
+
+ LibraryPurchase.CreateVendor(Vendor);
+ VendorBankAccount.Init();
+ VendorBankAccount.Validate(Code, BankAccount.Name);
+ VendorBankAccount.Validate("Vendor No.", Vendor."No.");
+ VendorBankAccount.Insert(true);
+
+ VendorBankAccount.Validate(Name, BankAccount.Name);
+ VendorBankAccount.Validate("Bank Account No.", BankAccount.Name);
+ VendorBankAccount.Validate("Country/Region Code", BankAccount."Country/Region Code");
+ VendorBankAccount.Validate(IBAN, BankAccount.IBAN);
+ VendorBankAccount.Validate("SWIFT Code", BankAccount."SWIFT Code");
+ VendorBankAccount.Modify(true);
+
+ Vendor.Validate("Country/Region Code", BankAccount."Country/Region Code");
+ Vendor.Validate("Preferred Bank Account Code", BankAccount."No.");
+ Vendor.Validate(Address, '´Š¢sterbrogade ´Š¢´Š¢');
+ // for testing non latin characters
+ PostCode.SetRange("Country/Region Code", Vendor."Country/Region Code");
+ Assert.IsTrue(not PostCode.IsEmpty(), 'Post code must exist');
+ Vendor.Validate("Post Code", PostCode.Code);
+ Vendor.Validate(City, PostCode.City);
+ Vendor.Modify(true);
+
+ exit(Vendor."No.");
+ end;
+
+ local procedure ExportSEPAFile(var PaymentHeader: Record "Payment Header FR") ExportedFilePath: Text
+ var
+ GenJnlLine: Record "Gen. Journal Line";
+ OutStr: OutStream;
+ File: File;
+ begin
+ GenJnlLine.SetRange("Journal Template Name", '');
+ GenJnlLine.SetRange("Journal Batch Name", '');
+ GenJnlLine.SetRange("Document No.", PaymentHeader."No.");
+ ExportedFilePath := TemporaryPath + LibraryUtility.GenerateGUID() + '.xml';
+ File.Create(ExportedFilePath);
+ File.CreateOutStream(OutStr);
+ XMLPORT.Export(XMLPORT::"SEPA CT pain.001.001.09", OutStr, GenJnlLine);
+ File.Close();
+ end;
+
+ local procedure FindSEPACTPaymentFormat(): Code[20]
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ BankExportImportSetup.SetFilter("Processing XMLport ID", '%1', XMLPORT::"SEPA CT pain.001.001.09");
+
+ if BankExportImportSetup.IsEmpty() then
+ Error('Bank Export/Import Setup not found.');
+
+ exit(BankExportImportSetup.Code);
+ end;
+
+ local procedure GetASEPACountryCode(): Code[10]
+ var
+ CountryRegion: Record "Country/Region";
+ PostCode: Record "Post Code";
+ begin
+ PostCode.Reset();
+ PostCode.FindSet();
+ PostCode.Next(LibraryRandom.RandInt(PostCode.Count));
+ CountryRegion.Get(PostCode."Country/Region Code");
+ AllowSEPAOnCountryCode(CountryRegion.Code);
+ exit(CountryRegion.Code);
+ end;
+
+ local procedure GetPreserveNonLatinCharacters(): Boolean
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ BankExportImportSetup.Get(SEPACTCode);
+ exit(BankExportImportSetup."Preserve Non-Latin Characters");
+ end;
+
+ local procedure GetISO20022V03NameSpace(): Text
+ begin
+ exit('urn:iso:std:iso:20022:tech:xsd:pain.001.001.09');
+ end;
+
+ local procedure InitializeTestDataAndExportSEPAFile(var PaymentHeader: Record "Payment Header FR"; var PaymentLine: Record "Payment Line FR")
+ var
+ ExportedFilePath: Text;
+ begin
+ Initialize();
+ CreatePaymentSlip(PaymentHeader, PaymentLine);
+ ExportedFilePath := ExportSEPAFile(PaymentHeader);
+ LibraryXMLRead.Initialize(ExportedFilePath);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentClassHandler(var PaymentClassList: TestPage "Payment Class List FR")
+ var
+ PaymentClassCode: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(PaymentClassCode);
+ PaymentClassList.GotoKey(PaymentClassCode);
+ PaymentClassList.OK().Invoke();
+ end;
+
+ local procedure SetPreserveNonLatinCharacters(Preserve: Boolean)
+ var
+ BankExportImportSetup: Record "Bank Export/Import Setup";
+ begin
+ BankExportImportSetup.Get(SEPACTCode);
+ if not (BankExportImportSetup."Preserve Non-Latin Characters" = Preserve) then begin
+ BankExportImportSetup.Validate("Preserve Non-Latin Characters", Preserve);
+ BankExportImportSetup.Modify(true);
+ end;
+ end;
+
+ local procedure VerifyDebitor(PaymentHeader: Record "Payment Header FR")
+ var
+ BankAccount: Record "Bank Account";
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ VerifyCompanyNameAndPostalAddress(CompanyInformation, 'Dbtr');
+
+ BankAccount.Get(PaymentHeader."Account No.");
+ LibraryXMLRead.VerifyNodeValueInSubtree('Dbtr', 'AnyBIC', BankAccount."SWIFT Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAcct', 'IBAN', BankAccount.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('DbtrAgt', 'BICFI', BankAccount."SWIFT Code");
+ end;
+
+ local procedure VerifyCreditor(PaymentLine: Record "Payment Line FR")
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor.Get(PaymentLine."Account No.");
+ VerifyNameAndPostalAddress(
+ 'Cdtr', Vendor.Name, Vendor.Address, Vendor."Post Code", Vendor.City, Vendor."Country/Region Code");
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtrAcct', 'IBAN', PaymentLine.IBAN);
+ LibraryXMLRead.VerifyNodeValueInSubtree('CdtTrfTxInf', 'InstdAmt', PaymentLine.Amount);
+ LibraryXMLRead.VerifyAttributeValueInSubtree('CdtTrfTxInf', 'InstdAmt', 'Ccy', 'EUR');
+ asserterror LibraryXMLRead.VerifyNodeValue('Ustrd', '');
+ Assert.ExpectedError(StrSubstNo(ElementIsMissingErr, 'Ustrd'));
+ end;
+
+ local procedure VerifyGroupHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory/required elements
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'MsgId');
+ VerifyNodeExistsAndNotEmpty('GrpHdr', 'CreDtTm');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'NbOfTxs', '1');
+ LibraryXMLRead.VerifyNodeValueInSubtree('GrpHdr', 'CtrlSum', PaymentLine.Amount);
+ end;
+
+ local procedure VerifyInitiatingParty()
+ var
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Nm', CompanyInformation.Name);
+ LibraryXMLRead.VerifyNodeValueInSubtree('InitgPty', 'Id', CompanyInformation."VAT Registration No.");
+ // TFSID: 327225 Removal of 'PstlAdr' tag since the scheme has been changed
+ LibraryXMLRead.VerifyNodeAbsenceInSubtree('InitgPty', 'PstlAdr');
+ end;
+
+ local procedure VerifyPaymentInformationHeader(PaymentLine: Record "Payment Line FR")
+ begin
+ // Mandatory elements
+ VerifyNodeExistsAndNotEmpty('PmtInf', 'PmtInfId');
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'PmtMtd', 'TRF'); // Hardcoded to 'TRF' by the FR SEPA standard
+
+ // Optional element
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'BtchBookg', 'false');
+
+ // Mandatory element
+ LibraryXMLRead.VerifyNodeValueInSubtree('ReqdExctnDt', 'Dt', PaymentLine."Posting Date");
+
+ LibraryXMLRead.VerifyNodeValueInSubtree('PmtInf', 'ChrgBr', 'SLEV'); // Hardcoded by FR SEPA standard
+ end;
+
+ local procedure VerifyCompanyNameAndPostalAddress(CompanyInformation: Record "Company Information"; SubtreeRootNodeName: Text)
+ begin
+ VerifyNameAndPostalAddress(
+ SubtreeRootNodeName, CompanyInformation.Name, CompanyInformation.Address,
+ CompanyInformation."Post Code", CompanyInformation.City, CompanyInformation."Country/Region Code");
+ end;
+
+ local procedure VerifyNameAndPostalAddress(SubtreeRootNodeName: Text; Name: Text; Address: Text; PostCode: Text; City: Text; CountryRegionCode: Text)
+ begin
+ VerifyNodeValue(SubtreeRootNodeName, 'Nm', Name);
+ VerifyNodeValue(SubtreeRootNodeName, 'StrtNm', Address);
+ VerifyNodeValue(SubtreeRootNodeName, 'PstCd', PostCode);
+ VerifyNodeValue(SubtreeRootNodeName, 'TwnNm', City);
+ VerifyNodeValue(SubtreeRootNodeName, 'Ctry', CountryRegionCode);
+ end;
+
+ local procedure VerifyNodeExistsAndNotEmpty(SubtreeRootName: Text; NodeName: Text)
+ begin
+ Assert.AreNotEqual(
+ '', LibraryXMLRead.GetNodeValueInSubtree(SubtreeRootName, NodeName), StrSubstNo(UnexpectedEmptyNodeErr, NodeName, SubtreeRootName));
+ end;
+
+ local procedure VerifyNodeValue(SubtreeRootNodeName: Text; NodeName: Text; ExpectedValue: Text)
+ begin
+ if not GetPreserveNonLatinCharacters() then
+ ExpectedValue := StringConversionManagement.WindowsToASCII(ExpectedValue);
+ LibraryXMLRead.VerifyNodeValueInSubtree(SubtreeRootNodeName, NodeName, ExpectedValue);
+ end;
+
+ local procedure VerifyXmlFileDeclarationAndVersion()
+ begin
+ LibraryXMLRead.VerifyXMLDeclaration('1.0', 'UTF-8', 'no');
+ LibraryXMLRead.VerifyAttributeValue('Document', 'xmlns', 'urn:iso:std:iso:20022:tech:xsd:pain.001.001.09');
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandlerYes(Question: Text; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTArchiveTableValidation.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTArchiveTableValidation.Codeunit.al
new file mode 100644
index 0000000000..b9417288a6
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTArchiveTableValidation.Codeunit.al
@@ -0,0 +1,63 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+codeunit 144031 "UT Archive Table Validation"
+{
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+
+ [Test]
+ procedure CompareArchiveTables()
+ begin
+ CompareTables(DATABASE::"Payment Header FR", DATABASE::"Payment Header Archive FR");
+ CompareTables(DATABASE::"Payment Line FR", DATABASE::"Payment Line Archive FR");
+ end;
+
+ local procedure CompareTables(TableId1: Integer; TableId2: Integer)
+ var
+ RecRef1: RecordRef;
+ RecRef2: RecordRef;
+ FieldRef1: FieldRef;
+ FieldRef2: FieldRef;
+ FieldIndex: Integer;
+ begin
+ RecRef1.Open(TableId1);
+ RecRef2.Open(TableId2);
+
+ for FieldIndex := 1 to RecRef1.FieldCount do begin
+ FieldRef1 := RecRef1.FieldIndex(FieldIndex);
+ if RecRef2.FieldExist(FieldRef1.Number) then begin
+ FieldRef2 := RecRef2.Field(FieldRef1.Number);
+
+ Assert.AreEqual(FieldRef1.Name, FieldRef2.Name, FieldRef2.Name);
+ Assert.AreEqual(FieldRef1.Length, FieldRef2.Length, FieldRef2.Name);
+ end;
+ end;
+
+ RecRef2.Close();
+ RecRef1.Close();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTBANKACC.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTBANKACC.Codeunit.al
new file mode 100644
index 0000000000..84975eb213
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTBANKACC.Codeunit.al
@@ -0,0 +1,298 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+using Microsoft.Bank.BankAccount;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+
+codeunit 144032 "UT BANKACC"
+{
+ // 1. Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Bank Account Table.
+ // 2. Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Bank Account Table.
+ // 3. Purpose of the test is to validate test 5 digit Agency Code on Bank Account Table.
+ // 4. Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Customer Bank Account Table.
+ // 5. Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Customer Bank Account Table.
+ // 6. Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Vendor Bank Account Table.
+ // 7. Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Vendor Bank Account Table.
+ // 8. Purpose of the test is to validate test Default Bank Account Code on Customer Bank Account Card page.
+ // 9. Purpose of the test is to validate test Default Bank Account Code on Vendor Bank Account Card page.
+ //
+ // Covers Test Cases for WI - 344162
+ // ------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ------------------------------------------------------------------------------------------------------------
+ // OnValidateBankAccountNoRIBTrueBankAccount,OnValidateBankAccountNoRIBFalseBankAccount 151138
+ // OnValidateAgencyCodeBankAccount 151144
+ // OnValidateBankAccountNoRIBTrueCustomerBankAccount,OnValidateBankAccountNoRIBFalseCustomerBankAccount151136
+ // OnValidateBankAccountNoRIBTrueVendorBankAccount,OnValidateBankAccountNoRIBFalseVendorBankAccount 151137
+ // OnValidateDefaultBankAccountCustomerCard 151145
+ // OnValidateDefaultBankAccountVendorCard 151146
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryRandom: Codeunit "Library - Random";
+ BankBranchNoTxt: Label '12000';
+ AgencyCodeTxt: Label '03100';
+#pragma warning disable AA0240
+ BankAccountNoTxt: Label '00012123003';
+#pragma warning restore AA0240
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBTrueBankAccount()
+ begin
+ // Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Bank Account Table.
+ OnValidateBankAccountNoRIBBankAccount(BankBranchNoTxt, true);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBFalseBankAccount()
+ begin
+ // Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Bank Account Table.
+ OnValidateBankAccountNoRIBBankAccount('', false); // Using Blank for Bank Account No.
+ end;
+
+ local procedure OnValidateBankAccountNoRIBBankAccount(BankAccountNo: Code[20]; RIBChecked: Boolean)
+ var
+ BankAccount: Record "Bank Account";
+ begin
+ // Setup: Create Bank Account.
+ CreateBankAccount(BankAccount);
+
+ // Exercise: Validate fields due to feature RIB Checked and Using hardcode for Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateBankAccount(BankAccount, BankAccountNo, AgencyCodeTxt, BankAccountNoTxt, 7); // Using blank for Bank Branch No.
+
+ // Verify.
+ BankAccount.Get(BankAccount."No.");
+ BankAccount.TestField("RIB Checked FR", RIBChecked);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAgencyCodeBankAccount()
+ var
+ BankAccount: Record "Bank Account";
+ AgencyCode: Text[5];
+ begin
+ // Purpose of the test is to validate test 5 digit Agency Code on Bank Account Table.
+
+ // Setup: Create Bank Account and Agency Code.
+ AgencyCode := Format(LibraryRandom.RandIntInRange(1, 4)); // Using Random for Agency Code.
+ CreateBankAccount(BankAccount);
+
+ // Validate fields due to feature RIB Checked.Using hardcode for Bank Branch No.,Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateBankAccount(
+ BankAccount, BankBranchNoTxt, AgencyCode, BankAccountNoTxt, LibraryRandom.RandInt(10)); // Using Random for Agency Code and RIB Key.
+
+ // Exercise: Checking field length is 5 and if less than 5, Zero will added in prefix.
+ if StrLen(AgencyCode) < 5 then
+ AgencyCode := PadStr('', 5 - StrLen(AgencyCode), '0') + AgencyCode;
+
+ // Verify.
+ BankAccount.Get(BankAccount."No.");
+ BankAccount.TestField("Agency Code FR", AgencyCode);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBTrueCustomerBankAccount()
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ // Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Customer Bank Account Table.
+
+ // Setup: Create Customer Bank Account.
+ CreateCustomerBankAccount(CustomerBankAccount);
+
+ // Exercise: Validate fields due to feature RIB Checked.Using hardcode for Bank Branch No.,Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateCustomerBankAccount(CustomerBankAccount, BankBranchNoTxt, AgencyCodeTxt, BankAccountNoTxt, 7);
+
+ // Verify.
+ CustomerBankAccount.Get(CustomerBankAccount."Customer No.", CustomerBankAccount.Code);
+ CustomerBankAccount.TestField("RIB Checked FR", true);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBFalseCustomerBankAccount()
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ // Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Customer Bank Account Table.
+
+ // Setup: Create Customer Bank Account.
+ CreateCustomerBankAccount(CustomerBankAccount);
+
+ // Exercise: Validate fields due to feature RIB Checked.Using hardcode for Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateCustomerBankAccount(CustomerBankAccount, '', AgencyCodeTxt, BankAccountNoTxt, 7); // Using blank for Bank Branch No.
+
+ // Verify.
+ CustomerBankAccount.Get(CustomerBankAccount."Customer No.", CustomerBankAccount.Code);
+ CustomerBankAccount.TestField("RIB Checked FR", false);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBTrueVendorBankAccount()
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ // Purpose of the test is to validate test RIB Checked is True by filling Bank Branch No.,Agency Code,Bank Account No. and RIB Key. on Vendor Bank Account Table.
+
+ // Setup: Create Vendor Bank Account.
+ CreateVendorBankAccount(VendorBankAccount);
+
+ // Exercise: Validate fields due to feature RIB Checked.Using hardcode for Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateVendorBankAccount(VendorBankAccount, BankBranchNoTxt, AgencyCodeTxt, BankAccountNoTxt, 7);
+
+ // Verify.
+ VendorBankAccount.Get(VendorBankAccount."Vendor No.", VendorBankAccount.Code);
+ VendorBankAccount.TestField("RIB Checked FR", true);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateBankAccountNoRIBFalseVendorBankAccount()
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ // Purpose of the test is to validate test RIB Checked is False by non - filling of Bank Branch No. on Vendor Bank Account Table.
+
+ // Setup: Create Vendor Bank Account.
+ CreateVendorBankAccount(VendorBankAccount);
+
+ // Exercise: Validate fields due to feature RIB Checked.Using hardcode for Agency Code,Bank Account No. and RIB Key due to fixed nature to return 0.
+ UpdateVendorBankAccount(VendorBankAccount, '', AgencyCodeTxt, BankAccountNoTxt, 7); // Using blank for Bank Branch No.
+
+ // Verify.
+ VendorBankAccount.Get(VendorBankAccount."Vendor No.", VendorBankAccount.Code);
+ VendorBankAccount.TestField("RIB Checked FR", false);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateDefaultBankAccountCustomerCard()
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ CustomerCard: TestPage "Customer Card";
+ begin
+ // Purpose of the test is to validate test Default Bank Account Code on Customer Bank Account Card page.
+
+ // Setup: Create Vendor Bank Account.
+ CreateCustomerBankAccount(CustomerBankAccount);
+ CustomerCard.OpenEdit();
+
+ // Exercise.
+ CustomerCard.FILTER.SetFilter("No.", CustomerBankAccount."Customer No.");
+
+ // Verify.
+ CustomerCard."Preferred Bank Account Code".AssertEquals(CustomerBankAccount.Code);
+ CustomerCard.Close();
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateDefaultBankAccountVendorCard()
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ VendorCard: TestPage "Vendor Card";
+ begin
+ // Purpose of the test is to validate test Default Bank Account Code on Vendor Bank Account Card page.
+
+ // Setup: Create Vendor Bank Account.
+ CreateVendorBankAccount(VendorBankAccount);
+ VendorCard.OpenEdit();
+
+ // Exercise.
+ VendorCard.FILTER.SetFilter("No.", VendorBankAccount."Vendor No.");
+
+ // Verify.
+ VendorCard."Preferred Bank Account Code".AssertEquals(VendorBankAccount.Code);
+ VendorCard.Close();
+ end;
+
+ local procedure CreateBankAccount(var BankAccount: Record "Bank Account")
+ begin
+ BankAccount."No." := LibraryUTUtility.GetNewCode();
+ BankAccount.Insert();
+ end;
+
+ local procedure CreateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account")
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Insert(true);
+ CustomerBankAccount."Customer No." := Customer."No.";
+ CustomerBankAccount.Code := LibraryUTUtility.GetNewCode10();
+ CustomerBankAccount.Insert();
+ Customer."Preferred Bank Account Code" := CustomerBankAccount.Code;
+ Customer.Modify();
+ end;
+
+ local procedure CreateVendorBankAccount(var VendorBankAccount: Record "Vendor Bank Account")
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor."No." := LibraryUTUtility.GetNewCode();
+ Vendor.Insert(true);
+ VendorBankAccount."Vendor No." := Vendor."No.";
+ VendorBankAccount.Code := LibraryUTUtility.GetNewCode10();
+ VendorBankAccount.Insert();
+ Vendor."Preferred Bank Account Code" := VendorBankAccount.Code;
+ Vendor.Modify();
+ end;
+
+ local procedure UpdateBankAccount(BankAccount: Record "Bank Account"; BankBranchNo: Text[20]; AgencyCode: Text[5]; BankAccountNo: Text[30]; RIBKey: Integer)
+ begin
+ // Validate fields due to feature RIB Checked.
+ BankAccount.Validate("Bank Branch No.", BankBranchNo);
+ BankAccount.Validate("Agency Code FR", AgencyCode);
+ BankAccount.Validate("Bank Account No.", BankAccountNo);
+ BankAccount.Validate("RIB Key FR", RIBKey);
+ BankAccount.Modify();
+ end;
+
+ local procedure UpdateCustomerBankAccount(CustomerBankAccount: Record "Customer Bank Account"; BankBranchNo: Text[20]; AgencyCode: Text[5]; BankAccountNo: Text[30]; RIBKey: Integer)
+ begin
+ // Validate fields due to feature RIB Checked.
+ CustomerBankAccount.Validate("Bank Branch No.", BankBranchNo);
+ CustomerBankAccount.Validate("Agency Code FR", AgencyCode);
+ CustomerBankAccount.Validate("Bank Account No.", BankAccountNo);
+ CustomerBankAccount.Validate("RIB Key FR", RIBKey);
+ CustomerBankAccount.Modify();
+ end;
+
+ local procedure UpdateVendorBankAccount(VendorBankAccount: Record "Vendor Bank Account"; BankBranchNo: Text[20]; AgencyCode: Text[5]; BankAccountNo: Text[30]; RIBKey: Integer)
+ begin
+ // Validate fields due to feature RIB Checked.
+ VendorBankAccount.Validate("Bank Branch No.", BankBranchNo);
+ VendorBankAccount.Validate("Agency Code FR", AgencyCode);
+ VendorBankAccount.Validate("Bank Account No.", BankAccountNo);
+ VendorBankAccount.Validate("RIB Key FR", RIBKey);
+ VendorBankAccount.Modify();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagement.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagement.Codeunit.al
new file mode 100644
index 0000000000..fb57002084
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagement.Codeunit.al
@@ -0,0 +1,849 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using System.IO;
+using System.TestLibraries.Utilities;
+
+codeunit 144034 "UT REP Payment Management"
+{
+ // 1. Purpose of the test is to validate On Pre Data Item Trigger of Report ID - 10818 Payment List.
+ // 2. Purpose of the test is to verify error on Report ID - 10832 GL/Cust. Ledger Reconciliation.
+ // 3. Purpose of the test is to verify error on Report ID - 10833 GL/Vend. Ledger Reconciliation.
+ // 4. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10821 'Bill' with Currency.
+ // 5. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10829 'Draft' with Currency.
+ // 6. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10821 'Bill' without Currency.
+ // 7. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10829 'Draft' without Currency.
+ // 8. Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10830 'Draft Notice'.
+ // 9. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10830 'Draft Notice' with blank Payment Address Code.
+ // 10. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10830 'Draft Notice' with Payment Address Code.
+ // 11. Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10822 'Withdraw Notice'.
+ // 12. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10822 'Withdraw Notice' with blank Payment Address Code.
+ // 13. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10822 'Withdraw Notice' with Payment Address Code.
+ // 14. Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // 15. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // 16. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // 17. Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation',
+ // 18. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation'.
+ // 19. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation'.
+ // 20. Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10826 Remittance.
+ //
+ // Covers Test Cases for WI - 344345
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // OnPreDateItemPaymentLinePaymentList 169507
+ // GLCustLedgerReconciliationDateFilterError 169508
+ // GLVendLedgerReconciliationDateFilterError 169509
+ // OnAfterGetRecordPaymentLineWithCurrencyBill, OnAfterGetRecordPaymentLineBlankCurrencyBillError 169433
+ // OnAfterGetRecordPaymentLineWithCurrencyDraft, OnAfterGetRecordPaymentLineBlankCurrencyDraftError 169510
+ // OnPreReportDraftNoticeError, OnAfterGetRecordPmtLineBlankPmtAddressDraftNotice
+ // OnAfterGetRecordPmtLinePmtAddressDraftNotice 169512
+ // OnPreReportWithdrawNoticeError, OnAfterGetRecordPmtLineBlankPmtAddressWithdrawNotice
+ // OnAfterGetRecordPmtLinePmtAddressWithdrawNotice 169432
+ // OnPreReportDraftRecapitulationError, OnAfterGetRecordPmtLineDraftRecapitulationError 169511
+ // OnAfterGetRecordPmtLineDraftRecapitulation
+ // OnPreReportWithdrawRecapitulationError, OnAfterGetRecordPmtLineWithdrawRecapitulationError
+ // OnAfterGetRecordPmtLineWithdrawRecapitulation 169434
+ // OnAfterGetRecordPaymentLineRemittance 169513
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ FileManagement: Codeunit "File Management";
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryReportValidation: Codeunit "Library - Report Validation";
+ AmountTxt: Label 'Amount %1', Comment = '%1 = Currency Code';
+ DialogErr: Label 'Dialog';
+ FileNotExistsMsg: Label 'File Does Not Exists.';
+ PaymentLinesAccountNoCapLbl: Label 'Payment_Lines__Account_No__';
+ PaymentLineAccountNoCapLbl: Label 'Payment_Line__Account_No__';
+ PaymentLines1NoCapLbl: Label 'Payment_Lines1___No__';
+
+ [Test]
+ [HandlerFunctions('PaymentListRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDateItemPaymentLinePaymentList()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On Pre Data Item Trigger of Report ID - 10818 Payment List.
+
+ // Setup: Create Payment Line.
+ Initialize();
+
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, CreateVendor(), '', ''); // Blank value for Currency and Payment Address code.
+ LibraryVariableStorage.Enqueue(PaymentLine."No."); // Enqueue for PaymentListRequestPageHandler.
+
+ // Exercise.
+ REPORT.Run(REPORT::"Payment List FR");
+
+ // Verify: Verify Account No on Payment List Report.
+ VerifyValuesOnXML(PaymentLineAccountNoCapLbl, PaymentLine."Account No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('GLCustLedgerReconciliationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure GLCustLedgerReconciliationDateFilterError()
+ begin
+ // Purpose of the test is to verify error on Report ID - 10832 GL/Cust. Ledger Reconciliation.
+
+ // Test to verify error 'Specify a filter for the Date Filter field in the Customer table.'.
+ GLReconciliationDateFilterError(REPORT::"GL/Cust Ledger Reconciliation");
+ end;
+
+ [Test]
+ [HandlerFunctions('GLVendLedgerReconciliationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure GLVendLedgerReconciliationDateFilterError()
+ begin
+ // Purpose of the test is to verify error on Report ID - 10833 GL/Vend. Ledger Reconciliation.
+
+ // Test to verify error 'Specify a filter for the Date Filter field in the Vendor table.'.
+ GLReconciliationDateFilterError(REPORT::"GL/Vend Ledger Reconciliation");
+ end;
+
+ local procedure GLReconciliationDateFilterError(ReportID: Integer)
+ begin
+ // Setup: Enqueue values for GLCustLedgerReconciliationRequestPageHandler and GLVendLedgerReconciliationRequestPageHandler.
+ Initialize();
+
+ LibraryVariableStorage.Enqueue(''); // Blank for No.
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify: Verify expected error code.
+ Assert.ExpectedErrorCode('DB:NoFilter');
+ end;
+
+ [Test]
+ [HandlerFunctions('BillRequestpageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineWithCurrencyBill()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10821 'Bill' with Currency.
+ PaymentReportWithCurrency(PaymentLine."Account Type"::Customer, CreateCustomer(), REPORT::"Bill FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineWithCurrencyDraft()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10829 'Draft' with Currency.
+ PaymentReportWithCurrency(PaymentLine."Account Type"::Vendor, CreateVendor(), REPORT::"Draft FR");
+ end;
+
+ local procedure PaymentReportWithCurrency(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; ReportID: Integer)
+ var
+ CurrencyCode: Code[10];
+ begin
+ // Setup and Exercise.
+ Initialize();
+
+ CurrencyCode := CreateCurrency();
+ CreatePaymentLineAndRunPaymentReport(AccountType, AccountNo, CurrencyCode, ReportID);
+
+ // Verify: Verify Amount Text on XML after running report.
+ VerifyValuesOnXML('AmountText', StrSubstNo(AmountTxt, CurrencyCode));
+ end;
+
+ [Test]
+ [HandlerFunctions('BillBlankCurrencyRequestpageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineBlankCurrencyBillError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10821 'Bill' without Currency.
+ PaymentReportWithoutCurrency(PaymentLine."Account Type"::Customer, CreateCustomer(), REPORT::"Bill FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftBlankCurrencyRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineBlankCurrencyDraftError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10829 'Draft' without Currency.
+ PaymentReportWithoutCurrency(PaymentLine."Account Type"::Vendor, CreateVendor(), REPORT::"Draft FR");
+ end;
+
+ local procedure PaymentReportWithoutCurrency(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; ReportID: Integer)
+ var
+ FileName: Text;
+ begin
+ // Setup and Exercise.
+ Initialize();
+
+ FileName := FileManagement.ServerTempFileName('.pdf');
+ LibraryVariableStorage.Enqueue(FileName); // Enqueue for BillBlankCurrencyRequestpageHandler and DraftBlankCurrencyRequestpageHandler.
+ CreatePaymentLineAndRunPaymentReport(AccountType, AccountNo, '', ReportID); // Blank for Currency code.
+
+ // Verify: Verify File Exists and not Empty.
+ Assert.IsTrue(VerifyFileNotEmpty(FileName), FileNotExistsMsg);
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreReportDraftNoticeError()
+ begin
+ // Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10830 'Draft Notice'.
+ // Setup.
+ Initialize();
+
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"Draft notice FR");
+
+ // Verify: Verify expected error code. Actual error is 'You must specify a transfer number'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBlankPmtAddressDraftNotice()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10830 'Draft Notice' with blank Payment Address Code.
+ RunAndVerifyDraftNoticeReport(''); // Blank for Payment Address code.
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLinePmtAddressDraftNotice()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10830 'Draft Notice' with Payment Address Code.
+ RunAndVerifyDraftNoticeReport(LibraryUTUtility.GetNewCode10());
+ end;
+
+ local procedure RunAndVerifyDraftNoticeReport(PaymentAddressCode: Code[10])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create payment Line.
+ Initialize();
+
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, CreateVendor(), '', PaymentAddressCode); // Blank for Currency code.
+ PaymentLine.SetRange("No.", PaymentLine."No.");
+
+ // Exercise.
+ REPORT.Run(REPORT::"Draft notice FR", true, false, PaymentLine); // TRUE for ReqWindow and FALSE for SystemPrinter.
+
+ // Verify: Verify Account No on Draft Notice report.
+ VerifyValuesOnXML(PaymentLines1NoCapLbl, PaymentLine."No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreReportWithdrawNoticeError()
+ begin
+ // Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10822 'Withdraw Notice'.
+ // Setup.
+ Initialize();
+
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"Withdraw notice FR");
+
+ // Verify: Verify expected error code. Actual error is 'You must specify a withdraw number'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBlankPmtAddressWithdrawNotice()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10822 'Withdraw Notice' with blank Payment Address Code.
+ RunAndVerifyWithdrawNoticeReport(''); // Blank for Payment Address code.
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawNoticeRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLinePmtAddressWithdrawNotice()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10822 'Withdraw Notice' with Payment Address Code.
+ RunAndVerifyWithdrawNoticeReport(LibraryUTUtility.GetNewCode10());
+ end;
+
+ local procedure RunAndVerifyWithdrawNoticeReport(PaymentAddressCode: Code[10])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create payment Line.
+ Initialize();
+
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Customer, CreateCustomer(), '', PaymentAddressCode); // Blank for Currency code.
+ PaymentLine.SetRange("No.", PaymentLine."No.");
+
+ // Exercise.
+ REPORT.Run(REPORT::"Withdraw notice FR", true, false, PaymentLine); // TRUE for ReqWindow and FALSE for SystemPrinter.
+
+ // Verify: Verify Account No on Withdraw Notice report.
+ VerifyValuesOnXML(PaymentLines1NoCapLbl, PaymentLine."No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreReportDraftRecapitulationError()
+ begin
+ // Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // Setup.
+ Initialize();
+
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"Draft recapitulation FR");
+
+ // Verify: Verify expected error code. Actual error is 'You must specify a transfer number'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineDraftRecapitulationError()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // Setup & Exercise.
+ Initialize();
+
+ asserterror CreatePaymentLineAndRunDraftRecapitulationReport(''); // Blank for AccountNo.
+
+ // Verify: Verify expected error code. Actual error is 'Vendor does not exist'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineDraftRecapitulation()
+ var
+ VendorNo: Code[20];
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10824 'Draft Recapitulation'.
+ // Setup & Exercise.
+ Initialize();
+
+ VendorNo := CreateVendor();
+ CreatePaymentLineAndRunDraftRecapitulationReport(VendorNo);
+
+ // Verify: Verify Account No on XML after running Draft Recapitulation report.
+ VerifyValuesOnXML(PaymentLinesAccountNoCapLbl, VendorNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreReportWithdrawRecapitulationError()
+ begin
+ // Purpose of the test is to validate On Pre Report Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation',
+ // Setup.
+ Initialize();
+
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"Withdraw recapitulation FR");
+
+ // Verify: Verify expected error code. Actual error is 'You must specify a withdraw number'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineWithdrawRecapitulationError()
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation'.
+ // Setup & Exercise.
+ Initialize();
+
+ asserterror CreatePaymentLineAndRunWithdrawRecapitulationReport(''); // Blank for AccountNo.
+
+ // Verify: Verify expected error code. Actual error is 'Customer does not exist'.
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRecapitulationRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineWithdrawRecapitulation()
+ var
+ CustomerNo: Code[20];
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10828 'Withdraw Recapitulation'.
+ // Setup & Exercise.
+ Initialize();
+
+ CustomerNo := CreateCustomer();
+ CreatePaymentLineAndRunWithdrawRecapitulationReport(CustomerNo);
+
+ // Verify: Verify Account No on XML after running Withdraw Recapitulation report.
+ VerifyValuesOnXML(PaymentLinesAccountNoCapLbl, CustomerNo);
+ end;
+
+ [Test]
+ [HandlerFunctions('RemittanceRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineRemittance()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to validate On After Get Record Trigger of Payment Line for Report ID - 10826 Remittance.
+ // Setup: Create payment Line.
+ Initialize();
+
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Customer, CreateCustomer(), CreateCurrency(), ''); // Blank for Payment Address Code.
+ PaymentLine.SetRange("No.", PaymentLine."No.");
+
+ // Exercise.
+ REPORT.Run(REPORT::"Remittance FR", true, false, PaymentLine); // TRUE for ReqWindow and FALSE for SystemPrinter.
+
+ // Verify: Verify Account No on XML after running Remittance report.
+ VerifyValuesOnXML(PaymentLineAccountNoCapLbl, PaymentLine."Account No.");
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftNoticeToExcelRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure DraftNoticeSaveToExcel()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 332702] Run report "Draft notice" with saving results to Excel file.
+ Initialize();
+
+ LibraryReportValidation.SetFileName(LibraryUtility.GenerateGUID());
+
+ // [GIVEN] Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, CreateVendor(), '', '');
+
+ // [WHEN] Run report "Draft notice", save report output to Excel file.
+ PaymentLine.SetRecFilter();
+ REPORT.Run(REPORT::"Draft notice FR", true, false, PaymentLine);
+
+ // [THEN] Report output is saved to Excel file.
+ LibraryReportValidation.OpenExcelFile();
+ LibraryReportValidation.VerifyCellValue(1, 6, '1'); // page number
+ Assert.AreNotEqual(0, LibraryReportValidation.FindColumnNoFromColumnCaption('Draft notice'), '');
+ end;
+
+ [Test]
+ [HandlerFunctions('DraftRecapitulationToExcelRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure DraftRecapitulationSaveToExcel()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 332702] Run report "Draft recapitulation FR" with saving results to Excel file.
+ Initialize();
+
+ LibraryReportValidation.SetFileName(LibraryUtility.GenerateGUID());
+
+ // [GIVEN] Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, CreateVendor(), '', '');
+
+ // [WHEN] Run report "Draft recapitulation FR", save report output to Excel file.
+ PaymentLine.SetRecFilter();
+ REPORT.Run(REPORT::"Draft recapitulation FR", true, false, PaymentLine);
+
+ // [THEN] Report output is saved to Excel file.
+ LibraryReportValidation.OpenExcelFile();
+ LibraryReportValidation.VerifyCellValue(1, 7, '1'); // page number
+ Assert.AreNotEqual(0, LibraryReportValidation.FindColumnNoFromColumnCaption('Draft Recapitulation'), '');
+ end;
+
+ [Test]
+ [HandlerFunctions('RemittanceToExcelRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure RemittanceSaveToExcel()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 332702] Run report "Remittance" with saving results to Excel file.
+ Initialize();
+
+ LibraryReportValidation.SetFileName(LibraryUtility.GenerateGUID());
+
+ // [GIVEN] Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Customer, CreateCustomer(), '', '');
+
+ // [WHEN] Run report "Remittance", save report output to Excel file.
+ PaymentLine.SetRecFilter();
+ REPORT.Run(REPORT::"Remittance FR", true, false, PaymentLine);
+
+ // [THEN] Report output is saved to Excel file.
+ LibraryReportValidation.OpenExcelFile();
+ LibraryReportValidation.VerifyCellValue(1, 8, '1'); // page number
+ Assert.AreNotEqual(0, LibraryReportValidation.FindColumnNoFromColumnCaption('Remittance'), '');
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRecapitulationToExcelRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure WithdrawRecapitulationSaveToExcel()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 332702] Run report "Withdraw recapitulation FR" with saving results to Excel file.
+ Initialize();
+
+ LibraryReportValidation.SetFileName(LibraryUtility.GenerateGUID());
+
+ // [GIVEN] Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, CreateVendor(), '', '');
+
+ // [WHEN] Run report "Withdraw recapitulation FR", save report output to Excel file.
+ PaymentLine.SetRecFilter();
+ REPORT.Run(REPORT::"Withdraw recapitulation FR", true, false, PaymentLine);
+
+ // [THEN] Report output is saved to Excel file.
+ LibraryReportValidation.OpenExcelFile();
+ LibraryReportValidation.VerifyCellValue(1, 13, '1'); // page number
+ Assert.AreNotEqual(0, LibraryReportValidation.FindColumnNoFromColumnCaption('Withdraw Recapitulation'), '');
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawNoticeToExcelRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure WithdrawNoticeSaveToExcel()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // [SCENARIO 337173] Run report "Withdraw notice" with saving results to Excel file.
+ Initialize();
+
+ LibraryReportValidation.SetFileName(LibraryUtility.GenerateGUID());
+
+ // [GIVEN] Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Customer, CreateCustomer(), '', '');
+
+ // [WHEN] Run report "Withdraw notice", save report output to Excel file.
+ PaymentLine.SetRecFilter();
+ REPORT.Run(REPORT::"Withdraw notice FR", true, false, PaymentLine);
+
+ // [THEN] Report output is saved to Excel file.
+ LibraryReportValidation.OpenExcelFile();
+ LibraryReportValidation.VerifyCellValue(1, 12, '1'); // page number
+ Assert.AreNotEqual(0, LibraryReportValidation.FindColumnNoFromColumnCaption('Withdraw'), '');
+ end;
+
+ [Test]
+ [HandlerFunctions('GLCustLedgerRecoRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure RunReportGLCustLedgerRecoWithoutError()
+ begin
+ // [SCENARIO 455845] Run Report with no error message.
+ Initialize();
+
+
+ // [VERIFY] Run report and save file in pdf successfully in handler page.
+ REPORT.Run(REPORT::"GL/Cust Ledger Reconciliation");
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateCustomer(): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Insert();
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateVendor(): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor."No." := LibraryUTUtility.GetNewCode();
+ Vendor.Insert();
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreatePaymentHeader(): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ PaymentHeader."No." := LibraryUTUtility.GetNewCode();
+ PaymentHeader."Account Type" := PaymentHeader."Account Type"::"Bank Account";
+ PaymentHeader.Insert();
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreatePaymentLine(var PaymentLine: Record "Payment Line FR"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; CurrencyCode: Code[10]; PaymentAddressCode: Code[10])
+ begin
+ PaymentLine."No." := CreatePaymentHeader();
+ PaymentLine."Account Type" := AccountType;
+ PaymentLine."Account No." := AccountNo;
+ PaymentLine."Currency Code" := CurrencyCode;
+ PaymentLine.Marked := true;
+ PaymentLine."Payment Address Code" := PaymentAddressCode;
+ PaymentLine."Applies-to ID" := LibraryUTUtility.GetNewCode10();
+ PaymentLine.Insert();
+ end;
+
+ local procedure CreatePaymentLineAndRunDraftRecapitulationReport(VendorNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Vendor, VendorNo, CreateCurrency(), ''); // Blank for Payment Address code.
+ PaymentLine.SetRange("No.", PaymentLine."No.");
+
+ // Exercise.
+ REPORT.Run(REPORT::"Draft recapitulation FR", true, false, PaymentLine); // TRUE for ReqWindow and FALSE for SystemPrinter.
+ end;
+
+ local procedure CreatePaymentLineAndRunWithdrawRecapitulationReport(CustomerNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create Payment Line.
+ CreatePaymentLine(PaymentLine, PaymentLine."Account Type"::Customer, CustomerNo, CreateCurrency(), ''); // Blank for Payment Address code.
+ PaymentLine.SetRange("No.", PaymentLine."No.");
+
+ // Exercise.
+ REPORT.Run(REPORT::"Withdraw recapitulation FR", true, false, PaymentLine); // TRUE for ReqWindow and FALSE for SystemPrinter.
+ end;
+
+ local procedure CreatePaymentLineAndRunPaymentReport(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; CurrencyCode: Code[10]; ReportID: Integer)
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create Payment Line.
+ CreatePaymentLine(PaymentLine, AccountType, AccountNo, CurrencyCode, ''); // Blank for Payment Address code.
+ LibraryVariableStorage.Enqueue(PaymentLine."No."); // Enqueue for BillRequestpageHandler and DraftRequestPageHandler.
+
+ // Exercise.
+ REPORT.Run(ReportID);
+ end;
+
+ local procedure CreateCurrency(): Code[10]
+ var
+ Currency: Record Currency;
+ begin
+ Currency.Code := LibraryUTUtility.GetNewCode10();
+ Currency.Insert();
+ exit(Currency.Code);
+ end;
+
+ procedure VerifyFileNotEmpty(FileName: Text): Boolean
+ var
+ File: File;
+ begin
+ // The parameter FileName should contain the full File Name including path.
+ if FileName = '' then
+ exit(false);
+ if File.Open(FileName) then
+ if File.Len > 0 then
+ exit(true);
+ exit(false);
+ end;
+
+ local procedure VerifyValuesOnXML(Caption: Text[50]; Value: Variant)
+ begin
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists(Caption, Value);
+ end;
+
+ local procedure FomatFileName(ReportCaption: Text) ReportFileName: Text
+ begin
+ ReportFileName := DelChr(ReportCaption, '=', '/') + '.pdf'
+ end;
+
+ [RequestPageHandler]
+ procedure GLCustLedgerReconciliationRequestPageHandler(var GLCustLedgerReconciliation: TestRequestPage "GL/Cust Ledger Reconciliation")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ GLCustLedgerReconciliation.Customer.SetFilter("No.", No);
+ GLCustLedgerReconciliation.Customer.SetFilter("Date Filter", Format(0D));
+ GLCustLedgerReconciliation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure GLVendLedgerReconciliationRequestPageHandler(var GLVendLedgerReconciliation: TestRequestPage "GL/Vend Ledger Reconciliation")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ GLVendLedgerReconciliation.Vendor.SetFilter("No.", No);
+ GLVendLedgerReconciliation.Vendor.SetFilter("Date Filter", Format(0D));
+ GLVendLedgerReconciliation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure PaymentListRequestPageHandler(var PaymentList: TestRequestPage "Payment List FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ PaymentList."Payment Line".SetFilter("No.", No);
+ PaymentList.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure BillRequestpageHandler(var Bill: TestRequestPage "Bill FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ Bill."Payment Line".SetFilter("No.", No);
+ Bill.IssueDate.SetValue(0D);
+ Bill.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure BillBlankCurrencyRequestpageHandler(var Bill: TestRequestPage "Bill FR")
+ var
+ No: Variant;
+ FileName: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(FileName);
+ LibraryVariableStorage.Dequeue(No);
+ Bill."Payment Line".SetFilter("No.", No);
+ Bill.IssueDate.SetValue(0D);
+ Bill.SaveAsPdf(FileName);
+ end;
+
+ [RequestPageHandler]
+ procedure DraftRequestPageHandler(var Draft: TestRequestPage "Draft FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ Draft.IssueDate.SetValue(0D); // Issue date
+ Draft."Payment Line".SetFilter("No.", No);
+ Draft.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure DraftBlankCurrencyRequestPageHandler(var Draft: TestRequestPage "Draft FR")
+ var
+ No: Variant;
+ FileName: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(FileName);
+ LibraryVariableStorage.Dequeue(No);
+ Draft.IssueDate.SetValue(0D); // Issue date
+ Draft."Payment Line".SetFilter("No.", No);
+ Draft.SaveAsPdf(FileName);
+ end;
+
+ [RequestPageHandler]
+ procedure DraftNoticeRequestPageHandler(var DraftNotice: TestRequestPage "Draft notice FR")
+ begin
+ DraftNotice.NumberOfCopies.SetValue(LibraryRandom.RandIntInRange(1, 10));
+ DraftNotice.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure DraftNoticeToExcelRequestPageHandler(var DraftNotice: TestRequestPage "Draft notice FR")
+ begin
+ DraftNotice.SaveAsExcel(LibraryReportValidation.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure DraftRecapitulationRequestPageHandler(var DraftRecapitulation: TestRequestPage "Draft recapitulation FR")
+ begin
+ DraftRecapitulation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure DraftRecapitulationToExcelRequestPageHandler(var DraftRecapitulation: TestRequestPage "Draft recapitulation FR")
+ begin
+ DraftRecapitulation.SaveAsExcel(LibraryReportValidation.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawNoticeRequestPageHandler(var WithdrawNotice: TestRequestPage "Withdraw notice FR")
+ begin
+ WithdrawNotice.NumberOfCopies.SetValue(LibraryRandom.RandIntInRange(1, 10));
+ WithdrawNotice.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawNoticeToExcelRequestPageHandler(var WithdrawNotice: TestRequestPage "Withdraw notice FR")
+ begin
+ WithdrawNotice.SaveAsExcel(LibraryReportValidation.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawRecapitulationRequestPageHandler(var WithdrawRecapitulation: TestRequestPage "Withdraw recapitulation FR")
+ begin
+ WithdrawRecapitulation.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawRecapitulationToExcelRequestPageHandler(var WithdrawRecapitulation: TestRequestPage "Withdraw recapitulation FR")
+ begin
+ WithdrawRecapitulation.SaveAsExcel(LibraryReportValidation.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure RemittanceRequestPageHandler(var Remittance: TestRequestPage "Remittance FR")
+ begin
+ Remittance.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure RemittanceToExcelRequestPageHandler(var Remittance: TestRequestPage "Remittance FR")
+ begin
+ Remittance.SaveAsExcel(LibraryReportValidation.GetFileName());
+ end;
+
+ [RequestPageHandler]
+ procedure GLCustLedgerRecoRequestPageHandler(var GLCustLedgerReconciliation: TestRequestPage "GL/Cust Ledger Reconciliation")
+ begin
+ GLCustLedgerReconciliation.Customer.SetFilter("Date Filter",
+ StrSubstNo('%1..%2', CalcDate('<-1Y>', WorkDate()), CalcDate('<+1Y>', WorkDate())));
+ GLCustLedgerReconciliation.SaveAsPdf(FomatFileName(GLCustLedgerReconciliation.Caption));
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagementII.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagementII.Codeunit.al
new file mode 100644
index 0000000000..6aec70a39f
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTREPPaymentManagementII.Codeunit.al
@@ -0,0 +1,582 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Currency;
+using Microsoft.Sales.Customer;
+using System.TestLibraries.Utilities;
+
+codeunit 144035 "UT REP Payment Management II"
+{
+ // 1 - 29. Purpose of test is to validate error for Report 10882 (Transfer), 10881 (Withdraw), 10880 (ETEBAC Files), 10862 (Suggest Vendor Payments FR), 10864 (Suggest Customer Payments) and 10872 (Duplicate parameter).
+ // 30. Purpose of test is to validate error for Report 10873 (Archive Payment Slips).
+ // 31. Purpose of test is to validate OnAfterGetRecord of Report 10872 (Duplicate Parameter).
+ //
+ // Covers Test Cases for WI - 344968
+ // ----------------------------------------------------------------------------------------------------------------------
+ // Test Function Name
+ // ----------------------------------------------------------------------------------------------------------------------
+ // OnAfterGetRecordPmtHdrTransferError, OnAfterGetRecordPmtHdrWithdrawError, OnAfterGetRecordPmtHdrETEBACFilesError
+ // OnAfterGetRecordPmtHdrAgencyCodeTransferError, OnAfterGetRecordPmtHdrBankBranchNoTransferError
+ // OnAfterGetRecordPmtHdrBankAccountNoTransferError, OnAfterGetRecordPmtHdrCurrencyCodeTransferError
+ // OnAfterGetRecordPmtHdrAgencyCodeWithdrawError, OnAfterGetRecordPmtHdrBankBranchNoWithdrawError
+ // OnAfterGetRecordPmtHdrBankAccountNoWithdrawError, OnAfterGetRecordPmtHdrCurrencyCodeWithdrawError
+ // OnAfterGetRecordPmtHdrAgencyCodeETEBACFilesError, OnAfterGetRecordPmtHdrBankBranchNoETEBACFilesError
+ // OnAfterGetRecordPmtHdrBankAccountNoETEBACFilesError, OnAfterGetRecordPaymentLineTransferError
+ // OnAfterGetRecordPaymentLineWithdrawError, OnAfterGetRecordPaymentLineETEBACFilesError
+ // OnAfterGetRecordPmtLineBankBranchNoTransferError, OnAfterGetRecordPmtLineBankBranchNoWithdrawError
+ // OnAfterGetRecordPmtLineBankAccountNoWithdrawError, OnAfterGetRecordPmtLineBankAccountNoTransferError
+ // OnAfterGetRecordPmtLineBankBranchNoETEBACFilesError, OnAfterGetRecordPmtLineBankAccountNoETEBACFilesError
+ // OnPreDataItemVendPmtDateSuggestVendPmtFRError, OnPreDataItemVendPostingDateSuggestVendPmtFRError
+ // OnPreDataItemVendPmtDateSuggestCustPmtError, OnPreDataItemVendPostingDateSuggestCustPmtError
+ // OnPreDataItemPmtClassDuplParameterError, OnAfterGetRecordPmtClassDuplParameterError
+ // OnAfterGetRecordPmtClassNewNameDuplParameterError, OnPostReportArchivePaymentSlips
+ //
+ // Covers Test Cases for WI - 345175
+ // ----------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------
+ // OnAfterGetRecordPaymentClassDuplicateParameter 169524
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ ArchiveMsg: Label 'There is no Payment Header to archive.';
+ DialogCapLbl: Label 'Dialog';
+ ValueMatchMsg: Label 'Value must be same.';
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrWithdrawError()
+ begin
+ // Purpose of test is to validate Payment Header - OnAfterGetRecord of Report 10881 (Withdraw).
+ // Verify actual error: "The RIB of the company's bank account is incorrect. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedFalse(REPORT::"Withdraw FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrETEBACFilesError()
+ begin
+ // Purpose of test is to validate Payment Header - OnAfterGetRecord of Report 10880 (ETEBAC Files).
+ // Verify actual error: "The RIB of the company's bank account is incorrect. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedFalse(REPORT::"ETEBAC Files FR");
+ end;
+
+ local procedure PaymentHeaderWithRIBCheckedFalse(ReportID: Integer)
+ begin
+ // Setup.
+ Initialize();
+
+ CreatePaymentHeader(false); // RIBChecked as false.
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify.
+ Assert.ExpectedErrorCode(DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrAgencyCodeWithdrawError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Agency Code for Report 10881 (Withdraw).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"Withdraw FR", PaymentHeader.FieldNo("Agency Code"), LibraryUTUtility.GetNewCode10())
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrBankBranchNoWithdrawError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Bank Branch No for Report 10881 (Withdraw).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"Withdraw FR", PaymentHeader.FieldNo("Bank Branch No."), LibraryUTUtility.GetNewCode10())
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrBankAccountNoWithdrawError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Bank Account No for Report 10881 (Withdraw).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"Withdraw FR", PaymentHeader.FieldNo("Bank Account No."), LibraryUTUtility.GetNewCode());
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrCurrencyCodeWithdrawError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Currency Code for Report 10881 (Withdraw).
+ // Verify actual error: "You can only use currency code EUR."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"Withdraw FR", PaymentHeader.FieldNo("Currency Code"), CreateCurrencyExchangeRate());
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrAgencyCodeETEBACFilesError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Agency Code for Report 10880 (ETEBAC Files).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"ETEBAC Files FR", PaymentHeader.FieldNo("Agency Code"), LibraryUTUtility.GetNewCode10());
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrBankBranchNoETEBACFilesError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Bank Branch No for Report 10880 (ETEBAC Files).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"ETEBAC Files FR", PaymentHeader.FieldNo("Bank Branch No."), LibraryUTUtility.GetNewCode10());
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtHdrBankAccountNoETEBACFilesError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of test is to validate error of Bank Account No for Report 10880 (ETEBAC Files).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ PaymentHeaderWithRIBCheckedTrue(REPORT::"ETEBAC Files FR", PaymentHeader.FieldNo("Bank Account No."), LibraryUTUtility.GetNewCode());
+ end;
+
+ local procedure PaymentHeaderWithRIBCheckedTrue(ReportID: Integer; FieldNo: Integer; FieldValue: Code[20])
+ begin
+ // Setup.
+ Initialize();
+
+ UpdatePaymentHeader(CreatePaymentHeader(true), FieldNo, FieldValue); // RIBChecked as true.
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify.
+ Assert.ExpectedErrorCode(DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineWithdrawError()
+ begin
+ // Purpose of test is to validate Payment Line - OnAfterGetRecord of Report 10881 (Withdraw).
+ // Verify actual error: "The RIB of the company's bank account is incorrect. Please verify before continuing."
+ CreatePaymentLineAndRunReport(REPORT::"Withdraw FR", LibraryUTUtility.GetNewCode());
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentLineETEBACFilesError()
+ begin
+ // Purpose of test is to validate Payment Line - OnAfterGetRecord of Report 10880 (ETEBAC Files).
+ // Verify actual error: "The RIB of the company's bank account is incorrect. Please verify before continuing."
+ CreatePaymentLineAndRunReport(REPORT::"ETEBAC Files FR", CreateCustomer());
+ end;
+
+ local procedure CreatePaymentLineAndRunReport(ReportID: Integer; FieldValue: Code[20])
+ begin
+ // Setup.
+ Initialize();
+
+ CreatePaymentLine(FieldValue);
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify.
+ Assert.ExpectedErrorCode(DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBankBranchNoWithdrawError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of test is to validate error of Bank Branch No for Report 10881 (Withdraw).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ CreateAndUpdatePaymentLine(PaymentLine.FieldNo("Bank Branch No."), REPORT::"Withdraw FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('WithdrawRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBankAccountNoWithdrawError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of test is to validate error of Bank Account No for Report 10881 (Withdraw).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ CreateAndUpdatePaymentLine(PaymentLine.FieldNo("Bank Account No."), REPORT::"Withdraw FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBankBranchNoETEBACFilesError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of test is to validate error of Bank Account No for Report 10880 (ETEBAC Files).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ CreateAndUpdatePaymentLine(PaymentLine.FieldNo("Bank Account No."), REPORT::"ETEBAC Files FR");
+ end;
+
+ [Test]
+ [HandlerFunctions('ETEBACFilesRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtLineBankAccountNoETEBACFilesError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of test is to validate error of Bank Branch No for Report 10880 (ETEBAC Files).
+ // Verify actual error: "Bank Account No. is too long. Please verify before continuing."
+ CreateAndUpdatePaymentLine(PaymentLine.FieldNo("Bank Branch No."), REPORT::"ETEBAC Files FR");
+ end;
+
+ local procedure CreateAndUpdatePaymentLine(FieldNo: Integer; ReportID: Integer)
+ begin
+ // Setup.
+ Initialize();
+
+ UpdatePaymentLine(CreatePaymentLine(CreateCustomer()), FieldNo, LibraryUTUtility.GetNewCode());
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify.
+ Assert.ExpectedErrorCode(DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('SuggestVendorPaymentsFRRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemVendPmtDateSuggestVendPmtFRError()
+ begin
+ // Purpose of test is to validate error of Payment Date for Report 10862 (Suggest Vendor Payments FR).
+ // Verify actual error: "Please enter the last payment date."
+ RunMiscellaneousReportsAndVerifyError(0D, REPORT::"Suggest Vend. Payments", DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('SuggestVendorPaymentsFRRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemVendPostingDateSuggestVendPmtFRError()
+ begin
+ // Purpose of test is to validate error of Posting Date for Report 10862 (Suggest Vendor Payments FR).
+ // Verify actual error: "Please enter the posting date."
+ RunMiscellaneousReportsAndVerifyError(WorkDate(), REPORT::"Suggest Vend. Payments", DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('SuggestCustomerPaymentsRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemVendPmtDateSuggestCustPmtError()
+ begin
+ // Purpose of test is to validate error of Payment Date for Report 10864 (Suggest Customer Payments).
+ // Verify actual error: "Please enter the last payment date."
+ RunMiscellaneousReportsAndVerifyError(0D, REPORT::"Suggest Cust. Payments", DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('SuggestCustomerPaymentsRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemVendPostingDateSuggestCustPmtError()
+ begin
+ // Purpose of test is to validate error of Posting Date for Report 10864 (Suggest Customer Payments).
+ // Verify actual error: "Please enter the posting date."
+ RunMiscellaneousReportsAndVerifyError(WorkDate(), REPORT::"Suggest Cust. Payments", DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('DuplicateParameterRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemPmtClassDuplParameterError()
+ begin
+ // Purpose of test is to validate error of New Name for Report 10872 (Duplicate parameter).
+ // Verify actual error: "You must precise a new name."
+ RunMiscellaneousReportsAndVerifyError('', REPORT::"Duplicate parameter FR", DialogCapLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('DuplicateParameterRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtClassDuplParameterError()
+ begin
+ // Purpose of test is to validate error of New Name for Report 10872 (Duplicate parameter).
+ // Verify actual error: "The Payment Class already exists. Identification fields and values.'"
+ RunMiscellaneousReportsAndVerifyError(LibraryUTUtility.GetNewCode(), REPORT::"Duplicate parameter FR", 'DB:RecordExists');
+ end;
+
+ [Test]
+ [HandlerFunctions('DuplicateParameterRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPmtClassNewNameDuplParameterError()
+ begin
+ // Purpose of test is to validate error of New Name for Report 10872 (Duplicate parameter).
+ // Verify actual error: "The name you have put does already exist. Please put an other name."
+ RunMiscellaneousReportsAndVerifyError(CreatePaymentClass(), REPORT::"Duplicate parameter FR", DialogCapLbl);
+ end;
+
+ local procedure RunMiscellaneousReportsAndVerifyError(InputValue: Variant; ReportID: Integer; ErrorCode: Text[30])
+ begin
+ // Setup.
+ Initialize();
+
+
+ // Enqueue required for DuplicateParameterRequestPageHandler, SuggestVendorPaymentsFRRequestPageHandler and SuggestCustomerPaymentsRequestPageHandler.
+ LibraryVariableStorage.Enqueue(InputValue);
+
+ // Exercise.
+ asserterror REPORT.Run(ReportID);
+
+ // Verify.
+ Assert.ExpectedErrorCode(ErrorCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('ArchivePaymentSlipsRequestPageHandler,MessageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPostReportArchivePaymentSlips()
+ begin
+ // Purpose of test is to validate error for Report 10873 (Archive Payment Slips).
+ // Setup.
+ Initialize();
+
+ LibraryVariableStorage.Enqueue(CreatePaymentHeader(true)); // Enqueue Payment Header No for ArchivePaymentSlipsRequestPageHandler.
+
+ // Exercise.
+ REPORT.Run(REPORT::"Archive Payment Slips FR");
+
+ // Verify: Verification is covered in MessageHandler.
+ end;
+
+ [Test]
+ [HandlerFunctions('DuplicateParameterRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordPaymentClassDuplicateParameter()
+ var
+ PaymentClass: TestPage "Payment Class FR";
+ begin
+ // Purpose of test is to validate OnAfterGetRecord of Report 10872 (Duplicate Parameter).
+ // Setup: Create Payment Class and assign value for duplicate class.
+ Initialize();
+
+ PaymentClass.OpenEdit();
+ PaymentClass.FILTER.SetFilter(Code, CreatePaymentClass());
+ LibraryVariableStorage.Enqueue(CopyStr(PaymentClass.Code.Value, 1, 4)); // Enqueue required for DuplicateParameterRequestPageHandler.
+
+ // Exercise: Run Duplicate Parameter batch job report.
+ PaymentClass.DuplicateParameter.Invoke();
+
+ // Verify: Verify duplicate class with new name.
+ PaymentClass.FILTER.SetFilter(Code, CopyStr(PaymentClass.Code.Value, 1, 4));
+ PaymentClass.Code.AssertEquals(CopyStr(PaymentClass.Code.Value, 1, 4));
+ PaymentClass.Close();
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateCurrency(): Code[10]
+ var
+ Currency: Record Currency;
+ begin
+ Currency.Code := LibraryUTUtility.GetNewCode10();
+ Currency.Insert();
+ exit(Currency.Code);
+ end;
+
+ local procedure CreateCurrencyExchangeRate(): Code[10]
+ var
+ CurrencyExchangeRate: Record "Currency Exchange Rate";
+ begin
+ CurrencyExchangeRate."Currency Code" := CreateCurrency();
+ CurrencyExchangeRate."Exchange Rate Amount" := LibraryRandom.RandDec(10, 2);
+ CurrencyExchangeRate."Relational Exch. Rate Amount" := LibraryRandom.RandDec(10, 2);
+ CurrencyExchangeRate.Insert();
+ exit(CurrencyExchangeRate."Currency Code");
+ end;
+
+ local procedure CreateCustomer(): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Insert();
+ exit(Customer."No.");
+ end;
+
+ local procedure CreatePaymentClass(): Text[30]
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ PaymentClass.Code := LibraryUTUtility.GetNewCode();
+ PaymentClass.Insert();
+ exit(PaymentClass.Code);
+ end;
+
+ local procedure CreatePaymentHeader(RIBChecked: Boolean): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ PaymentHeader."No." := LibraryUTUtility.GetNewCode();
+ PaymentHeader."Payment Class" := LibraryUTUtility.GetNewCode();
+ PaymentHeader."Account Type" := PaymentHeader."Account Type"::"Bank Account";
+ PaymentHeader."National Issuer No." := Format(CopyStr(LibraryUTUtility.GetNewCode10(), 6)); // National Issuer No should be less than 6 characters.
+ PaymentHeader."RIB Checked" := RIBChecked;
+ PaymentHeader.Insert();
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreatePaymentLine(AccountNo: Code[20]): Code[20]
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine."No." := CreatePaymentHeader(true); // RIBChecked as true.
+ PaymentLine."Account Type" := PaymentLine."Account Type"::"Bank Account";
+ PaymentLine."Account No." := AccountNo;
+ PaymentLine."Bank Account No." := LibraryUTUtility.GetNewCode10();
+ PaymentLine.Insert();
+ exit(PaymentLine."No.");
+ end;
+
+ local procedure UpdatePaymentHeader(No: Code[20]; FieldNo: Integer; FieldValue: Code[20])
+ var
+ PaymentHeader: Record "Payment Header FR";
+ RecRef: RecordRef;
+ FieldRef: FieldRef;
+ begin
+ PaymentHeader.Get(No);
+ RecRef.GetTable(PaymentHeader);
+ FieldRef := RecRef.Field(FieldNo);
+ FieldRef.Validate(FieldValue);
+ RecRef.SetTable(PaymentHeader);
+ PaymentHeader.Modify();
+ end;
+
+ local procedure UpdatePaymentLine(No: Code[20]; FieldNo: Integer; FieldValue: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ RecRef: RecordRef;
+ FieldRef: FieldRef;
+ begin
+ PaymentLine.SetRange("No.", No);
+ PaymentLine.FindFirst();
+ RecRef.GetTable(PaymentLine);
+ FieldRef := RecRef.Field(FieldNo);
+ FieldRef.Validate(FieldValue);
+ RecRef.SetTable(PaymentLine);
+ PaymentLine.Modify();
+ end;
+
+ [RequestPageHandler]
+ procedure ArchivePaymentSlipsRequestPageHandler(var ArchivePaymentSlips: TestRequestPage "Archive Payment Slips FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ ArchivePaymentSlips."Payment Header".SetFilter("No.", No);
+ ArchivePaymentSlips.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure DuplicateParameterRequestPageHandler(var Duplicateparameter: TestRequestPage "Duplicate parameter FR")
+ var
+ NewName: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(NewName);
+ Duplicateparameter.New_Name.SetValue(NewName);
+ Duplicateparameter.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure ETEBACFilesRequestPageHandler(var ETEBACFiles: TestRequestPage "ETEBAC Files FR")
+ begin
+ ETEBACFiles.OK().Invoke();
+ end;
+
+ [MessageHandler]
+ procedure MessageHandler(Message: Text[1024])
+ begin
+ Assert.AreEqual(Message, StrSubstNo(ArchiveMsg), ValueMatchMsg);
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestCustomerPaymentsRequestPageHandler(var SuggestCustomerPayments: TestRequestPage "Suggest Cust. Payments")
+ var
+ LastPaymentDate: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(LastPaymentDate);
+ SuggestCustomerPayments.LastPaymentDate.SetValue(LastPaymentDate);
+ SuggestCustomerPayments.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SuggestVendorPaymentsFRRequestPageHandler(var SuggestVendorPaymentsFR: TestRequestPage "Suggest Vend. Payments")
+ var
+ LastPaymentDate: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(LastPaymentDate);
+ SuggestVendorPaymentsFR.LastPaymentDate.SetValue(LastPaymentDate);
+ SuggestVendorPaymentsFR.AvailableAmountLCY.SetValue(LibraryRandom.RandDec(10, 2));
+ SuggestVendorPaymentsFR.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure WithdrawRequestPageHandler(var Withdraw: TestRequestPage "Withdraw FR")
+ begin
+ Withdraw.OK().Invoke();
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTRemittance.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTRemittance.Codeunit.al
new file mode 100644
index 0000000000..f6c52419cf
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTRemittance.Codeunit.al
@@ -0,0 +1,228 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Sales.Customer;
+using System.TestLibraries.Utilities;
+
+codeunit 144033 "UT Remittance"
+{
+ // 1. Purpose of the test is to validate OnAfterGetRecord - Bank Account Code On report 10843 - Recapitulation Form.
+ // 2. Purpose of the test is to validate OnAfterGetRecord - Customer Code On report 10843 - Recapitulation Form.
+ // 3. Purpose of the test is to validate OnAfterGetRecord - Gen. Journal Line On report 10843 - Recapitulation Form.
+ // 4. Purpose of the test is to validate OnPreDataItem - Gen. Journal Line On report 10843 - Recapitulation Form.
+ // 5. Purpose of the test is to Open Check Remittance report through Page 255 - Cash Receipt Journal.
+ //
+ // Covers Test Cases for WI - 344648.
+ // ------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ------------------------------------------------------------------------------------------------------
+ // OnAfterGetRecordBankAccountRecapitulationForm,OnAfterGetRecordCustomerRecapitulationForm 154983
+ // OnAfterGetRecordGenJournalLineRecapitulationForm,OnPreDataItemGenJournalLineRecapitulationForm 155364,154984
+ // CheckRemittanceReport 151203,151204,151205
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryReportDataset: Codeunit "Library - Report Dataset";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryRandom: Codeunit "Library - Random";
+
+ [Test]
+ [HandlerFunctions('RecapitulationFormRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordBankAccountRecapitulationForm()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ // Purpose of the test is to validate OnAfterGetRecord - Bank Account Code On report 10843 Recapitulation Form.
+ // Setup.
+ Initialize();
+ CreateGenJournalLineAndRunRecapitulationForm(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, CreateCustomer(), '', '', CreateBankAccount()); // Using blank for Bank Account Code and Currency Code.
+
+ // Verify: Bal. Account No.,Account No. and Amount on report.
+ VerifyValuesOnReportRecapitulationForm(GenJournalLine."Bal. Account No.", GenJournalLine."Account No.", GenJournalLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('RecapitulationFormRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordCustomerRecapitulationForm()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ CustomerNo: Code[20];
+ begin
+ // Purpose of the test is to validate OnAfterGetRecord - Customer Code On report 10843 Recapitulation Form.
+ // Setup.
+ Initialize();
+ CustomerNo := CreateCustomer();
+ CreateGenJournalLineAndRunRecapitulationForm(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, CustomerNo, CreateCustomerBankAccount(CustomerNo),
+ LibraryUTUtility.GetNewCode10(), CreateBankAccount()); // Using LibraryUTUtility.GetNewCode10 for Currency Code.
+
+ // Verify: Bal. Account No.,Account No. and Amount on report.
+ VerifyValuesOnReportRecapitulationForm(GenJournalLine."Bal. Account No.", GenJournalLine."Account No.", GenJournalLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('RecapitulationFormRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecordGenJournalLineRecapitulationForm()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ // Purpose of the test is validate OnAfterGetRecord - Gen. Journal Line On report 10843 Recapitulation Form.
+ // Using LibraryUTUtility.GetNewCode() for G/L Account No., blank for Bank Account Code and Currency Code.
+ // Setup.
+ Initialize();
+ CreateGenJournalLineAndRunRecapitulationForm(
+ GenJournalLine, GenJournalLine."Account Type"::"G/L Account", LibraryUTUtility.GetNewCode(), '', '', CreateBankAccount());
+
+ // Verify: Verify Amount on Report.
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists('GenJnlLine_Amount', GenJournalLine.Amount);
+ end;
+
+ [Test]
+ [HandlerFunctions('RecapitulationFormRequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnPreDataItemGenJournalLineRecapitulationForm()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ // Purpose of the test is to validate OnPreDataItem - Gen. Journal Line On report 10843 Recapitulation Form.
+ // Setup.
+ Initialize();
+ CreateGenJournalLineAndRunRecapitulationForm(
+ GenJournalLine, GenJournalLine."Account Type"::"Bank Account", CreateBankAccount(), '', '', ''); // Using blank for Bank Account Code,Currency Code and Bank Account No.
+
+ // Verify: RecapitulationFormRequestPageHandler opens successfully. Blank report generate in this case.
+ end;
+
+ local procedure CreateGenJournalLineAndRunRecapitulationForm(var GenJournalLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; BankAccountCode: Code[20]; CurrencyCode: Code[10]; BalAccountNo: Code[20])
+ begin
+ // Setup.
+ CreateGenJournalLine(GenJournalLine, AccountType, AccountNo, BankAccountCode, CurrencyCode, BalAccountNo);
+ LibraryVariableStorage.Enqueue(GenJournalLine."Bal. Account No."); // Enqueue for RecapitulationFormRequestPageHandler.
+
+ // Exercise.
+ REPORT.Run(REPORT::"Recapitulation Form FR"); // Opens RecapitulationFormRequestPageHandler.
+ end;
+
+ [Test]
+ [HandlerFunctions('RecapitulationFormRequestPageHandler')]
+ procedure CheckRemittanceReport()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ CashReceiptJournal: TestPage "Cash Receipt Journal";
+ begin
+ // Purpose of the test is to Open Check Remittance report through Page 255 Cash Receipt Journal.
+
+ // Setup.
+ Initialize();
+ CreateGenJournalLine(
+ GenJournalLine, GenJournalLine."Account Type"::Customer, CreateCustomer(), '', '', CreateBankAccount()); // Using blank for Bank Account Code and Currency Code.
+ LibraryVariableStorage.Enqueue(GenJournalLine."Bal. Account No."); // Enqueue for RecapitulationFormRequestPageHandler.
+ Commit(); // Commit is required to run report. Since runmodal is used in page 255 Cash Receipt Journal.
+ CashReceiptJournal.OpenEdit();
+ CashReceiptJournal.FILTER.SetFilter("Account No.", GenJournalLine."Account No.");
+
+ // Exercise.
+ CashReceiptJournal.PrintCheckRemittanceReportFR.Invoke();
+
+ // Verify: Verify Debit Amount on Page.
+ CashReceiptJournal."Debit Amount".AssertEquals(GenJournalLine."Debit Amount");
+ CashReceiptJournal.Close();
+ end;
+
+ local procedure Initialize()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ begin
+ LibraryVariableStorage.Clear();
+ GenJournalLine.DeleteAll();
+ end;
+
+ local procedure CreateBankAccount(): Code[20]
+ var
+ BankAccount: Record "Bank Account";
+ begin
+ BankAccount."No." := LibraryUTUtility.GetNewCode();
+ BankAccount.Insert();
+ exit(BankAccount."No.");
+ end;
+
+ local procedure CreateCustomer(): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Insert();
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateCustomerBankAccount(CustomerNo: Code[20]): Code[20]
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ begin
+ CustomerBankAccount."Customer No." := CustomerNo;
+ CustomerBankAccount.Code := LibraryUTUtility.GetNewCode10();
+ CustomerBankAccount.Insert();
+ exit(CustomerBankAccount.Code);
+ end;
+
+ local procedure CreateGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; BankAccountCode: Code[20]; CurrencyCode: Code[10]; BalAccountNo: Code[20])
+ begin
+ GenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;
+ GenJournalLine."Account Type" := AccountType;
+ GenJournalLine."Account No." := AccountNo;
+ GenJournalLine.Amount := LibraryRandom.RandDec(10, 2); // Using random for Amount.
+ GenJournalLine."Bal. Account Type" := GenJournalLine."Bal. Account Type"::"Bank Account";
+ GenJournalLine."Bal. Account No." := BalAccountNo;
+ GenJournalLine."Recipient Bank Account" := BankAccountCode;
+ GenJournalLine."Currency Code" := CurrencyCode;
+ GenJournalLine.Insert();
+ end;
+
+ local procedure VerifyValuesOnReportRecapitulationForm(BalAccountNo: Code[20]; AccountNo: Code[20]; Amount: Decimal)
+ begin
+ LibraryReportDataset.LoadDataSetFile();
+ LibraryReportDataset.AssertElementWithValueExists('Bank_Account__No__', BalAccountNo);
+ LibraryReportDataset.AssertElementWithValueExists('Gen__Journal_Line_Account_No_', AccountNo);
+ LibraryReportDataset.AssertElementWithValueExists('GenJnlLine_Amount', Amount);
+ end;
+
+ [RequestPageHandler]
+ procedure RecapitulationFormRequestPageHandler(var RecapitulationForm: TestRequestPage "Recapitulation Form FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ RecapitulationForm."Bank Account".SetFilter("No.", No);
+ RecapitulationForm.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTSEPA.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTSEPA.Codeunit.al
new file mode 100644
index 0000000000..3af53325cd
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTSEPA.Codeunit.al
@@ -0,0 +1,824 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Bank.DirectDebit;
+using Microsoft.Finance.Currency;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.IO;
+using System.TestLibraries.Utilities;
+
+codeunit 144038 "UT SEPA"
+{
+ // 1 - 8. Purpose of the test is to verify error of Report ID - 10827 (SEPA ISO20022).
+ // 9 - 12. Purpose of the test is to verify error of Table ID - 10806 (Payment Line).
+ // 13. Purpose of the test is to verify trigger Modify on page ID - 10808 (Payment Line List).
+ // 14 - 15. Purpose of the test is to verify OnValidate trigger of IBAN on Table ID - 10805, 10807 (Payment Header Archive, Payment Line Archive).
+ //
+ // Covers Test Cases for WI - 343904
+ // ----------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------
+ // OnAfterGetRecPmtHeaderSEPAISO20022Error 216877
+ // OnAfterGetRecPmtHeaderBankAccSEPAISO20022Error 216871
+ // OnAfterGetRecPmtHdrLocCurrEUROSEPAISO20022Error 216932,216870
+ // OnAfterGetRecPmtHdrIBANSEPAISO20022Error 216875,216873
+ // OnAfterGetRecPmtHdrSWIFTCodeSEPAISO20022Error 216872
+ // OnAfterGetRecPmtHeaderCutomerSEPAISO20022Error 216874
+ // OnAfterGetRecPmtHeaderVendorSEPAISO20022Error 216868
+ // OnAfterGetRecPmtHdrLocCurrOtherSEPAISO20022Error 216930,216869
+ // OnValidateIBANPaymentLineError 216928
+ // OnDeletePaymentLineError 216931
+ // OnInsertPaymentLineError 216929
+ // OnModifyPaymentLineError 216876
+ //
+ // Covers Test Cases for WI - 344437
+ // ----------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------
+ // OnActionModifyPaymentLineList
+ // OnValidateIBANPaymentHeaderArchive
+ // OnValidateIBANPaymentLineArchive
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ // [FEATURE] [SEPA]
+ isInitialized := false;
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryXMLReadOnServer: Codeunit "Library - XML Read OnServer";
+ LibraryERM: Codeunit "Library - ERM";
+ LibrarySetupStorage: Codeunit "Library - Setup Storage";
+ FileManagement: Codeunit "File Management";
+ DialogErr: Label 'Dialog';
+ IBANTxt: Text;
+ TestFieldLbl: Label 'TestField';
+ WrongIBANErr: Label 'Wrong number in the field IBAN.';
+ isInitialized: Boolean;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHeaderSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with SEPA Allowed as False on Country/Region.
+ // Verify actual error: "SEPA Allowed is not enabled for Country/Region."
+ CreatePaymentSlipForReportSEPAISO20022(
+ false, PaymentHeader."Account Type"::Vendor, '', LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode(), DialogErr); // SEPA Allowed as False. Currency Code as blank.
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHeaderBankAccSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with Account Type other than Customer or Vendor on Payment Line.
+ // Verify actual error: "Payment Lines can only be of type Customer or Vendor for SEPA."
+ CreatePaymentSlipForReportSEPAISO20022(
+ true, PaymentHeader."Account Type"::"Bank Account", '', LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode(), DialogErr); // SEPA Allowed as True. Currency Code as blank.
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHdrLocCurrEUROSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with Local Currency EURO on General Ledger Setup.
+ // Verify actual error: "Currency is not Euro in the Payment Line."
+ CreatePaymentSlipForReportSEPAISO20022(
+ true, PaymentHeader."Account Type"::Vendor, CreateCurrency(), LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode(), DialogErr); // SEPA Allowed as True.
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHdrIBANSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with IBAN as blank on Payment Header.
+ // Verify actual error: "IBAN must have a value in Payment Header"
+ CreatePaymentSlipForReportSEPAISO20022(
+ true, PaymentHeader."Account Type"::Vendor, CreateCurrency(), '', LibraryUTUtility.GetNewCode(), TestFieldLbl); // SEPA Allowed as True. Currency Code and IBAN as blank.
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHdrSWIFTCodeSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with SWIFT Code as blank on Payment Header.
+ // Verify actual error: "SWIFT Code must have a value in Payment Header"
+ CreatePaymentSlipForReportSEPAISO20022(
+ true, PaymentHeader."Account Type"::Vendor, CreateCurrency(), LibraryUTUtility.GetNewCode(), '', TestFieldLbl); // SEPA Allowed as True. Currency Code and SWIFT Code as blank.
+ end;
+
+ [TransactionModel(TransactionModel::AutoRollback)]
+ local procedure CreatePaymentSlipForReportSEPAISO20022(SEPAAllowed: Boolean; AccountType: Enum "Gen. Journal Account Type"; CurrencyCode: Code[10]; IBAN: Code[50]; SWIFTCode: Code[20]; ErrorCode: Text[50])
+ var
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ // Setup: Create Vendor Bank Account. Create Payment Slip.
+ Initialize();
+
+ CreateVendorBankAccount(VendorBankAccount, SEPAAllowed);
+
+ // Enqueue Payment Slip No. for SEPAISO20022RequestPageHandler.
+ LibraryVariableStorage.Enqueue(
+ CreatePaymentSlip(
+ AccountType, VendorBankAccount."Vendor No.", VendorBankAccount.Code, CurrencyCode, VendorBankAccount."Country/Region Code",
+ IBAN, SWIFTCode));
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"SEPA ISO20022 FR");
+
+ // Verify.
+ Assert.ExpectedErrorCode(ErrorCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHeaderCutomerSEPAISO20022Error()
+ var
+ CustomerBankAccount: Record "Customer Bank Account";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with Account Type Customer on Payment Line.
+
+ // Setup: Create Customer Bank Account. Create Payment Slip.
+ Initialize();
+
+ CreateCustomerBankAccount(CustomerBankAccount);
+
+ // Enqueue Payment Slip No. for SEPAISO20022RequestPageHandler.
+ LibraryVariableStorage.Enqueue(
+ CreatePaymentSlip(
+ PaymentHeader."Account Type"::Customer, CustomerBankAccount."Customer No.", CustomerBankAccount.Code, '',
+ CreateCountryRegion(true), LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode())); // SEPA Allowed as True. Currency Code as blank.
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"SEPA ISO20022 FR");
+
+ // Verify: Verify actual error: "SEPA Allowed is not enabled for Country/Region."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHeaderVendorSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with Account Type Vendor on Payment Line.
+
+ // Setup: Create Vendor Bank Account. Create Payment Slip.
+ Initialize();
+
+ CreateVendorBankAccount(VendorBankAccount, false); // SEPA Allowed as False.
+
+ // Enqueue Payment Slip No. for SEPAISO20022RequestPageHandler.
+ LibraryVariableStorage.Enqueue(
+ CreatePaymentSlip(
+ PaymentHeader."Account Type"::Vendor, VendorBankAccount."Vendor No.", VendorBankAccount.Code, '',
+ CreateCountryRegion(true), LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode())); // SEPA Allowed as True. Currency Code as blank.
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"SEPA ISO20022 FR");
+
+ // Verify: Verify actual error: "SEPA Allowed is not enabled for Country/Region."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnAfterGetRecPmtHdrLocCurrOtherSEPAISO20022Error()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VendorBankAccount: Record "Vendor Bank Account";
+ begin
+ // Purpose of the test is to verify error of Report 10883 (SEPA ISO20022) with Local Currency Other on General Ledger Setup.
+
+ // Setup: Create Vendor Bank Account. Create Payment Slip.
+ Initialize();
+
+ UpdateGeneralLedgerSetup();
+ CreateVendorBankAccount(VendorBankAccount, true); // SEPA Allowed as True.
+
+ // Enqueue Payment Slip No. for SEPAISO20022RequestPageHandler.
+ LibraryVariableStorage.Enqueue(
+ CreatePaymentSlip(
+ PaymentHeader."Account Type"::Vendor, VendorBankAccount."Vendor No.", VendorBankAccount.Code, CreateCurrency(),
+ VendorBankAccount."Country/Region Code", LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode()));
+
+ // Exercise.
+ asserterror REPORT.Run(REPORT::"SEPA ISO20022 FR");
+
+ // Verify: Verify actual error: "Currency is not Euro in the Payment Line."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('IBANConfirmHandler')]
+ procedure CheckPaymentLineIBANConfirmYes()
+ var
+ PaymentLine: Record "Payment Line FR";
+ IBANNumber: Code[50];
+ begin
+ // [SCENARIO] Invalid IBAN for Payment Line is set in case of Stan confirms its setting.
+ // [GIVEN] Payment Line.
+
+ PaymentLine.Init();
+ IBANNumber := LibraryUtility.GenerateGUID();
+
+ // [WHEN] Set invalid IBAN for Payment Line. Confim setting of IBAN in the dialog.
+ LibraryVariableStorage.Enqueue(true);
+ PaymentLine.Validate(IBAN, IBANNumber);
+
+ // [THEN] New IBAN is set.
+ VerifyIBAN(PaymentLine.IBAN, IBANNumber);
+ end;
+
+ [Test]
+ [HandlerFunctions('IBANConfirmHandler')]
+ procedure CheckPaymentLineIBANConfirmNo()
+ var
+ PaymentLine: Record "Payment Line FR";
+ OldIBAN: Code[50];
+ begin
+ // [SCENARIO] Invalid IBAN for Payment Line is not set in case of Stan rejects its setting.
+ // [GIVEN] Payment Line.
+
+ PaymentLine.Init();
+ OldIBAN := PaymentLine.IBAN;
+
+ // [WHEN] Set invalid IBAN for Payment Line. Reject setting of IBAN in the dialog.
+ LibraryVariableStorage.Enqueue(false);
+ asserterror PaymentLine.Validate(IBAN, LibraryUtility.GenerateGUID());
+
+ // [THEN] New IBAN is not set.
+ VerifyIBAN(PaymentLine.IBAN, OldIBAN);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnDeletePaymentLineError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to verify error of Table ID - 10806 (Payment Line) when delete Payment Line.
+
+ // Setup: Create Payment Slip.
+ Initialize();
+
+ CreatePaymentHeader(PaymentHeader, '', '', ''); // IBAN, SWIFT Code and Country Region Code as blank.
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine."Copied To No." := LibraryUTUtility.GetNewCode();
+ PaymentLine.Insert();
+
+ // Exercise.
+ asserterror PaymentLine.Delete(true);
+
+ // Verify: Verify actual error: "You cannot delete this payment line."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnInsertPaymentLineError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to verify error of Table ID - 10806 (Payment Line) when Currency is different on Payment Header and Payment Line.
+
+ // Setup: Create Payment Slip.
+ Initialize();
+
+ CreatePaymentHeader(PaymentHeader, '', '', ''); // IBAN, SWIFT Code and Country Region Code as blank.
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine.IsCopy := true;
+ PaymentLine."Currency Code" := CreateCurrency();
+
+ // Exercise.
+ asserterror PaymentLine.Insert(true);
+
+ // Verify: Verify actual error: "You cannot use different currencies on the same payment header."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnInsertPaymentLineAfterFileGeneratedErr()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ RecRef: RecordRef;
+ begin
+ // [SCENARIO 363057] Error message when inserting Payment Line in Payment Header with "File Export Completed" = TRUE
+ Initialize();
+
+
+ // [GIVEN] Create Payment Header with "File Export Completed" = TRUE
+ CreatePaymentHeader(PaymentHeader, '', '', '');
+ PaymentHeader.Validate("File Export Completed", true);
+ PaymentHeader.Modify(true);
+
+ // [GIVEN] Create Payment Line
+ PaymentLine.Init();
+ PaymentLine."No." := PaymentHeader."No.";
+ RecRef.GetTable(PaymentLine);
+ PaymentLine."Line No." := LibraryUtility.GetNewLineNo(RecRef, PaymentLine.FieldNo("Line No."));
+
+ // [WHEN] Payment Line is inserted
+ asserterror PaymentLine.Insert(true);
+
+ // [THEN] An error is thrown indicating an error with Payment Header field "File Export Completed"
+ Assert.ExpectedErrorCode(TestFieldLbl);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnModifyPaymentLineError()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to verify error of Table ID - 10806 (Payment Line) when modify Payment Line which is already posted.
+
+ // Setup: Create Payment Slip.
+ Initialize();
+
+ CreatePaymentHeader(PaymentHeader, '', '', ''); // IBAN, SWIFT Code and Country Region Code as blank.
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine.Insert();
+ PaymentLine.Posted := true;
+
+ // Exercise.
+ asserterror PaymentLine.Modify(true);
+
+ // Verify: Verify actual error: "You cannot modify this payment line."
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [HandlerFunctions('PaymentLineModificationPageHandler')]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnActionModifyPaymentLineList()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VendorBankAccount: Record "Vendor Bank Account";
+ PaymentLinesList: TestPage "Payment Lines List FR";
+ No: Code[20];
+ begin
+ // Purpose of the test is to validate action Modify on Payment Line List page ID - 10808.
+
+ // Setup: Create Vendor Bank Account and Payment Slip.
+ Initialize();
+
+ CreateVendorBankAccount(VendorBankAccount, true); // SEPA Allowed as True.
+ No :=
+ CreatePaymentSlip(
+ PaymentHeader."Account Type"::Vendor, VendorBankAccount."Vendor No.", VendorBankAccount.Code, CreateCurrency(),
+ VendorBankAccount."Country/Region Code", LibraryUTUtility.GetNewCode(), LibraryUTUtility.GetNewCode());
+ PaymentLinesList.OpenEdit();
+ PaymentLinesList.FILTER.SetFilter("No.", No);
+ LibraryVariableStorage.Enqueue(No); // Enqueue Payment No. for PaymentLineModificationPageHandler.
+
+ // Exercise: call action Modify on Payment Line List page.
+ PaymentLinesList.Modify.Invoke(); // Call PaymentLineModificationPageHandler.
+
+ // Verify: Verify updated value on Payment Line List page after action Modify.
+ PaymentLinesList."Drawee Reference".AssertEquals(CopyStr(No, 1, 10));
+ PaymentLinesList.Close();
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateIBANPaymentHeaderArchive()
+ var
+ PaymentHeaderArchive: Record "Payment Header Archive FR";
+ PaymentHeaderArchive2: Record "Payment Header Archive FR";
+ begin
+ IBANTxt := 'FR14 2004 1010 0505 0001 3M02 606';
+ // Purpose of the test is to validate trigger OnValidate of IBAN field on Table IDs - 10867 (Payment Header Archive).
+
+ // Setup: Create Payment Header Archive with IBAN.
+ Initialize();
+
+ PaymentHeaderArchive."No." := LibraryUTUtility.GetNewCode();
+
+ // Exercise.
+ PaymentHeaderArchive.Validate(IBAN, IBANTxt); // Validate required for check the trigger.
+ PaymentHeaderArchive.Insert();
+
+ // Verify: Verify updated value on Payment Header Archive table.
+ PaymentHeaderArchive2.Get(PaymentHeaderArchive."No.");
+ PaymentHeaderArchive2.TestField(IBAN, IBANTxt);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateIBANPaymentLineArchive()
+ var
+ PaymentLineArchive: Record "Payment Line Archive FR";
+ PaymentLineArchive2: Record "Payment Line Archive FR";
+ begin
+ IBANTxt := 'FR14 2004 1010 0505 0001 3M02 606';
+ // Purpose of the test is to validate trigger OnValidate of IBAN field on Table IDs - 10868 (Payment Line Archive).
+
+ // Setup: Create Payment Line Archive with IBAN.
+ Initialize();
+
+ PaymentLineArchive."No." := LibraryUTUtility.GetNewCode();
+ PaymentLineArchive."Line No." := LibraryRandom.RandInt(1000); // Using Random Int for Line No.
+
+ // Exercise.
+ PaymentLineArchive.Validate(IBAN, IBANTxt); // Validate required for check the trigger.
+ PaymentLineArchive.Insert();
+
+ // Verify: Verify updated value on Payment Line archive table.
+ PaymentLineArchive2.Get(PaymentLineArchive."No.", PaymentLineArchive."Line No.");
+ PaymentLineArchive2.TestField(IBAN, IBANTxt);
+ end;
+
+ [Test]
+ procedure MessagetoRecipientGenJournalLineFromCustLedgerEntries()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ DocumentNo: Code[10];
+ CustomerNo: Code[20];
+ PaymentNo: Code[20];
+ Result: Text;
+ begin
+ // [FEATURE] [UT][Customer]
+ // [SCENARIO 377537] "Message to Recipient" of "Gen. Journal Line" should contain "Document No." from payment applied to Customer Ledger Entries
+ Initialize();
+
+
+ // [GIVEN] 20 records of Customer ledger entries
+ // [GIVEN] Length of merged "Document No." is more than 140 symbols
+ Result := CreateCustLedgerEntries(LibraryRandom.RandIntInRange(15, 20), CustomerNo, DocumentNo);
+ // [GIVEN] Customer payment general journal line, applied to 20 customer ledger entries
+ PaymentNo := CreatePaymentDocument(GenJournalLine."Account Type"::Customer, CustomerNo, DocumentNo);
+
+ // [WHEN] Invoke "SEPA CT-Prepare Source"
+ GenJournalLine.SetFilter("Document No.", PaymentNo);
+ CODEUNIT.Run(CODEUNIT::"SEPA CT-Prepare Source", GenJournalLine);
+
+ // [THEN] "Gen. Journal Line"."Message to Recipient" is equal to first 140 symbols of merged "Document No."s from Customer Ledger Entries
+ GenJournalLine.Find();
+ GenJournalLine.TestField("Message to Recipient",
+ CopyStr(Result, MaxStrLen(GenJournalLine.Description) + 9, MaxStrLen(GenJournalLine."Message to Recipient")));
+
+ // TearDown
+ GenJournalLine.Delete(true);
+ end;
+
+ [Test]
+ procedure MessagetoRecipientGenJournalLineFromVendLedgerEntries()
+ var
+ GenJournalLine: Record "Gen. Journal Line";
+ DocumentNo: Code[10];
+ VendorNo: Code[20];
+ PaymentNo: Code[20];
+ Result: Text;
+ begin
+ // [FEATURE] [UT][Vendor]
+ // [SCENARIO 377537] "Message to Recipient" of "Gen. Journal Line" should contain "Document No." from payment applied to Vendor Ledger Entries
+ Initialize();
+
+
+ // [GIVEN] 20 records of Vendor ledger entries
+ // [GIVEN] Length of merged "Document No." is more than 140 symbols
+ Result := CreateVendLedgerEntries(LibraryRandom.RandIntInRange(15, 20), VendorNo, DocumentNo);
+ // [GIVEN] Vendor payment general journal line, applied to 20 vendor ledger entries
+ PaymentNo := CreatePaymentDocument(GenJournalLine."Account Type"::Vendor, VendorNo, DocumentNo);
+
+ // [WHEN] Invoke "SEPA CT-Prepare Source"
+ GenJournalLine.SetFilter("Document No.", PaymentNo);
+ CODEUNIT.Run(CODEUNIT::"SEPA CT-Prepare Source", GenJournalLine);
+
+ // [THEN] "Gen. Journal Line"."Message to Recipient" is equal to first 140 symbols of merged "Document No."s from Vendor Ledger Entries
+ GenJournalLine.Find();
+ GenJournalLine.TestField("Message to Recipient",
+ CopyStr(Result, MaxStrLen(GenJournalLine.Description) + 9, MaxStrLen(GenJournalLine."Message to Recipient")));
+
+ // TearDown
+ GenJournalLine.Delete(true);
+ end;
+
+ [Test]
+ [HandlerFunctions('SEPAISO20022RequestPageHandler')]
+ procedure PstlAdrInInitgPtyFromCompanyInfoAdressSEPAISO20022()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ VendorBankAccount: Record "Vendor Bank Account";
+ FileName: Text;
+ begin
+ // [FEATURE] [Credit Transfer]
+ // [SCENARIO 312137] There is no company postal address inside node in the report "SEPA ISO20022" results.
+ Initialize();
+
+
+ // [GIVEN] Payment Slip for Vendor. Address fields of Company Information are filled.
+ UpdateCompanyInfoAddressToMaxValues();
+ CreateVendorBankAccount(VendorBankAccount, true);
+ LibraryVariableStorage.Enqueue(
+ CreatePaymentSlip(
+ PaymentHeader."Account Type"::Vendor, VendorBankAccount."Vendor No.", VendorBankAccount.Code, '',
+ VendorBankAccount."Country/Region Code", LibraryUtility.GenerateGUID(), LibraryUtility.GenerateGUID()));
+ Commit();
+ FileName := FileManagement.ServerTempFileName('.xml');
+
+ // [WHEN] Run "SEPA ISO20022" report.
+ RunSEPAISO20022(FileName);
+
+ // [THEN] Node does not have a child nodes and , , , .
+ LibraryXMLReadOnServer.Initialize(FileName);
+ LibraryXMLReadOnServer.VerifyNodeAbsenceInSubtree('InitgPty', 'PstlAdr');
+ LibraryXMLReadOnServer.VerifyElementAbsenceInSubtree('InitgPty', 'StrtNm');
+ LibraryXMLReadOnServer.VerifyElementAbsenceInSubtree('InitgPty', 'PstCd');
+ LibraryXMLReadOnServer.VerifyElementAbsenceInSubtree('InitgPty', 'TwnNm');
+ LibraryXMLReadOnServer.VerifyNodeAbsenceInSubtree('InitgPty', 'Ctry');
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ LibrarySetupStorage.Restore();
+
+ if isInitialized then
+ exit;
+
+ LibrarySetupStorage.Save(DATABASE::"Company Information");
+
+ isInitialized := true;
+ end;
+
+ local procedure CreateCountryRegion(SEPAAllowed: Boolean): Code[10]
+ var
+ CountryRegion: Record "Country/Region";
+ begin
+ CountryRegion.Code := LibraryUTUtility.GetNewCode10();
+ CountryRegion."SEPA Allowed" := SEPAAllowed;
+ CountryRegion.Insert();
+ exit(CountryRegion.Code);
+ end;
+
+ local procedure CreateCurrency(): Code[10]
+ var
+ Currency: Record Currency;
+ begin
+ Currency.Code := LibraryUTUtility.GetNewCode10();
+ Currency.Insert();
+ exit(Currency.Code);
+ end;
+
+ local procedure CreateCustomer(): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Insert();
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account")
+ begin
+ CustomerBankAccount."Customer No." := CreateCustomer();
+ CustomerBankAccount.Code := LibraryUTUtility.GetNewCode10();
+ CustomerBankAccount."Country/Region Code" := CreateCountryRegion(false); // SEPA Allowed as False.
+ CustomerBankAccount.Insert();
+ end;
+
+ local procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR"; BankCountryRegionCode: Code[10]; IBAN: Code[50]; SWIFTCode: Code[20])
+ begin
+ PaymentHeader."No." := LibraryUTUtility.GetNewCode();
+ PaymentHeader.IBAN := IBAN;
+ PaymentHeader."Currency Code" := CreateCurrency();
+ PaymentHeader."SWIFT Code" := SWIFTCode;
+ PaymentHeader."Bank Country/Region Code" := BankCountryRegionCode;
+ PaymentHeader.Insert();
+ end;
+
+ local procedure CreatePaymentLine(PaymentHeaderNo: Code[20]; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DocumentNo: Code[10])
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentLine.Init();
+ PaymentLine."No." := PaymentHeaderNo;
+ PaymentLine."Line No." := LibraryUtility.GetNewRecNo(PaymentLine, PaymentLine.FieldNo("Line No."));
+ PaymentLine."Applies-to Doc. No." := DocumentNo;
+ PaymentLine."Account Type" := AccountType;
+ PaymentLine."Account No." := AccountNo;
+ PaymentLine.Insert();
+ end;
+
+ local procedure CreatePaymentSlip(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; BankAccountCode: Code[20]; CurrencyCode: Code[10]; BankCountryRegionCode: Code[10]; IBAN: Code[50]; SWIFTCode: Code[20]): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ begin
+ CreatePaymentHeader(PaymentHeader, BankCountryRegionCode, IBAN, SWIFTCode);
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine."Account Type" := AccountType;
+ PaymentLine."Account No." := AccountNo;
+ PaymentLine.IBAN := PaymentHeader.IBAN;
+ PaymentLine."SWIFT Code" := PaymentHeader."SWIFT Code";
+ PaymentLine."Currency Code" := CurrencyCode;
+ PaymentLine."Bank Account Code" := BankAccountCode;
+ PaymentLine.Insert();
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreateVendor(): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor."No." := LibraryUTUtility.GetNewCode();
+ Vendor.Insert();
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreateVendorBankAccount(var VendorBankAccount: Record "Vendor Bank Account"; SEPAAllowed: Boolean)
+ begin
+ VendorBankAccount."Vendor No." := CreateVendor();
+ VendorBankAccount.Code := LibraryUTUtility.GetNewCode10();
+ VendorBankAccount."Country/Region Code" := CreateCountryRegion(SEPAAllowed);
+ VendorBankAccount.Insert();
+ end;
+
+ local procedure CreatePaymentDocument(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; DocumentNo: Code[10]): Code[20]
+ var
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ CreatePaymentHeader(PaymentHeader, LibraryUtility.GenerateGUID(), LibraryUtility.GenerateGUID(), LibraryUtility.GenerateGUID());
+ CreatePaymentLine(PaymentHeader."No.", AccountType, AccountNo, DocumentNo);
+ exit(PaymentHeader."No.");
+ end;
+
+ local procedure CreateCustLedgerEntries(CountofEntries: Integer; var CustomerNo: Code[20]; var DocumentNo: Code[10]) Result: Text
+ var
+ i: Integer;
+ begin
+ DocumentNo := LibraryUtility.GenerateGUID();
+ CustomerNo := CreateCustomer();
+ Result := DocumentNo;
+ for i := 0 to CountofEntries do begin
+ MockCustLedgerEntry(CustomerNo, DocumentNo);
+ Result += ', ' + DocumentNo;
+ end;
+ end;
+
+ local procedure CreateVendLedgerEntries(CountofEntries: Integer; var VendorNo: Code[20]; var DocumentNo: Code[10]) Result: Text
+ var
+ i: Integer;
+ begin
+ DocumentNo := LibraryUtility.GenerateGUID();
+ VendorNo := CreateVendor();
+ Result := DocumentNo;
+ for i := 0 to CountofEntries do begin
+ MockVendLedgerEntry(VendorNo, DocumentNo);
+ Result += ', ' + DocumentNo;
+ end;
+ end;
+
+ local procedure MockCustLedgerEntry(CustomerNo: Code[20]; DocumentNo: Code[10])
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ begin
+ CustLedgerEntry.Init();
+ CustLedgerEntry."Entry No." := LibraryUtility.GetNewRecNo(CustLedgerEntry, CustLedgerEntry.FieldNo("Entry No."));
+ CustLedgerEntry."Customer No." := CustomerNo;
+ CustLedgerEntry."Document No." := DocumentNo;
+ CustLedgerEntry.Insert();
+ end;
+
+ local procedure MockVendLedgerEntry(VendorNo: Code[20]; DocumentNo: Code[10])
+ var
+ VendLedgerEntry: Record "Vendor Ledger Entry";
+ begin
+ VendLedgerEntry.Init();
+ VendLedgerEntry."Entry No." := LibraryUtility.GetNewRecNo(VendLedgerEntry, VendLedgerEntry.FieldNo("Entry No."));
+ VendLedgerEntry."Vendor No." := VendorNo;
+ VendLedgerEntry."Document No." := DocumentNo;
+ VendLedgerEntry.Insert();
+ end;
+
+ local procedure RunSEPAISO20022(FileName: Text)
+ var
+ SEPAISO20022: Report "SEPA ISO20022 FR";
+ begin
+ SEPAISO20022.SetFilePath(FileName);
+ SEPAISO20022.Run();
+ end;
+
+ local procedure UpdateGeneralLedgerSetup()
+ var
+ GeneralLedgerSetup: Record "General Ledger Setup";
+ begin
+ GeneralLedgerSetup.Get();
+ GeneralLedgerSetup."Local Currency" := GeneralLedgerSetup."Local Currency"::Other;
+ GeneralLedgerSetup."Currency Euro" := CreateCurrency();
+ GeneralLedgerSetup.Modify();
+ end;
+
+ local procedure UpdateCompanyInfoAddressToMaxValues()
+ var
+ CompanyInformation: Record "Company Information";
+ CountryRegion: Record "Country/Region";
+ begin
+ LibraryERM.CreateCountryRegion(CountryRegion);
+ CountryRegion."ISO Code" :=
+ CopyStr(LibraryUtility.GenerateRandomXMLText(MaxStrLen(CountryRegion."ISO Code")), 1, MaxStrLen(CountryRegion."ISO Code"));
+ CountryRegion.Modify();
+
+ CompanyInformation.Get();
+ CompanyInformation.Address :=
+ CopyStr(LibraryUtility.GenerateRandomXMLText(MaxStrLen(CompanyInformation.Address)), 1, MaxStrLen(CompanyInformation.Address));
+ CompanyInformation."Post Code" :=
+ CopyStr(
+ LibraryUtility.GenerateRandomXMLText(MaxStrLen(CompanyInformation."Post Code")), 1, MaxStrLen(CompanyInformation."Post Code"));
+ CompanyInformation.City :=
+ CopyStr(LibraryUtility.GenerateRandomXMLText(MaxStrLen(CompanyInformation.City)), 1, MaxStrLen(CompanyInformation.City));
+ CompanyInformation."Country/Region Code" := CountryRegion.Code;
+ CompanyInformation.Modify();
+ end;
+
+ local procedure VerifyIBAN(CurrentIBAN: Code[50]; CheckIBAN: Code[50])
+ begin
+ Assert.AreEqual(CurrentIBAN, CheckIBAN, WrongIBANErr);
+ end;
+
+ [ModalPageHandler]
+ procedure PaymentLineModificationPageHandler(var PaymentLineModification: TestPage "Payment Line Modification FR")
+ var
+ DraweeReference: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(DraweeReference);
+ PaymentLineModification."Drawee Reference".SetValue(CopyStr(DraweeReference, 1, 10));
+ PaymentLineModification.OK().Invoke();
+ end;
+
+ [RequestPageHandler]
+ procedure SEPAISO20022RequestPageHandler(var SEPAISO20022: TestRequestPage "SEPA ISO20022 FR")
+ var
+ No: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(No);
+ SEPAISO20022."Payment Header".SetFilter("No.", No);
+ SEPAISO20022.OK().Invoke();
+ end;
+
+ [ConfirmHandler]
+ procedure IBANConfirmHandler(Message: Text[1024]; var Reply: Boolean)
+ var
+ StoredReply: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(StoredReply);
+ Reply := StoredReply;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
diff --git a/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTTABPaymentManagement.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTTABPaymentManagement.Codeunit.al
new file mode 100644
index 0000000000..efed2e3b23
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/RegularTests/UTTABPaymentManagement.Codeunit.al
@@ -0,0 +1,908 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Finance.Dimension;
+using Microsoft.Finance.GeneralLedger.Journal;
+using Microsoft.Finance.GeneralLedger.Setup;
+using Microsoft.Purchases.Payables;
+using Microsoft.Purchases.Vendor;
+using Microsoft.Sales.Customer;
+using Microsoft.Sales.Receivables;
+using System.TestLibraries.Utilities;
+
+codeunit 144040 "UT TAB Payment Management"
+{
+ // // [FEATURE] [Payment Slip] [UT]
+ // 1-3. Purpose of the test is to verify error On Validate Account No. for Vendor with Blocked Type Payment and All and Customer with Blocked Type All of Payment Line table.
+ // 4-5. Purpose of the test is to validate On Validate Account No. Trigger Customer with Blocked Type Ship and Invoice of Payment Line table.
+ // 6. Purpose of the test is to verify error on OnValidate UnrealizedVAT General Ledger Setup table.
+ // 7-8. Purpose of the test is to verify error on OnValidate UnrealizedVAT Reversal Type Delayed and Application Payment Class table.
+ // 9. Purpose of this test to verify Payment Class is deleted from Payment Class table.
+ // 10. Purpose of this test to verify Payment Class, Payment Status, Payment Step and Payment Step Ledger is deleted when payment slip is not created.
+ // 11-12. Purpose of the test is to validate OnValidate trigger of Action Type on Payment Step Card to check Realize VAT control.
+ //
+ // Covers Test Cases for WI - 344458
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // OnValidateAccountNoPmtLineBlockedVendTypePmtError, OnValidateAccountNoPmtLineBlockedVendTypeAllError 169539
+ // OnValidateAccountNoPmtLineBlockedCustTypeAllError, OnValidateAccountNoPmtLineBlockedCustTypeShip 169540
+ // OnValidateAccountNoPmtLineBlockedCustTypeInvoice 169541
+ //
+ // Covers Test Cases for WI - 344508
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // OnValidateUnrealizedVATGLSetupError 169442
+ // OnValidateUnrealizedVATReversalTypeDelayedPmtClass 169443
+ // OnValidateUnrealizedVATReversalTypeApplnPmtClass 169444
+ //
+ // Covers Test Cases for WI - 345066
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // OnDeletePaymentClass 169514
+ // OnDeletePaymentClassPaymentSlipNotCreated 169530
+ //
+ // Covers Test Cases for WI - 345175
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // Test Function Name TFS ID
+ // ----------------------------------------------------------------------------------------------------------------------------------
+ // OnValidateActionTypeRealizeVATEnablePaymentStepCard 169525
+ // OnValidateActionTypeRealizeVATDisablePaymentStepCard 169532
+
+ Subtype = Test;
+ TestPermissions = Disabled;
+ TestType = Uncategorized;
+#if not CLEAN28
+ EventSubscriberInstance = Manual;
+#endif
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryUTUtility: Codeunit "Library UT Utility";
+ LibraryDimension: Codeunit "Library - Dimension";
+ LibrarySales: Codeunit "Library - Sales";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryUtility: Codeunit "Library - Utility";
+ DialogErr: Label 'Dialog';
+ PaymentClassErr: Label 'Payment Class should not exist.';
+ TestFieldErr: Label 'TestField';
+ UnexpectedErr: Label 'Expected and Actual value are not same.';
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAccountNoPmtLineBlockedVendTypePmtError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ begin
+ // Purpose of the test is to verify error on OnValidate Account No. for Vendor with Blocked Type Payment of Table ID - 10806 Payment Line.
+ // Test to verify error "Blocked must be equal to ' ' in Vendor: No.=10:29:57 AMXX002. Current value is 'Payment'".
+ OnValidateAccountNoErrorInPaymentLine(
+ PaymentLine."Account Type"::Vendor, CreateBlockedVendor(Vendor.Blocked::Payment), TestFieldErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAccountNoPmtLineBlockedVendTypeAllError()
+ var
+ PaymentLine: Record "Payment Line FR";
+ Vendor: Record Vendor;
+ begin
+ // Purpose of the test is to verify error on OnValidate Account No. for Vendor with Blocked Type All of Table ID - 10806 Payment Line.
+ // Test to verify error "Blocked must be equal to ' ' in Vendor: No.=2:04:38 PMXX004. Current value is 'All'".
+ OnValidateAccountNoErrorInPaymentLine(PaymentLine."Account Type"::Vendor, CreateBlockedVendor(Vendor.Blocked::All), TestFieldErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAccountNoPmtLineBlockedCustTypeAllError()
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to verify error on OnValidate Account No. for Customer with Blocked Type All of Table ID - 10806 Payment Line.
+ // Test to verify error "Blocked must not be All in Customer No.='1:29:10 PMXX004'".
+ OnValidateAccountNoErrorInPaymentLine(
+ PaymentLine."Account Type"::Customer, CreateBlockedCustomer(Customer.Blocked::All), 'NCLCSRTS');
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAccountNoPmtLineBlockedCustTypeShip()
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to check Customer with Blocked Type Ship is validating on Account No. of Table ID - 10806 Payment Line.
+ OnValidateAccountNoInPaymentLine(PaymentLine."Account Type"::Customer, CreateBlockedCustomer(Customer.Blocked::Ship));
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateAccountNoPmtLineBlockedCustTypeInvoice()
+ var
+ Customer: Record Customer;
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Purpose of the test is to check Customer with Blocked Type Invoice is validating on Account No. of Table ID - 10806 Payment Line.
+ OnValidateAccountNoInPaymentLine(PaymentLine."Account Type"::Customer, CreateBlockedCustomer(Customer.Blocked::Invoice));
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateUnrealizedVATGLSetupError()
+ var
+ GeneralLedgerSetup: Record "General Ledger Setup";
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to verify error on OnValidate UnrealizedVAT False Table ID - 98 General Ledger Setup.
+ // Setup: Update General Ledger Setup and Create Payment Class.
+
+ CreatePaymentClass(PaymentClass);
+
+ // Exercise.
+ asserterror GeneralLedgerSetup.Validate("Unrealized VAT", false);
+
+ // Verify: Verify expected error code, Actual error is "Payment Class 4:27:08 PMXX001 has Unrealized VAT Reversal set to Delayed.".
+ Assert.ExpectedErrorCode(DialogErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateUnrealizedVATReversalTypeDelayedPmtClass()
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to verify error on OnValidate UnrealizedVAT Reversal Type Delayed Table ID - 10803 Payment Class.
+ // Verify error "Unrealized VAT must be equal to 'Yes' in General Ledger Setup: Primary Key=. Current value is 'No'."
+ UnrealizedVATReversalTypePaymentClass(PaymentClass."Unrealized VAT Reversal"::Delayed, TestFieldErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateUnrealizedVATReversalTypeApplnPmtClass()
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to verify error on OnValidate UnrealizedVAT Reversal Type Application Table ID - 10803 Payment Class.
+ // Verify error "Payment Class 5:03:16 PMXX001 has at least one Payment Step for which Realize VAT is checked.".
+ UnrealizedVATReversalTypePaymentClass(PaymentClass."Unrealized VAT Reversal"::Application, DialogErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnDeletePaymentClass()
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to delete Payment Class.
+ // Setup: Create Payment Class.
+
+ CreatePaymentClass(PaymentClass);
+
+ // Exercise.
+ PaymentClass.Delete();
+
+ // Verify: Verify Payment Class is deleted.
+ Assert.IsFalse(PaymentClass.Get(PaymentClass.Code), PaymentClassErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnDeletePaymentClassPaymentSlipNotCreated()
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStatus: Record "Payment Status FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepLedger: Record "Payment Step Ledger FR";
+ begin
+ // Purpose of the test is to delete Payment Class when Payment Slip is not created.
+ // Setup: Create Payment Class, Payment Status, Payment Step and Payment Step Ledger.
+
+ CreatePaymentClass(PaymentClass);
+ CreatePaymentStatus(PaymentStatus, PaymentClass.Code);
+ CreatePaymentStep(PaymentStep, PaymentClass.Code);
+ CreatePaymentStepLedger(PaymentStepLedger, PaymentClass.Code);
+
+ // Excercise.
+ PaymentClass.Delete(true);
+
+ // Verify: Verify Payment Class is deleted in Payment Class, Payment Status, Payment Step and Payment Step Ledger.
+ Assert.IsFalse(PaymentClass.Get(PaymentClass.Code), PaymentClassErr);
+ Assert.IsTrue(PaymentStatus.IsEmpty(), PaymentClassErr);
+ Assert.IsTrue(PaymentStep.IsEmpty(), PaymentClassErr);
+ Assert.IsTrue(PaymentStepLedger.IsEmpty(), PaymentClassErr);
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateActionTypeRealizeVATEnablePaymentStepCard()
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to validate OnValidate trigger of Action Type for enable Relize VAT control on Payment Step Card page ID - 10824.
+ UnrealizedVATReversalOnPaymentClass(PaymentClass."Unrealized VAT Reversal"::Delayed, true); // Using True for check control state on page.
+ end;
+
+ [Test]
+ [TransactionModel(TransactionModel::AutoRollback)]
+ procedure OnValidateActionTypeRealizeVATDisablePaymentStepCard()
+ var
+ PaymentClass: Record "Payment Class FR";
+ begin
+ // Purpose of the test is to validate OnValidate trigger of Action Type disable Relize VAT control on Payment Step Card page ID - 10824.
+ UnrealizedVATReversalOnPaymentClass(PaymentClass."Unrealized VAT Reversal"::Application, false); // Using True for check control state on page.
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler')]
+ procedure OnValidateShortcutDimension12Code()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ DimValue: array[2] of Record "Dimension Value";
+ GLSetup: Record "General Ledger Setup";
+ begin
+ // [FEATURE] [Dimension]
+ // [SCENARIO 375959] Payment Line Global Dimension changed after change on Payment Slip
+ Initialize();
+
+
+ // [GIVEN] Payment Header with one line
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer);
+
+ // [GIVEN] 2 global Dimension Values, X1 and X2
+ GLSetup.Get();
+ LibraryDimension.CreateDimensionValue(DimValue[1], GLSetup."Global Dimension 1 Code");
+ LibraryDimension.CreateDimensionValue(DimValue[2], GLSetup."Global Dimension 2 Code");
+
+ // [WHEN] Payment Slip "Department Code" = X1
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentHeader.Validate("Shortcut Dimension 1 Code", DimValue[1].Code);
+ PaymentHeader.Modify();
+
+ // [THEN] Payment Line "Department Code" = X1
+ VerifyPaymentLineDimSetID(PaymentLine, PaymentHeader."Dimension Set ID");
+
+ // [WHEN] Payment Slip "Project Code" = X2
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentHeader.Validate("Shortcut Dimension 2 Code", DimValue[2].Code);
+ PaymentHeader.Modify();
+
+ // [THEN] Payment Line "Project Code" = X2
+ VerifyPaymentLineDimSetID(PaymentLine, PaymentHeader."Dimension Set ID");
+
+ // [WHEN] Payment Slip "Department Code" and "Project Code" cleared
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentHeader.Validate("Shortcut Dimension 1 Code", '');
+ PaymentHeader.Validate("Shortcut Dimension 2 Code", '');
+ PaymentHeader.Modify();
+
+ // [THEN] Payment Line has no Dimensions set
+ VerifyPaymentLineDimSetID(PaymentLine, 0);
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler,DimensionValueListModalPageHandler')]
+ procedure OnLookupShortcutDimension12Code()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ DimValue: array[2] of Record "Dimension Value";
+ GLSetup: Record "General Ledger Setup";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // [FEATURE] [Dimension]
+ // [SCENARIO 375959] Payment Line Global Dimension changed after change on Payment Slip using Lookup
+ Initialize();
+
+
+ // [GIVEN] Payment Header with one line
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer);
+
+ // [GIVEN] 2 Global Dimension Values, X1 and X2
+ GLSetup.Get();
+ LibraryDimension.CreateDimensionValue(DimValue[1], GLSetup."Global Dimension 1 Code");
+ LibraryDimension.CreateDimensionValue(DimValue[2], GLSetup."Global Dimension 2 Code");
+
+ // [WHEN] Payment Slip "Department Code" = X1 using Lookup
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentSlip.OpenEdit();
+ PaymentSlip.GotoRecord(PaymentHeader);
+ LibraryVariableStorage.Enqueue(DimValue[1]."Dimension Code");
+ LibraryVariableStorage.Enqueue(DimValue[1].Code);
+ PaymentSlip."Shortcut Dimension 1 Code".Lookup();
+ PaymentHeader.FindFirst();
+
+ // [THEN] Payment Line "Department Code" = X1
+ VerifyPaymentLineDimSetID(PaymentLine, PaymentHeader."Dimension Set ID");
+
+ // [WHEN] Payment Slip "Project Code" = X2 using Lookup
+ LibraryVariableStorage.Enqueue(DimValue[2]."Dimension Code");
+ LibraryVariableStorage.Enqueue(DimValue[2].Code);
+ PaymentSlip."Shortcut Dimension 2 Code".Lookup();
+ PaymentHeader.FindFirst();
+
+ // [THEN] Payment Line "Project Code" = X2
+ VerifyPaymentLineDimSetID(PaymentLine, PaymentHeader."Dimension Set ID");
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler')]
+ procedure PaymentHeaderLineMergeDimension()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ DimensionValue: array[2] of Record "Dimension Value";
+ GLSetup: Record "General Ledger Setup";
+ DimensionSetEntry: Record "Dimension Set Entry";
+ CustomerNo: Code[20];
+ begin
+ // [FEATURE] [Dimension]
+ // [SCENARIO 376115] Payment Header Dimension merges with Payment Line Dimension
+ Initialize();
+
+
+ // [GIVEN] Customer with Default Dimension "D1"
+ CustomerNo := CreateCustomerWithDefaultDimension(DimensionValue[1]);
+
+ // [GIVEN] Payment Header with Dimension "D2"
+ GLSetup.Get();
+ LibraryDimension.CreateDimensionValue(DimensionValue[2], GLSetup."Global Dimension 1 Code");
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer);
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentHeader.Validate("Shortcut Dimension 1 Code", DimensionValue[2].Code);
+ PaymentHeader.Modify();
+
+ // [WHEN] Customer No. is validated on Payment Line
+ PaymentLineSetAccountNo(PaymentLine, CustomerNo);
+
+ // [THEN] Payment Line has Dimension "D1" and "D2"
+ VerifyDimensionCountByDimSetID(DimensionSetEntry, PaymentLine."Dimension Set ID", 2);
+ DimensionSetEntry.SetFilter(
+ "Dimension Code", '%1|%2', DimensionValue[2]."Dimension Code", DimensionValue[1]."Dimension Code");
+ Assert.RecordCount(DimensionSetEntry, 2);
+ end;
+
+ [Test]
+ [HandlerFunctions('ConfirmHandler')]
+ procedure PaymentHeaderOverwriteLineDimensionValue()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ DimensionValue: array[2] of Record "Dimension Value";
+ DefaultDimension: Record "Default Dimension";
+ GLSetup: Record "General Ledger Setup";
+ DimensionSetEntry: Record "Dimension Set Entry";
+ CustomerNo: Code[20];
+ begin
+ // [FEATURE] [Dimension]
+ // [SCENARIO 376115] Payment Header Dimension Value overwrites Dimension Value of Payment Line with same Dimension
+ Initialize();
+
+
+ // [GIVEN] Payment Header with Dimension "D1" and Dimension Value "DV1"
+ GLSetup.Get();
+ LibraryDimension.CreateDimensionValue(DimensionValue[1], GLSetup."Global Dimension 1 Code");
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer);
+ PaymentHeader.Get(PaymentLine."No.");
+ PaymentHeader.Validate("Shortcut Dimension 1 Code", DimensionValue[1].Code);
+ PaymentHeader.Modify();
+
+ // [GIVEN] Customer with Default Dimension "D1" and Dimension Value "DV2"
+ CustomerNo := LibrarySales.CreateCustomerNo();
+ LibraryDimension.CreateDimensionValue(DimensionValue[2], DimensionValue[1]."Dimension Code");
+ LibraryDimension.CreateDefaultDimensionCustomer(
+ DefaultDimension, CustomerNo, DimensionValue[2]."Dimension Code", DimensionValue[2].Code);
+
+ // [WHEN] Customer No. is validated on Payment Line
+ PaymentLineSetAccountNo(PaymentLine, CustomerNo);
+
+ // [THEN] Payment Line has Dimension D1 with Dimension Value "DV1"
+ VerifyDimensionCountByDimSetID(DimensionSetEntry, PaymentLine."Dimension Set ID", 1);
+ DimensionSetEntry.SetFilter("Dimension Value Code", DimensionValue[1].Code);
+ Assert.RecordIsNotEmpty(DimensionSetEntry);
+ end;
+
+ [Test]
+ procedure PaymentLineAccountDimension()
+ var
+ PaymentLine: Record "Payment Line FR";
+ DimensionValue: Record "Dimension Value";
+ DimensionSetEntry: Record "Dimension Set Entry";
+ CustomerNo: Code[20];
+ begin
+ // [FEATURE] [Dimension]
+ // [SCENARIO 376115] Payment Line Dimension is taken from validated Account
+ Initialize();
+
+
+ // [GIVEN] Customer with Default Dimension "D1"
+ CustomerNo := CreateCustomerWithDefaultDimension(DimensionValue);
+
+ // [GIVEN] Payment Header with no Dimensions
+ CreatePaymentSlip(PaymentLine, PaymentLine."Account Type"::Customer);
+
+ // [WHEN] Customer No. is validated on Payment Line
+ PaymentLineSetAccountNo(PaymentLine, CustomerNo);
+
+ // [THEN] Payment Line has Dimension "D1"
+ VerifyDimensionCountByDimSetID(DimensionSetEntry, PaymentLine."Dimension Set ID", 1);
+ DimensionSetEntry.SetFilter("Dimension Value Code", DimensionValue.Code);
+ Assert.RecordIsNotEmpty(DimensionSetEntry);
+ end;
+
+ [Test]
+ procedure VendorPaymentLineOnDelete()
+ var
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ VendorLedgerEntry: array[2] of Record "Vendor Ledger Entry";
+ AppliesToID: Code[20];
+ begin
+ // [SCENARIO 304798] Deleting Payment Slip leads to only associated Vendor Ledger Entries having empty Applies-to ID
+ Initialize();
+
+
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Vendor Ledger Entry");
+
+ // [GIVEN] Payment Slip "X1" with Payment Line applied to Vendor Ledger Entry "Y1" with "Applies-To ID" equal "Z"
+ MockVendorLedgerEntry(VendorLedgerEntry[1], AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader[1], PaymentLine."Account Type"::Vendor, AppliesToID,
+ VendorLedgerEntry[1]."Document No.", VendorLedgerEntry[1]."Document Type");
+
+ // [GIVEN] Payment Slip "X2" with Payment Line applied to Vendor Ledger Entry "Y2" using "Applies-To ID" equal "Z"
+ MockVendorLedgerEntry(VendorLedgerEntry[2], AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader[2], PaymentLine."Account Type"::Vendor, AppliesToID,
+ VendorLedgerEntry[2]."Document No.", VendorLedgerEntry[2]."Document Type");
+
+ // [WHEN] Deleting Payment Slip "X1".
+ PaymentHeader[1].Delete(true);
+
+ // [THEN] Vendor Ledger Entry "Y1" has "Applies-To ID" equal to ""
+ VendorLedgerEntry[1].Get(VendorLedgerEntry[1]."Entry No.");
+ Assert.AreEqual('', VendorLedgerEntry[1]."Applies-to ID", '');
+ // [THEN] Vendor Ledger Entry "Y2" has "Applies-To ID" equal to "Z"
+ VendorLedgerEntry[2].Get(VendorLedgerEntry[2]."Entry No.");
+ Assert.AreEqual(AppliesToID, VendorLedgerEntry[2]."Applies-to ID", '');
+ end;
+
+ [Test]
+ procedure CustomerPaymentLineOnDelete()
+ var
+ PaymentHeader: array[2] of Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: array[2] of Record "Cust. Ledger Entry";
+ AppliesToID: Code[20];
+ begin
+ // [SCENARIO 304798] Deleting Payment Slip leads to only associated Customer Ledger Entries having empty Applies-to ID
+ Initialize();
+
+
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Cust. Ledger Entry");
+
+ // [GIVEN] Payment Slip "X1" with Payment Line applied to Customer Ledger Entry "Y1" with "Applies-To ID" equal "Z"
+ MockCustomerLedgerEntry(CustLedgerEntry[1], AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader[1], PaymentLine."Account Type"::Customer, AppliesToID,
+ CustLedgerEntry[1]."Document No.", CustLedgerEntry[1]."Document Type");
+
+ // [GIVEN] Payment Slip "X2" with Payment Line applied to Customer Ledger Entry "Y2" using "Applies-To ID" equal "Z"
+ MockCustomerLedgerEntry(CustLedgerEntry[2], AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader[2], PaymentLine."Account Type"::Customer, AppliesToID,
+ CustLedgerEntry[2]."Document No.", CustLedgerEntry[2]."Document Type");
+
+ // [WHEN] Deleting Payment Slip "X1".
+ PaymentHeader[1].Delete(true);
+
+ // [THEN] Customer Ledger Entry "Y1" has "Applies-To ID" equal to ""
+ CustLedgerEntry[1].Get(CustLedgerEntry[1]."Entry No.");
+ Assert.AreEqual('', CustLedgerEntry[1]."Applies-to ID", '');
+ // [THEN] Customer Ledger Entry "Y2" has "Applies-To ID" equal to "Z"
+ CustLedgerEntry[2].Get(CustLedgerEntry[2]."Entry No.");
+ Assert.AreEqual(AppliesToID, CustLedgerEntry[2]."Applies-to ID", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('ApplyCustomerEntriesModalPageHandler')]
+ procedure PaymentApplyKeepsAppliesToDocNoAndDocTypeWhenAccTypeCustomerAndCustLedEntryExists()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ AppliesToID: Code[20];
+ begin
+ // [FEATURE] [UT]
+ // [SCENARIO 315612] Codeunit "Payment-Apply" doesn't delete "Applies-to Doc. No." and "Applies-to Doc. Type".
+ Initialize();
+
+
+ // [GIVEN] Payment Line with "Account Type"::Customer and existing Customer Ledger entry.
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Cust. Ledger Entry");
+ MockCustomerLedgerEntry(CustLedgerEntry, AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader, PaymentLine."Account Type"::Customer, AppliesToID,
+ CustLedgerEntry."Document No.", CustLedgerEntry."Document Type");
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+
+ // [WHEN] Codeunit "Payment-Apply" is run for Payment Line.
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", PaymentLine);
+
+ // [THEN] "Applies-to Doc. No." and "Applies-to Doc. Type" are the same as before.
+ Assert.AreEqual(CustLedgerEntry."Document No.", PaymentLine."Applies-to Doc. No.", '');
+ Assert.AreEqual(CustLedgerEntry."Document Type", PaymentLine."Applies-to Doc. Type", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('ApplyVendorEntriesModalPageHandler')]
+ procedure PaymentApplyKeepsAppliesToDocNoAndDocTypeWhenAccTypeVendorAndVendLedEntryExists()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ AppliesToID: Code[20];
+ begin
+ // [FEATURE] [UT]
+ // [SCENARIO 315612] Codeunit "Payment-Apply" doesn't delete "Applies-to Doc. No." and "Applies-to Doc. Type".
+ Initialize();
+
+
+ // [GIVEN] Payment Line with "Account Type"::Vendor and existing Vendor Ledger entry.
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Vendor Ledger Entry");
+ MockVendorLedgerEntry(VendorLedgerEntry, AppliesToID);
+ MockPaymentSlipWithPaymentLine(
+ PaymentHeader, PaymentLine."Account Type"::Vendor, AppliesToID,
+ VendorLedgerEntry."Document No.", VendorLedgerEntry."Document Type");
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+
+ // [WHEN] Codeunit "Payment-Apply" is run for Payment Line.
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", PaymentLine);
+
+ // [THEN] "Applies-to Doc. No." and "Applies-to Doc. Type" are the same as before.
+ Assert.AreEqual(VendorLedgerEntry."Document No.", PaymentLine."Applies-to Doc. No.", '');
+ Assert.AreEqual(VendorLedgerEntry."Document Type", PaymentLine."Applies-to Doc. Type", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('ApplyCustomerEntriesModalPageHandler')]
+ procedure PaymentApplyKeepsAppliesToDocNoAndDocTypeWhenAccTypeCustomerAndCustLedEntryDoesntExist()
+ var
+ CustLedgerEntry: Record "Cust. Ledger Entry";
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ AppliesToID: Code[20];
+ DocNo: Code[20];
+ DocType: Enum "Gen. Journal Document Type";
+ begin
+ // [FEATURE] [UT]
+ // [SCENARIO 315612] Codeunit "Payment-Apply" doesn't delete "Applies-to Doc. No." and "Applies-to Doc. Type".
+ Initialize();
+
+
+ // [GIVEN] Payment Line with "Account Type"::Customer and no existing Customer Ledger entry.
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Cust. Ledger Entry");
+ DocNo := LibraryUtility.GenerateRandomCode(CustLedgerEntry.FieldNo("Document No."), DATABASE::"Cust. Ledger Entry");
+ DocType := "Gen. Journal Document Type".FromInteger(LibraryRandom.RandInt(7));
+ MockPaymentSlipWithPaymentLine(PaymentHeader, PaymentLine."Account Type"::Customer, AppliesToID, DocNo, DocType);
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+
+ // [WHEN] Codeunit "Payment-Apply" is run for Payment Line.
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", PaymentLine);
+
+ // [THEN] "Applies-to Doc. No." and "Applies-to Doc. Type" are the same as before.
+ Assert.AreEqual(DocNo, PaymentLine."Applies-to Doc. No.", '');
+ Assert.AreEqual(DocType, PaymentLine."Applies-to Doc. Type", '');
+ end;
+
+ [Test]
+ [HandlerFunctions('ApplyVendorEntriesModalPageHandler')]
+ procedure PaymentApplyKeepsAppliesToDocNoAndDocTypeWhenAccTypeVendorAndVendLedEntryDoesntExist()
+ var
+ PaymentHeader: Record "Payment Header FR";
+ PaymentLine: Record "Payment Line FR";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ AppliesToID: Code[20];
+ DocNo: Code[20];
+ DocType: Enum "Gen. Journal Document Type";
+ begin
+ // [FEATURE] [UT]
+ // [SCENARIO 315612] Codeunit "Payment-Apply" doesn't delete "Applies-to Doc. No." and "Applies-to Doc. Type".
+ Initialize();
+
+
+ // [GIVEN] Payment Line with "Account Type"::Vendor and no existing Vendor Ledger entry.
+ AppliesToID := LibraryUtility.GenerateRandomCode(PaymentLine.FieldNo("Applies-to ID"), DATABASE::"Vendor Ledger Entry");
+ DocNo := LibraryUtility.GenerateRandomCode(VendorLedgerEntry.FieldNo("Document No."), DATABASE::"Vendor Ledger Entry");
+ DocType := "Gen. Journal Document Type".FromInteger(LibraryRandom.RandInt(7));
+ MockPaymentSlipWithPaymentLine(PaymentHeader, PaymentLine."Account Type"::Vendor, AppliesToID, DocNo, DocType);
+ PaymentLine.SetRange("No.", PaymentHeader."No.");
+ PaymentLine.FindFirst();
+
+ // [WHEN] Codeunit "Payment-Apply" is run for Payment Line.
+ CODEUNIT.Run(CODEUNIT::"Payment-Apply FR", PaymentLine);
+
+ // [THEN] "Applies-to Doc. No." and "Applies-to Doc. Type" are the same as before.
+ Assert.AreEqual(DocNo, PaymentLine."Applies-to Doc. No.", '');
+ Assert.AreEqual(DocType, PaymentLine."Applies-to Doc. Type", '');
+ end;
+
+ local procedure Initialize()
+ begin
+ LibraryVariableStorage.Clear();
+ end;
+
+ local procedure CreateCustomerWithDefaultDimension(var DimensionValue: Record "Dimension Value") CustomerNo: Code[20]
+ var
+ DefaultDimension: Record "Default Dimension";
+ begin
+ CustomerNo := LibrarySales.CreateCustomerNo();
+ LibraryDimension.CreateDimWithDimValue(DimensionValue);
+ LibraryDimension.CreateDefaultDimensionCustomer(DefaultDimension, CustomerNo, DimensionValue."Dimension Code", DimensionValue.Code);
+ end;
+
+ local procedure OnValidateAccountNoErrorInPaymentLine(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; ErrorCode: Text)
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ // Setup: Create Payment Slip.
+ CreatePaymentSlip(PaymentLine, AccountType);
+
+ // Exercise.
+ asserterror PaymentLine.Validate("Account No.", AccountNo);
+
+ // Verify: Verify expected error code.
+ Assert.ExpectedErrorCode(ErrorCode);
+ end;
+
+ local procedure OnValidateAccountNoInPaymentLine(AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20])
+ var
+ PaymentLine: Record "Payment Line FR";
+ PaymentSlip: TestPage "Payment Slip FR";
+ begin
+ // Setup: Create Payment Slip.
+ CreatePaymentSlip(PaymentLine, AccountType);
+
+ // Exercise.
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify();
+
+ // Verify: Verify Account No. in Payment Line.
+ PaymentSlip.OpenEdit();
+ PaymentSlip.FILTER.SetFilter("No.", PaymentLine."No.");
+ PaymentSlip.Lines."Account No.".AssertEquals(PaymentLine."Account No.");
+ PaymentSlip.Close();
+ end;
+
+ local procedure CreateBlockedCustomer(Blocked: Enum "Customer Blocked"): Code[20]
+ var
+ Customer: Record Customer;
+ begin
+ Customer."No." := LibraryUTUtility.GetNewCode();
+ Customer.Blocked := Blocked;
+ Customer.Insert();
+ exit(Customer."No.");
+ end;
+
+ local procedure CreateBlockedVendor(Blocked: Enum "Vendor Blocked"): Code[20]
+ var
+ Vendor: Record Vendor;
+ begin
+ Vendor."No." := LibraryUTUtility.GetNewCode();
+ Vendor.Blocked := Blocked;
+ Vendor.Insert();
+ exit(Vendor."No.");
+ end;
+
+ local procedure CreatePaymentClass(var PaymentClass: Record "Payment Class FR")
+ begin
+ PaymentClass.Code := LibraryUTUtility.GetNewCode();
+ PaymentClass."Unrealized VAT Reversal" := PaymentClass."Unrealized VAT Reversal"::Delayed;
+ PaymentClass.Insert();
+ end;
+
+ local procedure CreatePaymentSlip(var PaymentLine: Record "Payment Line FR"; AccountType: Enum "Gen. Journal Account Type")
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentHeader: Record "Payment Header FR";
+ begin
+ PaymentClass.FindFirst();
+ PaymentHeader."No." := LibraryUTUtility.GetNewCode();
+ PaymentHeader."Payment Class" := PaymentClass.Code;
+ PaymentHeader.Insert();
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine."Line No." := LibraryRandom.RandInt(10);
+ PaymentLine."Account Type" := AccountType;
+ PaymentLine.Insert();
+ end;
+
+ local procedure CreatePaymentStatus(var PaymentStatus: Record "Payment Status FR"; PaymentClass: Text[30])
+ begin
+ PaymentStatus."Payment Class" := PaymentClass;
+ PaymentStatus.Name := LibraryUTUtility.GetNewCode();
+ PaymentStatus.Insert();
+ end;
+
+ local procedure CreatePaymentStep(var PaymentStep: Record "Payment Step FR"; PaymentClass: Text[30])
+ begin
+ PaymentStep."Payment Class" := PaymentClass;
+ PaymentStep.Name := LibraryUTUtility.GetNewCode();
+ PaymentStep."Realize VAT" := true;
+ PaymentStep.Insert();
+ end;
+
+ local procedure CreatePaymentStepLedger(var PaymentStepLedger: Record "Payment Step Ledger FR"; PaymentClass: Text[30])
+ begin
+ PaymentStepLedger."Payment Class" := PaymentClass;
+ PaymentStepLedger.Insert();
+ end;
+
+ local procedure MockCustomerLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; AppliesToID: Code[50])
+ var
+ EntryNo: Integer;
+ begin
+ if CustLedgerEntry.FindLast() then
+ EntryNo := CustLedgerEntry."Entry No." + 1
+ else
+ EntryNo := 1;
+
+ CustLedgerEntry.Init();
+ CustLedgerEntry."Entry No." := EntryNo;
+ CustLedgerEntry."Applies-to ID" := AppliesToID;
+ CustLedgerEntry."Document No." := LibraryUtility.GenerateRandomCode(CustLedgerEntry.FieldNo("Document No."), DATABASE::"Cust. Ledger Entry");
+ CustLedgerEntry."Document Type" := "Gen. Journal Document Type".FromInteger(LibraryRandom.RandInt(7));
+ CustLedgerEntry.Open := true;
+ CustLedgerEntry.Insert();
+ end;
+
+ local procedure MockPaymentSlipWithPaymentLine(var PaymentHeader: Record "Payment Header FR"; AccountType: Enum "Gen. Journal Account Type"; AppliesToID: Code[50]; AppliesToDocNo: Code[20]; AppliesToDocType: Enum "Gen. Journal Document Type")
+ var
+ PaymentLine: Record "Payment Line FR";
+ begin
+ PaymentHeader.Init();
+ PaymentHeader."No." := LibraryUTUtility.GetNewCode();
+ PaymentHeader.Insert();
+
+ PaymentLine.Init();
+ PaymentLine."No." := PaymentHeader."No.";
+ PaymentLine."Line No." := LibraryRandom.RandInt(10);
+ PaymentLine."Document No." := CopyStr(AppliesToID, 1, MaxStrLen(PaymentLine."Document No."));
+ PaymentLine."Applies-to ID" := AppliesToID;
+ PaymentLine."Applies-to Doc. No." := AppliesToDocNo;
+ PaymentLine."Applies-to Doc. Type" := AppliesToDocType;
+ PaymentLine."Account Type" := AccountType;
+ PaymentLine.Insert();
+ end;
+
+ local procedure MockVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; AppliesToID: Code[50])
+ var
+ EntryNo: Integer;
+ begin
+ if VendorLedgerEntry.FindLast() then
+ EntryNo := VendorLedgerEntry."Entry No." + 1
+ else
+ EntryNo := 1;
+
+ VendorLedgerEntry.Init();
+ VendorLedgerEntry."Entry No." := EntryNo;
+ VendorLedgerEntry."Applies-to ID" := AppliesToID;
+ VendorLedgerEntry."Document No." := LibraryUtility.GenerateRandomCode(VendorLedgerEntry.FieldNo("Document No."), DATABASE::"Vendor Ledger Entry");
+ VendorLedgerEntry."Document Type" := "Gen. Journal Document Type".FromInteger(LibraryRandom.RandInt(7));
+ VendorLedgerEntry.Open := true;
+ VendorLedgerEntry.Insert();
+ end;
+
+ local procedure PaymentLineSetAccountNo(var PaymentLine: Record "Payment Line FR"; AccountNo: Code[20])
+ begin
+ PaymentLine.Validate("Account No.", AccountNo);
+ PaymentLine.Modify(true);
+ end;
+
+ local procedure UnrealizedVATReversalTypePaymentClass(UnrealizedVATReversal: Option; ErrorCode: Text)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStep: Record "Payment Step FR";
+ begin
+ // Setup: Update General Ledger Setup, Create Payment Step and Create Payment Class.
+ CreatePaymentClass(PaymentClass);
+ CreatePaymentStep(PaymentStep, PaymentClass.Code);
+
+ // Exercise.
+ asserterror PaymentClass.Validate("Unrealized VAT Reversal", UnrealizedVATReversal);
+
+ // Verify: Verify expected error code.
+ Assert.ExpectedErrorCode(ErrorCode);
+ end;
+
+ local procedure UnrealizedVATReversalOnPaymentClass(UnrealizedVATReversal: Option; RealizeVAT: Boolean)
+ var
+ PaymentClass: Record "Payment Class FR";
+ PaymentStep: Record "Payment Step FR";
+ PaymentStepCard: TestPage "Payment Step Card FR";
+ begin
+ // Setup: Create Payment Class with Unrealized VAT Reversal, create Payment Step.
+ CreatePaymentClass(PaymentClass);
+ PaymentClass."Unrealized VAT Reversal" := UnrealizedVATReversal;
+ PaymentClass.Modify();
+ CreatePaymentStep(PaymentStep, PaymentClass.Code);
+ PaymentStepCard.OpenEdit();
+ PaymentStepCard.FILTER.SetFilter("Payment Class", PaymentClass.Code);
+
+ // Exercise: Update Payment Step card with Action Type is Ledger.
+ PaymentStepCard."Action Type".SetValue(PaymentStep."Action Type"::Ledger);
+
+ // Verify: Verify Realize VAT control on Payment Step Card.
+ Assert.AreEqual(RealizeVAT, PaymentStepCard."Realize VAT".Enabled(), UnexpectedErr);
+ PaymentStepCard.Close();
+ end;
+
+ local procedure VerifyPaymentLineDimSetID(PaymentLine: Record "Payment Line FR"; DimensionSetID: Integer)
+ begin
+ PaymentLine.Find();
+ PaymentLine.TestField("Dimension Set ID", DimensionSetID);
+ end;
+
+ local procedure VerifyDimensionCountByDimSetID(var DimensionSetEntry: Record "Dimension Set Entry"; DimSetId: Integer; "Count": Integer)
+ begin
+ LibraryDimension.FindDimensionSetEntry(DimensionSetEntry, DimSetId);
+ Assert.RecordCount(DimensionSetEntry, Count);
+ end;
+
+ [ConfirmHandler]
+ procedure ConfirmHandler(Question: Text; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+
+ [ModalPageHandler]
+ procedure DimensionValueListModalPageHandler(var DimensionValueList: Page "Dimension Value List"; var Response: Action)
+ var
+ DimensionValue: Record "Dimension Value";
+ DimensionCodeVar: Variant;
+ DimensionValueCodVar: Variant;
+ begin
+ LibraryVariableStorage.Dequeue(DimensionCodeVar);
+ LibraryVariableStorage.Dequeue(DimensionValueCodVar);
+ DimensionValue.SetRange("Dimension Code", DimensionCodeVar);
+ DimensionValue.SetRange(Code, DimensionValueCodVar);
+ DimensionValue.FindFirst();
+ DimensionValueList.SetRecord(DimensionValue);
+ Response := ACTION::LookupOK;
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyCustomerEntriesModalPageHandler(var ApplyCustomerEntries: Page "Apply Customer Entries"; var Response: Action)
+ begin
+ Response := ACTION::LookupOK;
+ end;
+
+ [ModalPageHandler]
+ procedure ApplyVendorEntriesModalPageHandler(var ApplyVendorEntries: Page "Apply Vendor Entries"; var Response: Action)
+ begin
+ Response := ACTION::LookupOK;
+ end;
+
+#if not CLEAN28
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Payment Management Feature FR", OnAfterCheckFeatureEnabled, '', false, false)]
+ local procedure OnAfterCheckFeatureEnabled(var IsEnabled: Boolean)
+ begin
+ IsEnabled := true;
+ end;
+#endif
+}
+
diff --git a/Apps/FR/PaymentManagementFR/test/src/TestLibraries/LibraryLocalizationFR.Codeunit.al b/Apps/FR/PaymentManagementFR/test/src/TestLibraries/LibraryLocalizationFR.Codeunit.al
new file mode 100644
index 0000000000..59ce9ea520
--- /dev/null
+++ b/Apps/FR/PaymentManagementFR/test/src/TestLibraries/LibraryLocalizationFR.Codeunit.al
@@ -0,0 +1,94 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Bank.Payment;
+
+using Microsoft.Sales.Customer;
+
+codeunit 144043 "Library - Localization FR"
+{
+ // Library containing functions specific to FR Localization objects, hence meant to be kept at FR Branch Only.
+
+
+ trigger OnRun()
+ begin
+ end;
+
+ var
+ LibraryUtility: Codeunit "Library - Utility";
+
+ procedure CreateCustomerBankAccount(var CustomerBankAccount: Record "Customer Bank Account"; CustomerNo: Code[20])
+ begin
+ CustomerBankAccount.Init();
+ CustomerBankAccount.Validate("Customer No.", CustomerNo);
+ CustomerBankAccount.Validate(
+ Code,
+ CopyStr(
+ LibraryUtility.GenerateRandomCode(CustomerBankAccount.FieldNo(Code), DATABASE::"Customer Bank Account"),
+ 1,
+ LibraryUtility.GetFieldLength(DATABASE::"Customer Bank Account", CustomerBankAccount.FieldNo(Code))));
+ CustomerBankAccount.Insert(true);
+ end;
+
+ procedure CreatePaymentClass(var PaymentClass: Record "Payment Class FR")
+ begin
+ PaymentClass.Init();
+ PaymentClass.Validate(Code, LibraryUtility.GenerateRandomCode(PaymentClass.FieldNo(Code), DATABASE::"Payment Class FR"));
+ PaymentClass.Insert(true);
+ end;
+
+ procedure CreatePaymentHeader(var PaymentHeader: Record "Payment Header FR")
+ begin
+ PaymentHeader.Init();
+ PaymentHeader.Insert(true);
+ end;
+
+ procedure CreatePaymentLine(var PaymentLine: Record "Payment Line FR"; No: Code[20])
+ var
+ RecRef: RecordRef;
+ begin
+ PaymentLine.Init();
+ PaymentLine.Validate("No.", No);
+ RecRef.GetTable(PaymentLine);
+ PaymentLine.Validate("Line No.", LibraryUtility.GetNewLineNo(RecRef, PaymentLine.FieldNo("Line No.")));
+ PaymentLine.Insert(true);
+ end;
+
+ procedure CreatePaymentStatus(var PaymentStatus: Record "Payment Status FR"; PaymentClass: Text[30])
+ var
+ RecRef: RecordRef;
+ begin
+ PaymentStatus.Init();
+ PaymentStatus.Validate("Payment Class", PaymentClass);
+ RecRef.GetTable(PaymentStatus);
+ PaymentStatus.Validate(Line, LibraryUtility.GetNewLineNo(RecRef, PaymentStatus.FieldNo(Line)));
+ PaymentStatus.Insert(true);
+ end;
+
+ procedure CreatePaymentStep(var PaymentStep: Record "Payment Step FR"; PaymentClass: Text[30])
+ var
+ RecRef: RecordRef;
+ begin
+ PaymentStep.Init();
+ PaymentStep.Validate("Payment Class", PaymentClass);
+ RecRef.GetTable(PaymentStep);
+ PaymentStep.Validate(Line, LibraryUtility.GetNewLineNo(RecRef, PaymentStep.FieldNo(Line)));
+ PaymentStep.Insert(true);
+ end;
+
+ procedure CreatePaymentStepLedger(var PaymentStepLedger: Record "Payment Step Ledger FR"; PaymentClass: Text[30]; Sign: Option; Line: Integer)
+ begin
+ PaymentStepLedger.Init();
+ PaymentStepLedger.Validate("Payment Class", PaymentClass);
+ PaymentStepLedger.Validate(Sign, Sign);
+ PaymentStepLedger.Validate(Line, Line);
+ PaymentStepLedger.Insert(true);
+ end;
+
+ procedure CreatePaymentSlip()
+ begin
+ CODEUNIT.Run(CODEUNIT::"Payment Management FR");
+ end;
+}
+
diff --git a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateAllocationAccountGB.Codeunit.al b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateAllocationAccountGB.Codeunit.al
index cd6a283e03..1e57c1fce8 100644
--- a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateAllocationAccountGB.Codeunit.al
+++ b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateAllocationAccountGB.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 10590 "Create Allocation Account GB"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 10590 "Create Allocation Account GB"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateGBGLAccounts: Codeunit "Create GB GL Accounts";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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", CreateGBGLAccounts.LicenseFeesRoyalties(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateGBGLAccounts.LicenseFeesRoyalties(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateGBGLAccounts.LicenseFeesRoyalties();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/GBContosoLocalization.Codeunit.al b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/GBContosoLocalization.Codeunit.al
index d5139b4be4..e86e7f1693 100644
--- a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/GBContosoLocalization.Codeunit.al
+++ b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/GBContosoLocalization.Codeunit.al
@@ -102,7 +102,6 @@ codeunit 11487 "GB Contoso Localization"
Enum::"Contoso Demo Data Level"::"Master Data":
begin
Codeunit.Run(Codeunit::"Create GB Column Layout");
- Codeunit.Run(Codeunit::"Create Allocation Account GB");
CreateGBGeneralLedgerSetup.UpdateMaxVATDifferenceAllowedOnGeneralLedgerSetup();
end;
end;
@@ -166,6 +165,8 @@ codeunit 11487 "GB Contoso Localization"
end;
Enum::"Contoso Demo Data Module"::Finance:
begin
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account GB");
BindSubscription(CreateGBResource);
#if not CLEAN27
BindSubscription(CreateGBVATReportSetup);
diff --git a/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateDemoEDocsGB.Codeunit.al b/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateDemoEDocsGB.Codeunit.al
index 57c3642418..4d3ab07f60 100644
--- a/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateDemoEDocsGB.Codeunit.al
+++ b/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateDemoEDocsGB.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 10558 "Create Demo EDocs GB"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 10558 "Create Demo EDocs GB"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountGB: Codeunit "Create Allocation Account GB";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
ITServicesJanuaryLbl: Label 'IT support Support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 10558 "Create Demo EDocs GB"
ITServicesMarchLbl: Label 'IT support Support period: March', MaxLength = 100;
ITServicesDecemberLbl: Label 'IT support Support period: December', MaxLength = 100;
ITServicesMayLbl: Label 'IT support Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245');
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245');
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountGB.Licenses(), '',
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '',
6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 60);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 60);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGBGLAccounts.ITServices(),
ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 190);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 190);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGBGLAccounts.ITServices(),
ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 20);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 20);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGBGLAccounts.ITServices(),
ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 90);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 90);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGBGLAccounts.ITServices(),
ITServicesMayLbl, 9, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 70);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 70);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGBGLAccounts.ITServices(),
ITServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 10558 "Create Demo EDocs GB"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 7970);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 7970);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 10558 "Create Demo EDocs GB"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateEDocSampleInvGB.Codeunit.al b/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateEDocSampleInvGB.Codeunit.al
index 6454e8dced..590755c674 100644
--- a/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateEDocSampleInvGB.Codeunit.al
+++ b/Apps/GB/EDocument_GB/demo data/3.Transactions/CreateEDocSampleInvGB.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 10559 "Create E-Doc Sample Inv. GB"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsGB: Codeunit "Create Demo EDocs GB";
- CreateAllocationAccountGB: Codeunit "Create Allocation Account GB";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 10559 "Create E-Doc Sample Inv. GB"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountGB.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/GB/GovTalk/app/app.json b/Apps/GB/GovTalk/app/app.json
index 4dab4877b6..04470c2ffe 100644
--- a/Apps/GB/GovTalk/app/app.json
+++ b/Apps/GB/GovTalk/app/app.json
@@ -12,14 +12,6 @@
"logo": "ExtensionLogo.png",
"contextSensitiveHelpUrl": "https://learn.microsoft.com/en-us/dynamics365/business-central/ui-extensions",
"application": "28.0.0.0",
- "dependencies": [
- {
- "id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
- "name": "Contoso Coffee Demo Dataset",
- "publisher": "Microsoft",
- "version": "28.0.0.0"
- }
- ],
"internalsVisibleTo": [
{
"id": "039d5e09-7eea-4b0b-b2b9-4b060e5d330a",
diff --git a/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapRcpt.xml b/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapRcpt.xml
index e87c318a7b..42b915c3e3 100644
--- a/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapRcpt.xml
+++ b/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapRcpt.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapShpt.xml b/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapShpt.xml
index 6ed7888e36..8a8ca1e7b1 100644
--- a/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapShpt.xml
+++ b/Apps/GB/IntrastatGB/app/AppResources/GB_DataExchDefMapShpt.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/Apps/IN/INGST/app/GSTDistribution/src/Codeunit/GSTDistribution.Codeunit.al b/Apps/IN/INGST/app/GSTDistribution/src/Codeunit/GSTDistribution.Codeunit.al
index f63f154870..82e1e4532c 100644
--- a/Apps/IN/INGST/app/GSTDistribution/src/Codeunit/GSTDistribution.Codeunit.al
+++ b/Apps/IN/INGST/app/GSTDistribution/src/Codeunit/GSTDistribution.Codeunit.al
@@ -122,6 +122,8 @@ codeunit 18200 "GST Distribution"
if DetailedGSTDistEntry.IsEmpty() then begin
PostedGSTDistributionHeader.Get(ReversalInvNo);
PostedGSTDistributionHeader."Completely Reversed" := true;
+ PostedGSTDistributionHeader.Reversal := true;
+ PostedGSTDistributionHeader."Reversal Invoice No." := PostedDistNo;
PostedGSTDistributionHeader.Modify(true);
end;
end;
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/0cded40a-a359-45e0-aaec-afe7bbcfbc96.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/0cded40a-a359-45e0-aaec-afe7bbcfbc96.json
index 31ee52b6a8..2f0cbae0cc 100644
--- a/Apps/IN/INTDS/app/.resources/TDSUseCases/0cded40a-a359-45e0-aaec-afe7bbcfbc96.json
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/0cded40a-a359-45e0-aaec-afe7bbcfbc96.json
@@ -1,5445 +1,5487 @@
[
- {
- "CaseID": "{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}",
- "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes.\n",
- "Version": 2,
- "MinorVersion": 0,
- "TaxType": "TDS",
- "ChangedBy": "Microsoft",
- "Code": "",
- "TaxEntity": "Gen. Journal Line",
- "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
- "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
- "PresentationOrder": 936,
- "Indent": 1,
- "PostingTableName": "TDS Posting Setup",
- "PostingTableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
+ {
+ "CaseID": "{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}",
+ "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes.\n",
+ "Version": 3,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Gen. Journal Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
+ "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
+ "PresentationOrder": 943,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
}
+ }
}
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Concessional Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "TDS Concessional Code",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
+ ]
}
- ],
- "Attributes": [
- {
- "Name": "Concessional Code",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "TDS Concessional Code",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmount",
+ "Expression": "0-Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
}
+ }
]
+ }
},
{
- "Name": "PAN No.",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
- }
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountLCY",
+ "Expression": "0-AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
}
+ }
]
+ }
}
- ],
- "RateColumns": [
- {
- "Name": "Effective Date",
- "When": [
- {
- "ValueType": "Lookup",
- "Sequence": 0,
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
}
- ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
}
- ],
- "ComputationVariables": [
- {
- "Name": "TotalAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TDSTaxableAmount",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PreviousContractAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContractLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "PreSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TDSBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
- },
- {
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
- },
- {
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveTotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "AppliedAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "BatchAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchPaymentAmountLCY",
- "Datatype": "Number"
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "Name": "BatchInvoiceAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmtExclGST",
- "Datatype": "Number"
- },
- {
- "Name": "TaxableAmountExclApplied",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
- },
- {
- "Name": "GSTAmount",
- "Datatype": "Number"
- },
- {
- "Name": "AdjustedInvAmount",
- "Datatype": "Number"
- }
- ],
- "ComputationScript": [
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ "OutputVariableName": "PositiveAmtExclGST",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmount",
- "Expression": "0-Amount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
- }
- ]
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
- },
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmountLCY",
- "Expression": "0-AmountLCY",
- "Tokens": [
- {
- "TokenName": "AmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- ]
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
}
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmtExclGST",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmtExclGST",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
- }
- }
- }
- }
- ]
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Created string for current financial year"
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "InvoiceAmount",
+ "Expression": "0-InvoiceAmount",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjsusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AdjustedInvAmount",
+ "Expression": "0-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
}
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Payment Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchPaymentAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Invoice Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Batch amount including Current Line Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "BatchAmountLCY",
+ "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
},
{
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- }
- ]
+ "TokenName": "BatchInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Invoice amount"
+ "TokenName": "BatchPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchPaymentAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Posting to G/L"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmountLCY",
+ "Expression": "PostedAmountLCY+BatchAmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "BatchAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchAmountLCY"
+ }
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
- }
+ "TokenName": "PostedAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "InvoiceAmount",
- "Expression": "0-InvoiceAmount",
- "Tokens": [
- {
- "TokenName": "InvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- }
- ]
- }
- }
- ]
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get TDS Adjsusted Invoice Amount"
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "AdjustedInvAmount",
- "OutputValue": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Adjusted",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
}
+ }
}
- }
+ }
+ ]
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
{
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "AdjustedInvAmount",
- "Expression": "0-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- }
- ]
- }
+ ]
}
- ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Payment amount"
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmount",
+ "Expression": "0-GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
}
+ ]
}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "COMMENT",
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Sum of posted payment and invoice amount"
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PrevInvAmountLCY",
- "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
- "Tokens": [
- {
- "TokenName": "PostedInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- },
- {
- "TokenName": "PostedPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
- }
- }
- }
- ]
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted contract amount"
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreviousContractAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Per Contract",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- }
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Posted amount without contract amount"
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmtWOContractLCY",
- "Expression": "TotalPostedAmount-PostedContractAmount",
- "Tokens": [
- {
- "TokenName": "PostedContractAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "TotalPostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- ]
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Payment Amount on current batch"
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "BatchPaymentAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Gen. Journal Line",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Journal Template Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
- }
- },
- {
- "FiterFieldName": "Line No.",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
- }
- },
- {
- "FiterFieldName": "Account Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- }
- },
- {
- "FiterFieldName": "Account No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
- {
- "FiterFieldName": "Journal Batch Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Invoice Amount on current batch"
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "BatchInvoiceAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Journal Template Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
- }
- },
- {
- "FiterFieldName": "Line No.",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
- }
- },
- {
- "FiterFieldName": "Account Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- }
- },
- {
- "FiterFieldName": "Account No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Journal Batch Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
+ "FieldName": "Account No."
+ }
}
- }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "BatchInvoiceAmountLCY",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": "0"
- },
- "RHS": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchInvoiceAmountLCY"
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Batch amount including Current Line Amount"
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "BatchAmountLCY",
- "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
- "Tokens": [
- {
- "TokenName": "AmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- }
- },
- {
- "TokenName": "BatchInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchInvoiceAmountLCY"
- }
- }
- },
- {
- "TokenName": "BatchPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchPaymentAmountLCY"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Posting to G/L"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "BatchAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmountLCY",
- "Expression": "PostedAmountLCY+BatchAmountLCY",
- "Tokens": [
- {
- "TokenName": "BatchAmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchAmountLCY"
- }
- }
- },
- {
- "TokenName": "PostedAmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Converted Amount from LCY to FCY"
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- },
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
- },
- "RHS": {
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
+ ]
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "PrevInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get applied amount"
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
+ }
}
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
- },
- "RHS": {
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
"Type": "Constant",
"Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
}
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
}
- ]
- },
- "Body": [
- {
+ ]
+ },
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "AppliedAmount",
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
"OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
+ "Type": "Constant",
+ "Value": ""
}
+ }
}
+ ]
}
- ]
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ ]
},
- {
+ "Body": [
+ {
"ActivityType": "IFSTATEMENT",
"Activity": {
- "Condition": {
- "Body": [
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
{
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
}
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
"Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Applies-to ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
- }
- }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
]
+ }
}
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
+ }
]
- },
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
"Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
}
+ }
]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Get GST Amount"
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
- "Token": [
- {
- "TokenName": "JournalBatchName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
- }
- }
- },
- {
- "TokenName": "JournalTemplateName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "GST Setup",
- "TableFieldName": "GST Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "GSTAmount",
- "Expression": "0-GSTAmount",
- "Tokens": [
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- }
- ]
- }
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
}
+ }
]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- },
+ },
+ "Body": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
}
+ }
}
- ],
- "ElseIf": {
+ ],
+ "ElseIf": {
"Condition": {
- "Body": []
+ "Body": []
},
"Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
]
+ }
}
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total Taxable Amount"
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "VendorNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmount",
- "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
- }
- ]
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Taxable Amount excluding posted contract amount"
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmtWOContract",
- "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "ContractAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
- }
- ]
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalAmtLCY",
+ "Expression": "0-{Amt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "IFSTATEMENT",
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmount"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
}
+ }
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "VariableName": "TDSAmount",
- "Expression": "TDSTaxableAmt*TDSPer/100",
- "Tokens": [
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "TDSPer",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
- },
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "TDSTaxableAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
+ }
}
- ]
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreSurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Surcharge Base Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- }
- ]
- }
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
}
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalSurchargeBaseAmt",
- "Expression": "PreSurchargeBaseAmt+TDSAmount",
- "Tokens": [
- {
- "TokenName": "PreSurchargeBaseAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreSurchargeBaseAmt"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Threshold Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Surcharge Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalSurchargeBaseAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
}
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
"Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
"SourceType": "Variable",
- "VariableName": "TDSAmount"
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
}
+ ]
}
- }
- ]
+ }
+ ]
+ }
+ }
+ ]
}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "IFSTATEMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- }
- ]
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
}
+ }
}
- ],
- "PostingVariables": [
- {
- "Name": "TDSIncludingSHECess",
- "Datatype": "Number"
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Bal. Account No."
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
{
- "Name": "TDSIncludingSurcharge",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalAmtLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PerContract",
- "Datatype": "Boolean"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "{TDSAmt}*{SurchargePer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{SurchargePer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "({TDSAmt}+{SurchargeAmt})*{SheCessPer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{SheCessPer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
},
{
- "Name": "AccountingDateFilter",
- "Datatype": "String"
+ "TokenName": "{SurchargeAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "Name": "TDSPer",
- "Datatype": "Number"
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "{TDSBaseAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{TDSBaseAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
},
{
- "Name": "SurchargePer",
- "Datatype": "Number"
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDS+Surcharge+eCess+SheCess",
+ "Tokens": [
+ {
+ "TokenName": "eCess",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
},
{
- "Name": "ECessPer",
- "Datatype": "Number"
+ "TokenName": "SheCess",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
},
{
- "Name": "SHECessPer",
- "Datatype": "Number"
+ "TokenName": "Surcharge",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "Name": "VendorNo",
- "Datatype": "String"
+ "TokenName": "TDS",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "({TDSAmt}+{SurchargeAmt})*{EcessPer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{EcessPer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
},
{
- "Name": "Applied",
- "Datatype": "Boolean"
+ "TokenName": "{SurchargeAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "Name": "PositiveAmount",
- "Datatype": "Number"
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
}
- ],
- "PostingScript": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSHECess",
- "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
- "Tokens": [
- {
- "TokenName": "{eCESS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "{SHECess}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "System-Created Entry"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "VendorNo"
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
}
+ }
},
{
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSurcharge",
- "Expression": "{TDS}+{Surcharge}",
- "Tokens": [
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
},
{
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
}
+ }
}
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalAmtLCY",
- "Expression": "0-{Amt}",
- "Tokens": [
- {
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Invoice Amount"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalAmtLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Invoice Amount"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "InvoiceAmt+PaymentAmt",
- "Tokens": [
- {
- "TokenName": "InvoiceAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmt"
- }
- }
- },
- {
- "TokenName": "PaymentAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "{Amt}+{InvAmt}",
- "Tokens": [
- {
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- }
- },
- {
- "TokenName": "{InvAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Threshold Overlook",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PerContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Vendor"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "VendorNo",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "VendorNo",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Bal. Account No."
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "Applied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "Components": [
- {
- "ComponentName": "eCESS",
- "Sequence": 3,
- "Formula": {
- "VariableName": "eCESS",
- "Expression": "({TDSAmt}+{SurchargeAmt})*{EcessPer}/100",
- "Tokens": [
- {
- "TokenName": "{EcessPer}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "{SurchargeAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDSAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "SHE Cess ",
- "Sequence": 4,
- "Formula": {
- "VariableName": "SHE Cess ",
- "Expression": "({TDSAmt}+{SurchargeAmt})*{SheCessPer}/100",
- "Tokens": [
- {
- "TokenName": "{SheCessPer}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "{SurchargeAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDSAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS",
- "Sequence": 1,
- "Formula": {
- "VariableName": "TDS",
- "Expression": "TDSTaxableAmount*TDSPer/100",
- "Tokens": [
- {
- "TokenName": "TDSPer",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Surcharge",
- "Sequence": 2,
- "Formula": {
- "VariableName": "Surcharge",
- "Expression": "{TDSAmt}*{SurchargePer}/100",
- "Tokens": [
- {
- "TokenName": "{SurchargePer}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDSAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "SurchargeBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS Base Amount",
- "Sequence": 6,
- "Formula": {
- "VariableName": "TDS Base Amount",
- "Expression": "{TDSBaseAmt}",
- "Tokens": [
- {
- "TokenName": "{TDSBaseAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Total TDS Amount",
- "Sequence": 5,
- "Formula": {
- "VariableName": "Total TDS Amount",
- "Expression": "TDS+Surcharge+eCess+SheCess",
- "Tokens": [
- {
- "TokenName": "eCess",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SheCess",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "Surcharge",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDS",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- }
- ],
- "Condition": {
- "Body": [
+ ]
+ }
+ }
+ },
{
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Source Code"
}
+ }
},
{
- "Operator": "or",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. Status",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": " "
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Include GST in TDS Base",
+ "Sequence": 47,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Concessional Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Applied",
+ "Sequence": 48,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Vendor"
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Work Tax Nature Of Deduction"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "TDS Line Amount",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "System-Created Entry"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Payment Amount",
+ "Sequence": 40,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Code",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Factor",
+ "Sequence": 46,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Non Resident Payments",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
- }
- ]
- },
- "TaxPostingSetup": [
- {
- "ComponentName": "Total TDS Amount",
- "TableName": "TDS Posting Setup",
- "AccountSourceType": "Field",
- "FieldName": "TDS Account",
- "AccountingImpact": "Credit",
- "ReverseCharge": false,
- "ReverseAccountSourceType": "Field",
- "ReverseChargeFieldName": "",
- "When": [
- {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "ValueType": "Insert Record",
- "Sequence": 0,
- "InsertRecord": {
- "TableName": "TDS Entry",
- "RunTrigger": true,
- "SubLedgerGrpBy": "Component",
- "InsertRecordFields": [
- {
- "FieldName": "Vendor No.",
- "Sequence": 4,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "VendorNo"
- }
- }
- },
- {
- "FieldName": "T.A.N. No.",
- "Sequence": 5,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "TAN No."
- }
- }
- },
- {
- "FieldName": "Section",
- "Sequence": 6,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FieldName": "Assessee Code",
- "Sequence": 7,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FieldName": "TDS Base Amount",
- "Sequence": 8,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "TDS %",
- "Sequence": 9,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Amount",
- "Sequence": 10,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "Surcharge %",
- "Sequence": 11,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Surcharge Amount",
- "Sequence": 12,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "eCess %",
- "Sequence": 13,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "eCess Amount",
- "Sequence": 14,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "SHE Cess %",
- "Sequence": 15,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "SHE Cess Amount",
- "Sequence": 16,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "Concessional Code",
- "Sequence": 17,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Concessional Code"
- }
- }
- },
- {
- "FieldName": "Concessional Form No.",
- "Sequence": 37,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Certificate No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Deductee PAN No.",
- "Sequence": 18,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "PAN No."
- }
- }
- },
- {
- "FieldName": "Invoice Amount",
- "Sequence": 25,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- },
- {
- "FieldName": "Posting Date",
- "Sequence": 3,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FieldName": "Document Type",
- "Sequence": 26,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FieldName": "Document No.",
- "Sequence": 2,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "Posted Document No."
- }
- }
- },
- {
- "FieldName": "Account Type",
- "Sequence": 23,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "G/L Account"
- }
- },
- {
- "FieldName": "Account No.",
- "Sequence": 24,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Source Code",
- "Sequence": 28,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Source Code"
- }
- }
- },
- {
- "FieldName": "TDS Amount Including Surcharge",
- "Sequence": 22,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSurcharge"
- }
- }
- },
- {
- "FieldName": "Bal. TDS Including SHE CESS",
- "Sequence": 29,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Include GST in TDS Base",
- "Sequence": 47,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- }
- },
- {
- "FieldName": "Applied",
- "Sequence": 48,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "Applied"
- }
- }
- },
- {
- "FieldName": "Remaining Surcharge Amount",
- "Sequence": 31,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Remaining TDS Amount",
- "Sequence": 43,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Line Amount",
- "Sequence": 44,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "FieldName": "Total TDS Including SHE CESS",
- "Sequence": 21,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Per Contract",
- "Sequence": 39,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PerContract"
- }
- }
- },
- {
- "FieldName": "User ID",
- "Sequence": 30,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Database",
- "DatabaseVariableName": "UserId"
- }
- }
- },
- {
- "FieldName": "Transaction No.",
- "Sequence": 38,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry Transaction No."
- }
- }
- },
- {
- "FieldName": "Original TDS Base Amount",
- "Sequence": 27,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "Payment Amount",
- "Sequence": 40,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
- }
- }
- },
- {
- "FieldName": "Currency Code",
- "Sequence": 45,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Code"
- }
- }
- },
- {
- "FieldName": "Currency Factor",
- "Sequence": 46,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- },
- {
- "FieldName": "Surcharge Base Amount",
- "Sequence": 42,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "G/L Entry No.",
- "Sequence": 1,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry No."
- }
- }
- }
- ]
- }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
}
- ]
+ }
+ }
+ ]
}
+ }
]
- }
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/1e42fdf3-1868-4205-a6d6-d2fc67bd132f.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/1e42fdf3-1868-4205-a6d6-d2fc67bd132f.json
index 1ea7d74dfd..df3756dab8 100644
--- a/Apps/IN/INTDS/app/.resources/TDSUseCases/1e42fdf3-1868-4205-a6d6-d2fc67bd132f.json
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/1e42fdf3-1868-4205-a6d6-d2fc67bd132f.json
@@ -1,7193 +1,7243 @@
[
- {
- "CaseID": "{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}",
- "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes.\n",
- "Version": 7,
- "MinorVersion": 0,
- "TaxType": "TDS",
- "ChangedBy": "Microsoft",
- "Code": "",
- "TaxEntity": "Purchase Line",
- "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
- "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
- "PresentationOrder": 568,
- "Indent": 1,
- "PostingTableName": "TDS Posting Setup",
- "PostingTableFilters": [
- {
- "FiterFieldName": "TDS Section",
+ {
+ "CaseID": "{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}",
+ "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes.\n",
+ "Version": 8,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Purchase Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
+ "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
+ "PresentationOrder": 574,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
"FilterType": "Equals",
"FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "Assessee Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
+ ]
}
- ],
- "Attributes": [
- {
- "Name": "PAN No.",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
+ }
+ ]
+ },
+ {
+ "Name": "Concessional Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "TDS Concessional Code",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Start Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
}
+ ]
}
- ]
- },
- {
- "Name": "Assessee Code",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
+ }
+ },
+ {
+ "FiterFieldName": "End Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
}
+ ]
}
- ]
- },
- {
- "Name": "Concessional Code",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "TDS Concessional Code",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Start Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "End Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
+ }
+ },
+ {
+ "FiterFieldName": "Certificate Value",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountTillThisLine",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
}
- ],
- "RateColumns": [
- {
- "Name": "Effective Date",
- "When": [
- {
- "ValueType": "Lookup",
- "Sequence": 0,
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
}
- ],
- "ComputationVariables": [
- {
- "Name": "TotalAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TDSTaxableAmount",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PreviousContractAmount",
- "Datatype": "Number"
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
},
{
- "Name": "TotalInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContractLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "PreSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TDSBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
- },
- {
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
- },
- {
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveTotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "AppliedAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "BatchAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchPaymentAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchInvoiceAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmtExclGST",
- "Datatype": "Number"
- },
- {
- "Name": "TaxableAmountExclApplied",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
- },
- {
- "Name": "GSTAmount",
- "Datatype": "Number"
- },
- {
- "Name": "AdjustedInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCYExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmountLCYExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountTillThisLine",
- "Datatype": "Number"
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
}
- ],
- "ComputationScript": [
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Created string for current financial year"
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Is Less Than",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
+ }
}
- },
- {
- "ActivityType": "COMMENT",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Get TDS Adjusted Invoice Amount"
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
}
- },
- {
+ },
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "AdjustedInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Adjusted",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
}
+ }
}
- },
- {
- "ActivityType": "COMMENT",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total posted Payment amount"
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
}
- },
- {
+ },
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
+ "OutputVariableName": "PositiveAmountLCYExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCYExclThisLine"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCYExclThisLine",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Sum of posted payment and invoice amount"
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountTillThisLine",
+ "Expression": "PositiveAmountExclThisLine+Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountExclThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PrevInvAmountLCY",
- "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
- "Tokens": [
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
{
- "TokenName": "PostedInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "PositiveAmountTillThisLine-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountTillThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Variable",
- "VariableName": "InvoiceAmount"
+ "VariableName": "PositiveAmountTillThisLine"
+ }
}
- }
+ }
+ ]
+ }
},
{
- "TokenName": "PostedPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
}
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
}
+ }
}
- ]
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted contract amount"
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreviousContractAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Per Contract",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- }
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Posted amount without contract amount"
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmtWOContractLCY",
- "Expression": "TotalPostedAmount-PostedContractAmount",
- "Tokens": [
- {
- "TokenName": "PostedContractAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "TotalPostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- ]
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
},
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCY",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Converted Amount from LCY to FCY"
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountExclThisLine",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
"TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "Line No.",
- "FilterType": "Is Less Than",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
+ "FieldName": "Pay-to Vendor No."
+ }
}
- }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "false"
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
- },
- "RHS": {
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "Operator": "Multiply By",
- "LHS": {
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
}
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
{
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
}
+ }
}
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ ]
},
- {
- "ActivityType": "NUMBERCALCULATION",
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
"Activity": {
- "OutputVariableName": "PrevInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
"SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
+ "VariableName": "TotalInvAmountLCYExclThisLine"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
}
+ }
},
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
}
- ]
- }
+ ]
+ }
+ }
+ ]
+ }
}
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "Operator": "Divided By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ ]
},
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
}
+ }
}
- }
- ]
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCYExclThisLine",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountExclThisLine"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCY",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCYExclThisLine"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCYExclThisLine",
- "Operator": "Minus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get applied amount"
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. Type",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
}
+ ]
},
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
}
+ ]
}
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ ]
},
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
"FiterFieldName": "Document Type",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
- },
- {
+ },
+ {
"FiterFieldName": "No.",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
}
+ ]
}
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
]
+ }
}
- }
+ }
+ ]
+ }
}
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
}
+ }
]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Get GST Amount"
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "GST Setup",
- "TableFieldName": "GST Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
}
- ]
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "NUMERICEXPRESSION",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
}
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
}
+ }
]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmountTillThisLine",
- "Expression": "PositiveAmountExclThisLine+Amount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "PositiveAmountExclThisLine",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountExclThisLine"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountTillThisLine"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "PositiveAmountTillThisLine-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "PositiveAmountTillThisLine",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountTillThisLine"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "TotalInvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithoutTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineTDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalGSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "QtyFactor",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyToInvoice",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQuantity",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyFactor",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "QtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Qty. to Invoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Quantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Taxable Amount"
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmount",
- "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
- },
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
- },
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
- ]
+ ]
+ }
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalTaxableInvAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmtWOContract",
- "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "ContractAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
- }
- ]
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalTaxableInvAmtWOContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
}
- },
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "false"
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCYExclThisLine"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
+ ]
}
- }
+ }
+ ]
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "QtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSAmount",
- "Expression": "TDSTaxableAmt*TDSPer/100",
- "Tokens": [
- {
- "TokenName": "TDSPer",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "LOOPTHROUGHRECORDS",
+ "Activity": {
+ "TableName": "Purchase Line",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Bus. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Bus. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Prod. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Prod. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Dimension Set ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Dimension Set ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ],
+ "LoopThroughRecordFields": [
+ {
+ "FieldName": "Line No.",
+ "VariableName": "LineNo",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Quantity",
+ "VariableName": "LineQuantity",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Qty. to Invoice",
+ "VariableName": "LineQtyToInvoice",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Amount",
+ "VariableName": "LineAmount",
+ "CalculateSum": false
+ }
+ ],
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineNo"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineQtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyToInvoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQuantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineAmt",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
}
+ }
]
+ }
}
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "LineTDSAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Amount",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreSurchargeBaseAmt",
- "OutputValue": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineTDSAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithTDS",
+ "Operator": "Plus",
+ "LHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Surcharge Base Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- }
- ]
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithoutTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
}
+ }
}
+ ]
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalSurchargeBaseAmt",
- "Expression": "PreSurchargeBaseAmt+TDSAmount",
- "Tokens": [
- {
- "TokenName": "PreSurchargeBaseAmt",
- "TokenValue": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreSurchargeBaseAmt"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalGSTAmt",
+ "Expression": "TotalGSTAmt+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+TotalGSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Surcharge Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalSurchargeBaseAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
- }
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- }
- ]
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. Type",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- }
- ]
- }
- }
- ]
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. Type",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Applies-to ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
- }
- ],
- "PostingVariables": [
- {
- "Name": "TDSIncludingSHECess",
- "Datatype": "Number"
- },
- {
- "Name": "TDSIncludingSurcharge",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalAmtLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PerContract",
- "Datatype": "Boolean"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
- },
- {
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
- },
- {
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TDSPer",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargePer",
- "Datatype": "Number"
- },
- {
- "Name": "ECessPer",
- "Datatype": "Number"
- },
- {
- "Name": "SHECessPer",
- "Datatype": "Number"
- },
- {
- "Name": "Applied",
- "Datatype": "Boolean"
- },
- {
- "Name": "TotalInvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
- },
- {
- "Name": "GSTAmt",
- "Datatype": "Number"
- },
- {
- "Name": "LineNo",
- "Datatype": "String"
- },
- {
- "Name": "TotalInvoiceAmountWithTDS",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvoiceAmountWithoutTDS",
- "Datatype": "Number"
- },
- {
- "Name": "LineTDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "LineAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalGSTAmt",
- "Datatype": "Number"
- },
- {
- "Name": "QtyFactor",
- "Datatype": "Number"
+ }
},
{
- "Name": "LineAmount",
- "Datatype": "Number"
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
},
{
- "Name": "LineQtyToInvoice",
- "Datatype": "Number"
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
},
{
- "Name": "LineQuantity",
- "Datatype": "Number"
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "Name": "LineQtyFactor",
- "Datatype": "Number"
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
}
- ],
- "PostingScript": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "QtyFactor",
- "Operator": "Divided By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Qty. to Invoice"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Quantity"
- }
- }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSHECess",
- "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
- "Tokens": [
- {
- "TokenName": "{eCESS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "{SHECess}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSurcharge",
- "Expression": "{TDS}+{Surcharge}",
- "Tokens": [
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Order"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "InvoiceAmt+PaymentAmt",
- "Tokens": [
- {
- "TokenName": "InvoiceAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmt"
- }
- }
- },
- {
- "TokenName": "PaymentAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "{Amt}+{InvAmt}",
- "Tokens": [
- {
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "{InvAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalAmtLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PerContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "Applied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "QtyFactor"
- }
- }
- }
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "LOOPTHROUGHRECORDS",
- "Activity": {
- "TableName": "Purchase Line",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "Gen. Bus. Posting Group",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Gen. Bus. Posting Group"
- }
- }
- },
- {
- "FiterFieldName": "Gen. Prod. Posting Group",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Gen. Prod. Posting Group"
- }
- }
- },
- {
- "FiterFieldName": "Dimension Set ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Dimension Set ID"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ],
- "LoopThroughRecordFields": [
- {
- "FieldName": "Line No.",
- "VariableName": "LineNo",
- "CalculateSum": false
- },
- {
- "FieldName": "Quantity",
- "VariableName": "LineQuantity",
- "CalculateSum": false
- },
- {
- "FieldName": "Qty. to Invoice",
- "VariableName": "LineQtyToInvoice",
- "CalculateSum": false
- },
- {
- "FieldName": "Amount",
- "VariableName": "LineAmount",
- "CalculateSum": false
- }
- ],
- "Body": [
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineNo"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "LineQtyFactor",
- "Operator": "Divided By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQtyToInvoice"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQuantity"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "LineAmt",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQtyFactor"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "GST Setup",
- "TableFieldName": "GST Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "LineTDSAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Amount",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineTDSAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmountWithTDS",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithTDS"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithoutTDS"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmt"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvoiceAmount",
- "Expression": "TotalInvoiceAmount+GSTAmt",
- "Tokens": [
- {
- "TokenName": "GSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalGSTAmt",
- "Expression": "TotalGSTAmt+GSTAmt",
- "Tokens": [
- {
- "TokenName": "GSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalGSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalGSTAmt"
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvoiceAmount",
- "Expression": "TotalInvoiceAmount+TotalGSTAmt",
- "Tokens": [
- {
- "TokenName": "TotalGSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalGSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ],
- "Components": [
- {
- "ComponentName": "Total TDS Amount",
- "Sequence": 5,
- "Formula": {
- "VariableName": "Total TDS Amount",
- "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
- "Tokens": [
- {
- "TokenName": "ECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SHECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS",
- "Sequence": 1,
- "Formula": {
- "VariableName": "TDS",
- "Expression": "TDSTaxableAmount*TDSPercent/100",
- "Tokens": [
- {
- "TokenName": "TDSPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS Base Amount",
- "Sequence": 6,
- "Formula": {
- "VariableName": "TDS Base Amount",
- "Expression": "TDSBaseAmount",
- "Tokens": [
- {
- "TokenName": "TDSBaseAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "eCESS",
- "Sequence": 3,
- "Formula": {
- "VariableName": "eCESS",
- "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
- "Tokens": [
- {
- "TokenName": "EcessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "SHE Cess ",
- "Sequence": 4,
- "Formula": {
- "VariableName": "SHE Cess ",
- "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
- "Tokens": [
- {
- "TokenName": "SHECessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Surcharge",
- "Sequence": 2,
- "Formula": {
- "VariableName": "Surcharge",
- "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
- "Tokens": [
- {
- "TokenName": "SurchargePercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "SurchargeTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "SurchargeBaseAmt"
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
+ ]
}
- ],
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Order"
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. Status",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": " "
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Concessional Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Work Tax Nature Of Deduction"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Non Resident Payments",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "No"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "End Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ],
- "Sorting": [
- {
- "FieldName": "Concessional Code"
- },
- {
- "FieldName": "End Date"
- }
- ]
- }
- }
- }
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "No"
+ }
},
- "TaxPostingSetup": [
- {
- "ComponentName": "Total TDS Amount",
- "TableName": "TDS Posting Setup",
- "AccountSourceType": "Field",
- "FieldName": "TDS Account",
- "AccountingImpact": "Credit",
- "ReverseCharge": false,
- "ReverseAccountSourceType": "Field",
- "ReverseChargeFieldName": "",
- "When": [
- {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "ValueType": "Insert Record",
- "Sequence": 0,
- "InsertRecord": {
- "TableName": "TDS Entry",
- "RunTrigger": true,
- "SubLedgerGrpBy": "Component",
- "InsertRecordFields": [
- {
- "FieldName": "Vendor No.",
- "Sequence": 4,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FieldName": "T.A.N. No.",
- "Sequence": 5,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "TAN No."
- }
- }
- },
- {
- "FieldName": "Section",
- "Sequence": 6,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FieldName": "Assessee Code",
- "Sequence": 7,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FieldName": "TDS Base Amount",
- "Sequence": 8,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "TDS %",
- "Sequence": 9,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Amount",
- "Sequence": 10,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "Surcharge %",
- "Sequence": 11,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Surcharge Amount",
- "Sequence": 12,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "eCess %",
- "Sequence": 13,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "eCess Amount",
- "Sequence": 14,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "SHE Cess %",
- "Sequence": 15,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "SHE Cess Amount",
- "Sequence": 16,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "Concessional Code",
- "Sequence": 17,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Concessional Code"
- }
- }
- },
- {
- "FieldName": "Concessional Form No.",
- "Sequence": 37,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Certificate No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Deductee PAN No.",
- "Sequence": 18,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "PAN No."
- }
- }
- },
- {
- "FieldName": "Nature of Remittance",
- "Sequence": 19,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Nature of Remittance"
- }
- }
- },
- {
- "FieldName": "Act Applicable",
- "Sequence": 20,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Act Applicable"
- }
- }
- },
- {
- "FieldName": "Invoice Amount",
- "Sequence": 25,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- },
- {
- "FieldName": "Posting Date",
- "Sequence": 3,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Document Type",
- "Sequence": 26,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FieldName": "Document No.",
- "Sequence": 2,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "Posted Document No."
- }
- }
- },
- {
- "FieldName": "Account Type",
- "Sequence": 23,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "G/L Account"
- }
- },
- {
- "FieldName": "Account No.",
- "Sequence": 24,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Source Code",
- "Sequence": 28,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "PURCHASES"
- }
- },
- {
- "FieldName": "TDS Amount Including Surcharge",
- "Sequence": 22,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSurcharge"
- }
- }
- },
- {
- "FieldName": "Bal. TDS Including SHE CESS",
- "Sequence": 29,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSHECess"
- }
- }
- },
- {
- "FieldName": "Applied",
- "Sequence": 45,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "Applied"
- }
- }
- },
- {
- "FieldName": "Remaining Surcharge Amount",
- "Sequence": 31,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Remaining TDS Amount",
- "Sequence": 42,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Line Amount",
- "Sequence": 43,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "FieldName": "Total TDS Including SHE CESS",
- "Sequence": 21,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Per Contract",
- "Sequence": 39,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PerContract"
- }
- }
- },
- {
- "FieldName": "Party Account No.",
- "Sequence": 44,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "User ID",
- "Sequence": 30,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Database",
- "DatabaseVariableName": "UserId"
- }
- }
- },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "End Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ],
+ "Sorting": [
+ {
+ "FieldName": "Concessional Code"
+ },
+ {
+ "FieldName": "End Date"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Nature of Remittance",
+ "Sequence": 19,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Nature of Remittance"
+ }
+ }
+ },
+ {
+ "FieldName": "Act Applicable",
+ "Sequence": 20,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Act Applicable"
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "FieldName": "Transaction No.",
- "Sequence": 38,
- "ReverseSign": false,
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry Transaction No."
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "FieldName": "Original TDS Base Amount",
- "Sequence": 27,
- "ReverseSign": false,
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
- },
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "PURCHASES"
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSHECess"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "Party Account No.",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "FieldName": "Surcharge Base Amount",
- "Sequence": 41,
- "ReverseSign": false,
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "FieldName": "G/L Entry No.",
- "Sequence": 1,
- "ReverseSign": false,
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry No."
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
- ]
+ ]
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 41,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
}
+ }
]
- }
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/33bfbe99-9140-4112-a55b-35ec0d9b61b9.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/33bfbe99-9140-4112-a55b-35ec0d9b61b9.json
index d6fef472e4..264c4d7836 100644
--- a/Apps/IN/INTDS/app/.resources/TDSUseCases/33bfbe99-9140-4112-a55b-35ec0d9b61b9.json
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/33bfbe99-9140-4112-a55b-35ec0d9b61b9.json
@@ -1,6020 +1,6062 @@
[
- {
- "CaseID": "{33BFBE99-9140-4112-A55B-35EC0D9B61B9}",
- "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes.\n",
- "Version": 4,
- "MinorVersion": 0,
- "TaxType": "TDS",
- "ChangedBy": "Microsoft",
- "Code": "",
- "TaxEntity": "Gen. Journal Line",
- "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
- "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
- "PresentationOrder": 937,
- "Indent": 1,
- "PostingTableName": "TDS Posting Setup",
- "PostingTableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
+ {
+ "CaseID": "{33BFBE99-9140-4112-A55B-35EC0D9B61B9}",
+ "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes.\n",
+ "Version": 5,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Gen. Journal Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
+ "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
+ "PresentationOrder": 941,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmount",
+ "Expression": "0-Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountLCY",
+ "Expression": "0-AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
+ "FieldName": "Amount (LCY)"
+ }
}
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
}
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
}
+ }
}
- ],
- "Attributes": [
- {
- "Name": "PAN No.",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
}
- ],
- "RateColumns": [
- {
- "Name": "Effective Date",
- "When": [
- {
- "ValueType": "Lookup",
- "Sequence": 0,
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
}
- ],
- "ComputationVariables": [
- {
- "Name": "TotalAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TDSTaxableAmount",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PreviousContractAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContractLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "PreSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TDSBaseAmt",
- "Datatype": "Number"
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
},
{
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "InvoiceAmount",
+ "Expression": "0-InvoiceAmount",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AdjustedInvAmount",
+ "Expression": "0-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Applied",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
},
{
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
},
{
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveTotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "AppliedAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "BatchAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchPaymentAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchInvoiceAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmtExclGST",
- "Datatype": "Number"
- },
- {
- "Name": "TaxableAmountExclApplied",
- "Datatype": "Number"
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Payment Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchPaymentAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Invoice Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Batch amount including Current Line Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "BatchAmountLCY",
+ "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
},
{
- "Name": "RecID",
- "Datatype": "String"
+ "TokenName": "BatchInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
},
{
- "Name": "GSTAmount",
- "Datatype": "Number"
+ "TokenName": "BatchPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchPaymentAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Posting to G/L"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmountLCY",
+ "Expression": "PostedAmountLCY+BatchAmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "BatchAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchAmountLCY"
+ }
+ }
},
{
- "Name": "AdjustedInvAmount",
- "Datatype": "Number"
+ "TokenName": "PostedAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
}
- ],
- "ComputationScript": [
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "IFSTATEMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Condition": {
- "Body": [
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
{
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmount",
- "Expression": "0-Amount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmountLCY",
- "Expression": "0-AmountLCY",
- "Tokens": [
- {
- "TokenName": "AmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- ]
- }
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- ]
+ ]
+ }
+ }
}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
+ "FieldName": "TDS Section Code"
+ }
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmtExclGST",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmtExclGST",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount Excl. GST"
- }
+ "FieldName": "Applies-to Doc. Type"
+ }
}
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
- }
- }
- }
- },
+ },
+ "Body": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmtExclGST"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Created string for current financial year"
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Constant",
- "Value": "true"
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. Type"
+ }
}
- },
- {
- "FiterFieldName": "Closed",
+ },
+ {
+ "FiterFieldName": "Document No.",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
+ "FieldName": "Applies-to Doc. No."
+ }
}
- }
+ }
+ ]
+ }
}
+ }
}
- ]
- }
+ ]
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
"Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Constant",
- "Value": "false"
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
}
- },
- {
- "FiterFieldName": "Closed",
+ },
+ {
+ "FiterFieldName": "Document No.",
"FilterType": "Equals",
"FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Document No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ }
+ ]
+ }
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
+ "FieldName": "Applies-to ID"
+ }
}
- }
+ }
+ ]
+ }
}
+ }
}
- ]
- }
+ ]
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- },
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AppliedAmount",
+ "Expression": "0-AppliedAmount",
+ "Tokens": [
{
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
}
- ]
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Invoice amount"
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmount",
+ "Expression": "0-GSTAmount",
+ "Tokens": [
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "InvoiceAmount",
- "Expression": "0-InvoiceAmount",
- "Tokens": [
- {
- "TokenName": "InvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- }
- ]
- }
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
}
- ]
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "AdjustedInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Adjusted",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- }
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "AdjustedInvAmount",
- "Expression": "0-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- }
- ]
- }
- }
- ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Payment amount"
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
- {
- "FiterFieldName": "Applied",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
- }
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Sum of posted payment and invoice amount"
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PrevInvAmountLCY",
- "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
- "Tokens": [
- {
- "TokenName": "PostedInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- },
- {
- "TokenName": "PostedPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
- }
- }
- }
- ]
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted contract amount"
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreviousContractAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Per Contract",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- }
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Posted amount without contract amount"
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmtWOContractLCY",
- "Expression": "TotalPostedAmount-PostedContractAmount",
- "Tokens": [
- {
- "TokenName": "PostedContractAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "TotalPostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- ]
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Payment Amount on current batch"
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
}
- },
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "BatchPaymentAmountLCY",
- "OutputValue": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Gen. Journal Line",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
{
- "FiterFieldName": "Journal Template Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
- },
- {
- "FiterFieldName": "Line No.",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
- },
- {
- "FiterFieldName": "Account Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
}
- },
- {
- "FiterFieldName": "Account No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
}
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- },
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
{
- "FiterFieldName": "Journal Batch Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
}
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
}
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
}
+ }
}
- ]
+ ]
+ }
+ }
}
- }
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Invoice Amount on current batch"
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "BatchInvoiceAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Gen. Journal Line",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Journal Template Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "FiterFieldName": "Line No.",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
}
+ }
},
{
- "FiterFieldName": "Account Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
}
- }
- },
- {
- "FiterFieldName": "Account No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
}
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Journal Batch Name",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
}
- }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
- }
- ]
- }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
}
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "BatchInvoiceAmountLCY",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": "0"
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Variable",
- "VariableName": "BatchInvoiceAmountLCY"
+ "VariableName": "TaxableAmountExclApplied"
+ }
}
+ }
}
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total Batch amount including Current Line Amount"
- }
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "BatchAmountLCY",
- "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
- "Tokens": [
- {
- "TokenName": "AmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- }
- },
- {
- "TokenName": "BatchInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchInvoiceAmountLCY"
- }
- }
- },
- {
- "TokenName": "BatchPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchPaymentAmountLCY"
- }
- }
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Posting to G/L"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "BatchAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- }
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
}
- ]
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "NUMERICEXPRESSION",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "VariableName": "TotalInvAmountLCY",
- "Expression": "PostedAmountLCY+BatchAmountLCY",
- "Tokens": [
- {
- "TokenName": "BatchAmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "BatchAmountLCY"
- }
- }
- },
- {
- "TokenName": "PostedAmountLCY",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- ]
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
}
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "VendorNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Converted Amount from LCY to FCY"
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- }
- ]
- }
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get applied amount"
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalAmtLCY",
+ "Expression": "0-{Amt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
},
{
- "ActivityType": "IFSTATEMENT",
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": "0"
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Applies-to ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
- ]
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Threshold Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
}
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
+ },
+ "RHS": {
+ "Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
+ }
}
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
}
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Document No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Applies-to ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Applies-to ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "AppliedAmount",
- "Expression": "0-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- }
- ]
- }
- }
- ]
- }
+ ]
+ }
+ }
+ ]
+ }
}
- ]
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get GST Amount"
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
- "Token": [
- {
- "TokenName": "JournalBatchName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
- }
- }
- },
- {
- "TokenName": "JournalTemplateName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "GST Setup",
- "TableFieldName": "GST Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "GSTAmount",
- "Expression": "0-GSTAmount",
- "Tokens": [
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "IFSTATEMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Bal. Account No."
}
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Taxable Amount"
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmount",
- "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmt",
+ "Expression": "0-GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
}
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total Taxable Amount excluding posted contract amount"
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmtWOContract",
- "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "ContractAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
- }
- ]
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCY",
- "Operator": "Minus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- }
- }
- ]
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmount"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSAmount",
- "Expression": "TDSTaxableAmt*TDSPer/100",
- "Tokens": [
- {
- "TokenName": "TDSPer",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- ]
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreSurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Surcharge Base Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- }
- ]
- }
- }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalSurchargeBaseAmt",
- "Expression": "PreSurchargeBaseAmt+TDSAmount",
- "Tokens": [
- {
- "TokenName": "PreSurchargeBaseAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreSurchargeBaseAmt"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- ]
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Surcharge Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalSurchargeBaseAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
- }
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- }
- ]
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
}
- ],
- "PostingVariables": [
- {
- "Name": "TDSIncludingSHECess",
- "Datatype": "Number"
- },
- {
- "Name": "TDSIncludingSurcharge",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalAmtLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PerContract",
- "Datatype": "Boolean"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
- },
- {
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
- },
- {
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TDSPer",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargePer",
- "Datatype": "Number"
- },
- {
- "Name": "ECessPer",
- "Datatype": "Number"
- },
- {
- "Name": "SHECessPer",
- "Datatype": "Number"
- },
- {
- "Name": "VendorNo",
- "Datatype": "String"
- },
- {
- "Name": "Applied",
- "Datatype": "Boolean"
- },
- {
- "Name": "PositiveAmount",
- "Datatype": "Number"
- },
- {
- "Name": "GSTAmt",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
}
- ],
- "PostingScript": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSHECess",
- "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
- "Tokens": [
- {
- "TokenName": "{eCESS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "{SHECess}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSurcharge",
- "Expression": "{TDS}+{Surcharge}",
- "Tokens": [
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalAmtLCY",
- "Expression": "0-{Amt}",
- "Tokens": [
- {
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "Operator": "Minus",
- "LHS": {
- "Type": "Constant",
- "Value": ""
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Invoice Amount"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalAmtLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount (LCY)"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Invoice Amount"
- }
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
}
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "System-Created Entry"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Payment Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "VendorNo"
}
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
}
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "InvoiceAmt+PaymentAmt",
- "Tokens": [
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "InvoiceAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmt"
- }
- }
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
},
{
- "TokenName": "PaymentAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmt"
- }
- }
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "{Amt}+{InvAmt}",
- "Tokens": [
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- }
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
},
{
- "TokenName": "{InvAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- }
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
}
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Threshold Overlook",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PerContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Vendor"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "VendorNo",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "VendorNo",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Bal. Account No."
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "Applied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
- "Token": [
- {
- "TokenName": "JournalBatchName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Batch Name"
- }
- }
- },
- {
- "TokenName": "JournalTemplateName",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Journal Template Name"
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount (LCY)",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "GST Setup",
- "TableFieldName": "GST Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "GSTAmt",
- "Expression": "0-GSTAmt",
- "Tokens": [
- {
- "TokenName": "GSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to Doc. No."
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Applies-to ID"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "Components": [
- {
- "ComponentName": "Surcharge",
- "Sequence": 2,
- "Formula": {
- "VariableName": "Surcharge",
- "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
- "Tokens": [
- {
- "TokenName": "SurchargePercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "SurchargeTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "SurchargeBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "SHE Cess ",
- "Sequence": 4,
- "Formula": {
- "VariableName": "SHE Cess ",
- "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
- "Tokens": [
- {
- "TokenName": "SHECessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS",
- "Sequence": 1,
- "Formula": {
- "VariableName": "TDS",
- "Expression": "TDSTaxableAmount*TDSPercent/100",
- "Tokens": [
- {
- "TokenName": "TDSPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "eCESS",
- "Sequence": 3,
- "Formula": {
- "VariableName": "eCESS",
- "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
- "Tokens": [
- {
- "TokenName": "EcessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS Base Amount",
- "Sequence": 6,
- "Formula": {
- "VariableName": "TDS Base Amount",
- "Expression": "TDSBaseAmount",
- "Tokens": [
- {
- "TokenName": "TDSBaseAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Total TDS Amount",
- "Sequence": 5,
- "Formula": {
- "VariableName": "Total TDS Amount",
- "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
- "Tokens": [
- {
- "TokenName": "ECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SHECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- }
- ],
- "Condition": {
- "Body": [
+ ]
+ }
+ }
+ },
{
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Source Code"
}
+ }
},
{
- "Operator": "or",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. Status",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": " "
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Include GST in TDS Base",
+ "Sequence": 47,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Concessional Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Applied",
+ "Sequence": 48,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Vendor"
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Non Resident Payments",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Work Tax Nature Of Deduction"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "System-Created Entry"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Payment Amount",
+ "Sequence": 40,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Code",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Factor",
+ "Sequence": 46,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
},
{
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Payment Overlook",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
}
+ }
}
- ]
- },
- "TaxPostingSetup": [
- {
- "ComponentName": "Total TDS Amount",
- "TableName": "TDS Posting Setup",
- "AccountSourceType": "Field",
- "FieldName": "TDS Account",
- "AccountingImpact": "Credit",
- "ReverseCharge": false,
- "ReverseAccountSourceType": "Field",
- "ReverseChargeFieldName": "",
- "When": [
- {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "ValueType": "Insert Record",
- "Sequence": 0,
- "InsertRecord": {
- "TableName": "TDS Entry",
- "RunTrigger": true,
- "SubLedgerGrpBy": "Component",
- "InsertRecordFields": [
- {
- "FieldName": "Vendor No.",
- "Sequence": 4,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "VendorNo"
- }
- }
- },
- {
- "FieldName": "T.A.N. No.",
- "Sequence": 5,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "TAN No."
- }
- }
- },
- {
- "FieldName": "Section",
- "Sequence": 6,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FieldName": "Assessee Code",
- "Sequence": 7,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FieldName": "TDS Base Amount",
- "Sequence": 8,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "TDS %",
- "Sequence": 9,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Amount",
- "Sequence": 10,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "Surcharge %",
- "Sequence": 11,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Surcharge Amount",
- "Sequence": 12,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "eCess %",
- "Sequence": 13,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "eCess Amount",
- "Sequence": 14,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "SHE Cess %",
- "Sequence": 15,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "SHE Cess Amount",
- "Sequence": 16,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "Concessional Code",
- "Sequence": 17,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Concessional Code"
- }
- }
- },
- {
- "FieldName": "Concessional Form No.",
- "Sequence": 37,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Certificate No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Account No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Deductee PAN No.",
- "Sequence": 18,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "PAN No."
- }
- }
- },
- {
- "FieldName": "Invoice Amount",
- "Sequence": 25,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- },
- {
- "FieldName": "Posting Date",
- "Sequence": 3,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- },
- {
- "FieldName": "Document Type",
- "Sequence": 26,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FieldName": "Document No.",
- "Sequence": 2,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "Posted Document No."
- }
- }
- },
- {
- "FieldName": "Account Type",
- "Sequence": 23,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "G/L Account"
- }
- },
- {
- "FieldName": "Account No.",
- "Sequence": 24,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Posting Date"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Source Code",
- "Sequence": 28,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Source Code"
- }
- }
- },
- {
- "FieldName": "TDS Amount Including Surcharge",
- "Sequence": 22,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSurcharge"
- }
- }
- },
- {
- "FieldName": "Bal. TDS Including SHE CESS",
- "Sequence": 29,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Include GST in TDS Base",
- "Sequence": 47,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Include GST in TDS Base"
- }
- }
- },
- {
- "FieldName": "Applied",
- "Sequence": 48,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "Applied"
- }
- }
- },
- {
- "FieldName": "Remaining Surcharge Amount",
- "Sequence": 31,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Remaining TDS Amount",
- "Sequence": 42,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Line Amount",
- "Sequence": 43,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "FieldName": "Total TDS Including SHE CESS",
- "Sequence": 21,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Per Contract",
- "Sequence": 39,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PerContract"
- }
- }
- },
- {
- "FieldName": "User ID",
- "Sequence": 30,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Database",
- "DatabaseVariableName": "UserId"
- }
- }
- },
- {
- "FieldName": "Transaction No.",
- "Sequence": 38,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry Transaction No."
- }
- }
- },
- {
- "FieldName": "Original TDS Base Amount",
- "Sequence": 27,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "Payment Amount",
- "Sequence": 40,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
- }
- }
- },
- {
- "FieldName": "Currency Code",
- "Sequence": 45,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Code"
- }
- }
- },
- {
- "FieldName": "Currency Factor",
- "Sequence": 46,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Gen. Journal Line",
- "FieldName": "Currency Factor"
- }
- }
- },
- {
- "FieldName": "Surcharge Base Amount",
- "Sequence": 44,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "G/L Entry No.",
- "Sequence": 1,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry No."
- }
- }
- }
- ]
- }
- }
- ]
+ ]
}
+ }
]
- }
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/3EFD6FE9-72B2-427F-A254-C36E7CA61D6D.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/3EFD6FE9-72B2-427F-A254-C36E7CA61D6D.json
new file mode 100644
index 0000000000..cdec4574b5
--- /dev/null
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/3EFD6FE9-72B2-427F-A254-C36E7CA61D6D.json
@@ -0,0 +1,7278 @@
+[
+ {
+ "CaseID": "{3EFD6FE9-72B2-427F-A254-C36E7CA61D6D}",
+ "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes with certificate value\n",
+ "Version": 1,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Purchase Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
+ "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
+ "PresentationOrder": 573,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "Concessional Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "TDS Concessional Code",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Start Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "End Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Assessee Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountTillThisLine",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Is Less Than",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCYExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCYExclThisLine"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCYExclThisLine",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountTillThisLine",
+ "Expression": "PositiveAmountExclThisLine+Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountExclThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "PositiveAmountTillThisLine-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountTillThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCYExclThisLine"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "TotalInvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithoutTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineTDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalGSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "QtyFactor",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyToInvoice",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQuantity",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyFactor",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "QtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Qty. to Invoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Quantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "QtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "LOOPTHROUGHRECORDS",
+ "Activity": {
+ "TableName": "Purchase Line",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Bus. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Bus. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Prod. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Prod. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Dimension Set ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Dimension Set ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ],
+ "LoopThroughRecordFields": [
+ {
+ "FieldName": "Line No.",
+ "VariableName": "LineNo",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Quantity",
+ "VariableName": "LineQuantity",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Qty. to Invoice",
+ "VariableName": "LineQtyToInvoice",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Amount",
+ "VariableName": "LineAmount",
+ "CalculateSum": false
+ }
+ ],
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineNo"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineQtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyToInvoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQuantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineAmt",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "LineTDSAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Amount",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineTDSAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithoutTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalGSTAmt",
+ "Expression": "TotalGSTAmt+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+TotalGSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Order"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "No"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Greater Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Used Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "End Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ],
+ "Sorting": [
+ {
+ "FieldName": "Concessional Code"
+ },
+ {
+ "FieldName": "Section"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Nature of Remittance",
+ "Sequence": 19,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Nature of Remittance"
+ }
+ }
+ },
+ {
+ "FieldName": "Act Applicable",
+ "Sequence": 20,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Act Applicable"
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "PURCHASES"
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSHECess"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "Party Account No.",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 41,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/430D7BC2-7F79-4B77-A16C-63C758DA1FD0.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/430D7BC2-7F79-4B77-A16C-63C758DA1FD0.json
new file mode 100644
index 0000000000..393fe939c6
--- /dev/null
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/430D7BC2-7F79-4B77-A16C-63C758DA1FD0.json
@@ -0,0 +1,7122 @@
+[
+ {
+ "CaseID": "{430D7BC2-7F79-4B77-A16C-63C758DA1FD0}",
+ "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes certificate value exceeded\n",
+ "Version": 1,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Purchase Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
+ "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
+ "PresentationOrder": 569,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "Assessee Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountTillThisLine",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Is Less Than",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCYExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCYExclThisLine"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCYExclThisLine",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountTillThisLine",
+ "Expression": "PositiveAmountExclThisLine+Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountExclThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "PositiveAmountTillThisLine-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountTillThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCYExclThisLine"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "TotalInvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithoutTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineTDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalGSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "QtyFactor",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyToInvoice",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQuantity",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyFactor",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "QtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Qty. to Invoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Quantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "QtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "LOOPTHROUGHRECORDS",
+ "Activity": {
+ "TableName": "Purchase Line",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Bus. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Bus. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Gen. Prod. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Prod. Posting Group"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Dimension Set ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Dimension Set ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ],
+ "LoopThroughRecordFields": [
+ {
+ "FieldName": "Line No.",
+ "VariableName": "LineNo",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Quantity",
+ "VariableName": "LineQuantity",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Qty. to Invoice",
+ "VariableName": "LineQtyToInvoice",
+ "CalculateSum": false
+ },
+ {
+ "FieldName": "Amount",
+ "VariableName": "LineAmount",
+ "CalculateSum": false
+ }
+ ],
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineNo"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineQtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyToInvoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQuantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineAmt",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "LineTDSAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Amount",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineTDSAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithoutTDS"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalGSTAmt",
+ "Expression": "TotalGSTAmt+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+TotalGSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Order"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "No"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Used Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Remaining Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Nature of Remittance",
+ "Sequence": 19,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Nature of Remittance"
+ }
+ }
+ },
+ {
+ "FieldName": "Act Applicable",
+ "Sequence": 20,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Act Applicable"
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "PURCHASES"
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSHECess"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "Party Account No.",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 41,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/5F2E69B7-0288-468A-83C8-D6A2AF993782.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/5F2E69B7-0288-468A-83C8-D6A2AF993782.json
new file mode 100644
index 0000000000..4704fab984
--- /dev/null
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/5F2E69B7-0288-468A-83C8-D6A2AF993782.json
@@ -0,0 +1,5564 @@
+[
+ {
+ "CaseID": "{5F2E69B7-0288-468A-83C8-D6A2AF993782}",
+ "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes With Certificate Value\n",
+ "Version": 1,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Gen. Journal Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
+ "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
+ "PresentationOrder": 944,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Concessional Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "TDS Concessional Code",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmount",
+ "Expression": "0-Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountLCY",
+ "Expression": "0-AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "InvoiceAmount",
+ "Expression": "0-InvoiceAmount",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjsusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AdjustedInvAmount",
+ "Expression": "0-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Payment Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchPaymentAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Invoice Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Batch amount including Current Line Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "BatchAmountLCY",
+ "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchPaymentAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Posting to G/L"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmountLCY",
+ "Expression": "PostedAmountLCY+BatchAmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "BatchAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmount",
+ "Expression": "0-GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "VendorNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalAmtLCY",
+ "Expression": "0-{Amt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Threshold Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Bal. Account No."
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "({TDSAmt}+{SurchargeAmt})*{SheCessPer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{SheCessPer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{SurchargeAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDS+Surcharge+eCess+SheCess",
+ "Tokens": [
+ {
+ "TokenName": "eCess",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SheCess",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "Surcharge",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDS",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "{TDSAmt}*{SurchargePer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{SurchargePer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "{TDSBaseAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{TDSBaseAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "({TDSAmt}+{SurchargeAmt})*{EcessPer}/100",
+ "Tokens": [
+ {
+ "TokenName": "{EcessPer}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SurchargeAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDSAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "System-Created Entry"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Greater Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Used Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "End Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "VendorNo"
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Source Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Include GST in TDS Base",
+ "Sequence": 47,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 48,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Payment Amount",
+ "Sequence": 40,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Code",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Factor",
+ "Sequence": 46,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/CC412FD1-030F-4F28-BBDC-46F25D2B7BF3.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/CC412FD1-030F-4F28-BBDC-46F25D2B7BF3.json
new file mode 100644
index 0000000000..8eaeaf90a9
--- /dev/null
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/CC412FD1-030F-4F28-BBDC-46F25D2B7BF3.json
@@ -0,0 +1,6066 @@
+[
+ {
+ "CaseID": "{CC412FD1-030F-4F28-BBDC-46F25D2B7BF3}",
+ "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes when Posting date is greater then end date\n",
+ "Version": 1,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Gen. Journal Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
+ "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
+ "PresentationOrder": 942,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmount",
+ "Expression": "0-Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountLCY",
+ "Expression": "0-AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "InvoiceAmount",
+ "Expression": "0-InvoiceAmount",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AdjustedInvAmount",
+ "Expression": "0-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Applied",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Payment Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchPaymentAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Invoice Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Batch amount including Current Line Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "BatchAmountLCY",
+ "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchPaymentAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Posting to G/L"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmountLCY",
+ "Expression": "PostedAmountLCY+BatchAmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "BatchAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Document No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AppliedAmount",
+ "Expression": "0-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmount",
+ "Expression": "0-GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "VendorNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalAmtLCY",
+ "Expression": "0-{Amt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Threshold Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Bal. Account No."
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmt",
+ "Expression": "0-GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "System-Created Entry"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Payment Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "End Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "VendorNo"
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Source Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Include GST in TDS Base",
+ "Sequence": 47,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 48,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Payment Amount",
+ "Sequence": 40,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Code",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Factor",
+ "Sequence": 46,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/E3446842-7BE3-448E-A055-2BBA1A627C6E.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/E3446842-7BE3-448E-A055-2BBA1A627C6E.json
new file mode 100644
index 0000000000..d488322d41
--- /dev/null
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/E3446842-7BE3-448E-A055-2BBA1A627C6E.json
@@ -0,0 +1,6135 @@
+[
+ {
+ "CaseID": "{E3446842-7BE3-448E-A055-2BBA1A627C6E}",
+ "Description": "Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes when certificate value exceed\n",
+ "Version": 1,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Gen. Journal Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source through General Journal for Vendors.\n",
+ "ParentCaseId": "{D0CED206-BE26-47A3-A370-D064D8AFCE44}",
+ "PresentationOrder": 939,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Current Line's amount and amount (LCY) to positive amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmount",
+ "Expression": "0-Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountLCY",
+ "Expression": "0-AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmtExclGST",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount Excl. GST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmtExclGST"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "InvoiceAmount",
+ "Expression": "0-InvoiceAmount",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AdjustedInvAmount",
+ "Expression": "0-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Applied",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Payment Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchPaymentAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Invoice Amount on current batch"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Gen. Journal Line",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Journal Template Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Account No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Journal Batch Name",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "BatchInvoiceAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Batch amount including Current Line Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "BatchAmountLCY",
+ "Expression": "BatchPaymentAmount+BatchInvoiceAmount+AmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "AmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchInvoiceAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "BatchPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchPaymentAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Posting to G/L"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "BatchAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmountLCY",
+ "Expression": "PostedAmountLCY+BatchAmountLCY",
+ "Tokens": [
+ {
+ "TokenName": "BatchAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "BatchAmountLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmountLCY",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": "0"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Document No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Applies-to ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "AppliedAmount",
+ "Expression": "0-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmount",
+ "Expression": "0-GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "VendorNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalAmtLCY",
+ "Expression": "0-{Amt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Constant",
+ "Value": ""
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount (LCY)"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Invoice Amount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ },
+ {
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Threshold Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "VendorNo",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Bal. Account No."
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Gen. Journal Line: {JournalTemplateName},{JournalBatchName},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "JournalBatchName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Batch Name"
+ }
+ }
+ },
+ {
+ "TokenName": "JournalTemplateName",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Journal Template Name"
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount (LCY)",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "GST Setup",
+ "TableFieldName": "GST Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "GSTAmt",
+ "Expression": "0-GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to Doc. No."
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Applies-to ID"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Vendor"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "System-Created Entry"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Payment Overlook",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Used Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Remaining Certificate Value",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "VendorNo"
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Account No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Posting Date"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Source Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Include GST in TDS Base",
+ "Sequence": 47,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Include GST in TDS Base"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 48,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Line Amount",
+ "Sequence": 43,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Payment Amount",
+ "Sequence": 40,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Code",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Currency Factor",
+ "Sequence": 46,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Gen. Journal Line",
+ "FieldName": "Currency Factor"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/.resources/TDSUseCases/f8bf58d9-7681-458d-9dfc-71ea23a9f853.json b/Apps/IN/INTDS/app/.resources/TDSUseCases/f8bf58d9-7681-458d-9dfc-71ea23a9f853.json
index 2cf2fd442e..18f1064512 100644
--- a/Apps/IN/INTDS/app/.resources/TDSUseCases/f8bf58d9-7681-458d-9dfc-71ea23a9f853.json
+++ b/Apps/IN/INTDS/app/.resources/TDSUseCases/f8bf58d9-7681-458d-9dfc-71ea23a9f853.json
@@ -1,6721 +1,6721 @@
[
- {
- "CaseID": "{F8BF58D9-7681-458D-9DFC-71EA23A9F853}",
- "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified with Concessional Codes and Posting Date is greater than Start Date\n",
- "Version": 3,
- "MinorVersion": 0,
- "TaxType": "TDS",
- "ChangedBy": "Microsoft",
- "Code": "",
- "TaxEntity": "Purchase Line",
- "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
- "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
- "PresentationOrder": 565,
- "Indent": 1,
- "PostingTableName": "TDS Posting Setup",
- "PostingTableFilters": [
- {
- "FiterFieldName": "TDS Section",
+ {
+ "CaseID": "{F8BF58D9-7681-458D-9DFC-71EA23A9F853}",
+ "Description": "Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified with Concessional Codes and Posting Date is greater than Start Date\n",
+ "Version": 4,
+ "MinorVersion": 0,
+ "TaxType": "TDS",
+ "ChangedBy": "Microsoft",
+ "Code": "",
+ "TaxEntity": "Purchase Line",
+ "ParentUseCase": "Calculation of Tax Deduction at Source on Vendor Invoice (through Purchase Order/Purchase Invoice).\n",
+ "ParentCaseId": "{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}",
+ "PresentationOrder": 570,
+ "Indent": 1,
+ "PostingTableName": "TDS Posting Setup",
+ "PostingTableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
"FilterType": "Equals",
"FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "Attributes": [
+ {
+ "Name": "PAN No.",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "Name": "Assessee Code",
+ "When": [
+ {
+ "ValueType": "Relation",
+ "Sequence": 0,
+ "Relation": {
+ "IsCurrentRecord": false,
+ "TableName": "Vendor",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
+ ]
}
- ],
- "Attributes": [
- {
- "Name": "PAN No.",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
+ }
+ ]
+ }
+ ],
+ "RateColumns": [
+ {
+ "Name": "Effective Date",
+ "When": [
+ {
+ "ValueType": "Lookup",
+ "Sequence": 0,
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "ComputationVariables": [
+ {
+ "Name": "TotalAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSTaxableAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PrevInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreviousContractAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContractLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PreSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalSurchargeBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSBaseAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveTotalCurrAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalTaxableInvAmtWOContract",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchPaymentAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "BatchInvoiceAmountLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmtExclGST",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TaxableAmountExclApplied",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TransactionNo",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AdjustedInvAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmountLCYExclThisLine",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PositiveAmountTillThisLine",
+ "Datatype": "Number"
+ }
+ ],
+ "ComputationScript": [
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Created string for current financial year"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
- },
- {
- "Name": "Assessee Code",
- "When": [
- {
- "ValueType": "Relation",
- "Sequence": 0,
- "Relation": {
- "IsCurrentRecord": false,
- "TableName": "Vendor",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
}
- ],
- "RateColumns": [
- {
- "Name": "Effective Date",
- "When": [
- {
- "ValueType": "Lookup",
- "Sequence": 0,
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
}
- ],
- "ComputationVariables": [
- {
- "Name": "TotalAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TDSTaxableAmount",
- "Datatype": "Number"
- },
- {
- "Name": "SurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PrevInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PreviousContractAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContractLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "PreSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalSurchargeBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TDSBaseAmt",
- "Datatype": "Number"
- },
- {
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
- },
- {
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
- },
- {
- "Name": "AccountingDateFilter",
- "Datatype": "String"
- },
- {
- "Name": "TotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveTotalCurrAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "AppliedAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "TotalTaxableInvAmtWOContract",
- "Datatype": "Number"
- },
- {
- "Name": "BatchAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchPaymentAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "BatchInvoiceAmountLCY",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmtExclGST",
- "Datatype": "Number"
- },
- {
- "Name": "TaxableAmountExclApplied",
- "Datatype": "Number"
- },
- {
- "Name": "TransactionNo",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
- },
- {
- "Name": "GSTAmount",
- "Datatype": "Number"
- },
- {
- "Name": "AdjustedInvAmount",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountLCYExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmountLCYExclThisLine",
- "Datatype": "Number"
- },
- {
- "Name": "PositiveAmountTillThisLine",
- "Datatype": "Number"
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
}
- ],
- "ComputationScript": [
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Created string for current financial year"
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Invoice amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
}
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get TDS Adjusted Invoice Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AdjustedInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FiterFieldName": "Adjusted",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted Payment amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PrevInvAmountLCY",
+ "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmount"
}
+ }
},
{
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- }
- ]
+ "TokenName": "PostedPaymentAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmount"
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Invoice amount"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreviousContractAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Per Contract",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Posted amount without contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmtWOContractLCY",
+ "Expression": "TotalPostedAmount-PostedContractAmount",
+ "Tokens": [
+ {
+ "TokenName": "PostedContractAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
+ "TokenName": "TotalPostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Converted Amount from LCY to FCY"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get TDS Adjusted Invoice Amount"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Line No.",
+ "FilterType": "Is Less Than",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AdjustedInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FiterFieldName": "Adjusted",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
- }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Total posted Payment amount"
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
- }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Sum of posted payment and invoice amount"
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PrevInvAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PrevInvAmountLCY",
- "Expression": "PostedInvoiceAmount+PostedPaymentAmount",
- "Tokens": [
- {
- "TokenName": "PostedInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmount"
- }
- }
- },
- {
- "TokenName": "PostedPaymentAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmount"
- }
- }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "PositiveAmountLCY",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Currency Factor",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
]
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total posted contract amount"
+ "OutputVariableName": "TotalInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
}
- },
- {
+ },
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "PreviousContractAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Per Contract",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
+ "OutputVariableName": "TotalInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmtWOContractLCY"
}
+ }
}
- },
- {
- "ActivityType": "COMMENT",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total Posted amount without contract amount"
+ "OutputVariableName": "PrevInvAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ }
}
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "VariableName": "TotalInvAmtWOContractLCY",
- "Expression": "TotalPostedAmount-PostedContractAmount",
- "Tokens": [
- {
- "TokenName": "PostedContractAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "TotalPostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- ]
+ "OutputVariableName": "PositiveAmountLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
}
- },
- {
- "ActivityType": "NUMBERCALCULATION",
+ },
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "TotalInvAmountLCY",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
+ "OutputVariableName": "PositiveAmountLCYExclThisLine",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCY",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCYExclThisLine"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvAmountLCYExclThisLine",
+ "Operator": "Minus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get applied amount"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Purchase Line",
- "FieldName": "Amount"
+ "FieldName": "Document No."
+ }
}
- }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Payment"
}
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Converted Amount from LCY to FCY"
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "TDS Base Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
"TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Transaction No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Transaction No.",
+ "Method": "First",
"TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. Type",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Purchase Line",
"FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Purchase Line",
"FieldName": "Document No."
+ }
}
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
+ }
+ ]
+ }
}
- ]
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountExclThisLine",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Purchase Line",
"FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
"SourceType": "Current Record",
"TableName": "Purchase Line",
"FieldName": "Document No."
+ }
}
- }
- },
- {
- "FiterFieldName": "Line No.",
- "FilterType": "Is Less Than",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
}
+ }
]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Get GST Amount"
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
}
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "",
+ "TableFieldName": "",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "Amount+GSTAmount-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "PositiveAmountTillThisLine",
+ "Expression": "PositiveAmountExclThisLine+Amount",
+ "Tokens": [
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountExclThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountExclThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "Operator": "Multiply By",
- "LHS": {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TaxableAmountExclApplied",
+ "Expression": "PositiveAmountTillThisLine-AppliedAmount",
+ "Tokens": [
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PositiveAmountTillThisLine",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountTillThisLine"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
- },
- "RHS": {
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
}
+ }
}
- }
+ }
+ ]
+ }
},
{
- "ActivityType": "NUMBERCALCULATION",
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "Operator": "Divided By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Currency Factor",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvAmtWOContract",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmtWOContractLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PrevInvAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PositiveAmountLCYExclThisLine",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountExclThisLine"
- }
- }
- }
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
]
+ }
}
+ }
+ ]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TaxableAmountExclApplied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmount",
+ "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
},
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCY",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Total Taxable Amount excluding posted contract amount"
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalTaxableInvAmtWOContract",
+ "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
+ "Tokens": [
+ {
+ "TokenName": "AdjustedInvAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AdjustedInvAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "Amount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "AppliedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "ContractAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreviousContractAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "GSTAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "PostedAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalTaxableInvAmtWOContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "COMMENT",
+ "Activity": {
+ "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
}
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCYExclThisLine"
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
}
- }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "false"
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvAmountLCYExclThisLine",
- "Operator": "Minus",
- "LHS": {
- "Type": "Lookup",
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than Or Equals To",
+ "LHS": {
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
}
- },
- "RHS": {
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get applied amount"
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. Type",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Payment"
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
}
+ ]
},
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
"Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
+ "SourceType": "Variable",
+ "VariableName": "TotalTaxableInvAmtWOContract"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
{
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ }
]
+ }
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ ]
}
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "TDS Base Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Transaction No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Transaction No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. Type",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Get GST Amount"
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
+ "SourceType": "Variable",
+ "VariableName": "PositiveAmountLCY"
}
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
}
+ }
}
+ ]
},
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
}
+ }
}
- }
- ]
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "",
- "TableFieldName": "",
- "Method": "First",
- "TableFilters": []
- }
- }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
}
- ]
+ }
+ }
+ ]
}
+ }
}
+ ]
}
+ }
}
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
}
+ ]
},
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
+ {
+ "ActivityType": "IFSTATEMENT",
"Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "Amount+GSTAmount-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCYExclThisLine"
+ }
},
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
}
+ }
]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "PositiveAmountTillThisLine",
- "Expression": "PositiveAmountExclThisLine+Amount",
- "Tokens": [
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
}
+ ]
},
- {
- "TokenName": "PositiveAmountExclThisLine",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountExclThisLine"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
"SourceType": "Variable",
- "VariableName": "AppliedAmount"
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
}
+ ]
}
+ }
]
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
"Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
"Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountTillThisLine"
- }
- }
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
},
"Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TaxableAmountExclApplied",
- "Expression": "PositiveAmountTillThisLine-AppliedAmount",
- "Tokens": [
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "PositiveAmountTillThisLine",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountTillThisLine"
- }
- }
- }
- ]
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
}
- },
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- }
- }
- ]
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AppliedAmount"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Calc. Over & Above Threshold"
}
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "1"
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSTaxableAmount",
+ "Expression": "TDSTaxableAmount-TDSThresholdAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ },
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
+ "TokenName": "TDSThresholdAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
- ]
- }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
}
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
}
+ }
]
+ }
}
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TaxableAmountExclApplied",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
+ }
]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
}
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total Taxable Amount"
+ "OutputVariableName": "TDSTaxableAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TaxableAmountExclApplied"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSAmount",
+ "Expression": "TDSTaxableAmt*TDSPer/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPer",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmount",
- "Expression": "(PostedAmount+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
+ "TokenName": "TDSTaxableAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PreSurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Surcharge Base Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalSurchargeBaseAmt",
+ "Expression": "PreSurchargeBaseAmt+TDSAmount",
+ "Tokens": [
+ {
+ "TokenName": "PreSurchargeBaseAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PreSurchargeBaseAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Surcharge Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "true"
}
- },
+ }
+ ]
+ },
+ "Body": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PrevInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmountLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Surcharge Threshold Amount"
+ }
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalSurchargeBaseAmt"
+ }
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "TotalTaxableInvAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
}
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
}
- ]
+ }
+ }
+ ]
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
- "ActivityType": "COMMENT",
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
"Activity": {
- "Comment": "Total Taxable Amount excluding posted contract amount"
+ "OutputVariableName": "SurchargeBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TDSBaseAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSTaxableAmount"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "PostingVariables": [
+ {
+ "Name": "TDSIncludingSHECess",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TDSIncludingSurcharge",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PaymentAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalAmtLCY",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "PerContract",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "PaymentAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "InvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "FiscalYearStartDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "FiscalYearEndDate",
+ "Datatype": "Date"
+ },
+ {
+ "Name": "AccountingDateFilter",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TDSPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SurchargePer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "ECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "SHECessPer",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "AppliedAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "Applied",
+ "Datatype": "Boolean"
+ },
+ {
+ "Name": "TotalInvoiceAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "RecID",
+ "Datatype": "String"
+ },
+ {
+ "Name": "GSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineNo",
+ "Datatype": "String"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalInvoiceAmountWithoutTDS",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineTDSAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "TotalGSTAmt",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "QtyFactor",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyFactor",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineAmount",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQtyToInvoice",
+ "Datatype": "Number"
+ },
+ {
+ "Name": "LineQuantity",
+ "Datatype": "Number"
+ }
+ ],
+ "PostingScript": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "QtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Qty. to Invoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Quantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSHECess",
+ "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
+ "Tokens": [
+ {
+ "TokenName": "{eCESS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalTaxableInvAmtWOContract",
- "Expression": "((PostedAmount-ContractAmt)+Amount+GSTAmount)-AppliedAmount-AdjustedInvAmount",
- "Tokens": [
- {
- "TokenName": "AdjustedInvAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AdjustedInvAmount"
- }
- }
- },
- {
- "TokenName": "Amount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "AppliedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- }
- },
- {
- "TokenName": "ContractAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreviousContractAmount"
- }
- }
- },
- {
- "TokenName": "GSTAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmount"
- }
- }
- },
- {
- "TokenName": "PostedAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmount"
- }
- }
- }
- ]
+ "TokenName": "{SHECess}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalTaxableInvAmtWOContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "COMMENT",
- "Activity": {
- "Comment": "Condition to calculate TDS Amount considering Threshold limit"
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TDSIncludingSurcharge",
+ "Expression": "{TDS}+{Surcharge}",
+ "Tokens": [
+ {
+ "TokenName": "{Surcharge}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- },
- "Body": [
+ "TokenName": "{TDS}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Starting Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalTaxableInvAmtWOContract"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PositiveAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCYExclThisLine"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AppliedAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Calc. Over & Above Threshold"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "1"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSTaxableAmount",
- "Expression": "TDSTaxableAmount-TDSThresholdAmount",
- "Tokens": [
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- }
- },
- {
- "TokenName": "TDSThresholdAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
- }
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
}
+ }
}
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSTaxableAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TaxableAmountExclApplied"
- }
- }
- }
- }
- ]
+ ]
}
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSAmount",
- "Expression": "TDSTaxableAmt*TDSPer/100",
- "Tokens": [
+ }
+ },
+ {
+ "FiterFieldName": "Starting Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "TDSPer",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "TokenName": "TDSTaxableAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearStartDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
}
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PreSurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Surcharge Base Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- }
- ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Accounting Period",
+ "TableFieldName": "Ending Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Type Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Type",
+ "TableFieldName": "Accounting Period",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
}
+ ]
}
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalSurchargeBaseAmt",
- "Expression": "PreSurchargeBaseAmt+TDSAmount",
- "Tokens": [
+ }
+ },
+ {
+ "FiterFieldName": "New Fiscal Year",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Closed",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "false"
+ }
+ },
+ {
+ "FiterFieldName": "Ending Date",
+ "FilterType": "Is Greater Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "TokenName": "PreSurchargeBaseAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PreSurchargeBaseAmt"
- }
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "FiscalYearEndDate",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
]
+ }
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "AccountingDateFilter",
+ "Expression": "{StartDate}..{EndDate}",
+ "Token": [
+ {
+ "TokenName": "EndDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearStartDate"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Surcharge Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PrevInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmountLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Surcharge Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalSurchargeBaseAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
- }
- ]
- }
+ "TokenName": "StartDate",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "FiscalYearEndDate"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "InvoiceAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Invoice Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PaymentAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Entry",
+ "TableFieldName": "Payment Amount",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Assessee Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Posting Date",
+ "FilterType": "CAL Filter",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "AccountingDateFilter"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "Payment"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "AppliedAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor Ledger Entry",
+ "TableFieldName": "Amount to Apply",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
+ }
},
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "SurchargeBaseAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSAmount"
- }
- }
- }
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
- ]
+ }
+ }
+ ]
}
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "InvoiceAmt+PaymentAmt",
+ "Tokens": [
+ {
+ "TokenName": "InvoiceAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "InvoiceAmt"
}
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
+ "TokenName": "PaymentAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PaymentAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvAmt",
+ "Expression": "{Amt}+{InvAmt}",
+ "Tokens": [
+ {
+ "TokenName": "{Amt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Amount"
+ }
+ }
+ },
+ {
+ "TokenName": "{InvAmt}",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalAmtLCY",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "",
+ "Method": "Exist",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Pay-to Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Threshold Overlook",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
"Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
]
- },
- "Body": [
+ },
+ "Body": [
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TDSBaseAmt",
- "OutputValue": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Less Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvAmt"
+ }
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSTaxableAmount"
+ "SourceType": "Column",
+ "RateColumnName": "TDS Threshold Amount"
}
+ }
}
- }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalAmtLCY"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Column",
+ "RateColumnName": "Per Contract Value"
+ }
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "PerContract",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
}
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "Applied",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "true"
}
+ }
}
- ],
- "PostingVariables": [
- {
- "Name": "TDSIncludingSHECess",
- "Datatype": "Number"
- },
- {
- "Name": "TDSIncludingSurcharge",
- "Datatype": "Number"
- },
- {
- "Name": "InvoiceAmt",
- "Datatype": "Number"
- },
- {
- "Name": "PaymentAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalAmtLCY",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvAmt",
- "Datatype": "Number"
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Line",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "QtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
},
{
- "Name": "PerContract",
- "Datatype": "Boolean"
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
},
{
- "Name": "PaymentAmount",
- "Datatype": "Number"
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Line No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "LOOPTHROUGHRECORDS",
+ "Activity": {
+ "TableName": "Purchase Line",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
},
{
- "Name": "InvoiceAmount",
- "Datatype": "Number"
+ "FiterFieldName": "Document No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
},
{
- "Name": "FiscalYearStartDate",
- "Datatype": "Date"
+ "FiterFieldName": "Gen. Bus. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Bus. Posting Group"
+ }
+ }
},
{
- "Name": "FiscalYearEndDate",
- "Datatype": "Date"
+ "FiterFieldName": "Gen. Prod. Posting Group",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Gen. Prod. Posting Group"
+ }
+ }
},
{
- "Name": "AccountingDateFilter",
- "Datatype": "String"
+ "FiterFieldName": "Dimension Set ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Dimension Set ID"
+ }
+ }
},
{
- "Name": "TDSPer",
- "Datatype": "Number"
- },
+ "FiterFieldName": "TDS Section Code",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ],
+ "LoopThroughRecordFields": [
{
- "Name": "SurchargePer",
- "Datatype": "Number"
+ "FieldName": "Line No.",
+ "VariableName": "LineNo",
+ "CalculateSum": false
},
{
- "Name": "ECessPer",
- "Datatype": "Number"
+ "FieldName": "Quantity",
+ "VariableName": "LineQuantity",
+ "CalculateSum": false
},
{
- "Name": "SHECessPer",
- "Datatype": "Number"
+ "FieldName": "Qty. to Invoice",
+ "VariableName": "LineQtyToInvoice",
+ "CalculateSum": false
},
{
- "Name": "AppliedAmount",
- "Datatype": "Number"
- },
- {
- "Name": "LineAmount",
- "Datatype": "Number"
- },
- {
- "Name": "Applied",
- "Datatype": "Boolean"
- },
- {
- "Name": "TotalInvoiceAmount",
- "Datatype": "Number"
- },
- {
- "Name": "RecID",
- "Datatype": "String"
- },
- {
- "Name": "GSTAmt",
- "Datatype": "Number"
- },
- {
- "Name": "LineNo",
- "Datatype": "String"
- },
- {
- "Name": "TotalInvoiceAmountWithTDS",
- "Datatype": "Number"
- },
- {
- "Name": "TotalInvoiceAmountWithoutTDS",
- "Datatype": "Number"
- },
- {
- "Name": "LineTDSAmount",
- "Datatype": "Number"
- },
- {
- "Name": "LineAmt",
- "Datatype": "Number"
- },
- {
- "Name": "TotalGSTAmt",
- "Datatype": "Number"
- },
- {
- "Name": "QtyFactor",
- "Datatype": "Number"
- },
- {
- "Name": "LineQtyFactor",
- "Datatype": "Number"
- },
- {
- "Name": "LineAmount",
- "Datatype": "Number"
- },
- {
- "Name": "LineQtyToInvoice",
- "Datatype": "Number"
- },
- {
- "Name": "LineQuantity",
- "Datatype": "Number"
+ "FieldName": "Amount",
+ "VariableName": "LineAmount",
+ "CalculateSum": false
}
- ],
- "PostingScript": [
+ ],
+ "Body": [
+ {
+ "ActivityType": "STRINGEXPRESSION",
+ "Activity": {
+ "OutputVariableName": "RecID",
+ "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
+ "Token": [
+ {
+ "TokenName": "DocType",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "TokenName": "DocumentNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ },
+ {
+ "TokenName": "LineNo",
+ "FormatString": "",
+ "LookupVariableName": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineNo"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineQtyFactor",
+ "Operator": "Divided By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyToInvoice"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQuantity"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "LineAmt",
+ "Operator": "Multiply By",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineQtyFactor"
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "LineTDSAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Tax Transaction Value",
+ "TableFieldName": "Amount",
+ "Method": "Sum",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Tax Record ID",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "RecID"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Value Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "COMPONENT"
+ }
+ },
+ {
+ "FiterFieldName": "Percent",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Amount",
+ "FilterType": "Not Equals",
+ "FilterValue": {
+ "Type": "Constant",
+ "Value": "0"
+ }
+ },
+ {
+ "FiterFieldName": "Tax Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Setup",
+ "TableFieldName": "Tax Type",
+ "Method": "First",
+ "TableFilters": []
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
{
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "QtyFactor",
- "Operator": "Divided By",
- "LHS": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineTDSAmount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithTDS",
+ "Operator": "Plus",
+ "LHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Qty. to Invoice"
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithTDS"
}
- },
- "RHS": {
+ },
+ "RHS": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Quantity"
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
}
+ }
}
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSHECess",
- "Expression": "{TDS}+{Surcharge}+{eCESS}+{SHECess}",
- "Tokens": [
- {
- "TokenName": "{eCESS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "{SHECess}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
+ },
+ "Body": [
+ {
+ "ActivityType": "NUMBERCALCULATION",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
+ "Operator": "Plus",
+ "LHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithoutTDS"
+ }
},
- {
- "TokenName": "{TDS}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "LineAmt"
+ }
}
- ]
+ }
+ }
+ ]
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TDSIncludingSurcharge",
- "Expression": "{TDS}+{Surcharge}",
- "Tokens": [
- {
- "TokenName": "{Surcharge}",
- "TokenValue": {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Include GST in TDS Base",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
- }
- },
- {
- "TokenName": "{TDS}",
- "TokenValue": {
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
"Type": "Lookup",
"Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
+ ]
}
- ]
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "GSTAmt",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalGSTAmt",
+ "Expression": "TotalGSTAmt+GSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "GSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "GSTAmt"
+ }
+ }
+ },
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithTDS"
+ }
}
+ }
+ }
+ ],
+ "ElseIf": {
+ "Condition": {
+ "Body": []
},
- {
+ "Body": [
+ {
"ActivityType": "SETVARIABLE",
"Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Starting Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "Starting Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- }
- ]
- }
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmountWithoutTDS"
}
+ }
}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "ActivityType": "NUMERICEXPRESSION",
+ "Activity": {
+ "VariableName": "TotalInvoiceAmount",
+ "Expression": "TotalInvoiceAmount+TotalGSTAmt",
+ "Tokens": [
+ {
+ "TokenName": "TotalGSTAmt",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalGSTAmt"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearStartDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
+ "TokenName": "TotalInvoiceAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ActivityType": "IFSTATEMENT",
+ "Activity": {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to Doc. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Applies-to ID",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
}
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
}
+ }
+ ]
+ },
+ "Body": [
+ {
+ "ActivityType": "SETVARIABLE",
+ "Activity": {
+ "OutputVariableName": "TotalInvoiceAmount",
+ "OutputValue": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Components": [
+ {
+ "ComponentName": "TDS Base Amount",
+ "Sequence": 6,
+ "Formula": {
+ "VariableName": "TDS Base Amount",
+ "Expression": "TDSBaseAmount",
+ "Tokens": [
+ {
+ "TokenName": "TDSBaseAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "TDS",
+ "Sequence": 1,
+ "Formula": {
+ "VariableName": "TDS",
+ "Expression": "TDSTaxableAmount*TDSPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "TDSPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Accounting Period",
- "TableFieldName": "Ending Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Type Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Type",
- "TableFieldName": "Accounting Period",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- },
- {
- "FiterFieldName": "New Fiscal Year",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Closed",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "false"
- }
- },
- {
- "FiterFieldName": "Ending Date",
- "FilterType": "Is Greater Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
+ "TokenName": "TDSTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSBaseAmt"
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "FiscalYearEndDate",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- }
- ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "eCESS",
+ "Sequence": 3,
+ "Formula": {
+ "VariableName": "eCESS",
+ "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "EcessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "AccountingDateFilter",
- "Expression": "{StartDate}..{EndDate}",
- "Token": [
- {
- "TokenName": "EndDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearStartDate"
- }
- }
- },
- {
- "TokenName": "StartDate",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "FiscalYearEndDate"
- }
- }
- }
- ]
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "InvoiceAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Invoice Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- }
- ]
- }
- }
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "SHE Cess ",
+ "Sequence": 4,
+ "Formula": {
+ "VariableName": "SHE Cess ",
+ "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SHECessPercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PaymentAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Entry",
- "TableFieldName": "Payment Amount",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Assessee Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FiterFieldName": "Posting Date",
- "FilterType": "CAL Filter",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "AccountingDateFilter"
- }
- }
- },
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "Payment"
- }
- }
- ]
- }
- }
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "AppliedAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor Ledger Entry",
- "TableFieldName": "Amount to Apply",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Total TDS Amount",
+ "Sequence": 5,
+ "Formula": {
+ "VariableName": "Total TDS Amount",
+ "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
+ "Tokens": [
+ {
+ "TokenName": "ECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "InvoiceAmt+PaymentAmt",
- "Tokens": [
- {
- "TokenName": "InvoiceAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "InvoiceAmt"
- }
- }
- },
- {
- "TokenName": "PaymentAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PaymentAmt"
- }
- }
- }
- ]
+ "TokenName": "SHECessAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
}
+ }
},
{
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvAmt",
- "Expression": "{Amt}+{InvAmt}",
- "Tokens": [
- {
- "TokenName": "{Amt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Amount"
- }
- }
- },
- {
- "TokenName": "{InvAmt}",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- }
- }
- ]
+ "TokenName": "SurchargeAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
}
+ }
},
{
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalAmtLCY",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
+ "TokenName": "TDSAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
}
+ }
+ }
+ ]
+ }
+ },
+ {
+ "ComponentName": "Surcharge",
+ "Sequence": 2,
+ "Formula": {
+ "VariableName": "Surcharge",
+ "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
+ "Tokens": [
+ {
+ "TokenName": "SurchargePercent",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
},
{
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "",
- "Method": "Exist",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Pay-to Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Threshold Overlook",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Less Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvAmt"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "TDS Threshold Amount"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalAmtLCY"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Column",
- "RateColumnName": "Per Contract Value"
- }
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "PerContract",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "Applied",
- "OutputValue": {
- "Type": "Constant",
- "Value": "true"
- }
- }
- }
- ]
+ "TokenName": "SurchargeTaxableAmount",
+ "TokenValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "SurchargeBaseAmt"
}
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Line",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "QtyFactor"
- }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Order"
+ }
+ },
+ {
+ "Operator": "or",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. Status",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
}
+ }
}
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": "0"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Line No."
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": " "
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Concessional Code",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
}
- },
- {
- "ActivityType": "LOOPTHROUGHRECORDS",
- "Activity": {
- "TableName": "Purchase Line",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "Document No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "FiterFieldName": "Gen. Bus. Posting Group",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Gen. Bus. Posting Group"
- }
- }
- },
- {
- "FiterFieldName": "Gen. Prod. Posting Group",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Gen. Prod. Posting Group"
- }
- }
- },
- {
- "FiterFieldName": "Dimension Set ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Dimension Set ID"
- }
- }
- },
- {
- "FiterFieldName": "TDS Section Code",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ],
- "LoopThroughRecordFields": [
- {
- "FieldName": "Line No.",
- "VariableName": "LineNo",
- "CalculateSum": false
- },
- {
- "FieldName": "Quantity",
- "VariableName": "LineQuantity",
- "CalculateSum": false
- },
- {
- "FieldName": "Qty. to Invoice",
- "VariableName": "LineQtyToInvoice",
- "CalculateSum": false
- },
- {
- "FieldName": "Amount",
- "VariableName": "LineAmount",
- "CalculateSum": false
- }
- ],
- "Body": [
- {
- "ActivityType": "STRINGEXPRESSION",
- "Activity": {
- "OutputVariableName": "RecID",
- "Expression": "Purchase Line: {DocType},{DocumentNo},{LineNo}",
- "Token": [
- {
- "TokenName": "DocType",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "TokenName": "DocumentNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- },
- {
- "TokenName": "LineNo",
- "FormatString": "",
- "LookupVariableName": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineNo"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "LineQtyFactor",
- "Operator": "Divided By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQtyToInvoice"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQuantity"
- }
- }
- }
- },
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "LineAmt",
- "Operator": "Multiply By",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmount"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineQtyFactor"
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "LineTDSAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Tax Transaction Value",
- "TableFieldName": "Amount",
- "Method": "Sum",
- "TableFilters": [
- {
- "FiterFieldName": "Tax Record ID",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "RecID"
- }
- }
- },
- {
- "FiterFieldName": "Value Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "COMPONENT"
- }
- },
- {
- "FiterFieldName": "Percent",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Amount",
- "FilterType": "Not Equals",
- "FilterValue": {
- "Type": "Constant",
- "Value": "0"
- }
- },
- {
- "FiterFieldName": "Tax Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Setup",
- "TableFieldName": "Tax Type",
- "Method": "First",
- "TableFilters": []
- }
- }
- }
- ]
- }
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineTDSAmount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmountWithTDS",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithTDS"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmt"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "NUMBERCALCULATION",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmountWithoutTDS",
- "Operator": "Plus",
- "LHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithoutTDS"
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "LineAmt"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Include GST in TDS Base",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "GSTAmt",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvoiceAmount",
- "Expression": "TotalInvoiceAmount+GSTAmt",
- "Tokens": [
- {
- "TokenName": "GSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalGSTAmt",
- "Expression": "TotalGSTAmt+GSTAmt",
- "Tokens": [
- {
- "TokenName": "GSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "GSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalGSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalGSTAmt"
- }
- }
- }
- ]
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Is Greater Than",
- "LHS": {
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithTDS"
- }
- }
- }
- }
- ],
- "ElseIf": {
- "Condition": {
- "Body": []
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "OutputValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmountWithoutTDS"
- }
- }
- }
- }
- ]
- }
- }
- },
- {
- "ActivityType": "NUMERICEXPRESSION",
- "Activity": {
- "VariableName": "TotalInvoiceAmount",
- "Expression": "TotalInvoiceAmount+TotalGSTAmt",
- "Tokens": [
- {
- "TokenName": "TotalGSTAmt",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalGSTAmt"
- }
- }
- },
- {
- "TokenName": "TotalInvoiceAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- }
- ]
- }
- },
- {
- "ActivityType": "IFSTATEMENT",
- "Activity": {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to Doc. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Applies-to ID",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "Body": [
- {
- "ActivityType": "SETVARIABLE",
- "Activity": {
- "OutputVariableName": "TotalInvoiceAmount",
- "OutputValue": {
- "Type": "Constant",
- "Value": ""
- }
- }
- }
- ]
- }
- }
- ],
- "Components": [
- {
- "ComponentName": "TDS",
- "Sequence": 1,
- "Formula": {
- "VariableName": "TDS",
- "Expression": "TDSTaxableAmount*TDSPercent/100",
- "Tokens": [
- {
- "TokenName": "TDSPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "TokenName": "TDSTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "TDS Base Amount",
- "Sequence": 6,
- "Formula": {
- "VariableName": "TDS Base Amount",
- "Expression": "TDSBaseAmount",
- "Tokens": [
- {
- "TokenName": "TDSBaseAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSBaseAmt"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "SHE Cess ",
- "Sequence": 4,
- "Formula": {
- "VariableName": "SHE Cess ",
- "Expression": "(TDSAmount+SurchargeAmount)*SHECessPercent/100",
- "Tokens": [
- {
- "TokenName": "SHECessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Total TDS Amount",
- "Sequence": 5,
- "Formula": {
- "VariableName": "Total TDS Amount",
- "Expression": "TDSAmount+SurchargeAmount+ECessAmount+SHECessAmount",
- "Tokens": [
- {
- "TokenName": "ECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SHECessAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "eCESS",
- "Sequence": 3,
- "Formula": {
- "VariableName": "eCESS",
- "Expression": "(TDSAmount+SurchargeAmount)*EcessPercent/100",
- "Tokens": [
- {
- "TokenName": "EcessPercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "TokenName": "SurchargeAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "TDSAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- }
- ]
- }
- },
- {
- "ComponentName": "Surcharge",
- "Sequence": 2,
- "Formula": {
- "VariableName": "Surcharge",
- "Expression": "SurchargeTaxableAmount*SurchargePercent/100",
- "Tokens": [
- {
- "TokenName": "SurchargePercent",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "TokenName": "SurchargeTaxableAmount",
- "TokenValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "SurchargeBaseAmt"
- }
- }
- }
- ]
- }
- }
- ],
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Order"
- }
- },
- {
- "Operator": "or",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. Status",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": " "
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Concessional Code",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Vendor",
- "TableFieldName": "P.A.N. No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Allowed Sections",
- "TableFieldName": "Non Resident Payments",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": "No"
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Work Tax Nature Of Deduction"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- },
- {
- "Operator": "and",
- "ConditionType": "Is Greater Than Or Equals To",
- "LHS": {
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- },
- "RHS": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "End Date",
- "Method": "Last",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- }
- ]
- }
- }
- }
- ]
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
},
- "TaxPostingSetup": [
- {
- "ComponentName": "Total TDS Amount",
- "TableName": "TDS Posting Setup",
- "AccountSourceType": "Field",
- "FieldName": "TDS Account",
- "AccountingImpact": "Credit",
- "ReverseCharge": false,
- "ReverseAccountSourceType": "Field",
- "ReverseChargeFieldName": "",
- "When": [
- {
- "Condition": {
- "Body": [
- {
- "Operator": " ",
- "ConditionType": "Not Equals",
- "LHS": {
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- },
- "RHS": {
- "Type": "Constant",
- "Value": ""
- }
- }
- ]
- },
- "ValueType": "Insert Record",
- "Sequence": 0,
- "InsertRecord": {
- "TableName": "TDS Entry",
- "RunTrigger": true,
- "SubLedgerGrpBy": "Component",
- "InsertRecordFields": [
- {
- "FieldName": "Vendor No.",
- "Sequence": 4,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FieldName": "T.A.N. No.",
- "Sequence": 5,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "TAN No."
- }
- }
- },
- {
- "FieldName": "Section",
- "Sequence": 6,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FieldName": "Assessee Code",
- "Sequence": 7,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Assessee Code"
- }
- }
- },
- {
- "FieldName": "TDS Base Amount",
- "Sequence": 8,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
- }
- },
- {
- "FieldName": "TDS %",
- "Sequence": 9,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "TDS Amount",
- "Sequence": 10,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "Surcharge %",
- "Sequence": 11,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Surcharge Amount",
- "Sequence": 12,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "eCess %",
- "Sequence": 13,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "eCess Amount",
- "Sequence": 14,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "eCESS"
- }
- }
- },
- {
- "FieldName": "SHE Cess %",
- "Sequence": 15,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component Percent",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "SHE Cess Amount",
- "Sequence": 16,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "SHE Cess "
- }
- }
- },
- {
- "FieldName": "Concessional Code",
- "Sequence": 17,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "Concessional Code"
- }
- }
- },
- {
- "FieldName": "Concessional Form No.",
- "Sequence": 37,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Concessional Code",
- "TableFieldName": "Certificate No.",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Vendor No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Buy-from Vendor No."
- }
- }
- },
- {
- "FiterFieldName": "Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Deductee PAN No.",
- "Sequence": 18,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Tax Attributes",
- "AttributeName": "PAN No."
- }
- }
- },
- {
- "FieldName": "Nature of Remittance",
- "Sequence": 19,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Nature of Remittance"
- }
- }
- },
- {
- "FieldName": "Act Applicable",
- "Sequence": 20,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Act Applicable"
- }
- }
- },
- {
- "FieldName": "Invoice Amount",
- "Sequence": 25,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TotalInvoiceAmount"
- }
- }
- },
- {
- "FieldName": "Posting Date",
- "Sequence": 3,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Document Type",
- "Sequence": 26,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "Invoice"
- }
- },
- {
- "FieldName": "Document No.",
- "Sequence": 2,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "Posted Document No."
- }
- }
- },
- {
- "FieldName": "Account Type",
- "Sequence": 23,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "G/L Account"
- }
- },
- {
- "FieldName": "Account No.",
- "Sequence": 24,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "Source Code",
- "Sequence": 28,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Constant",
- "Value": "PURCHASES"
- }
- },
- {
- "FieldName": "TDS Amount Including Surcharge",
- "Sequence": 22,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSurcharge"
- }
- }
- },
- {
- "FieldName": "Bal. TDS Including SHE CESS",
- "Sequence": 29,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "TDSIncludingSHECess"
- }
- }
- },
- {
- "FieldName": "Applied",
- "Sequence": 44,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "Applied"
- }
- }
- },
- {
- "FieldName": "Remaining Surcharge Amount",
- "Sequence": 31,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Surcharge"
- }
- }
- },
- {
- "FieldName": "Remaining TDS Amount",
- "Sequence": 42,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
- }
- },
- {
- "FieldName": "Total TDS Including SHE CESS",
- "Sequence": 21,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "Total TDS Amount"
- }
- }
- },
- {
- "FieldName": "Per Contract",
- "Sequence": 39,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Variable",
- "VariableName": "PerContract"
- }
- }
- },
- {
- "FieldName": "Party Account No.",
- "Sequence": 45,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "TDS Posting Setup",
- "TableFieldName": "TDS Account",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "TDS Section",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "TDS Section Code"
- }
- }
- },
- {
- "FiterFieldName": "Effective Date",
- "FilterType": "Is Less Than Or Equals To",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Table",
- "TableName": "Purchase Header",
- "TableFieldName": "Posting Date",
- "Method": "First",
- "TableFilters": [
- {
- "FiterFieldName": "Document Type",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document Type"
- }
- }
- },
- {
- "FiterFieldName": "No.",
- "FilterType": "Equals",
- "FilterValue": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Current Record",
- "TableName": "Purchase Line",
- "FieldName": "Document No."
- }
- }
- }
- ]
- }
- }
- }
- ]
- }
- }
- },
- {
- "FieldName": "User ID",
- "Sequence": 30,
- "ReverseSign": false,
- "Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Database",
- "DatabaseVariableName": "UserId"
- }
- }
- },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Vendor",
+ "TableFieldName": "P.A.N. No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Allowed Sections",
+ "TableFieldName": "Non Resident Payments",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": "No"
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Work Tax Nature Of Deduction"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ },
+ {
+ "Operator": "and",
+ "ConditionType": "Is Greater Than",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ },
+ "RHS": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "End Date",
+ "Method": "Last",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "TaxPostingSetup": [
+ {
+ "ComponentName": "Total TDS Amount",
+ "TableName": "TDS Posting Setup",
+ "AccountSourceType": "Field",
+ "FieldName": "TDS Account",
+ "AccountingImpact": "Credit",
+ "ReverseCharge": false,
+ "ReverseAccountSourceType": "Field",
+ "ReverseChargeFieldName": "",
+ "When": [
+ {
+ "Condition": {
+ "Body": [
+ {
+ "Operator": " ",
+ "ConditionType": "Not Equals",
+ "LHS": {
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ },
+ "RHS": {
+ "Type": "Constant",
+ "Value": ""
+ }
+ }
+ ]
+ },
+ "ValueType": "Insert Record",
+ "Sequence": 0,
+ "InsertRecord": {
+ "TableName": "TDS Entry",
+ "RunTrigger": true,
+ "SubLedgerGrpBy": "Component",
+ "InsertRecordFields": [
+ {
+ "FieldName": "Vendor No.",
+ "Sequence": 4,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FieldName": "T.A.N. No.",
+ "Sequence": 5,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "TAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Section",
+ "Sequence": 6,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Assessee Code",
+ "Sequence": 7,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Assessee Code"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Base Amount",
+ "Sequence": 8,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS %",
+ "Sequence": 9,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "TDS Amount",
+ "Sequence": 10,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge %",
+ "Sequence": 11,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Amount",
+ "Sequence": 12,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess %",
+ "Sequence": 13,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "eCess Amount",
+ "Sequence": 14,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "eCESS"
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess %",
+ "Sequence": 15,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component Percent",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "SHE Cess Amount",
+ "Sequence": 16,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "SHE Cess "
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Code",
+ "Sequence": 17,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "Concessional Code"
+ }
+ }
+ },
+ {
+ "FieldName": "Concessional Form No.",
+ "Sequence": 37,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Concessional Code",
+ "TableFieldName": "Certificate No.",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Vendor No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Buy-from Vendor No."
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Deductee PAN No.",
+ "Sequence": 18,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Tax Attributes",
+ "AttributeName": "PAN No."
+ }
+ }
+ },
+ {
+ "FieldName": "Nature of Remittance",
+ "Sequence": 19,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Nature of Remittance"
+ }
+ }
+ },
+ {
+ "FieldName": "Act Applicable",
+ "Sequence": 20,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Act Applicable"
+ }
+ }
+ },
+ {
+ "FieldName": "Invoice Amount",
+ "Sequence": 25,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TotalInvoiceAmount"
+ }
+ }
+ },
+ {
+ "FieldName": "Posting Date",
+ "Sequence": 3,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Document Type",
+ "Sequence": 26,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "Invoice"
+ }
+ },
+ {
+ "FieldName": "Document No.",
+ "Sequence": 2,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "Posted Document No."
+ }
+ }
+ },
+ {
+ "FieldName": "Account Type",
+ "Sequence": 23,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "G/L Account"
+ }
+ },
+ {
+ "FieldName": "Account No.",
+ "Sequence": 24,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "FieldName": "Transaction No.",
- "Sequence": 38,
- "ReverseSign": false,
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry Transaction No."
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "FieldName": "Original TDS Base Amount",
- "Sequence": 27,
- "ReverseSign": false,
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS Base Amount"
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
- },
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "FieldName": "Source Code",
+ "Sequence": 28,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Constant",
+ "Value": "PURCHASES"
+ }
+ },
+ {
+ "FieldName": "TDS Amount Including Surcharge",
+ "Sequence": 22,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSurcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Bal. TDS Including SHE CESS",
+ "Sequence": 29,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "TDSIncludingSHECess"
+ }
+ }
+ },
+ {
+ "FieldName": "Applied",
+ "Sequence": 44,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "Applied"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining Surcharge Amount",
+ "Sequence": 31,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Surcharge"
+ }
+ }
+ },
+ {
+ "FieldName": "Remaining TDS Amount",
+ "Sequence": 42,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "Total TDS Including SHE CESS",
+ "Sequence": 21,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "Total TDS Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Per Contract",
+ "Sequence": 39,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Variable",
+ "VariableName": "PerContract"
+ }
+ }
+ },
+ {
+ "FieldName": "Party Account No.",
+ "Sequence": 45,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "TDS Posting Setup",
+ "TableFieldName": "TDS Account",
+ "Method": "First",
+ "TableFilters": [
+ {
+ "FiterFieldName": "TDS Section",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "TDS Section Code"
+ }
+ }
+ },
+ {
+ "FiterFieldName": "Effective Date",
+ "FilterType": "Is Less Than Or Equals To",
+ "FilterValue": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Table",
+ "TableName": "Purchase Header",
+ "TableFieldName": "Posting Date",
+ "Method": "First",
+ "TableFilters": [
{
- "FieldName": "Surcharge Base Amount",
- "Sequence": 41,
- "ReverseSign": false,
+ "FiterFieldName": "Document Type",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Component",
- "ComponentName": "TDS"
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document Type"
}
+ }
},
{
- "FieldName": "G/L Entry No.",
- "Sequence": 1,
- "ReverseSign": false,
+ "FiterFieldName": "No.",
+ "FilterType": "Equals",
+ "FilterValue": {
+ "Type": "Lookup",
"Lookup": {
- "Type": "Lookup",
- "Lookup": {
- "SourceType": "Posting Field",
- "PostingVariableName": "G/L Entry No."
- }
+ "SourceType": "Current Record",
+ "TableName": "Purchase Line",
+ "FieldName": "Document No."
}
+ }
}
- ]
+ ]
+ }
+ }
}
+ ]
}
- ]
+ }
+ },
+ {
+ "FieldName": "User ID",
+ "Sequence": 30,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Database",
+ "DatabaseVariableName": "UserId"
+ }
+ }
+ },
+ {
+ "FieldName": "Transaction No.",
+ "Sequence": 38,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry Transaction No."
+ }
+ }
+ },
+ {
+ "FieldName": "Original TDS Base Amount",
+ "Sequence": 27,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS Base Amount"
+ }
+ }
+ },
+ {
+ "FieldName": "Surcharge Base Amount",
+ "Sequence": 41,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Component",
+ "ComponentName": "TDS"
+ }
+ }
+ },
+ {
+ "FieldName": "G/L Entry No.",
+ "Sequence": 1,
+ "ReverseSign": false,
+ "Lookup": {
+ "Type": "Lookup",
+ "Lookup": {
+ "SourceType": "Posting Field",
+ "PostingVariableName": "G/L Entry No."
+ }
+ }
+ }
+ ]
}
+ }
]
- }
+ }
+ ]
+ }
]
\ No newline at end of file
diff --git a/Apps/IN/INTDS/app/TDSBase/src/TaxEngineSetup/TDSTaxConfiguration.Codeunit.al b/Apps/IN/INTDS/app/TDSBase/src/TaxEngineSetup/TDSTaxConfiguration.Codeunit.al
index 8e55331ee9..48aa8bcbd5 100644
--- a/Apps/IN/INTDS/app/TDSBase/src/TaxEngineSetup/TDSTaxConfiguration.Codeunit.al
+++ b/Apps/IN/INTDS/app/TDSBase/src/TaxEngineSetup/TDSTaxConfiguration.Codeunit.al
@@ -61,7 +61,7 @@ codeunit 18694 "TDS Tax Configuration"
UseCases.Add('{5D4C69D3-E776-4E9D-B397-09336BFDC884}', 1);
UseCases.Add('{FED919F2-CBDB-45F9-9383-0E1607897400}', 2);
UseCases.Add('{B0C259BC-64CC-4818-887A-3337D357CDFF}', 2);
- UseCases.Add('{33BFBE99-9140-4112-A55B-35EC0D9B61B9}', 4);
+ UseCases.Add('{33BFBE99-9140-4112-A55B-35EC0D9B61B9}', 5);
UseCases.Add('{271D5BC6-17E8-424E-9E34-3BEE548F938F}', 1);
UseCases.Add('{A8E114BF-F8CD-44DB-A2B3-614BC18F4442}', 31);
UseCases.Add('{6FBA1A5C-41A0-4430-976E-6B54E4884164}', 1);
@@ -74,20 +74,25 @@ codeunit 18694 "TDS Tax Configuration"
UseCases.Add('{EB2141B4-1220-462B-AB1A-9BB3FFDF704A}', 1);
UseCases.Add('{C1C8C9A9-1AE8-48D7-AB60-9EA08AA0AF21}', 4);
UseCases.Add('{61ED733A-A96B-45ED-BE21-A98A8B65566B}', 1);
- UseCases.Add('{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}', 2);
+ UseCases.Add('{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}', 3);
UseCases.Add('{B8483E82-4EAB-43DE-B423-B1371AAA9CE0}', 2);
UseCases.Add('{F39A0864-D2E7-40A5-9633-B6680CD3EC6F}', 3);
UseCases.Add('{C3B6CECC-CACE-43A4-8F03-BAB6AFE1E15B}', 1);
UseCases.Add('{98E3D17E-B644-4DBA-836C-CF26A20EDD3F}', 3);
UseCases.Add('{D0CED206-BE26-47A3-A370-D064D8AFCE44}', 1);
UseCases.Add('{487C3669-B12A-42C0-9FEA-D23AB1426BF6}', 1);
- UseCases.Add('{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}', 7);
+ UseCases.Add('{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}', 8);
UseCases.Add('{75222E87-A1A0-48EE-9211-D3F59009C287}', 1);
UseCases.Add('{25C2D9C3-2A87-41A6-9AB9-DC76E818DF0C}', 1);
UseCases.Add('{08737F79-35F1-4670-BD1D-E41764E3A9DE}', 1);
- UseCases.Add('{f8bf58d9-7681-458d-9dfc-71ea23a9f853}', 3);
+ UseCases.Add('{f8bf58d9-7681-458d-9dfc-71ea23a9f853}', 4);
UseCases.Add('{1abe2c56-9700-4a30-a14a-5e8ecc2f32dd}', 2);
UseCases.Add('{b8a33720-278b-45b4-8465-2d9fa273d813}', 5);
+ UseCases.Add('{3EFD6FE9-72B2-427F-A254-C36E7CA61D6D}', 1);
+ UseCases.Add('{5F2E69B7-0288-468A-83C8-D6A2AF993782}', 1);
+ UseCases.Add('{430D7BC2-7F79-4B77-A16C-63C758DA1FD0}', 1);
+ UseCases.Add('{E3446842-7BE3-448E-A055-2BBA1A627C6E}', 1);
+ UseCases.Add('{CC412FD1-030F-4F28-BBDC-46F25D2B7BF3}', 1);
end;
var
diff --git a/Apps/IN/INTDS/app/TDSBase/src/page/TDSConcessionalCodes.Page.al b/Apps/IN/INTDS/app/TDSBase/src/page/TDSConcessionalCodes.Page.al
index 1c721364fa..bdd59b2786 100644
--- a/Apps/IN/INTDS/app/TDSBase/src/page/TDSConcessionalCodes.Page.al
+++ b/Apps/IN/INTDS/app/TDSBase/src/page/TDSConcessionalCodes.Page.al
@@ -41,6 +41,11 @@ page 18690 "TDS Concessional Codes"
ApplicationArea = Basic, Suite;
ToolTip = 'Specify the concessional form/certificate number of the deductee.';
}
+ field("Certificate Value"; Rec."Certificate Value")
+ {
+ ApplicationArea = Basic, Suite;
+ ToolTip = 'Specify the certificate value as per the certificate number of the deductee.';
+ }
field("Start Date"; Rec."Start Date")
{
ApplicationArea = Basic, Suite;
diff --git a/Apps/IN/INTDS/app/TDSBase/src/table/TDSConcessionalCode.Table.al b/Apps/IN/INTDS/app/TDSBase/src/table/TDSConcessionalCode.Table.al
index 979d81a92c..790d5734a3 100644
--- a/Apps/IN/INTDS/app/TDSBase/src/table/TDSConcessionalCode.Table.al
+++ b/Apps/IN/INTDS/app/TDSBase/src/table/TDSConcessionalCode.Table.al
@@ -59,6 +59,27 @@ table 18688 "TDS Concessional Code"
Error(ShorterEndDateErr);
end;
}
+ field(7; "Certificate Value"; Decimal)
+ {
+ Caption = 'Certificate Value';
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if ("Remaining Certificate Value" = 0) or ("Certificate Value" <> xRec."Certificate Value") then
+ "Remaining Certificate Value" := "Certificate Value";
+ end;
+ }
+ field(8; "Remaining Certificate Value"; Decimal)
+ {
+ Caption = 'Remaining Certificate Value';
+ DataClassification = CustomerContent;
+ }
+ field(9; "Used Certificate Value"; Decimal)
+ {
+ Caption = 'Used Certificate Value';
+ DataClassification = CustomerContent;
+ }
}
keys
diff --git a/Apps/IN/INTDS/app/TDSOnPurchase/src/codeunit/TDSSubscribers.Codeunit.al b/Apps/IN/INTDS/app/TDSOnPurchase/src/codeunit/TDSSubscribers.Codeunit.al
index 183bd5bfd4..164ca6e4c0 100644
--- a/Apps/IN/INTDS/app/TDSOnPurchase/src/codeunit/TDSSubscribers.Codeunit.al
+++ b/Apps/IN/INTDS/app/TDSOnPurchase/src/codeunit/TDSSubscribers.Codeunit.al
@@ -204,6 +204,64 @@ codeunit 18716 "TDS Subscribers"
Error(CustPANNoErr);
end;
+ local procedure UpdateTDSCertificateUsageGenJnlLine(var GenJournalLine: Record "Gen. Journal Line")
+ var
+ TDSConcessionalCode: Record "TDS Concessional Code";
+ TDSEntry: Record "TDS Entry";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ TotalPostedAmount: Decimal;
+ TotalLineAmount: Decimal;
+ CurrentUsed: Decimal;
+ AppliedAmount: Decimal;
+ begin
+ if GenJournalLine."Account Type" <> GenJournalLine."Account Type"::Vendor then
+ exit;
+
+ if GenJournalLine."Account No." = '' then
+ exit;
+
+ TDSConcessionalCode.Reset();
+ TDSConcessionalCode.SetRange("Vendor No.", GenJournalLine."Account No.");
+ TDSConcessionalCode.SetRange(Section, GenJournalLine."TDS Section Code");
+ TDSConcessionalCode.SetFilter("Certificate Value", '<>%1', 0);
+ if not TDSConcessionalCode.FindFirst() then
+ exit;
+
+ TDSEntry.Reset();
+ TDSEntry.SetRange("Vendor No.", GenJournalLine."Account No.");
+ TDSEntry.SetRange(Section, GenJournalLine."TDS Section Code");
+ TDSEntry.CalcSums("TDS Base Amount");
+ TotalPostedAmount := TDSEntry."TDS Base Amount";
+
+ TotalLineAmount := GenJournalLine.Amount;
+
+ CurrentUsed := TotalPostedAmount + TotalLineAmount;
+
+ if GenJournalLine."Applies-to ID" <> '' then begin
+ VendorLedgerEntry.SetRange("Applies-to ID", GenJournalLine."Applies-to ID");
+ VendorLedgerEntry.CalcSums("Amount to Apply");
+ AppliedAmount := VendorLedgerEntry."Amount to Apply";
+ end;
+
+ if (AppliedAmount = 0) and (CurrentUsed = 0) then begin
+ TDSConcessionalCode."Used Certificate Value" := 0;
+ TDSConcessionalCode."Remaining Certificate Value" := TDSConcessionalCode."Certificate Value";
+ TDSConcessionalCode.Modify();
+ exit;
+ end;
+
+ if AppliedAmount >= CurrentUsed then
+ exit;
+
+ TDSConcessionalCode."Used Certificate Value" := CurrentUsed - AppliedAmount;
+ TDSConcessionalCode."Remaining Certificate Value" := TDSConcessionalCode."Certificate Value" - TDSConcessionalCode."Used Certificate Value";
+
+ if TDSConcessionalCode."Remaining Certificate Value" < 0 then
+ TDSConcessionalCode."Remaining Certificate Value" := 0;
+
+ TDSConcessionalCode.Modify();
+ end;
+
local procedure ValidatePurchLineAppliesToDocNo(PurchaseHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line")
var
VendorLedgerEntry: Record "Vendor Ledger Entry";
@@ -260,6 +318,162 @@ codeunit 18716 "TDS Subscribers"
until VendorLedgerEntry.Next() = 0;
end;
+ local procedure UpdateTDSCertificateUsage(var PurchaseLine: Record "Purchase Line")
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine2: Record "Purchase Line";
+ TDSConcessionalCode: Record "TDS Concessional Code";
+ TDSEntry: Record "TDS Entry";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ TotalPostedAmount: Decimal;
+ TotalLineAmount: Decimal;
+ CurrentUsed: Decimal;
+ AppliedAmount: Decimal;
+ begin
+ if not PurchaseHeader.Get(PurchaseLine."Document Type", PurchaseLine."Document No.") then
+ exit;
+
+ TDSConcessionalCode.Reset();
+ TDSConcessionalCode.SetRange("Vendor No.", PurchaseLine."Pay-to Vendor No.");
+ TDSConcessionalCode.SetRange(Section, PurchaseLine."TDS Section Code");
+ TDSConcessionalCode.SetFilter("Certificate Value", '<>%1', 0);
+ if not TDSConcessionalCode.FindFirst() then
+ exit;
+
+ TDSEntry.Reset();
+ TDSEntry.SetRange("Vendor No.", PurchaseLine."Pay-to Vendor No.");
+ TDSEntry.SetRange(Section, PurchaseLine."TDS Section Code");
+ TDSEntry.CalcSums("TDS Base Amount");
+ TotalPostedAmount := TDSEntry."TDS Base Amount";
+
+ PurchaseLine2.Reset();
+ PurchaseLine2.SetRange("Document Type", PurchaseLine."Document Type");
+ PurchaseLine2.SetRange("Document No.", PurchaseLine."Document No.");
+ PurchaseLine2.SetRange("TDS Section Code", PurchaseLine."TDS Section Code");
+ PurchaseLine2.CalcSums(Amount);
+ TotalLineAmount := PurchaseLine2.Amount;
+ CurrentUsed := TotalPostedAmount + TotalLineAmount;
+
+ if PurchaseHeader."Applies-to Doc. No." <> '' then begin
+ VendorLedgerEntry.SetRange("Document Type", PurchaseHeader."Applies-to Doc. Type");
+ VendorLedgerEntry.SetRange("Document No.", PurchaseHeader."Applies-to Doc. No.");
+ if VendorLedgerEntry.FindFirst() then
+ AppliedAmount := VendorLedgerEntry."Amount to Apply";
+ end;
+
+ if (AppliedAmount = 0) and (CurrentUsed = 0) then begin
+ TDSConcessionalCode."Used Certificate Value" := 0;
+ TDSConcessionalCode."Remaining Certificate Value" := TDSConcessionalCode."Certificate Value";
+ PurchaseHeader."Remaining TDS Cert. Value" := TDSConcessionalCode."Remaining Certificate Value";
+ PurchaseHeader.Modify();
+ TDSConcessionalCode.Modify();
+ exit;
+ end;
+
+ if AppliedAmount >= CurrentUsed then
+ exit;
+
+ TDSConcessionalCode."Used Certificate Value" := CurrentUsed - AppliedAmount;
+ TDSConcessionalCode."Remaining Certificate Value" := TDSConcessionalCode."Certificate Value" - TDSConcessionalCode."Used Certificate Value";
+
+ if TDSConcessionalCode."Remaining Certificate Value" < 0 then
+ TDSConcessionalCode."Remaining Certificate Value" := 0;
+
+ PurchaseHeader."Remaining TDS Cert. Value" := TDSConcessionalCode."Remaining Certificate Value";
+ PurchaseHeader.Modify();
+ TDSConcessionalCode.Modify();
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Purchase Line", 'OnAfterValidateEvent', 'Direct Unit Cost', false, false)]
+ local procedure OnAfterValidateAmount(var Rec: Record "Purchase Line"; var xRec: Record "Purchase Line")
+ var
+ CalculateTax: Codeunit "Calculate Tax";
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ UpdateTDSCertificateUsage(Rec);
+ CalculateTax.CallTaxEngineOnPurchaseLine(Rec, xRec);
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Purchase Line", 'OnAfterValidateEvent', 'Quantity', false, false)]
+ local procedure OnAfterValidateQuantity(var Rec: Record "Purchase Line"; var xRec: Record "Purchase Line")
+ var
+ CalculateTax: Codeunit "Calculate Tax";
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ UpdateTDSCertificateUsage(Rec);
+ CalculateTax.CallTaxEngineOnPurchaseLine(Rec, xRec);
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'Applies-to Doc. No.', false, false)]
+ local procedure OnAfterValidateAppliesToDocNo(var Rec: Record "Purchase Header")
+ var
+ PurchaseLine: Record "Purchase Line";
+ CalculateTax: Codeunit "Calculate Tax";
+ begin
+ PurchaseLine.SetCurrentKey("Document Type", "Document No.", "TDS Section Code");
+ PurchaseLine.SetRange("Document Type", Rec."Document Type");
+ PurchaseLine.SetRange("Document No.", Rec."No.");
+ PurchaseLine.SetFilter("TDS Section Code", '<>%1', '');
+ if PurchaseLine.FindSet() then
+ repeat
+ CalculateTax.CallTaxEngineOnPurchaseLine(PurchaseLine, PurchaseLine);
+ until PurchaseLine.Next() = 0;
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Purchase Line", 'OnAfterDeleteEvent', '', false, false)]
+ local procedure OnAfterDeletePurchaseLine(var Rec: Record "Purchase Line")
+ var
+ PurchaseHeader: Record "Purchase Header";
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ if not PurchaseHeader.Get(Rec."Document Type", Rec."Document No.") then
+ exit;
+
+ if PurchaseHeader.Status <> PurchaseHeader.Status::Open then
+ exit;
+
+ if Rec.Amount <> 0 then
+ Rec.Amount := 0;
+
+ UpdateTDSCertificateUsage(Rec);
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterValidateEvent', 'Amount', false, false)]
+ local procedure OnAfterValidateGenJnlAmount(var Rec: Record "Gen. Journal Line")
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ UpdateTDSCertificateUsageGenJnlLine(Rec);
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterValidateEvent', 'TDS Section Code', false, false)]
+ local procedure OnAfterValidateGenJnlTDSSection(var Rec: Record "Gen. Journal Line")
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ UpdateTDSCertificateUsageGenJnlLine(Rec);
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterDeleteEvent', '', false, false)]
+ local procedure OnAfterDeleteGenJnlLine(var Rec: Record "Gen. Journal Line")
+ begin
+ if Rec."TDS Section Code" = '' then
+ exit;
+
+ if Rec.Amount <> 0 then
+ Rec.Amount := 0;
+
+ UpdateTDSCertificateUsageGenJnlLine(Rec);
+ end;
+
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Document Mgt.", 'OnCopyPurchDocPurchLineOnAfterCopyPurchLine', '', false, false)]
local procedure CallTaxEngineOnCopyPurchDocPurchLineOnAfterCopyPurchLine(var ToPurchLine: Record "Purchase Line"; RecalculateLines: Boolean)
var
diff --git a/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseInvoice.PageExt.al b/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseInvoice.PageExt.al
index e40dff75d9..149b7af40e 100644
--- a/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseInvoice.PageExt.al
+++ b/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseInvoice.PageExt.al
@@ -33,6 +33,12 @@ pageextension 18723 "Purchase invoice" extends "Purchase Invoice"
CurrPage.Update(false);
end;
}
+ field("Remaining TDS Cert. Value"; Rec."Remaining TDS Cert. Value")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = false;
+ ToolTip = 'Displays the remaining TDS Certificate Value for the vendor on this purchase invoice.';
+ }
}
}
}
diff --git a/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseOrder.PageExt.al b/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseOrder.PageExt.al
index 579a36a524..264ca16f6d 100644
--- a/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseOrder.PageExt.al
+++ b/Apps/IN/INTDS/app/TDSOnPurchase/src/pageextension/PurchaseOrder.PageExt.al
@@ -33,6 +33,12 @@ pageextension 18722 "Purchase Order" extends "Purchase Order"
CurrPage.Update(false);
end;
}
+ field("Remaining TDS Cert. Value"; Rec."Remaining TDS Cert. Value")
+ {
+ ApplicationArea = Basic, Suite;
+ Editable = false;
+ ToolTip = 'Displays the remaining TDS Certificate Value for the vendor on this purchase invoice.';
+ }
}
}
}
diff --git a/Apps/IN/INTDS/app/TDSOnPurchase/src/tableextension/PurchaseHeader.TableExt.al b/Apps/IN/INTDS/app/TDSOnPurchase/src/tableextension/PurchaseHeader.TableExt.al
index ae61d0c9f7..8e259ce824 100644
--- a/Apps/IN/INTDS/app/TDSOnPurchase/src/tableextension/PurchaseHeader.TableExt.al
+++ b/Apps/IN/INTDS/app/TDSOnPurchase/src/tableextension/PurchaseHeader.TableExt.al
@@ -30,5 +30,11 @@ tableextension 18717 "Purchase Header" extends "Purchase Header"
until PurchLine.Next() = 0;
end;
}
+ field(18717; "Remaining TDS Cert. Value"; Decimal)
+ {
+ Caption = 'Remaining TDS Cert. Value';
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
}
}
diff --git a/Apps/IN/INTDS/test/TDSBase/src/LibraryTDS.Codeunit.al b/Apps/IN/INTDS/test/TDSBase/src/LibraryTDS.Codeunit.al
index c63ff98346..0ad5f2225e 100644
--- a/Apps/IN/INTDS/test/TDSBase/src/LibraryTDS.Codeunit.al
+++ b/Apps/IN/INTDS/test/TDSBase/src/LibraryTDS.Codeunit.al
@@ -19,6 +19,20 @@ codeunit 18786 "Library-TDS"
AttachConcessionalWithVendor(Vendor."No.", ConcessionalCode.Code, TDSSection.Code);
end;
+ procedure CreateTDSSetupWithConcessionalCertificate(
+ var Vendor: Record Vendor;
+ var TDSPostingSetup: Record "TDS Posting Setup";
+ var ConcessionalCode: Record "Concessional Code")
+ var
+ AssesseeCode: Record "Assessee Code";
+ TDSSection: Record "TDS Section";
+ begin
+ CreateCommonSetup(AssesseeCode, ConcessionalCode);
+ CreateTDSPostingSetupWithSection(TDSPostingSetup, TDSSection);
+ CreateTDSVendor(Vendor, AssesseeCode.Code, TDSSection.Code);
+ AttachConcessionalWithCertificateValue(Vendor."No.", ConcessionalCode.Code, TDSSection.Code);
+ end;
+
procedure UpdateVendorWithPANWithConcessional(
var Vendor: Record Vendor;
ThresholdOverlook: Boolean;
@@ -87,6 +101,25 @@ codeunit 18786 "Library-TDS"
TDSConcessionalCode.Insert(true);
end;
+ procedure AttachConcessionalWithCertificateValue(
+ VendorNo: Code[20];
+ ConcessionalCode: Code[10];
+ TDSSection: Code[10])
+ var
+ TDSConcessionalCode: Record "TDS Concessional Code";
+ begin
+ TDSConcessionalCode.Init();
+ TDSConcessionalCode.Validate("Vendor No.", VendorNo);
+ TDSConcessionalCode.Validate(Section, TDSSection);
+ TDSConcessionalCode.Validate("Concessional Code", ConcessionalCode);
+ TDSConcessionalCode.Validate("Certificate No.", LibraryUtility.GenerateRandomCode(TDSConcessionalCode.FieldNo("Certificate No."),
+ Database::"TDS Concessional Code"));
+ TDSConcessionalCode.Validate("Certificate Value", 50000);
+ TDSConcessionalCode."Start Date" := WorkDate();
+ TDSConcessionalCode."End Date" := WorkDate() + 30;
+ TDSConcessionalCode.Insert(true);
+ end;
+
procedure CreateAssesseeCode(var AssesseeCode: Record "Assessee Code")
begin
AssesseeCode.Init();
diff --git a/Apps/IN/INTDS/test/TDSOnPurchase/src/TDSOnPurchaseInvoice.Codeunit.al b/Apps/IN/INTDS/test/TDSOnPurchase/src/TDSOnPurchaseInvoice.Codeunit.al
index 8f3009421d..d2e1be92ed 100644
--- a/Apps/IN/INTDS/test/TDSOnPurchase/src/TDSOnPurchaseInvoice.Codeunit.al
+++ b/Apps/IN/INTDS/test/TDSOnPurchase/src/TDSOnPurchaseInvoice.Codeunit.al
@@ -1836,6 +1836,66 @@ codeunit 18791 "TDS On Purchase Invoice"
VerifyGLEntryCount(DocumentNo, 6);
end;
+ [Test]
+ [HandlerFunctions('TaxRatePageHandler')]
+ // [SCENARIO] [482399] Required a validation on TDS concessional code with Certificate No. and Values.
+ procedure PostFromPurchInvWithGLAccWithPANWithConCodeAndCertificateValue()
+ var
+ Vendor: Record Vendor;
+ ConcessionalCode: Record "Concessional Code";
+ TDSPostingSetup: Record "TDS Posting Setup";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ DocumentNo: Code[20];
+ begin
+ // [GIVEN] Created Setup for AssesseeCode,TDSPostingSetup,TDSSection,ConcessionalCode With Certificate Value with Threshold.
+ LibraryTDS.CreateTDSSetupWithConcessionalCertificate(Vendor, TDSPostingSetup, ConcessionalCode);
+ LibraryTDS.UpdateVendorWithPANWithConcessional(Vendor, false, false);
+ CreateTaxRateSetup(TDSPostingSetup."TDS Section", Vendor."Assessee Code", ConcessionalCode.Code, WorkDate());
+
+ // [WHEN] Created and Posted Purchase Invoice.
+ DocumentNo := CreateAndPostPurchaseDocument(
+ PurchaseHeader,
+ PurchaseHeader."Document Type"::Invoice,
+ Vendor."No.", WorkDate(),
+ PurchaseLine.Type::"G/L Account", false);
+
+ // [THEN] G/L Entries and TDS Entries Verified
+ VerifyGLEntryCount(DocumentNo, 3);
+ LibraryTDS.VerifyGLEntryWithTDS(DocumentNo, TDSPostingSetup."TDS Account");
+ VerifyTDSEntry(DocumentNo, true, true, true);
+ end;
+
+ [Test]
+ [HandlerFunctions('TaxRatePageHandler')]
+ // [SCENARIO] [482399] Required a validation on TDS concessional code with Certificate No. and Values.
+ procedure PostFromPurchInvWithGLAccWithPANWithConCodeAndCrossedCertificateValue()
+ var
+ Vendor: Record Vendor;
+ ConcessionalCode: Record "Concessional Code";
+ TDSPostingSetup: Record "TDS Posting Setup";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ DocumentNo: Code[20];
+ begin
+ // [GIVEN] Created Setup for AssesseeCode,TDSPostingSetup,TDSSection,ConcessionalCode With Certificate Value with Threshold.
+ LibraryTDS.CreateTDSSetupWithConcessionalCertificate(Vendor, TDSPostingSetup, ConcessionalCode);
+ LibraryTDS.UpdateVendorWithPANWithConcessional(Vendor, false, false);
+ CreateTaxRateSetup(TDSPostingSetup."TDS Section", Vendor."Assessee Code", ConcessionalCode.Code, WorkDate());
+
+ // [WHEN] Created and Posted Purchase Invoice.
+ DocumentNo := CreateAndPostPurchaseDocumentCrossedTDSCertificateValue(
+ PurchaseHeader,
+ PurchaseHeader."Document Type"::Invoice,
+ Vendor."No.", WorkDate(),
+ PurchaseLine.Type::"G/L Account", false);
+
+ // [THEN] G/L Entries and TDS Entries Verified
+ VerifyGLEntryCount(DocumentNo, 3);
+ LibraryTDS.VerifyGLEntryWithTDS(DocumentNo, TDSPostingSetup."TDS Account");
+ VerifyTDSEntry(DocumentNo, true, true, true);
+ end;
+
local procedure UpdateTDSSection(PurchaseHeader: Record "Purchase Header")
var
PurchaseInvoice: TestPage "Purchase Invoice";
@@ -2014,6 +2074,22 @@ codeunit 18791 "TDS On Purchase Invoice"
exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true))
end;
+ procedure CreateAndPostPurchaseDocumentCrossedTDSCertificateValue(var PurchaseHeader: Record "Purchase Header";
+ DocumentType: enum "Purchase Document Type";
+ VendorNo: Code[20];
+ PostingDate: Date;
+ LineType: enum "Purchase Line Type";
+ LineDiscount: Boolean): Code[20]
+ var
+ PurchaseLine: Record "Purchase Line";
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, DocumentType, VendorNo);
+ PurchaseHeader.Validate("Posting Date", PostingDate);
+ PurchaseHeader.Modify(true);
+ CreatePurchaseLineCrossedTDSCertificatevalue(PurchaseHeader, PurchaseLine, LineType, LineDiscount);
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true))
+ end;
+
local procedure CreatePurchaseLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line";
Type: enum "Purchase Line Type"; LineDiscount: Boolean)
begin
@@ -2025,6 +2101,17 @@ codeunit 18791 "TDS On Purchase Invoice"
PurchaseLine.Modify(true);
end;
+ local procedure CreatePurchaseLineCrossedTDSCertificatevalue(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line";
+ Type: enum "Purchase Line Type"; LineDiscount: Boolean)
+ begin
+ InsertPurchaseLine(PurchaseLine, PurchaseHeader, Type);
+ if LineDiscount then
+ PurchaseLine.Validate("Line Discount %", LibraryRandom.RandDecInRange(10, 20, 2));
+
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDecInDecimalRange(30000, 1001, 0));
+ PurchaseLine.Modify(true);
+ end;
+
local procedure InsertPurchaseLine(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: record "Purchase Header"; LineType: enum "Purchase Line Type")
var
RecRef: RecordRef;
diff --git a/Apps/IN/INTaxBase/app/Translations/India Tax Base.en-US.xlf b/Apps/IN/INTaxBase/app/Translations/India Tax Base.en-US.xlf
index b0105e94b6..ff7a8010c8 100644
--- a/Apps/IN/INTaxBase/app/Translations/India Tax Base.en-US.xlf
+++ b/Apps/IN/INTaxBase/app/Translations/India Tax Base.en-US.xlf
@@ -270,7 +270,7 @@
Use Case Tree Place holder
- ''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000311","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Registered/Unregistered","NodeType":"Use Case","TableID":39,"CaseID":"{F6F63738-94DD-4B0B-BAD6-4EC11668D327}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000312","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8D93354A-64E8-4DA5-A1A7-741A42B80B33}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000313","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{826B72ED-5C21-45CA-A966-8443C38B768A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000314","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{7C64DCF3-718C-405E-A389-582FD1E33E5D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000315","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{71ED6108-7E6C-42E3-BEC8-DF9AD0C7A27E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000316","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C724AA5A-92F2-4965-957B-C43EEACAABE6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000317","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account","NodeType":"Use Case","TableID":39,"CaseID":"{DEEB69C8-EDAA-4A5A-875E-A20DA52008BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000318","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{DE898176-3602-4CBD-BF29-EAF4A9C03987}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000319","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{F7192A60-5739-4B72-AB1D-FB48ED3EE0F9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000320","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{3E8E1EDA-828E-40BE-8FD4-3456546F47A6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000321","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{FD3380A2-217C-4059-A344-1D832B755088}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000322","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice- Fixed Asset","NodeType":"Use Case","TableID":39,"CaseID":"{E1914856-FF7A-4B3A-99D5-17190CE10C27}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000323","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8D7FD8C3-FCB1-4968-8FD6-08181778EC29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000324","Name":"Calculation of Cess where input tax Credit is Not Available for Goods through Purchase Quote/Order/Invoice -(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{1E087C72-9078-4C31-ABD5-38F01008E508}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000325","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{508FE302-0CAB-41B6-8C43-737EBE931312}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000326","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{68FE3FB0-9F3C-44A6-9686-F37192B1A371}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000327","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{2EA01E14-807E-4CC7-8494-9EAAFBA21709}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000328","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice -Fixed Asset(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{6ADC0F4A-6D69-4BAE-A94F-7DC0889758DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000329","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{C9822271-8F51-46B7-B4BD-A2B424B1699B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000330","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{C63F1B6C-96EE-41CB-879B-801CE9C734A6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000331","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{F748E0D1-BC76-4D68-8CBD-FF4189DC3517}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000332","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{AE6444ED-20D1-4E69-A69C-7DCAEC9C4738}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000333","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{535A4B2C-EEA4-4267-8638-F57DE9153FDD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000340","Name":"End Cess on Purchase","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000350","Name":"Cess on Purchase Return","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3|5),Field7=1(<>''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000351","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Registered/Unregistered","NodeType":"Use Case","TableID":39,"CaseID":"{725E8FB9-C4CC-42B7-B060-5E86614A8168}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000352","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EFF1E5F5-6CC1-414D-BD1F-1095D42F9A4A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000353","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8BB1C380-7CFE-4B49-82AD-78BBA652EB5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000354","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{231587B2-D0BD-4362-9A3B-11839F7BB326}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000355","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{CEAE9F6C-7E67-4347-9E66-A9C6C54E4ECE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000356","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account","NodeType":"Use Case","TableID":39,"CaseID":"{F33121DD-68CB-423C-A98B-6FF10BD8CED7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000357","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{75A11E67-E9DF-446F-974A-AE9F91D8EA1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000358","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{6F2DE875-4569-41DB-A28E-021E4D00378A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000359","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{7D571F8D-B6A0-47E0-B80F-9AC703DF1D3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000360","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/ Credit Memo - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A622E949-C161-4AE2-B6DB-7D3C16E5D899}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000361","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset","NodeType":"Use Case","TableID":39,"CaseID":"{43F17130-4EA1-48FE-B1A8-716EE5DF7C16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000362","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{3A6F385C-72E7-42C6-A696-47102B270402}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000364","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{6DEEF440-3A5B-4201-9D1B-59AC37AF4C36}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000365","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{C08A9FD5-5ECC-4BB5-8A19-345060822129}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000366","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{CBDB09CC-FB6C-4475-89A3-62C04DADFA15}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000367","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo Unregistered Vendor- Item (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{39808C8A-4131-4B49-BF1D-D8FA64667B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000368","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{812C7B77-0622-4E71-9F4E-261C3874A680}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000369","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{3B82DBC4-FAAE-477D-892C-AD82ECDFEF7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000370","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo -G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{B4A44DCF-6090-4813-9C09-193AB1A09B93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000371","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{A79DCE33-C753-4680-A6A3-F824608702B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000372","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{FBD319E5-BDFD-43E8-B9EB-275F01FA6A40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000380","Name":"End Cess on Purchase Return","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000500","Name":"Cess on Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4),Field5=1(1|2|4|3),Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000501","Name":"Calculation of Cess on sales to Registered/Unregistered Customer through Sales Quote/Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{3D30F63D-D6C1-4B1B-ACFD-E252FAB190E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000502","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice with Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{9B4E1225-00F2-4467-BA93-29AD1F2EBD46}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000503","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice without Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{0F354915-7E17-421B-87D8-7E6C2716E173}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000504","Name":"Calculation of Cess on sales to Registered/Unregistered/Exempted/SEZ/SEZ Development/ Deemed Export Customer through Sales","NodeType":"Use Case","TableID":37,"CaseID":"{33CD3931-0BA0-4358-B808-5C6378CAA489}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000505","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice with Payment of Duty - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{37EFA642-056C-45E8-974E-6B41B335FC81}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000506","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo with Payment of Duty - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{DE8006B8-CF9F-474A-AE29-C7903A148261}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000600","Name":"End Cess on Sales","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000601","Name":"Cess on Sales Return","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3|5),Field5=1(2|1|3|4),Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000602","Name":"Calculation of Cess on sales to Registered/Unregistered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{272FFE9F-A7C9-4AF8-87DD-3EA53BA18511}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000603","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo with Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{9DB4ECE1-3397-4ADD-9EA8-40A8D82A6A9A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000604","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo without Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{423BECDD-68DC-4541-9047-8F6B797709E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000605","Name":"Calculation of Cess on sales to Registered/Unregistered/Exempted/ SEZ/ SEZ Development/ Deemed Export Customer through Sales Return Order/ Credit Memo - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{ED1E0A5D-C364-4F36-847E-AAE263B34185}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000700","Name":"End Cess on Sales Return","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000701","Name":"Cess on Transfer Order","NodeType":"Begin","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field3=1(<>''),Field18394=1(<>''),Field18395=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000702","Name":"Calculation of Cess in Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{631DEFA0-165E-4BDC-8F8A-AB2A88DF90AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000750","Name":"End Cess on Transfer Order","NodeType":"End","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-001000","Name":"End GST Cess","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100001","Name":"GST","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"GST","IsTaxTypeRoot":true},{"Code":"TE-100011","Name":"Subcontracting GST For Delivery Challan Line","NodeType":"Begin","TableID":18469,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field54,Field55) WHERE(Field46=1(<>''),Field47=1(<>''),Field102=1(<>''),Field103=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100012","Name":"Intra-state Subcontracting GST For Delivery Challan Line for Registered Vendor","NodeType":"Use Case","TableID":18469,"CaseID":"{5388F401-5CDE-4918-A9B0-B7B134235921}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100013","Name":"Inter-state Subcontracting GST For Delivery Challan Line for Registered Vendor","NodeType":"Use Case","TableID":18469,"CaseID":"{6A75BFF5-C880-498F-AC1D-E9CF9BE7F888}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100099","Name":"Subcontracting GST For Delivery Challan Line","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100100","Name":"Subcontracting GST For GST Liability Line","NodeType":"Begin","TableID":18470,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field3,Field4) WHERE(Field46=1(<>''),Field47=1(<>''),Field102=1(<>''),Field103=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100101","Name":"Intra-state Subcontracting GST on GST Liability Line for Registered Vendor","NodeType":"Use Case","TableID":18470,"CaseID":"{81A83FF9-D7EB-4B5F-A2AE-ED346B7A9079}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100102","Name":"Inter-state Subcontracting GST on GST Liability Line for Registered Vendor","NodeType":"Use Case","TableID":18470,"CaseID":"{81A24E9D-52B9-4EFE-A18B-398C6BAD55ED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100199","Name":"Subcontracting GST For GST Liability Line","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100200","Name":"GST Finance Charge Memo","NodeType":"Begin","TableID":303,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field18142=1(<>''),Field18144=1(<>''))","TaxType":"GST","IsTaxTypeRoot":false},{"Code":"TE-100201","Name":"InterState GST Calculation on Finance Charge Memo For Registered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{10675EE2-5AA7-4D43-8794-03BA8CD85445}","Condition":"VERSION(1) SORTING(Field1,Field2)","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100202","Name":"Intrastate GST Calculation on Finance Charge Memo For Registered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{853FC9A7-4D6E-4511-8207-BB18D1FFC0E8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100203","Name":"InterState GST Calculation on Finance Charge Memo For SEZ Unit/SEZ Development/Deemed Export Customer With Payment of Duty.\n","NodeType":"Use Case","TableID":303,"CaseID":"{CAC3F49D-59DD-4F1A-B0F3-AC28F7552973}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100204","Name":"InterState GST Calculation on Finance Charge Memo For Unregistered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{C4BC4E11-E295-4A20-9F5F-801F2406A610}","Condition":"VERSION(1) SORTING(Field1,Field2)","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100205","Name":"Intrastate GST Calculation on Finance Charge Memo For Unregistered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{34D44752-1655-43CC-8DD8-9CBA775C5554}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100206","Name":"Intrastate GST Calculation on Finance Charge Memo For Exempted Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{4C815B8B-6831-4E19-899D-361FBA9CFC43}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100207","Name":"InterState GST Calculation on Finance Charge Memo For Exempted Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{EC7AE7B0-93FA-42C2-9717-BBD2E8FC4D4C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100208","Name":"InterState GST Calculation on Finance Charge Memo For SEZ Unit/SEZ Development/Deemed Export Customer Without Payment of Duty.\n","NodeType":"Use Case","TableID":303,"CaseID":"{6946230A-A2F4-4E4B-90C6-6C907D010EB5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100300","Name":"GST Finance Charge Memo","NodeType":"End","TableID":303,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110001","Name":"Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110501","Name":"Sales Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110601","Name":"Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110696","Name":"Sales Line No Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110700","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Order/Invoice - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{A4C57AB8-DBFF-473C-B2A3-739975737950}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110701","Name":"Intra State Sales of Exempted from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4911101A-A3D1-4596-836C-A9EB2F2CB24C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110702","Name":"Inter State Sales of Exempted from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{CA856646-6B6F-42D2-A4CC-64A8F52DE9F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110703","Name":"Inter State Sales of Exempted from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{CE4E5351-F5F5-413A-AAF9-6C5EA6530D93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110704","Name":"Intra State Sales of Exempted from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{887FEE8B-EFB6-4010-B79B-4CDB44F23CC8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110705","Name":"Intra State Exempted Sales for Deemed Export Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{332A3E45-C1C8-423A-9063-B55EFA585045}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110706","Name":"Export and Exempted to Foreign Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{74E6E05F-641D-4857-8F88-C48783B29B3E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110707","Name":"Intra state Sales of Charge Item from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{D2C0BC32-D71C-4FEC-A3FC-63A0586DA3D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110708","Name":"Inter State Sales of Exempted Charge Item from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{8E20FC81-1137-41B3-A90E-AE86CD66F718}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110720","Name":"End Sales Line No Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110721","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110722","Name":"Intra state Sales of Services from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A9D34135-2984-4C5D-99C0-5563408C59EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110723","Name":"Inter State Sales of Exempted Services from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E474605D-6956-438B-95F2-DA5BE6A6D741}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110740","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110741","Name":"Begin Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110742","Name":"Inter State Sales of Exempted Goods from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{144DB41F-813A-4EE0-87EC-7082D07652B7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110743","Name":"Intra state Sales of Goods from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{C3901ECF-9316-49A7-9897-B8C52A5A66A0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110760","Name":"End Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110761","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110762","Name":"Inter State Exempted Sales of Fixed Assets from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A48A1647-673E-4C77-9997-143963591989}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110763","Name":"Intra state Sales of Fixed Asset from Exempted Customer through Sales Quote/ Order/ Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{26405773-06F9-4F36-B6B1-E80AA9987628}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110780","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110801","Name":"End Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-111001","Name":"Not Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-111950","Name":"Sales Line No Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112001","Name":"Intra-State Sales of Services to Overseas Place of Supply to Registered Customer Through Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{FA5B2691-7B6B-43B4-92F1-9B6D10A216E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112002","Name":"GST Deemed Exports With Payment of Duty through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{B66179F8-E62E-45F8-9DE3-5351C859F85D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112003","Name":"Intra State Sales for Deemed Export Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2C82CF3D-40B2-4FCC-8F04-E649DADD1619}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112004","Name":"Intra State Sales for Deemed Export Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{1F930CB5-93A8-4BE9-B412-B9B44F1FBE2B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112005","Name":"Intra State Sales for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{71177393-F102-466E-AC36-1A460BC1C3E9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112010","Name":"End Sales Line No Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112051","Name":"Type - Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112052","Name":"Intra State Sales of Charge Item from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{7422E62E-F5A5-46C6-8A2D-9F9F4C082C91}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112053","Name":"Intra State Sales of Charge Item from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A9E13C42-F366-4E5F-A057-1E0B4E43D454}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112054","Name":"Inter State Sales of Charge Item from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{F5794DA7-0CC7-42C2-BEA0-18EB8F98BB5A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112075","Name":"Inter State Sales of Charge Item from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{207FA1CE-712A-475E-AC05-B36812DDE2C8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112076","Name":"Export Sales of Charge Item from SEZ Unit / Development through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4083D3D9-1F73-48ED-ABD1-12C0559D270F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112077","Name":"Export Sales of Charge Item from SEZ Unit / Development without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{EFF7E856-EF6B-4EC0-9AAE-C2E07B6CB15B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112078","Name":"Export Sales of Charge Item from SEZ Unit / Development through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{40065229-E7D9-4C0A-A0EB-5DE70DD4E9AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112079","Name":"GST Deemed Exports for Charge Item through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{929EB05F-45B5-4F4F-9DD4-61AFAB36F21B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112080","Name":"GST Deemed Exports for Charge Item Without Payment of Duty through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{A2608A05-D116-4475-B690-A6E26170BC2C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112081","Name":"Export Charge Item to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9D6C4AC2-81D1-47E7-8C7C-494F20F1719F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112082","Name":"Export and Charge Item to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9CBCEC6F-A01B-422B-8AAB-4B6BC90EC959}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112100","Name":"End- Type - Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112101","Name":"Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112102","Name":"Inter State Sales of Fixed Asset from Registered Customer through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{46CB3503-286F-43C3-9B04-FBBD5F2CBAF0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112103","Name":"Intra State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{636979B2-6B57-49C6-B0B8-B306261B3304}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112104","Name":"Intra State Sales of Fixed Asset from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A4044120-D393-4525-88F4-AB1A71F2E49C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112105","Name":"Inter State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{52FD8776-17C2-428A-B747-159404771D07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112106","Name":"Export Fixed Asset to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{AF5EE023-63DF-4210-AD71-6436230F6DFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112107","Name":"GST Deemed Exports of Fixed Asset through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{7B9EA3AF-2235-44F9-AE67-E0F9F74740E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112108","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8E2CB0E2-795D-4DC3-879B-5117E415DFB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112109","Name":"Export Fixed Asset to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8FDC8D41-E5D7-40D7-B962-80DA519596F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112110","Name":"Export Fixed Asset to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C99A231E-6BBF-4982-AEAF-6CAAC7E5BA9B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112111","Name":"Export Fixed Asset to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4490AC87-E83B-44C4-A6A8-EAF2650E8773}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112112","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{6EC9FAFD-8029-4B9C-8899-CB3C494682D1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112113","Name":"Export of Fixed Asset to SEZ Development Without Payment of Duty through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{24BF4F23-3693-4E31-ADDA-9D2F91057CA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112114","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{58789CA5-0F23-4972-B1FE-3EE6E8BC19A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112115","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{A18E31F4-0E06-42B6-B8E0-282B42CA2A28}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112214","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112249","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112250","Name":"Intra State Sales of Services from UnRegistered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{1BAE51D1-AD26-40F8-BFD2-156024A23A7B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112251","Name":"Inter State Sales of Services from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2E7A7A10-CCD5-4673-AF42-1EF83425931F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112252","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4529A161-49CC-44B6-95BA-CC141FA794B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112253","Name":"Intra State Sales of Services from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4962D3B9-0349-4BE9-B173-22B456AEE6C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112254","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{BF9D05ED-BF8A-4BC8-9195-D008E4E381FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112255","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice. - POS","NodeType":"Use Case","TableID":37,"CaseID":"{E6D39823-CCCC-43DC-BD7E-CC6EEEBDB5EB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112256","Name":"Export and Service to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{DD3CF85B-64EA-4DD4-A626-C472E3B3B072}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112257","Name":"Export and Service to Foreign Customer With Payment of Duty through Sales Order/Invoice With GST on Assessable value.","NodeType":"Use Case","TableID":37,"CaseID":"{1C9C14DA-22A0-4F6B-968A-1F79BE11B7A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112258","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{ABD1A54F-36DA-45A7-AFED-451B98434B0C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112259","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B2150DAA-4B46-41F2-89BF-19F5FD89362E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112260","Name":"Export Services to SEZ Development Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{F8591F7C-5D5C-4976-B5F1-E3248733EBC5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112261","Name":"Export Services to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{21A349A2-B069-4AA5-86B9-34136BE37267}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112262","Name":"Export Service to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{512B21D6-5395-499F-A2BE-EF6D24385C89}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112263","Name":"Export Services to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8638A2E3-3F44-4672-A54D-0D65B1528FF9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112264","Name":"Calculation of GST Services where Unregistered Transporter, TPT Location is different and Pick Up Location and Delivery Location is same through Sale Orders/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{99C83819-83BC-418A-A2A7-26A041F2F99A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112265","Name":"Inter State Sales of Services from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C6AAB568-68A3-4D8A-A708-ECD7EFD9A3EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112266","Name":"Intra State Sales of Service from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{9666CA08-2C56-43C5-B36F-7FD3745FE832}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112267","Name":"Inter State Sales of Service from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{D9221422-669E-485D-8224-053D641FE4F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112268","Name":"GST Deemed Exports of Services through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{67F7C66D-5296-4A5F-A85F-D4B91D1DBF97}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112269","Name":"Calculation of Transportation of Services from Registered Vendor, where TPT Location and Pick Up Location is same and Delivery Location is different. through Sales Order","NodeType":"Use Case","TableID":37,"CaseID":"{8D0E6401-974F-4F8E-9254-2AF9067E73DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112270","Name":"Calculation of Transportation of Services from Un-Registered Vendor, where TPT Location and Pick Up Location is same and Delivery Location is different. through Sales Order","NodeType":"Use Case","TableID":37,"CaseID":"{99F473AC-553E-4032-AEDB-0AE44C871CD2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112271","Name":"Calculation of GST in case of Transportation of Service where Registered Transporter State is different and Pick Up Location State and Delivery Location State is same through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{02B82B77-D7E5-4A49-89A2-6D46EC87AE61}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112272","Name":"Calculation of GST in case of Transportation of Service where Un-Registered Transporter State is different and Pick Up Location State and Delivery Location State is same through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{76F9EC4B-C6F3-4DBE-B1CA-04EFC5AD609E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112273","Name":"Calculation of Transportation of Services from Registered Vendor, , TPT Location is different and Pick Up Location is different and Delivery Location is different through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{CF4626CB-7022-41C6-95C6-E1FE28C8C370}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112274","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{C447C36E-72FA-4FEA-A49C-F976FE57275D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112275","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice -Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{5043629A-E2D7-4E0D-AD7F-C9D505507D01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112276","Name":"Intra State Sales of Service from Registered Customer through Sales Order/Invoice For Ship To Address.","NodeType":"Use Case","TableID":37,"CaseID":"{0321474A-ABD0-45DB-8CEA-B586A5CB7F49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112399","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112400","Name":"Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112401","Name":"Inter State Sales of Goods from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{11160E03-89D0-481D-B2EA-24898F3DB4AB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112402","Name":"Intra State Sales of Goods from UnRegistered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{364EABA8-DF5D-4174-951E-9C9B375830D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112403","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{A8BF5AD2-5132-40E7-9DF1-893B3940F6EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112404","Name":"Intra State Sales of Goods from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{CFE77ACE-1F20-4126-98D9-8D14B18088EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112405","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B61CB389-28BD-4569-BF95-284B62972B23}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112406","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{6B464955-261F-4EAF-A749-7807444FC37C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112407","Name":"Export and Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{55AD5167-785F-4CC3-B633-84A8414EE100}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112408","Name":"Export and Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice With GST on Assessable value.","NodeType":"Use Case","TableID":37,"CaseID":"{23C292E2-9704-4112-9AB6-A2FCBDDFFA6A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112409","Name":"Export Goods to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2961B717-F882-4174-A7D0-98737C7F49A2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112410","Name":"Export Goods to SEZ Unit With Price Inclusive of Tax through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9CF523A9-24DB-4928-A3CB-8DC5FCA4AF69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112411","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{6621F516-24B5-47CC-AB8B-6EF51F2616E3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112412","Name":"GST Deemed Exports of goods through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{759DC0B3-0697-4262-B0B6-12AA4A6E3822}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112413","Name":"Export Goods to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{AA3E77B0-A08A-4756-90E5-F6561C7D4B9B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112414","Name":"Export and Goods to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{BAEC40C3-3C56-4B4F-95C9-ED6E1E39A019}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112415","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B618D919-C2A5-4BB8-B7EF-13784A51A6D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112416","Name":"Export Goods to SEZ Development Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{34D0EE0E-FC73-416C-A59C-484107E36965}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112417","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{74601C3A-21C1-4924-950E-039ADD6086E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112418","Name":"Inter State Sales of Goods from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{E06B429C-0CDD-4F49-9C4D-8546151805AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112419","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{888E76DA-FA62-4714-83A3-76777E325D84}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112420","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{277B1053-C551-4BF4-9518-7BFE200A8E18}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112421","Name":"Export Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice with Shipment locally as Intrastate.","NodeType":"Use Case","TableID":37,"CaseID":"{9F7A9C0A-BC4A-45C2-B79B-7D22EDB6ABBB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112422","Name":"Export Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice with Shipment locally as Interstate.","NodeType":"Use Case","TableID":37,"CaseID":"{F69C2334-D38A-4CC1-B701-D7DC4C3B7CA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112423","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice - Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{13217522-8F07-4C15-9787-8B1840E8CC40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112424","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{FA8E63F5-19A9-4940-AD59-DB7067BE069A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112425","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote with FOC","NodeType":"Use Case","TableID":37,"CaseID":"{E449E955-A401-4C0D-9DB6-3920DA89D68E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112426","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote with FOC","NodeType":"Use Case","TableID":37,"CaseID":"{E449E955-A401-4C0D-9DB6-3920DA89D68E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112427","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer with PIT","NodeType":"Use Case","TableID":37,"CaseID":"{5E4AA776-3C54-4909-8B29-0CED4FDE6D7A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112450","Name":"End Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112500","Name":"Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112501","Name":"Intra State Sales of Resource from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{D1629C9B-AA5B-4237-94CE-5B14BAF756C0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112502","Name":"Intra State Sales of Resource from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9B0FE6DB-6121-44B0-8BD0-08B8060D7A92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112503","Name":"Inter State Sales of Resource from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{D95F6D4E-EEF5-41B7-8284-694BCBDFEABD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112504","Name":"Export Resource to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{60F5C368-9B10-45CB-BB1B-63DEF7520AB6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112505","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{77D07467-2180-4712-814A-A6292F8D5E59}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112506","Name":"GST Deemed Exports for Resource through Sales Order/ Invoice\n","NodeType":"Use Case","TableID":37,"CaseID":"{BE8902D9-72AA-41C9-BACE-1B781D7C8107}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112507","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{96B76AC2-66FF-4457-9DE3-3F2A3213C3E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112508","Name":"Inter State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{B2047EB4-AD5D-4E8B-BFFC-94FB1C4EED34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112509","Name":"Inter State Sales of Resources from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C8652C10-76BA-489E-985D-CFFC24D6276B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112510","Name":"Inter State Sales of Resource from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{149E867B-BE67-4BA4-AE3B-36C10F7552F5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112511","Name":"Inter State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{6F89240D-BBA1-4BB9-85B6-0BE2154EE0B8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112512","Name":"Intra state Sales of Resources from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A1895816-94BF-4F67-819E-D3898920FAF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112513","Name":"Intra State Calculation of GST on Resource to SEZ Unit / Development Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{969F9BE2-D2C0-4DB5-BD38-F9DAC8AB8173}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112514","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{882CB936-42D9-4C2D-BFD9-028D5F5D3337}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112515","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{4B114178-6589-41CD-907E-8C46CCDFE895}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112516","Name":"Inter State Calculation of GST on Resource to SEZ Unit / Development Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E28ED0E6-8917-4D81-AD22-29D13FE94091}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112517","Name":"Inter State Calculation of GST on Resource to SEZ Unit / Development through Sales Order/ Invoice-Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{E9ED8CB8-E0BD-4E8A-88A5-1AA7348ACF20}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112518","Name":"GST Deemed Exports for Resource Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E65CE6AA-C447-466E-A3FE-154D3F5A76DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112519","Name":"Inter State Sales of Resource from UnRegistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{DF167294-5878-44C6-9220-01D93BEA09FF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112520","Name":"Inter State Sales of Resource from Unregistered Customer through Sales Order/Invoice without FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C8BA6CA4-7E8C-4053-980D-451FE32D8EFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112550","Name":"End Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112600","Name":"End -Not Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112601","Name":"Begin FOC","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18157=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112602","Name":"Begin Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112603","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112604","Name":"Intra State Sales for Goods from Registered Customer through Sales Order/Invoice With FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6333F9D2-02B8-4FF1-88EE-386041B7FCA4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112605","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C69C8C2B-3445-476C-80ED-776EC67B06D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112609","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112610","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112611","Name":"Intra State Sales of Goods from Unregistered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{A4B4B64C-1D4C-48EE-88E9-4BBC4F05EAE8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112612","Name":"Inter State Sales of Goods from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{E786A7D6-1147-46F6-BB75-1223AAC92007}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112616","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112617","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112618","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{BB38433A-2AE4-492D-8380-D8B5A6F80135}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112619","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{F0E83015-3886-4263-A0B7-A97BA3B7753C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112623","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112624","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112625","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice - Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{BE591554-5098-41FD-A200-5B5B48C19083}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112626","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{CF0F6DEA-A530-45B3-8B1B-CF86879E9EDA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112630","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112631","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112632","Name":"Intra State Sales for Deemed Export Customer for Goods through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{ADF93FBF-84BB-4DC9-8B87-EADDE08829F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112633","Name":"GST Deemed Exports of goods through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{4116F9D4-1957-46D1-BCED-580BD21C0908}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112634","Name":"Intra State Sales for Goods for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{17DA0FC6-FC3F-4AB5-A2C7-34D00B649941}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112635","Name":"GST Deemed Exports for Goods With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{44130B2E-FBA8-47DE-BF1F-AF9145AC13BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112637","Name":"EndGST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112638","Name":"End Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112639","Name":"Begin Type- G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112640","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112641","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{03D7D334-04D2-4EC5-AE88-A67C1409C8BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112642","Name":"Inter State Sales of Services from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{08EACBE7-7B68-4B7B-8BCE-8D5D4FAD80F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112647","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112648","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112649","Name":"Intra State Sales of Services from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8D8429D6-2B1A-4081-900E-9D19C312335E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112650","Name":"Inter State Sales of Services from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EA505D2C-22A0-4B4B-B20F-18A0E1AE2C02}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112653","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112654","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112655","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{81345EC6-231D-4274-95D2-302FFE85B903}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112656","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FD5FD103-5251-4063-92C9-CCFE016B971B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112661","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112662","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112663","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer For FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6807FDAC-8BCB-4B1A-84FF-882C6A9C15B7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112664","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0561985A-B2F9-4C9C-BE39-7D6AE423104E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112669","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112670","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112671","Name":"Intra State Sales for Deemed Export Customer for Services through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3C1D2A94-CBAE-4190-BE50-AD56CF9218D9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112672","Name":"GST Deemed Exports of Services through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{05CEE5AD-FF50-479C-922C-1C51FE10F724}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112673","Name":"Intra State Sales for Services for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{741172E2-8B2D-461D-9081-71145F1316DF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112674","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112675","Name":"End Type- G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112676","Name":"Begin Type Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112677","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112678","Name":"Intra State Sales of Resource from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{9E8F612A-6306-4CD0-AA63-8F443733B9B5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112679","Name":"Inter State Sales of Resource from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{E8ACBB6B-EAAF-46C6-A4EA-EFB502D8E110}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112684","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112685","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112686","Name":"Intra State Sales of Resource from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DC79D469-98CD-45FF-ADBB-27DFF74D2672}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112687","Name":"Inter State Sales of Resource from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{13827C55-0612-40EF-BED1-62D7605B9D68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112692","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112693","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112694","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{747B1A95-DF79-4286-A38B-A6F98F2D2DE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112695","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5582B9B9-2C0C-4036-A0E1-ED20495D47AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112701","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112702","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112703","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8B4B45EC-5B92-4383-935B-DE2E70579CA8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112704","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{51CD0A49-E8DF-42A3-9180-84D1A7076A42}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112710","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112711","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112712","Name":"Intra State Sales for Deemed Export Customer for Resource through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{103E8A37-530C-4FFF-BB01-D298E7DF9FFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112713","Name":"GST Deemed Exports for Resource through Sales Order/ Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{F356E0FE-23C7-4D81-A149-3659F2CEFBB4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112714","Name":"Intra State Sales for Resource for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{29C6FB1D-F01C-426F-AC3E-76E9122FDB69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112715","Name":"GST Deemed Exports for Resource With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{97120CFC-A3A4-4545-8A71-881473ED33C7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112720","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112750","Name":"End Type Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112751","Name":"Begin Type- Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112752","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112753","Name":"Intra State Sales of Fixed Asset from Registered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{CF89D22F-0CD8-4E3C-A01C-6C159E03E5E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112754","Name":"Inter State Sales of Fixed Asset from Registered Customer through Sales Quote/Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5860DC76-AE27-4A12-808D-667172BEF336}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112760","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112761","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112762","Name":"Intra State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{84992760-0362-488C-8D49-0DE8065F945C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112763","Name":"Inter State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FBBCEAFB-3B22-4D36-969E-84AB2CDC7859}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112769","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112770","Name":"Begin GST Customer Type SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112771","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice - Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FC888469-0E29-48BA-B417-07D5943D7C45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112772","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{307349C1-C724-4CB8-8878-7587CC2617EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112778","Name":"End GST Customer Type SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112779","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112780","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A8B33288-CA54-4DC6-B3E4-A14E3CCA4EFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112781","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DA8695B6-D7D7-41E9-BE59-C26A19D03C2C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112789","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112790","Name":"Begin GST Customer Type - Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112791","Name":"Intra State Sales for Deemed Export Customer for Fixed Assets through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{02A9B37F-66A8-446A-B5B0-703D594FF934}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112792","Name":"GST Deemed Exports of Fixed Asset through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{7E2F85F6-FFBA-45FE-80B5-39B654365ACD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112793","Name":"Intra State Sales for Resource for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{29C6FB1D-F01C-426F-AC3E-76E9122FDB69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112794","Name":"GST Deemed Exports for Fixed Asset With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{23F3D552-5B8B-47A9-B217-903567666BCE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112800","Name":"End GST Customer Type - Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112820","Name":"End Type- Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112821","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112822","Name":"Begin GST Customer Type Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112823","Name":"GST Deemed Exports for Services With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{53D88A93-5CE2-427C-81F0-6DCFC36F579F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112826","Name":"End GST Customer Type Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112827","Name":"End Type G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112840","Name":"End FOC","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112845","Name":"End Sales Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112848","Name":"Sales Return Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112849","Name":"Not Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112850","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112851","Name":"Intra-State Sales Return of Services to Overseas Place of Supply to Registered Customer Through Sales Return","NodeType":"Use Case","TableID":37,"CaseID":"{44F4B3DF-4625-4E8F-9BE3-53C61B67463B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112852","Name":"Intra State Sales Return of Services from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{BC238FA9-CAD7-43AB-8E7E-D6FFC7035EE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112853","Name":"Inter State Sales Return of Services from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{693D346E-069E-4306-9F7C-84665CD42141}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112854","Name":"Inter State Sales Return of Services from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{80BC1B3E-DB26-4E90-B780-43C8BA593655}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112855","Name":"Intra State Sales Return of Services from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{8A18FA5B-AD17-43D3-8981-5BB20A04EFA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112856","Name":"Intra State Sales Return of Services from Registered Customer through Return Order - POS","NodeType":"Use Case","TableID":37,"CaseID":"{1FF813B4-1776-4717-8C56-8F0E684ACE73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112857","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{DB44587F-08FB-4D5F-96A3-6CD4D4E30300}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112858","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{895C47DF-89E2-4A14-9329-5E260C1DBF05}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112859","Name":"Export Return of Services to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{81E2ACA0-D6DD-4B4A-ADEF-60B602660F25}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112860","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{1DE560C5-73C9-4476-9447-80FC42CD492C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112861","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo - POst GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{8139E94E-D43E-4C24-B6B3-C59F55737321}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112862","Name":"Export Return of Goods to Export Customer for item Type GL Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{4738101C-19E3-418C-A19D-61E67100D199}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112890","Name":"End - Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112895","Name":"Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112896","Name":"Intra State Sales Return of Goods from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{26581492-A8D9-41EB-B84E-40671AE8CC3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112897","Name":"Inter State Sales Return of Goods from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{77DC6AF2-5D31-4450-8F78-E2F7383B9EAB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112898","Name":"Intra State Sales Return of Goods from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{08F3F188-43F5-441F-AB95-BE332651AD3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112899","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{2167C0D3-971D-481A-86BA-F45FB92025FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112900","Name":"Intra State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{293882EE-DEB8-47A9-BAF1-9221422B247A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112901","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{77D351AF-2B06-49FB-B72A-CF9980E31A43}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112902","Name":"Export Return of Goods to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{BCB4C9B2-E212-4971-BE8C-914BC1DAAB1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112903","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{17ED9604-C26D-496C-B2F4-9124166CF719}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112904","Name":"Export Return of Goods to SEZ Unit Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A8ED1A73-743C-4D08-98E3-6D85C416E951}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112905","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{06F95F30-2C34-4CD2-9084-0B9101B9455D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112906","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A744EF89-44A8-4CE0-81F8-3D8094623CD1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112907","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{8153E2CA-FD9A-4A9F-A0E4-A657636F83DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112908","Name":"Export Return of Goods to Export Customer Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{E607F91D-D6E7-459A-801A-CBB9C7F8CE89}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112909","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo With Price Inclusive of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{7AB59461-B75F-446E-A3EF-A2050873DFAD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112910","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo With Price Inclusive of Tax And Post GST To Customer","NodeType":"Use Case","TableID":37,"CaseID":"{88910F77-9493-481B-AF77-783FBD332B12}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112950","Name":"End - Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113000","Name":"Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113001","Name":"Intra-State Sales Return of Resources from Unregistered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{8F88FDD0-561E-4FEA-A663-4F4BAEC9D009}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113002","Name":"Inter State Sales Return of Resources from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{C9854015-8E55-43F1-A5F2-747FC1CF6A0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113003","Name":"Inter State Sales Return of Resources from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{52BFB82F-A54A-4E62-9DC3-2D608D6373B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113004","Name":"Intra-State Sales Return of Resources from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{6856A59C-FE7F-4DDA-B180-391F6E0D0A5F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113005","Name":"Export Return of Resource to Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{AD7D62C2-213F-4288-9506-BE3D205DBB95}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113006","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{FD76EB64-C01A-48C0-9F8E-3EE2E17BE515}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113007","Name":"Export Return of Resources to SEZ Unit / Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{D500E259-42B6-4346-BA2F-D76ECB9AFEE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113008","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{E62B6029-1BFA-456D-8D43-306AB7C78589}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113105","Name":"End - Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113106","Name":"Type- Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113107","Name":"Intra State Sales Return of Charge Item from Un-Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{41F1CFC3-B9F5-464D-9B6D-2C7B6C83186C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113108","Name":"Inter State Return of Charge Item from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B3036F44-2238-4DC9-B250-70AA3FEC7821}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113109","Name":"Intra State Sales Return of Charge Item from Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{3835C90E-1BDF-4C46-B50E-C5375ED24ED4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113110","Name":"Inter State Sales Return of Charge Item from Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{DBE9B77E-9171-4F5C-A7CA-9156126D34FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113111","Name":"Export Return of Goods to Export Customer for item Type Charge Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{D8792403-FBC9-455C-8A3A-C67DAFDB6E53}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113112","Name":"Export Return of Charge-Item to SEZ Unit / Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{609F72CC-C49F-43F1-AB52-E56ED173368B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113113","Name":"Export Return of Charge-Item to SEZ Unit / Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{7F8B0021-4099-48C9-80BB-D977917CEA9E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113114","Name":"Export Return of Charge-Item to SEZ Unit / Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{57A0B7F8-E6C5-4CC4-89AD-11A14AF3C68B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113125","Name":"End Type- Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113140","Name":"Type- Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113141","Name":"Intra State Sales Return of Fixed Asset from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{884574EB-3354-459C-AF96-6EB624CCEFFE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113142","Name":"Intra State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{F7C5C8B6-2EB3-478E-AE6B-66BEEB6A3861}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113143","Name":"Inter State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{C915C6D6-9C5D-4C2F-BAB6-50E13850581E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113144","Name":"Inter State Sales Return of Fixed Asset from UnRegistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{7627B9EF-CB23-4EAB-88D9-3D894B6F6607}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113145","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{24F69259-FD27-49A7-B5E8-3CBF5351132F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113146","Name":"Export Return of Fixed Asset to SEZ Unit Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{200C22B1-5DC0-4A80-B377-B14F9613D061}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113147","Name":"Export Return of Fixed Asset to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{E35E188E-728D-42BE-94F0-4B0476315B0B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113148","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo - Post GST To Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{7D7F45D3-E214-47D5-8CD5-ED31E8F4092F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113149","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1DD8BB1A-1AA9-4B82-9F6A-80F26AA8675D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113150","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{C6AFDFC6-874B-4B14-BCC9-8FC5B4992157}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113151","Name":"Export Return of Goods to Export Customer for item Type FA Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{AA85EF19-5F94-438E-ADC4-A9ACF0DCB0C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113160","Name":"End Type-Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113161","Name":"Begin No. Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113162","Name":"Export Return of Services to Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{BB48AD27-2942-4C4A-B19C-4A7E76E181DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113163","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{D22C3484-E0DE-473F-9D62-2BB1DD4B10B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113164","Name":"Export to SEZ/ SEZ Development /Deemed Export Without Payment of Duty through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{2FF34432-5A9D-4C71-AF8B-6DDDC92F0A85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113165","Name":"Export Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{C502F69B-F76D-4D72-B7FC-A272A252590B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113166","Name":"Export Return to Deemed Export Customer Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{7BE46E73-EF21-4766-B4F2-34558460A2C9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113167","Name":"Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{2F7B1F64-56F5-48C9-A6B2-A5F7F2BF8A2F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113168","Name":"Intra-State Sales Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{5FB236FB-7619-48A1-92D0-BD12F5C8A5C0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113169","Name":"Intra-State Sales Return to Deemed Export Customer Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A030C0C9-951C-4818-8A68-C6D5917C31BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113170","Name":"Intra-State Sales Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{0BD7BB2E-38E6-4254-82CB-713F429D787C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113180","Name":"End No. Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113205","Name":"End - Not Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113305","Name":"Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113306","Name":"Intra state Sales Return of Exempted Resources from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{99E193A6-6A7C-4035-BCC1-F2BC49DC4F86}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113307","Name":"Inter State Sales Return of Exempted from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{A485DD0E-AB08-49E5-9C7C-1FCA3398AE3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113308","Name":"Inter State Sales Return of Exempted Resources from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{A49C7425-A602-4445-873D-BCA89D3C2330}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113309","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{D187D562-E011-4879-839D-A3CB824D11EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113310","Name":"Intra state Sales Return of Exempted Item from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1A135F44-7A65-49A6-A08A-C87D453E5837}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113350","Name":"Intra state Sales Return of Exempted Resources from Unregistered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{C2730DF7-9769-4732-819E-C39124E5E3F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113351","Name":"End -Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113380","Name":"Begin Type Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113381","Name":"Intra state Sales Return of Exempted Goods from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{DA8B91D0-1B63-44EE-BA57-0A40B1403080}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113382","Name":"Inter State Sales Return of Exempted Goods from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{246B0F60-6CA4-42A1-ACDD-30C38C89D2C4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113400","Name":"Begin Type Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113401","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113402","Name":"Intra state Sales Return of Exempted Services from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{D2A96240-2F58-406C-8774-03CD60C28E5D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113403","Name":"Inter State Sales Return of Exempted Services from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{E9E7486C-DBFB-432C-886F-017AD828CE5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113420","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113421","Name":"Begin Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113422","Name":"Intra state Sales Return of Resource from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{10E9D621-B3A8-49E2-BAA1-EB7D535C0712}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113430","Name":"End Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113431","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113432","Name":"Inter State Exempted Sales Return of Fixed Assets from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{2D2466D5-E651-49FE-A00C-9DE16690874C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113433","Name":"Intra state Sales Return of Exempted Fixed Asset from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1C2FBFBD-A18B-4A5D-819E-043993E5510C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113440","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113441","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113442","Name":"Inter State Sales Return of Exempted Charge Item from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{0410BC8A-0231-4947-8ED6-982A68846120}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113443","Name":"Intra state Sales Return of Exempted Charge Item from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{3277542B-B49C-4CCD-B661-F72C71CED698}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113445","Name":"End Type - Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113449","Name":"Begin FOC","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18157=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113450","Name":"Begin Type Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113451","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113452","Name":"Intra State Sales Return of Goods from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{14FC3D2C-3DAF-4C04-AA69-6AE47D0D7552}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113453","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A4A8C87F-D458-4DD2-B8E9-8393220FDD2D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113459","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113460","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113461","Name":"Intra State Sales Return of Goods from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{10CA76A8-8DE4-419A-8220-3DD88D8F8747}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113462","Name":"Inter State Sales Return of Goods from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{92CD1D91-1D76-46D8-B2E1-C62C54E62191}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113469","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113470","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113471","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{31F4991C-5E91-4AF3-B911-39F985BF48C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113472","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C3755AFF-81D3-4B1A-85B2-B2C8A60F9EAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113479","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113480","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113481","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8E881E89-87C1-4745-9529-B82A784E83BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113482","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{270F6442-0097-437D-9F91-5C15BD9EAB4D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113489","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113490","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113491","Name":"Intra-State Sales Return to Deemed Export Customer for Goods With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{913AAE94-3AEF-4F6D-80DB-F30FF5E5C067}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113492","Name":"Deemed Export for Goods With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{14586EFF-720D-4670-B023-EA4FBFF96B99}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113493","Name":"Intra-State Sales Return to Deemed Export Customer for Goods With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{9654C77E-D850-4AA2-9A47-FB003B1574B2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113494","Name":"Export Return to Deemed Export Customer With Payment of Duty for Goods through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{88F1A4B3-DCAC-499A-BD7A-A5EBA3EF3CB4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113499","Name":"EndGST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113500","Name":"End Type Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113501","Name":"Begin Type- G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113502","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113503","Name":"Intra State Sales Return of Services from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{59157E34-743F-4293-A662-1A9C3D916178}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113504","Name":"Inter State Sales Return of Services from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{D9AA8D5E-8135-47AA-A722-6356873CF5EF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113507","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113508","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113509","Name":"Intra State Sales Return of Services from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{B8757B78-D36C-4AB7-B532-353006120046}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113510","Name":"Inter State Sales Return of Services from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EFB5634E-C341-4922-9BC9-1CE76AD61D79}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113512","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113513","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113514","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo - POst GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{3397DBB8-098B-4A52-9BFA-E24A12B5F9E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113515","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0E655E71-19D9-4A10-8A28-FE4AFBA2A7C7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113517","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113518","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113519","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DBA2CAA4-8EE2-4DD0-B413-383101DB034E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113520","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{ABF997C4-D467-4F97-94CD-10AFE3A66B3A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113523","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113524","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113525","Name":"Intra-State Sales Return to Deemed Export Customer for Services With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6CC7879A-5AF1-4FD6-8713-7ECF54ABC412}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113526","Name":"Deemed Export for Services With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{861E4175-2832-49D7-8AF3-96E6C19F8E68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113527","Name":"Intra-State Sales Return to Deemed Export Customer for Services With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{6924DAF8-60F6-4C42-9266-200033C6D3F4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113528","Name":"Export Return to Deemed Export Customer With Payment of Duty for Service through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{1F11A81C-0551-4B07-AA30-23DA57E0FE16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113535","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113536","Name":"End Type- G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113537","Name":"Begin Type- Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113538","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113539","Name":"Intra-State Sales Return of Resources from Registered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{D6D5AACF-3FC9-4E46-AC66-66CB29D5293E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113540","Name":"Inter State Sales Return of Resources from Registered Customer through Sales Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A0D756A0-DC72-49F9-A1F9-B926242C6AD2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113543","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113544","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113545","Name":"Intra-State Sales Return of Resources from Unregistered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5131A9E4-A281-496F-9AF2-E60DC7D88A50}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113546","Name":"Inter State Sales Return of Resources from Unregistered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{40C0504C-93D7-4EC1-A4B8-7FE82C224BE4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113549","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113550","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113551","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{1F48109A-8444-4862-B9DA-190182B3FBAC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113552","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{F4C6236C-3805-4826-88FD-EAC2659389B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113557","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113558","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113559","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{6C740BB7-2090-4E02-8611-2FD65CC51465}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113564","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113565","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113566","Name":"Intra-State Sales Return to Deemed Export Customer for Resource With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{858CA47F-FA82-4485-91A5-12B2EBF36D6F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113567","Name":"Deemed Export for Resource With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{220890E5-A6C0-4719-83C5-E2247EF9BEC3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113568","Name":"Intra-State Sales Return to Deemed Export Customer for Resource With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{11D160CF-FD98-4C47-928B-9F4125F584A9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113569","Name":"Export Return to Deemed Export Customer With Payment of Duty for Resource through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EBFDB89B-5F22-4386-87CA-72157CBF122D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113574","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113575","Name":"End Type- Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113576","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113577","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113578","Name":"Intra State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{291465B9-0C22-48B5-9EEA-4006CC372B1A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113579","Name":"Inter State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{BFB628D6-4413-4628-B619-013EF3255CE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113583","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113584","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113585","Name":"Intra State Sales Return of Fixed Asset from Unregistered Customer through Sales Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{7AFF7259-D09B-4C62-8575-34BEDEE4A72C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113586","Name":"Inter State Sales Return of Fixed Asset from UnRegistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3EAEA83A-B986-4C1E-9231-EDEAC919DE2F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113590","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113591","Name":"Begin GST Customer Type SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113592","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0DD3F665-8D52-487D-A200-9BD69DB0A4A2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113593","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{10BBEEB9-E622-4899-B4E0-C000CA753E54}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113597","Name":"End GST Customer Type SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113598","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113599","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo - Post GST To Customer For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3AD6DDBC-A132-4ABA-B216-73133B85604A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113600","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{902158A0-97D5-4075-943E-3B30B800FB78}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113608","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113609","Name":"Begin GST Customer Type - Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113610","Name":"Intra-State Sales Return to Deemed Export Customer for Fixed Asset With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{5629EBAA-46B2-4DD7-9511-1D6E697A6B0A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113611","Name":"Deemed Export for Fixed Asset With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{4BFA98D3-CEF3-4573-B464-9E897EB9D4AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113612","Name":"Intra-State Sales Return to Deemed Export Customer for Fixed Asset With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{B3793372-9AD2-4F36-BA5C-3AF13BE44F2D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113613","Name":"Export Return to Deemed Export Customer With Payment of Duty for Fixed Asset through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{321E0F7B-A15D-4CE6-9C11-BF3FD3DEE918}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113620","Name":"End GST Customer Type - Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113630","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113635","Name":"End FOC","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113639","Name":"End- Sales Return Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114640","Name":"End Sales","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114645","Name":"Purchase","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114650","Name":"Purchase Document","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114660","Name":"GST Reverse Charge -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114670","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114672","Name":"Intra State Purchase of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{536EFB4F-1EBC-4731-861E-433F3BA23A4A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114673","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{93FE03BD-63C7-44B5-B40D-5974C8300527}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114800","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114850","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114851","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{01C97F7D-4263-4387-84E1-610D2EA4A762}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114853","Name":"Intra State Purchase of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Quote/Order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{78A245B3-3BAB-4347-B09A-FDE73A600BB2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114854","Name":"Inter State Purchase of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Quote/Order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{94FF400C-34A8-4760-A4E5-C4B367739FA3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114855","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{93FE03BD-63C7-44B5-B40D-5974C8300527}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114856","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{51395C06-549D-40B5-98C5-A7F6B73AF427}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114857","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{131AC7D7-6079-4C25-A3A6-CEAC66A6203D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114858","Name":"Intra State Purchase of G/L Account from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{D7A29410-A685-41B6-A8F9-268D65F062B6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114859","Name":"Inter State Purchase of G/L Account from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4DC1D2DC-A8F8-4443-A563-348B8E8961C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114860","Name":"Inter-State Purchase of Charge Item from Sez Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{85DAE7D1-95AC-4FD1-B1E0-5FFD980481BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114861","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{0E1A782B-CF1F-4CF0-8797-A1310519B1DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114862","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{3E14881B-DB97-473E-9A0B-C8A0A2D604C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115000","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115001","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115002","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{71EC1D59-01EC-4486-8CB4-0957D4ADF38B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115003","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice-For GST Reverse Charge No","NodeType":"Use Case","TableID":39,"CaseID":"{CF902413-8C5A-4677-B070-1583FF5C13A4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115010","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115020","Name":"Type G/L Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115021","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BDA9C3AF-6736-46FB-B84C-ED078EA8F1B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115022","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Not Available and GST Group as Goods through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{63842FED-75F4-44C8-897F-6D350858A29A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115030","Name":"End Type G/L Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115100","Name":"End GST Reverse Charge -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115150","Name":"GST Reverse Charge","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115151","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115152","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice Type-Debit Note","NodeType":"Use Case","TableID":39,"CaseID":"{2AB850AD-528A-498A-9E23-65E396AC61A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115153","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice Type-Debit Note","NodeType":"Use Case","TableID":39,"CaseID":"{B064E1CD-DB51-456E-AE19-7F2AC8C9DC11}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115154","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{89071509-BF13-4ED5-A45D-8D938DFEF265}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115200","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115201","Name":"Exempted Yes","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115202","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice for Exempted Goods","NodeType":"Use Case","TableID":39,"CaseID":"{700CF31E-E4A1-4183-AEF6-7C572C34C8AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115203","Name":"Inter State Purchase of Exempted Goods for Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{DF5E22A4-BD3C-4C80-B6D3-9F667C8037DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115205","Name":"End Exempted Yes","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115250","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115300","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115301","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{118F40D5-2D0E-45D6-B458-52D6BF00A035}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115302","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{8D8A9485-D248-4B9B-AB8C-EEDB746B190C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115350","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115351","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115352","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{20913086-F0CD-4AC8-AF0A-755723E44946}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115354","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice - For GST Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{D279BE29-1CB8-4F96-BA2C-0348368D0879}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115400","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115401","Name":"Begin Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115402","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FB4C68ED-BD93-4229-B1BB-91163250C066}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115403","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote With Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{9154D0D0-5D85-40BE-889D-764E65F8691C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115404","Name":"Import of Service from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice for Charge (Item)","NodeType":"Use Case","TableID":39,"CaseID":"{B8A8C947-5BA0-45B4-B8A4-33088F25782F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115415","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115450","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115451","Name":"GST Credit-Non Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115452","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115453","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{AE939960-28B0-426C-B5D7-D8535B9AE3C9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115454","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{27255CC6-70FC-4D33-91F1-5B83F03CE33E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115500","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115501","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115502","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{9167AE32-6B66-48FB-AF03-35D261A7C5BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115503","Name":"Import of Services without Input Tax Credit available from Foreign Vendor.","NodeType":"Use Case","TableID":39,"CaseID":"{F1AFD035-5F0A-4DD2-B15E-E0EEF0BA43D7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115506","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{387B69F6-70EC-4BCC-A4C0-AA1CFAB0D356}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115507","Name":"Inter-State Purchase of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{62A4192A-86D8-4431-A641-78EF2F348546}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115550","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115551","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115552","Name":"Intra-State Purchase of Resource from Registered Vendor where Input Tax Credit Not Available - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{A0CED092-3AAD-4121-A5A2-F4DEAC316621}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115553","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{FED218A8-8C3F-43D9-BBD5-E8BCBB30D8BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115554","Name":"Inter-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{C340D02B-697D-414F-9082-E4CC9B4B2A3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115555","Name":"Intra-State Purchase of Resource from Unregistered Vendor where Input Tax Credit Not Available - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{0EE4D825-CC7B-458D-9165-D32635F56F41}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115556","Name":"Intra-State Purchase of Resource From UnRegistered Vendor where Input Tax Credit Not Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{38BC1AAB-3066-483F-811E-E147662D48C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115580","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115581","Name":"Begin Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115582","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1C3087C6-66E1-4D66-8133-DF7F13FDB0D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115583","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C7BA99E0-7A62-41C9-93C4-36BDAD52C328}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115584","Name":"Import of Charge from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BFCC5C7F-F391-44D5-84F1-1D72DC7A9DEC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115595","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115649","Name":"End GST Credit-Non Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115650","Name":"End GST Reverse Charge","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115651","Name":"Extempted -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115652","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115653","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115654","Name":"Import of goods with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{4D6EF305-AE45-4735-9E9A-C9428D139D38}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115655","Name":"Import of goods with Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{24E498DD-9DFB-4097-9F32-C8EBD49B8D22}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115656","Name":"ISD - Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{E8B90257-9F0D-42F4-A340-13A648D11829}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115657","Name":"ISD - Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{874048A6-575B-456F-A2E7-26532DA3F1CA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115659","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{2C80FA78-CBBE-45E7-8C62-5010B692AC9C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115660","Name":"Inter-State Purchase of Goods from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{FF5D43D6-C93E-42D5-9CD3-E3FCA99E77DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115661","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{94D31994-F430-4825-A72E-D41F51F63952}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115662","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{53AA1183-8DEC-4542-A708-317C5CD7BDA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115663","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{E75A7A67-D332-41BE-B7EA-61C8BF69E9F7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115664","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{1440B152-A710-4982-86C0-5C27FEF4A7D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115665","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A8B3F6FB-A42D-4767-BD3D-D4C9BB11AEAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115666","Name":"Inter-State Purchase of Goods from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{B86AA24C-78CF-4F29-BD88-E17580D6992B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115667","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7BDD3EE0-29AE-4C15-A879-1DBF13ADA019}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115668","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{9FE211A9-770A-4396-BE84-B9625D975180}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115669","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{B7A4D05E-75C4-47F5-B502-9510B13E2DEA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115670","Name":"(POS) Intra-State Purchase of Service Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{F0AB5767-48C9-4F01-A346-D6CAA74EFCED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115700","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115701","Name":"Type-GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115702","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is Available.","NodeType":"Use Case","TableID":39,"CaseID":"{BACBB54A-0D30-4206-AA6A-5CF48A744D5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115703","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{9568C93C-FC46-477D-B554-A8EACAEAF21A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115704","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{F85B9211-93F9-4443-9784-BE52C220CE24}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115705","Name":"ISD - Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote ","NodeType":"Use Case","TableID":39,"CaseID":"{EF5146EB-771F-4DCE-80E7-ACC0B606829F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115706","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{0027CF9D-DA15-43A2-83D4-5CD214E0278B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115707","Name":"ISD-Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{700AF8A2-1315-41BC-9FE9-E00FB826DC80}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115708","Name":"Inter-State Purchase of Services from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{8A057230-A2A9-4E59-8101-9A947A8D8B91}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115709","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FC1AEFDA-0537-4D94-A576-F542B6710B71}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115710","Name":"Inter-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{5F9FDC49-A99D-4F72-AA5F-4E0BF5B3AC34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115711","Name":"Intra-State Purchase of Services from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{31C539BE-990C-4E00-AF1A-6BFA1333ED7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115712","Name":"Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{B03B25F1-806F-4CE3-86A2-A65BBE1F8360}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115713","Name":"Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry and GST Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C2D132AB-4A23-47FC-9A25-EEB973689456}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115714","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{04BA2F8D-9562-4551-8A98-C61CE5509B47}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115715","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{19625BAB-02B9-42E1-80EF-FED88D13FF40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115750","Name":"End Type-GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115751","Name":"Type-Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115752","Name":"Import of Fixed Asset with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{E076372D-BFB5-4911-B6EE-85F1F71B1569}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115753","Name":"Import of Fixed Asset with Input Tax Credit available from Import Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{7E44665E-5E48-4F98-8E9A-135669D3E75B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115754","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{C02EF3F0-A659-4762-854B-830A8D59B371}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115755","Name":"Intra State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4753502A-0359-4A8C-A37C-4DB4B6FCD790}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115756","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{4852FE50-F64A-454F-B43F-D46FE4BABECB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115757","Name":"Inter State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted goods(Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7C939AC1-1919-4919-A0D0-B62E3C72B382}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115758","Name":"Intra State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{975372FC-F93D-4E8B-81EA-57B6751B9F94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115759","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted goods(Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{B69B4BDA-5CAC-4C9C-B4DB-211912D30EF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115760","Name":"Inter-State Purchase of Fixed Asset from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{F3E7CEF3-5437-42EC-9DED-FE81F994FFCB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115761","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{B83A838B-C0A8-4E69-B735-86D011229B1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115762","Name":"Import of Fixed Asset with Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A7ED2E31-2CA7-4D60-A415-31A78736388D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115763","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{8B96F1E1-FC2C-48FD-AD1E-62986961AC0D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115764","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{FCC8AA84-E16B-4D3F-A139-946089738FB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115765","Name":"Inter-State Purchase of Fixed Asset from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{E246F7FE-DE34-4E3C-BD3B-D8943D9B966C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115766","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E365B9AF-953A-462B-A562-9B494D0B84B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115767","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted fixed asset with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{DA3FC765-67AA-4232-8C30-6CE3E6E6DFDC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115768","Name":"Import of Goods with Fixed Asset from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{D9172942-78EB-4305-950C-C9DEC70F16E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115769","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{F7997B96-631E-456D-9FA2-028ADEC745C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115770","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{5E2D969D-2A4B-4288-900B-7D1527F80A8E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115800","Name":"End Type-Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115801","Name":"Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115802","Name":"Inter-State Purchase of Charge Item from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{21957E13-9751-40A2-B591-67ADE93573E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115803","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{4F234B8B-1B95-4938-B3DF-3D96784EAC77}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115804","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{AB0E6CA2-960E-4D6F-A7C6-D461F268627F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115805","Name":"Intra-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{72511E89-CA1E-4749-8648-F1EFD6F61D44}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115806","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{0ABF122D-4ED5-4820-8411-7C39147B2819}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115807","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{CD837506-8D55-4E71-8576-FA6B9934A6BB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115808","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1DD024D8-C5D0-44DC-BD2E-3B4A395F33FE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115809","Name":"Intra-State Purchase of Charge Item from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8EE30985-1662-4A16-B9B1-2C36589F4F94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115810","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{2A0E0C4E-331F-42B3-96D2-F9CFF01E6FC1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115811","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted charge item with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{714E77D3-C569-418A-A932-DBFF272D3B92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115812","Name":"Import of Charge Item with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{B95176D6-58FF-487C-A25B-26E433D85356}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115813","Name":"Import with Input Tax Credit for Charge Item available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{13E5D66F-422B-4830-992B-39C740D6D560}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115814","Name":"Import of Charge with Input Tax Credit available from SEZ Vendor with Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8E537871-C8F7-4E07-8B32-84411C668443}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115815","Name":"Inter-State Purchase of Charge Item from Sez Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{05312E80-BE4E-4EB1-9A1E-AF55EA4D8E3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115816","Name":"(POS) Intra-State Purchase of Charge Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{E587BDAC-2C08-42CA-9657-B3EA423F30E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115850","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115851","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115852","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{EC4815D3-A78F-4C4F-8C64-8FE9AF09050C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115853","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{4AC1A712-CC9B-4CB7-91EA-05245C1D7211}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115854","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{F5EA246D-523F-4FFA-B316-967933F01C16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115855","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{7342ECF9-7916-4923-AC4C-71E973942346}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115856","Name":"Intra-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{0FD2A76A-DECB-4FAC-8008-10D6762CDAFE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115857","Name":"Inter-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{20C477FD-F60A-4D5C-B919-BF3082993511}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115858","Name":"Import of Resource with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A106F715-2EC1-43B7-B0AE-33F6AEEF3B2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115859","Name":"Import of Resource from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{45189151-3ACF-421C-8984-C932DC8A3A2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115860","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{FEC46768-8566-4C39-AE1D-62B0FD83D5D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115861","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{56966B10-DE93-4980-A9FE-1CBB5DE6359B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115870","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115900","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115901","Name":"GST Credit-Non Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115902","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115903","Name":"Import of goods without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A7619228-F860-4E03-B21E-E0F01EFF6C52}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115904","Name":"Import of goods without Input Tax Credit Not available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{ABA6F00E-B423-49DF-8DF5-F74950011703}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115905","Name":"Import of goods without Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{C57B60DB-22D0-43D5-8460-B47D9F11AFC2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115906","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{E277B92E-D047-425F-B44D-E8EA58FAEE5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115908","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{09CD7163-15FB-4340-82BF-57373BE3E206}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115909","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{F4B17FC7-3605-47DD-804E-4573BCB3FAC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115910","Name":"Inter-State Purchase of Goods from Unregistered Vendor where Input Tax Credit is Not-Available","NodeType":"Use Case","TableID":39,"CaseID":"{9E59D4DD-C975-4F42-B5A2-AA98AC93FB7F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115911","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{5577B8ED-6471-4480-AD5A-63BA31696AB7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115912","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{A274F11C-332F-4EE3-AC91-2E2D95E9E2B6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115913","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{679E7F9F-9AAC-4CC5-A263-904ECC708057}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115914","Name":"Inter-State Purchase of Goods from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1B2046C2-4264-4272-A998-085B20832B87}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115915","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit isNon-Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F4F11B85-700B-4880-9A73-740FF36C4160}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115916","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{CE65AEFF-0248-437E-B8A6-87C60E49EFD4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115917","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{55BEA8B4-15ED-47B2-AD24-157BA39467EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115918","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{CCD1BD07-0A33-4DAB-9A3E-E66956E0F98B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115919","Name":"ISD - Intra-State Purchase of Type Item and GST Group Type as Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7D71FA6F-572E-4C61-B3CB-297E4521E1A9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115920","Name":"ISD-Inter-State Purchase of Type Item as Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{9304251B-68E9-41D1-A6FD-00424AB38EE6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115921","Name":"(POS) Intra-State Purchase of Item as Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{7C76E97A-E248-4CFE-82A9-18EB754ED886}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115950","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115951","Name":"Type-GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115952","Name":"Intra-State Purchase of Services From Registered Vendor where Input Tax Credit Not Available through Purchase Quote- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EB169AE5-8DE0-4490-8DFD-46CEE05AA5C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115953","Name":"Inter-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{67527223-25F5-48B0-A0C2-F0064BD92F18}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115954","Name":"Intra-State Purchase of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{46AD3622-5D72-4048-9FAC-3C31077C2DF0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115955","Name":"Intra-State Purchase of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FEE41ACD-C7C4-4653-9A34-15F7F0B70663}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115956","Name":"ISD-Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{EC905260-0D39-42CD-ADAE-27F4E74CE267}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115957","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{6A72F56C-CA49-4D53-939A-4FABC050BFB3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115958","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{0C3618F6-08BD-417F-8744-94A415595940}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115959","Name":"ISD - Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{61FB3B94-A2C7-4F3F-B4A8-801D842328E1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115960","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BE0C902C-E9FC-4548-B8C7-AB70E21388BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115961","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{36A5E0EC-E197-4102-8FF0-F6DC9B4A47C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115962","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is not available.","NodeType":"Use Case","TableID":39,"CaseID":"{62216594-6660-492B-ACA0-F8BD3893DE49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115963","Name":"Intra-State Purchase of Services from POS as vendor state Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{A52E9652-EFC8-4950-B8C1-A41D887AF962}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115964","Name":"Import of Services without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{C07C2110-2740-4FAD-975B-293FAAD86247}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115965","Name":"Intra-State Purchase of Services from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{D2457D2F-2B0E-4F56-BF93-007E245C4FF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115966","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{0C6EE2B8-335F-4420-9B76-AEBF773BB40C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115967","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7642FECB-8BEE-4127-9523-47ECB7D29DC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116000","Name":"End Type-GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116001","Name":"Type-Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116002","Name":"Import of Fixed Asset from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7307BDA2-283F-4094-82E0-41EC241CE177}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116003","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{47F223C1-06BE-4BD6-A98A-E001F8CE436E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116004","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available through Purchase Order/ Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{1A8DCBD9-6A50-4C2F-9364-9DB967B50A24}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116005","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{2E369D91-2885-47EB-886E-7AD35816B42E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116006","Name":"Intra State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{5DC7836A-BA61-4738-8506-BA91EC982903}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116007","Name":"Inter State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{62AD7817-C30F-4EC6-B68C-AC4828B07DF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116008","Name":"Intra State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{64233AA2-2DB0-4AC9-8078-0755AB5DA89D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116009","Name":"Intra-State Purchase of Fixed Asset from UnRegistered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{DB7C51C1-1F9F-40F2-82C2-82D59793413C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116010","Name":"Inter-State Purchase of Fixed Asset from Unregistered Vendor where Input Tax Credit is not available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F8D35423-18AA-4916-A10C-3DC5A6F80CB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116011","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4FA8A9F3-D8C5-4B20-ACB0-F52BFE013A01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116012","Name":"Inter-State Purchase of Fixed Asset from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{718C2339-648B-4FC6-A496-737B12176D01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116013","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{679F358F-4DB0-4587-9F0C-CE643B16A152}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116014","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{AFCCC11E-97B1-4627-8DFD-4184537E2509}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116015","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted fixed asset for Non-Availment through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{D50E350F-963C-4C3C-9E78-08F12AB7D8F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116016","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice For FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7E48E18F-D907-423A-BC62-256D7CFAA089}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116017","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available through Purchase Order/ Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{65746F4E-A835-4278-98CA-B6AB0D0CBF6B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116050","Name":"End Type-Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116051","Name":"Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116052","Name":"Intra-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{97664A61-096E-43D9-BF55-2D5672F02F7F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116053","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F4A8CF06-D6CE-4263-ACF3-F1FBB744FBFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116054","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{101CAF41-34AB-4EA1-9277-166954A7FF94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116055","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{64F0C586-3993-4F05-A127-332E7E46802D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116056","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{666A5198-99BA-4EC0-A89A-C991109BBC0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116057","Name":"Inter-State Purchase of Charge Item from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{66A099C8-9660-498E-9BEB-61296A76CFAF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116058","Name":"Intra-State Purchase of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8A58255B-97C9-4691-9DBF-1C041D4433DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116059","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C4DD33B4-D4DB-4F30-8C86-E2045B473C57}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116060","Name":"Inter-State Purchase of Charge Item from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{CCE6E98E-5330-48BA-B42E-70E2BDE3E45B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116061","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted charge item for Non-Availment through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{FFCC9396-D3C4-4A81-BDE8-23070BF8976F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116062","Name":"(POS) IntraState Purchase of Charge Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{A5676558-7FDC-4CEC-B562-37829B285BE3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116100","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116101","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116102","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order.","NodeType":"Use Case","TableID":39,"CaseID":"{DBD883FC-4DD3-4C9C-B9AC-AAAF07FF4F3E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116103","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{073D94DC-E7F0-4535-B269-7C36C626FD96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116104","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{B33DCDC5-21C3-4019-96E3-EF513EAED95E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116105","Name":"Import of Resource without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{B12DD0D6-A87C-4A8C-AE71-746B26156893}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116106","Name":"Import of Resource from Foreign Vendor where Input Tax Credit is not available through Purchase Order/Invoice/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{5D419270-CBAE-42FB-A135-DC1693C77985}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116107","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{10D6A0FE-F802-4235-B438-3A29B7C853ED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116108","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{F1A5130E-021A-40F9-8282-82CBFEE3FF07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116130","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116150","Name":"End GST Credit-Non Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116200","Name":"End Exempted -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116201","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116202","Name":"Inter-State Purchase of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{1FFB6082-63D3-4AF8-A83B-9AE92D2010E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116203","Name":"Intra State Purchase of Exempted Fixed Asset from Registered Vendor (Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C7563021-CD85-4519-ADFB-BA848CA3022F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116204","Name":"Inter State Purchase of Exempted Goods-SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{97856AB0-DAB0-4CF3-B1B1-3A6EB1524E0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116205","Name":"Intra State Purchase of Exempted Goods and Services.","NodeType":"Use Case","TableID":39,"CaseID":"{2ED393A6-3B1D-49AC-9DBB-D5836930F61C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116206","Name":"Inter-State Purchase of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{AB2BDB68-471C-4EC0-B43A-92920239FBF9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116207","Name":"Intra State Purchase of Exempted Fixed Asset from Registered Vendor (Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{F67095C1-F610-4B59-A1E5-7B58D83A6CF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116208","Name":"Inter State Purchase of Exempted Goods for Registered/Exempted/Composite Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{07AC553C-0E84-41E3-B04A-19B63C3BCF75}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116250","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116251","Name":"Begin Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116252","Name":"Import of Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, without cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{A43577AE-11F7-4DF9-9EEF-F317ED83ADD4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116253","Name":"Import of Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{B45F2436-2E00-4A49-9A8E-7B9202FE0F0A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116260","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116300","Name":"End Purchase Document","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116301","Name":"Purchase Return Document","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116302","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116303","Name":"GST Credit Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116304","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116305","Name":"Return of Import of goods with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{15A78CF5-A4CC-4804-95DA-6FB3DCBF2DBF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116306","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{BB9814B7-D039-49BC-BF5D-F80127620CAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116307","Name":"Purchase Credit Memo/Return Order for Imported Goods where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{48C973FB-77C2-476C-AB39-0E61F0F76F0D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116308","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{D0059E3B-4B5F-44E3-B2AD-B3DB74C1CEC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116309","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{BC7B8A8E-B343-439B-B240-B5D7D0253CC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116310","Name":"Inter-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{CFC3D6F5-144A-4731-8658-BA626457624A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116311","Name":"Intra-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{2E358EDE-097D-4846-A45B-BC2C1AE07FE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116312","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available with Bill To-Loc Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{F6EB6D82-74A5-413E-BE36-9308F41811A3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116313","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{7759D07C-F691-4738-8FB8-F682B03DA922}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116314","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{998A15E8-B4E6-460E-A89C-239F276E9B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116315","Name":"Inter-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{FFBADC05-CF47-4787-B31A-EB85F88CACE8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116316","Name":"Intra-State Purchase Return of Goods from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FBEDC063-63EA-4FED-A3DD-8B5E175031CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116317","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{055AEE33-1301-4B59-BA0D-E76D2D542B34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116318","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{C9F94259-EA6B-481B-AAF1-8D8F9F025902}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116319","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{90643BB8-1BEB-40C8-81B3-E6A3C5075C45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116350","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116351","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116352","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is available through Return Order.","NodeType":"Use Case","TableID":39,"CaseID":"{AF13E308-74EA-4A38-86B9-B0EA0DCE1972}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116353","Name":"Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{0CCFD5FB-95C8-4189-ACFF-E7D9AE1DB368}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116354","Name":"ISD - Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{137A0843-A280-441F-8D87-5639EDB2B01E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116355","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{2A733D02-2125-4EA9-97E3-2068E5708A94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116356","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{710042C6-833D-4CF4-B943-47CF6691F7DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116357","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{D2E1CF7B-EA38-4EB3-82C3-E2E6949625D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116358","Name":"Intra-State Purchase Return of Services from Unregistered Vendor when Input Tax Credit is Available (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{AEDED96A-9927-4DF4-B89B-22FA7C77C19F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116360","Name":"Inter-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{64A2BCC0-3E88-4613-B91D-540FF4977F86}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116361","Name":"Inter-State Purchase of Return of Services from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{6510FF1C-A0A5-4C52-8DE5-836BE2536650}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116362","Name":"Return of Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{36710BC3-FED5-4726-8AB5-1DC108CF23AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116363","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{47AA3C60-6575-4F87-8022-29790BB97A11}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116400","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116401","Name":"Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116402","Name":"Return of Import Fixed Asset with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{1201ECAE-F4F2-43D7-938E-15F5361C2062}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116403","Name":"Return of Import of Fixed Asset with Input Tax Credit available from Import Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8EECE1FD-4BDB-4A37-92ED-00380C170CFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116404","Name":"Inter State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted goods(Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{A8A42D6F-2A47-4175-8ED8-F482D64554C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116405","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{CCF91681-45AA-45DC-94A6-52DBBF199CF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116406","Name":"Intra State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{4E53918C-16B7-4834-86DE-E7422FC21E83}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116407","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{57322220-978A-459E-8EC5-05AB66E6B362}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116408","Name":"Intra-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{F37442C1-AB50-445F-A7C3-8DCA84931B69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116409","Name":"Inter-State Purchase Return of Fixed Asset from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{B5669E1C-A496-431B-A29F-69E527E37AA0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116410","Name":"Inter-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{E6B10245-E536-41CF-A9CC-AA043113F6F4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116411","Name":"Inter-State Purchase Return of Fixed Asset from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{38583B1E-682C-4B06-BB69-005849014E82}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116412","Name":"Intra-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1EB264E9-24DD-43EC-A17F-E623BF565203}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116413","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{8E9E924F-0BE8-4862-BDFE-39CB23848B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116414","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is available through Purchase Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{B4B3EE78-57EC-4EE8-8F51-E7B868CF34B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116450","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116451","Name":"Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116452","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available through purchase return order/Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{9A744701-39FF-4CFF-AA72-F5856E82FBF4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116453","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{142D2618-98AC-4DD8-922F-11CF063DD8D8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116454","Name":"Inter-State Purchase Return of Charge Item to Unregistered Vendor when Input Tax Credit is Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{8B75A47C-8DD2-45C8-99D9-B04E18C531D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116455","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{06A818C9-817D-4983-B8D9-D96759380A68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116456","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{4934B903-2938-4ED9-994C-36F89B08E352}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116457","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8F83C983-4368-45FF-9319-952826F72162}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116458","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{478E0789-2184-4644-8165-3B5169084277}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116459","Name":"Inter-State Purchase Return of Charge Item from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{0E9F08C2-7CF2-4AC1-AFB4-57AC8383E732}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116460","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{03418FFD-0AF9-48F5-A500-EC48BF9DE4E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116465","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116466","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116467","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available through Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{A8C8864E-5E75-431A-90D6-9AAB47623BA6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116468","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C6FDF908-18DE-47B6-ADED-1E654C153D2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116469","Name":"Inter-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{D8632F51-FEDB-4AF9-8A25-CFE374BD12BA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116470","Name":"Return of Import of Resource with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{62CA4077-63DB-4812-8DBA-369BDD0A5A63}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116471","Name":"Intra-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{C9ED5F18-07B9-43AF-9221-448B962EC9CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116472","Name":"Intra-State Purchase Return of Resources from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{04F944A1-EF9C-440F-A89B-654782D13EAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116473","Name":"Purchase Credit Memo/Return Order for Resource where Input Tax Credit is available.","NodeType":"Use Case","TableID":39,"CaseID":"{4001BD59-B35E-4BBC-B7AD-464FBB21E54A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116474","Name":"Intra-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{EE5198CD-9648-49CF-97C5-E71A9843EE27}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116475","Name":"Intra-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{21A2DFFA-DF09-4531-BE3F-DFC7E50F3D1E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116476","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available through Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{2E66DC31-92BB-4928-83E5-6F87FC544A85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116490","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116500","Name":"End GST Credit Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116501","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116502","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116503","Name":"Return of Import of goods where Input Tax Credit Not available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{D66CD2EC-C8A4-48B9-A634-B14161E0E03B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116504","Name":"Return of Import goods without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A4A0C6C8-FE70-4DA2-9E3D-E5F0CCA93A22}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116505","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{4684DF92-D578-4978-B4EC-04ACC07C8206}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116506","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{C8AEE991-4EDD-4562-BCE7-3DFA3502C8D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116507","Name":"Intra-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available through Return Order","NodeType":"Use Case","TableID":39,"CaseID":"{0120B543-BBCA-433A-B84D-3A07CA4BD763}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116508","Name":"Intra-State Purchase Return of Goods to UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{5F7E0B6C-3D83-418C-9829-C5E5E52460C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116509","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EB39C2FC-37D8-4778-8B44-9A45DDA46B2E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116510","Name":"Inter-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{938B00CD-0C55-4E7E-9E88-9D26724E10E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116511","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available with Bill To-Loc purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{65C755B4-E396-453F-9425-896AFF64D1B3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116512","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{0D76D452-CCE9-473B-998A-71EDADD459AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116513","Name":"Intra-State Purchase Return of Goods to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{35C8BFED-ED88-46B7-AFE8-9F2C58421857}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116514","Name":"Inter-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E0AA74AA-F401-4115-B768-D41BB661B532}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116515","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available purchase Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{A515D68A-A496-4A81-8F4E-EC21F207D5FF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116516","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{040A5713-75A6-4FD3-BCA9-7A335D697933}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116550","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116551","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116552","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is Not Available.","NodeType":"Use Case","TableID":39,"CaseID":"{F14B809C-31CA-4B7D-989E-419B00D35F8F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116553","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is not available Through Return Order ","NodeType":"Use Case","TableID":39,"CaseID":"{C6B64855-0CA9-4749-B21E-AF9FA0AB33D4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116554","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{2CEB6A3E-11E4-420F-A3C6-886B920BEC29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116555","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{78DCCF81-7548-4028-A6AF-31AEB633FC3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116556","Name":"ISD - Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{BD845B37-5E0F-4EF3-94CB-ED972B71A3C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116557","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is Non-available through Purchase Return Orders/Purchase Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{E6B27281-EC3F-4040-B035-4179D33884CE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116558","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{58CCF42B-75BE-422F-90A5-93E52B2CC817}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116559","Name":"Intra-State/Intra-Union Territory Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A7F8D194-33DA-472D-87CB-693FB589CD45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116560","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A4461039-C91C-4102-9438-866AF5607096}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116561","Name":"Intra-State Purchase Return of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{F7D97DC6-CF0E-4248-95A3-3C7189BF844D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116562","Name":"Intra-State Purchase Return of Services from UnRegistered Vendor where Input Tax Credit Not Available (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{01289E18-40A0-4AC7-92DA-601F5AF77AA0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116563","Name":"Inter-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7EE4EB63-5718-4880-80D7-DC82790F804D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116564","Name":"Inter-State Purchase Return of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{6FB5A46A-83C0-495F-9495-7365027603EA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116565","Name":"Return of Import of Services without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{7DBFAC05-5315-4A5F-B5BE-962A065F7D93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116566","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Purchase Return Order/Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{79A59A19-401F-444F-A3C4-F8CBBA06D4B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116567","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is Non-available through Purchase Return Orders/Purchase Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{4B185DAB-793D-4C0A-A303-417A61AC9B96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116568","Name":"Intra-State Purchase Return of Services from Registered Vendor when Pos as Vendor Input Tax Credit is Not Available Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{4F2FB4B9-25BE-4C8C-8D77-7E3D63F9DB40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116600","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116601","Name":"Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116602","Name":"Purchase Return of Imported Fixed Asset from Foreign Vendor where Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{21811F58-E56B-4A1B-B6DA-C9BD8EECC3AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116603","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{11784DD8-7EF0-42CF-9A18-401A9ABC6466}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116604","Name":"Intra State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted (Non-Availment) goods with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{12EFA340-BD17-487B-A7CC-F23993B289CF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116605","Name":"Inter State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{8E46C7A8-FFB5-40D2-8DBB-26E9FEDDF17D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116606","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{079237F7-FA64-40B5-8BE7-A92428550117}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116607","Name":"Intra-State Purchase Return of Fixed Asset to Unregistered Vendor when Input Tax Credit is Not Available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{8EC585FC-1F0E-4A31-A28A-463F3239EB57}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116608","Name":"Inter-State Purchase Return of Fixed Asset to Unregistered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{028465BA-B14C-4266-9D47-75A8087EE299}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116609","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{BFB5B4F3-BBC1-4A5B-9B7C-C3572578CD78}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116610","Name":"Inter-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{3A542488-E9A7-41E5-BF0B-C73F9C82A8DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116611","Name":"Intra-State Purchase Return of Fixed Asset to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{6A0A47A2-4A0F-4CCD-AC63-A70C76E05091}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116612","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7601E944-F060-482E-B620-CF8555D00BB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116613","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available with Bill To-Loc for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{BC63870D-585E-4C07-A6A6-44DE28F260BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116650","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116661","Name":"Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116662","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase return order/Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{2653A4AF-CD57-4A29-B4C2-4FE3749AC4AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116663","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Not Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{87FB95AD-905D-4832-9EC3-0330B674D601}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116664","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1B728E5D-4A32-4E32-A2AA-FE3673AFC2CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116665","Name":"Inter-State Purchase Return of Charge Item to Unregistered Vendor when Input Tax Credit is not Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{79839F30-7F44-4411-BB2D-07FFA294A38D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116666","Name":"Intra-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7E781F55-9A83-4206-B18A-46C2CA5E8573}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116667","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{4F6B53B9-9961-4F29-8151-33C5D413CF58}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116668","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{38F58D78-84D4-40D9-BE77-CD33C02B49AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116669","Name":"Inter-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C85088E3-672F-4F2E-B1EF-19CBDFA5460B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116670","Name":"Intra-State Purchase Return of Charge Item to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E5053EEB-44D1-4552-8084-67D72A90CECB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116675","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116685","Name":"Type Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116686","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{40E9E837-E785-42A1-B8ED-9B27D43D1FFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116687","Name":"Return of Import Resource without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{5C3AA147-EDD0-4271-9CB8-4A6F6C98962A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116688","Name":"Inter-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{43D94D4C-82EA-4A44-B80F-E297292CAA10}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116689","Name":"Intra-State Purchase Return of Resources from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{A170BEEF-350A-4B43-B333-CBEA1D197E1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116690","Name":"Purchase Credit Memo/Return Order for Resource where Input Tax Credit is not available.","NodeType":"Use Case","TableID":39,"CaseID":"{7C3076A9-460B-41BC-AED8-6B615E4835D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116691","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{545DC1C5-C848-43B9-BFCE-72C3A45C94BA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116692","Name":"Intra-State Purchase Return of Resource from Registered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{7B096619-70FB-4622-9E57-8EAE58DC1AB1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116693","Name":"Intra-State Purchase Return of Resource from Unregistered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{A2153C07-E791-4821-9542-F9C6C3737BAF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116694","Name":"Intra-State Purchase Return of Resource from Registered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{8B9B630B-1AC7-49A1-BA60-3A415B97C2BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116695","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{4FD977C3-86DB-46A1-AEEF-A0A176F23BE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116697","Name":"End Type Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116700","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116701","Name":"Begin Type Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116702","Name":"Inter State Purchase Return of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{F0453435-C2EF-43BB-BC81-39454E1DE4B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116703","Name":"Intra State Purchase Return of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Credit Memo/Return order.","NodeType":"Use Case","TableID":39,"CaseID":"{28E2DDFD-2F63-47CB-986C-8E6F5D2356F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116715","Name":"End Type Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116750","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116751","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116752","Name":"Intra State Purchase Return of Exempted Fixed Asset from Registered Vendor (Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{26260269-B2BE-4D01-AF43-91BCE15FFF05}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116753","Name":"Inter-State Purchase Return of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{8314CDF7-853B-4DEA-A6DF-CE478FB1D3BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116754","Name":"Intra State Purchase Return of Exempted Fixed Asset from Registered Vendor (Non-Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{739B3C04-8659-438B-B9D5-EB62435B9025}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116755","Name":"Inter-State Purchase Return of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{43228213-4CEA-41C4-B28B-170B00BC81A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116756","Name":"Intra State Purchase Return of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Credit Memo/Return order","NodeType":"Use Case","TableID":39,"CaseID":"{5E1C6C44-CCBA-49ED-AD64-54D360467B0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116757","Name":"Intra-State Purchase Return of Goods from Registered Exempted Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{8FCF5988-06C7-44E2-A7BD-A5A9B40CDEF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116758","Name":"Inter-State Purchase Return of Goods from Registered Exempted Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{67FECB97-A3FA-4FC9-8A80-E214C3DF4CA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116759","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{4F992CE7-BB8C-4129-923A-F53A771DF231}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116760","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{0371699B-6B05-4B16-99FB-604F142308AA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116800","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116901","Name":"GST Reverse Charge -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116902","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116903","Name":"Type -GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116904","Name":"(POS) Intra-State Purchase Return of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{3F057D29-C926-453B-8B17-6B5E431A20B4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116950","Name":"End Type -GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117000","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117001","Name":"Begin Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117002","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{2BF5B2FE-2191-416D-B63F-47052716FC1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117003","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{F759EFFB-61F9-4B84-B9CD-01E2616A7B85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117004","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{F023887D-C599-4FE6-89E7-49C257DC208C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117005","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{13352A4D-EEAB-4FEA-A778-0BDAD73B550C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117015","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117016","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117017","Name":"Inter State Purchase of Charge from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{0CF4326B-FD68-4AE6-B52A-CD2AA2F2A788}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117020","Name":"End Type - Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117021","Name":"Inter State Purchase of other types except good from Composite Vendor/Supplier of exempted not goods with no GST Impact through Purchase Return Order/Credit Memo With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{21E3248F-92C2-444C-B7E9-B48218AD918A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117022","Name":"Intra State Purchase of other types from Composite Vendor/Supplier of exempted not goods with no GST Impact through Purchase Return Order/Credit Memo with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1988B611-ABD4-44C4-9CB5-67BB88E0002C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117023","Name":"Inter State Purchase of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{BC9A772F-DBF9-4F4F-8607-212DC829C005}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117050","Name":"End GST Reverse Charge -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117051","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117052","Name":"Return of Import Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{047704F8-A619-401F-9653-12103103E14A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117053","Name":"Purchase Credit Memo/Return Order for Imported Goods where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{DA972CCF-D97D-4379-9704-AB397FA9E08F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117054","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{1005E09C-7F65-4E7A-AC0C-B071C455A412}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117055","Name":"(POS) Intra-State Return of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{8B6ADE91-D482-4071-B431-C299292EF2BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117056","Name":"Return of Import Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, without cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{B5C09EE0-1CF9-4818-AADB-AC5E95626AE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117057","Name":"Intra-State Purchase Return of Goods from Registered Vendor where Input Tax Credit is not available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{0EBD8B25-3C27-46AE-8CD7-4E870DB1315B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117058","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{97437C0C-3E99-4D15-9378-34AC4B8FD002}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117100","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117101","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117102","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{AA1B2E3A-4149-4352-B081-2A869CDE5353}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117120","Name":"End Type G/L Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117121","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117122","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{55B6317F-25F3-4C73-8AA5-AFA3EC519C88}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117125","Name":"End Type - Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117150","Name":"End Purchase Return Document","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117200","Name":"End Purchase","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117201","Name":"Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18543=1(<>''),Field18001=1(<>''),Field18009=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117202","Name":"Account Type-Customer","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117203","Name":"Document Type- Invoice","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117204","Name":"GST Customer Type- Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18007=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117205","Name":"Intra-State Sales of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{3335E143-1F90-4E63-B6E7-5A4897019FFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117206","Name":"Inter-State Sales of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{38C5A554-206D-44A5-9090-86CAC52A7715}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117207","Name":"Intra-State Sales of Service to Registered Customer through Sales Journal/Journal/General Journal - Kerala Cess","NodeType":"Use Case","TableID":81,"CaseID":"{C89845E0-C8B1-45B1-9C1B-04EC264B7AC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117208","Name":"Intra-State Sales of Service to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{BBD37D0A-E328-4544-B5E1-03FCF65399D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117209","Name":"Inter-State Sales of Services to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{CF221DCD-487C-4B3C-BBC4-FE16B6667E76}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117210","Name":"Intra-State Sales of Exempted Service to Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{B0D75B5B-C42D-4381-80D8-B312BD2360AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117250","Name":"End GST Customer type- Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117251","Name":"GST Customer Type- Others","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18007=1(2|3|4|5|6|7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117252","Name":"Inter-State Sales of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F56F247A-8E36-496E-8672-C6FE2C81CE7B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117253","Name":"Intra-State Sales of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F719A304-09CF-479B-A123-2A4E34ED3133}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117254","Name":"Export Sales of Service to Export Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F807C5DC-40B1-4E22-AB49-06BC54A22558}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117255","Name":"IntraState - Export Sales of Service to Deemed Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{005ED1ED-F66A-4A08-8647-0554154F0DF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117256","Name":"Export Sales of Service to SEZ Development Customer with payment of duty through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{3DC33AD0-69AB-4B36-B58D-7C409957507C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117257","Name":"Export of Service to SEZ Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6F745F19-1955-4DAA-A3C4-BAC6D6326232}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117258","Name":"Inter State - Export Sales of Service to Deemed Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{FCB154BF-A72A-43A0-87AB-DF80DEAB4F1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117300","Name":"End GST Customer Type- Others","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117350","Name":"End Document Type- Invoice","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117351","Name":"Document Type- Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117352","Name":"Inter-State Sales Return of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{CCF41113-DC62-47E2-B45B-87AF0248AF65}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117353","Name":"Inter-State Sales Return of Goods to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{674E08E2-EB2A-4C3D-924B-9370C6ED3DBF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117354","Name":"Intra-State Sales Return of Service to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6C9258C7-AF9C-43E4-A015-C4253265F37E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117355","Name":"Intra-State Sales Return of Service to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6C9258C7-AF9C-43E4-A015-C4253265F37E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117356","Name":"(POS) Intra-State Sales Return/Credit Note of Services for Overseas Place of Supply from Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{DF8067FF-2F97-485F-8364-3AC5536AD82D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117357","Name":"Export Sales Return of Service to Export Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{B8EE2ED8-F29F-465D-B6DC-A3A2A4BB1B3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117358","Name":"Intra-State Sales Return of Service from Deemed Export Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{4BFBD63E-F561-4C68-AB29-BF4139D24F49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117359","Name":"InterState Sales Return of Service to SEZ Development Customer with payment of duty through Sales Journal/Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{68AE0437-E71F-4AC5-8729-DDD40410D69D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117360","Name":"Sales Return of Service to SEZ Unit Customer with payment of duty through Sales Journal/Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{960BC8FC-FF34-4E46-A6A0-6FD2CB7BBDA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117361","Name":"Inter State - Export Sales Return of Service to Deemed Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{FFBBBCDE-50F5-4D02-8B40-DAD63ED1491E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117362","Name":"Intra-State Sales Return of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{DF783FC9-39C3-492B-B94F-90BCF26C04E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117363","Name":"Inter-State Sales Return of Service to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{4E1D5479-C527-4295-A0C1-7D82D94860F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117400","Name":"End Document Type- Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117401","Name":"Document Type- Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117402","Name":"Inter-State GST on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{287ED69D-1488-4A48-BA50-E063EC8EF915}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117403","Name":"Intra-State GST on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{18F45902-76C4-4B57-AF7F-7D9B3A76D51F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117404","Name":"Export of Goods and Services to SEZ Development, through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{0B9F94CE-1C82-4FF7-9EF7-D51E156A0286}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117405","Name":"Export of Goods and Services to Foreign Customer through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{2E85F2F7-2ED8-42CC-95F5-B20D32DB41AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117406","Name":"GST Deemed Exports through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{AE574FA3-E537-4FC1-9F8D-E16EF5D7A40E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117407","Name":"Export of Goods and Services to SEZ Unit through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{B7D173ED-4B8F-4F13-95B8-B7C4890B3623}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117408","Name":"Export of Goods and Services to SEZ Unit through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{B8ACD224-FC70-4037-86AD-C18AA5DA085F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117409","Name":"Export of Goods and Services to SEZ Development through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{C9CE4C92-F6CD-4B97-BD13-D8EE824D7D66}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117410","Name":"Export of Goods and Services to Foreign Customer through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{DAC31111-29F4-4C8F-BEEC-C3B31668DAF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117450","Name":"End Document Type-Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117451","Name":"Document Type-Refund","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117453","Name":"Intra-State GST Refund on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{0628D305-F863-48E9-986E-0570995F7002}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117454","Name":"Inter-State GST Refund on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{F643A772-5CA6-4CC5-913C-9188C52DF8E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117499","Name":"End Document Type-Refund","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117500","Name":"End Account Type- Customer","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117501","Name":"Account Type-Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117502","Name":"Document Type- Invoice","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117503","Name":"GST Credit -Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117504","Name":"GST Reverse Charge -Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18023=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117505","Name":"Intra-State/Intra-Union Territory Purchase of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{3C23CDAC-6995-4B6C-9E4B-708B540C413B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117506","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{744B47C3-E4C1-4AC4-A37E-CBA3102A59A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117507","Name":"Purchase of Services from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{7E182C87-669C-4CD8-8336-41C2ABE6144C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117508","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{B8F32E0D-5D5E-4B84-AE3A-C0D4520470D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117509","Name":"Inter-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{819CADCF-BE64-4BC6-93BA-59EDE239EB54}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117511","Name":"Interstate GST Calculation on Reverse Charge Exempt Transactions through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{25E8E204-2E63-4B79-824C-3C1185D6467C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117513","Name":"Intrastate GST Calculation on Reverse Charge Exempt Transactions through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DF134523-53D1-4137-B091-D9C5E1DB8D64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117550","Name":"End GST Reverse Charge -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117551","Name":"Begin Vendor Type - Composite","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117552","Name":"Inter-State Purchase of Service from Composite Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F3CD2FC6-4CEE-47EF-B0F5-9EB3E46CE74B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117553","Name":"Intra-State/Intra-Union Territory Purchase of Service from Composite Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B68BAE5C-F887-46E8-9B4C-7333EB6152E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117558","Name":"End Vendor Type - Composite","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117571","Name":"Begin Vendor type - Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117572","Name":"Intra-State/Intra-Union Territory Purchase of Goods from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{66A65EDD-B06A-4817-84C4-B61B035AC7EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117573","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{C2FE3376-EDB2-4C3E-A82D-F49D27D292DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117574","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{36017702-208F-4E8C-A75E-8872EA7D1205}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117575","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{26B7CC70-0C7D-4FD2-B00A-B7845C289215}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117576","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{02670909-9C35-49DA-B64F-E5EA4602693E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117577","Name":"ISD-Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{FA492219-9C2F-4986-B773-DAA35CA74796}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117578","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E73369B2-7A52-46D6-909F-BA116399AF39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117579","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E73369B2-7A52-46D6-909F-BA116399AF39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117580","Name":"(POS) Intra-State Sales of Services for Overseas Place of Supply from Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{5DAE448C-0BD5-4DC3-9BF9-B846921D2C71}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117581","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available through Purchase Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2341D31D-659B-4C70-B0FD-20C4494A4F1F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117585","Name":"End Vendor type - Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117586","Name":"Begin Vendor type - Import","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117587","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal-","NodeType":"Use Case","TableID":81,"CaseID":"{F6DED4E3-7405-4E6E-B0DF-1320041F130A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117588","Name":"Import of Purchase of Service from Import Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B4662B2E-9E63-4BA7-A683-248E5811B566}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117589","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{6D031AA1-2009-4D4A-A8E7-01D9116EDC5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117592","Name":"End Vendor type - Import","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117593","Name":"Begin Vendor Type- SEZ","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117594","Name":"SEZ of Purchase of Service from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AB179237-EF7C-4BB1-9406-46B7B6DD1449}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117599","Name":"End Vendor Type-SEZ","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117600","Name":"End GST Credit-Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117601","Name":"GST Credit- Non Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117602","Name":"GST Reverse Charge-Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18023=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117603","Name":"Intra-State/Intra-Union Territory Purchase of Service from UnRegistered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{4CB6ACCD-BD47-4485-A757-62924EA09524}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117604","Name":"Purchase of Services from SEZ Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{B2CD61FA-9C30-4FE5-B5C5-5B535BA6DF96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117605","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{4D9AEA2D-B94B-40CC-B9D9-BC8D6FA19425}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117606","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{580975ED-52DE-4EF9-BD94-99425C52B570}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117607","Name":"Intra-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0751F148-5E1D-4EFB-9008-ECB2F2F6704D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117608","Name":"Inter-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{4D947EDC-3710-49D2-91D5-6446978D43EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117650","Name":"End GST Reverse Charge -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117651","Name":"GST Input Service Distribution -Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18022=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117652","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{9639222B-DFA8-4F14-9A72-24E994C1C7DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117653","Name":"ISD-Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{19FC1701-0FE4-4ED3-83B8-07DAB075A043}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117700","Name":"End GST Input Service Distribution -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117701","Name":"GST Input Service Distribution -No","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18022=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117702","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E530DADD-215F-47FF-8A84-46A1E62353CF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117703","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{5305AA1D-CF40-43CC-B9E3-B9471E33DCB3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117750","Name":"End GST Input Service Distribution -No","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117751","Name":"Begin Vendor Type - Import","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117752","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{774A6E80-FBB4-4413-9144-6ACA8C6546D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117753","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{9236A009-169D-4464-8B2C-62C94B782C26}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117754","Name":"Import of Services from Associate Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{54CB1855-9AD0-4A47-9777-D811C7FA1FDE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117759","Name":"End Vendor Type - Import","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117760","Name":"Begin Vendor Type - Unregistered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117761","Name":"IGST on Transportation of Goods through Purchase Journal/Journal/General Journal for Unregistered Vendor with Non-Availment.","NodeType":"Use Case","TableID":81,"CaseID":"{26ED31B0-75B8-439C-8E16-56518665184F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117764","Name":"End Vendor Type - Unregistered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117765","Name":"Begin Vendor Type - Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117766","Name":"Intra-State/ Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{15E17CFF-8262-4E83-8FD4-3EC012EEA465}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117767","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{A734B9DD-A4C1-427E-AF18-6A8B27474F50}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117768","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DA8551C9-79B9-423C-801E-A8C868788300}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117769","Name":"Intra-State/ Intra-Union Territory Purchase of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{547DDC98-8D3C-46A0-84BE-03E71BA135DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117770","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{997C3EE3-8453-43F1-A179-A32B19EFD8B8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117771","Name":"IGST on Transportation of Goods through Purchase Journal/Journal/General Journal for Registered Vendor with Non-Availment.","NodeType":"Use Case","TableID":81,"CaseID":"{4A025601-FF3D-4BA6-A567-0C31785D0D36}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117772","Name":"Place of supply as Vendors State in Purchase Transactions through Purchase Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{7ABC67E5-F6F0-4ECB-9634-55258429DFD8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117780","Name":"End Vendor Type - Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117781","Name":"Begin Vendor Type-SEZ","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117782","Name":"SEZ of Services from SEZ Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8DF66C94-890C-4007-9341-18D0565000FE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117799","Name":"End Vendor Type- SEZ","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117800","Name":"End GST Credit -Non Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117850","Name":"End Document Type-Invoice","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117851","Name":"Document Type-Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117852","Name":"GST Credit -Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117853","Name":"Purchase return of Imported Goods where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{7B91DD35-F410-4971-A2BC-DBCB67520105}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117854","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{BBBBD283-C64C-4AFE-A14E-950791E18CF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117856","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{9DFF9CBE-B1A5-4D28-A855-8783315A87D0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117857","Name":"Intra-State/ Intra-Union Territory Purchase Return of Goods to Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{85D7B57B-6657-4C5B-889D-282A48B9D0FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117858","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{C97F63C3-79EB-44D6-8AEA-B1710A9BBCE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117859","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{D0EADC0B-CBC1-4E07-8ADF-5AE168893B04}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117860","Name":"Intra-State Purchase Return of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{789CE492-C2BE-4EEC-8E98-740310FDD0E3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117861","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0AAD1908-46DC-4370-8A8D-77096D9B30B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117862","Name":"Intra-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F857355F-9134-460C-89C8-FB0845206988}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117863","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0AAD1908-46DC-4370-8A8D-77096D9B30B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117864","Name":"Inter-State Purchase Return of Services to Registered Vendor where Input Tax Credit is available (Reverse Charge) through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DA389E3B-A6C3-4DE1-9843-807B2161B9DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117865","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{812E9032-CA16-4FAB-A80B-94CD7BC5EB8D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117866","Name":"(POS) Intra-State Return/Credit Note of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F9A5047E-5B27-41E4-AF68-9497E3B52FAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117867","Name":"Inter-State Purchase Return of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B5A9628F-46F5-48C4-9CC0-09CBAE26D7EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117868","Name":"Intra-State Purchase Return from Composite Vendor where Input Tax Credit is available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AFA9BC82-6757-44E3-B5E4-00029DACDA64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117869","Name":"Intra-State Purchase Return of Services from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B053F5FC-CD93-4EA7-AC71-1590E006FAAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117870","Name":"Intra-State Return of Services to Registered/ Unregistered Vendor where Input Tax Credit is available through Purchase Journal/General Journal (Reverse Charge)","NodeType":"Use Case","TableID":81,"CaseID":"{4C68E757-379A-4FD3-A58A-91F57954A9FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117871","Name":"ISD - Intra-State/Intra-Union Territory Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{783D79C8-B103-439F-9F75-9CB53B347C73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117900","Name":"End GST Credit- Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117901","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117902","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is Not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{CB0F4A5D-EE91-402C-AA30-C8B724D7DCC5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117903","Name":"Intra-State/ Intra-Union Territory Return of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8E0D2716-6C6D-4CDF-863F-1E043223D7DF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117905","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F6932043-6A5A-4F55-B06A-DD7F76AFB52B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117906","Name":"Purchase return of Imported Goods where Input Tax Credit is Not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8503C963-7C87-45CD-8543-607AE516F9F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117907","Name":"Purchase Credit Memo for Imported Services where Input Tax Credit is not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{A6239FAB-E9D2-4FFC-90CC-A5D7858C4CD8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117908","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{CF175943-0F1A-4814-BF17-756FB88F497C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117909","Name":"Inter-State Purchase Return of Services to Unregistered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0C04EF8F-6F19-4C41-928B-9F32605898A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117910","Name":"ISD - Intra-State/Intra-Union Territory Purchase Return of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{00B59093-4DB8-4152-99DB-7F9368A143A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117911","Name":"(POS) Intra-State Return/Credit Note of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{75C41C76-22FC-479E-836E-E9C838FF3320}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117912","Name":"Inter-State Purchase Return of Services to Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AE2974C0-8A1D-4821-8999-7617690C41FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117913","Name":"Intra-State Return of Services to Registered/Unregistered Vendor where Input Tax Credit is not available through Purchase Journal and General Journal (Reverse charge)","NodeType":"Use Case","TableID":81,"CaseID":"{56D375F9-6B43-4460-B0F6-CAB18F44DE92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117914","Name":"Intra-State Purchase Return of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{62275F50-6F85-4EA6-AA4F-0BACF20CF65E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117950","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118000","Name":"End Document Type-Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118001","Name":"Document Type-Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118002","Name":"GST on Advance for Import Payment.","NodeType":"Use Case","TableID":81,"CaseID":"{7859624E-8AFD-4A64-B361-900053C11266}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118003","Name":"GST on Advance payment from SEZ Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{041E1938-9B6A-4173-937C-FF0FDC0E7309}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118004","Name":"Inter State GST on Advance Payment made to Registered/Unregistered Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{E411752D-2CC4-4CD4-9D35-1AE651319762}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118005","Name":"Intra State GST on Advance Payment made to Registered/Unregistered Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{0686E40E-9643-42C8-B4D1-7587447E98E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118006","Name":"GST on Advance Payment made to Vendor through General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{C60D4ED2-E3FC-41BC-BB8D-F1B521984712}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118050","Name":"End Document Type-Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118080","Name":"End Account Type- Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118090","Name":"GST Credit","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(0),Field18014=1(4|5|6|7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118091","Name":"GST Opening Liability IGST","NodeType":"Use Case","TableID":81,"CaseID":"{BE4AF8DF-BB6D-432C-B598-B7B481D8D826}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118092","Name":"GST Opening Liability CGST","NodeType":"Use Case","TableID":81,"CaseID":"{5B85FA47-8603-4A7F-9B76-4A5AD999CA81}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118093","Name":"GST Opening TDS Credit - CGST","NodeType":"Use Case","TableID":81,"CaseID":"{7FD02BAE-DA8D-4100-962E-6A8F7FDE823C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118094","Name":"GST Opening TDS Credit - IGST","NodeType":"Use Case","TableID":81,"CaseID":"{09E58D68-C9B5-4A27-B4FE-3BCA8B383E14}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118095","Name":"GST Opening TDS Credit - SGST","NodeType":"Use Case","TableID":81,"CaseID":"{851F544F-7349-4E29-AF19-A0B3B72AB0AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118096","Name":"GST Opening TCS Credit - CGST","NodeType":"Use Case","TableID":81,"CaseID":"{AF9D718A-2832-4D92-A195-4D7DD81E2029}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118097","Name":"GST Opening TCS Credit - IGST","NodeType":"Use Case","TableID":81,"CaseID":"{33896D17-0F26-4376-8304-7BA20BE4E6D4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118098","Name":"GST Opening TCS Credit - SGST","NodeType":"Use Case","TableID":81,"CaseID":"{36207D8F-34B2-4AF3-83EC-96642DA44DFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118103","Name":"GST Opening IGST","NodeType":"Use Case","TableID":81,"CaseID":"{325D0E84-286F-437E-BFE1-EBB6F575AD39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118104","Name":"GST Opening CGST","NodeType":"Use Case","TableID":81,"CaseID":"{34A74D02-F64A-4329-B0B3-B20E07D5A79A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118105","Name":"GST Opening SGST","NodeType":"Use Case","TableID":81,"CaseID":"{BBA0DF22-691B-46EB-8500-8B270596F2E9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118106","Name":"GST Opening Liability SGST","NodeType":"Use Case","TableID":81,"CaseID":"{97CF7642-AB0E-4686-A5CE-3D7C7C641E7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118108","Name":"Account Type - G/L * Tax Type End","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118110","Name":"Account Type - G/L Account","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118111","Name":"Intra-state purchase of services where Services is paid directly and service provider is registered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{77160361-37A9-43BD-A71B-BFA6853D1CFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118112","Name":"Inter-state purchase of services where Services is paid directly and service provider is registered and GST Credit is Not Available on Purchase Journal and Gen. Journals","NodeType":"Use Case","TableID":81,"CaseID":"{869FF9BE-3EA8-424B-973E-E27D6E370807}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118113","Name":"Intra-state purchase of services where Services is paid directly through bank and service provider is registered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2D1A7414-2844-4128-B026-CA683BCEA058}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118114","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is registered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{5265955A-2DE6-49CD-AFBE-D314E2D049FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118115","Name":"Inter-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2A85CD62-7897-47FF-808B-E0A11131071F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118116","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{EAD964E4-7CD1-4462-96B3-78A3FA9DE087}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118117","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{99AB0C39-33A7-47F5-8659-968DBAEEA2F2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118118","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F5F82273-FCF2-4165-A7A8-C46D44F45D4B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118119","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal and Bal Acc Type is Bank","NodeType":"Use Case","TableID":81,"CaseID":"{C246AFFB-B99E-4D9B-8278-39A30CC7E26F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118120","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for Bal Acc Type Bank","NodeType":"Use Case","TableID":81,"CaseID":"{687FE3EB-C604-4E95-A9A8-C231EDB2D269}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118121","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for Bal Acc Type Bank","NodeType":"Use Case","TableID":81,"CaseID":"{E2D6E80E-D1E5-43FC-A060-2DEE839CBBA8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118122","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal For G/L Account","NodeType":"Use Case","TableID":81,"CaseID":"{1DD2DEE4-08E3-42A8-B120-D28FC546F0A3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118123","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for G/L Account","NodeType":"Use Case","TableID":81,"CaseID":"{486C52CB-591D-4538-9B21-505CB3F7AD9A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118125","Name":"End - Account Type - G/L Account","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118150","Name":"End Payment","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118151","Name":"Service Transfer","NodeType":"Begin","TableID":18351,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field11=1(<>''),Field12=1(<>''),Field20=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118152","Name":"Interstate Service Transfer Order","NodeType":"Use Case","TableID":18351,"CaseID":"{FEB751CF-3E8D-42AB-965E-51097FF60E64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118153","Name":"IntraState Service Transfer Order","NodeType":"Use Case","TableID":18351,"CaseID":"{D68B3FE8-78C6-492D-AC1A-FFA29F17A50D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118200","Name":"End Service Transfer","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118201","Name":"Stock Transfer","NodeType":"Begin","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field18394=1(<>''),Field18395=1(<>''),Field18396=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118202","Name":"IntraState Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{A59206F4-476D-4ED9-8665-08535755BB5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118203","Name":"InterState Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{E52D7679-7E9C-4623-9CA7-AB704EF2465C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118204","Name":"Bonded Inter-State Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{AECAE480-71C8-41C4-B247-FB33DFC9C039}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118205","Name":"Bonded Intra-State Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{C215F153-718E-4936-BA99-ACB4E2F2BBC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118250","Name":"End Stock Transfer","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118251","Name":"Journal Bank Charges","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field13=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118252","Name":"Document Type-Invoice","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118253","Name":"GST on Bank Charges against Customer Receipt (Intra Sate)","NodeType":"Use Case","TableID":18247,"CaseID":"{46054EB7-3CE7-421C-B047-00658AC5C150}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118254","Name":"Intra-State Bank Payment with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{7AC16E57-E977-41B3-9338-1399811A688B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118255","Name":"GST on Bank Charges against Customer Receipt (Inter State)","NodeType":"Use Case","TableID":18247,"CaseID":"{668C2032-DD90-4A23-8F30-04B69FE7C99E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118256","Name":"Inter-State Bank Payment with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{98A43A23-24F8-4FC2-9D4E-6B45D74B02FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118300","Name":"End Document Type-Invoice","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118301","Name":"Document Type-Credit Memo","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118302","Name":"GST on Bank Charges against Customer Refund (Inter State)","NodeType":"Use Case","TableID":18247,"CaseID":"{2026E996-050E-4647-8D77-9B2E8FF1B068}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118303","Name":"Inter State GST Refund on Bank Charges.","NodeType":"Use Case","TableID":18247,"CaseID":"{4CB74CDB-63C8-492B-8819-BA937750388D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118304","Name":"Intra State Refund GST on Bank Charges.","NodeType":"Use Case","TableID":18247,"CaseID":"{7E6E164B-CB38-4B5A-ADAA-BB51CAEEA5A7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118305","Name":"Inter-State Bank Payment for Credit Memo with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{429F37B1-0D9F-4B5A-BC3F-AC53F994BC32}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118306","Name":"Intra-State Bank Payment for Credit Memo with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{A26AB5CA-52E6-4626-A426-C656627502E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118350","Name":"End Document Type-Credit Memo","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118351","Name":"Document Type - Blank","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118352","Name":"Intra-State Bank charges on bank Payment with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{F230C59A-547E-41CA-B6B9-5E8BE22A1BEF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118353","Name":"Inter-State Bank charges on bank Payment with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{50157D1D-C080-4AF0-8C63-0B5E918F5AF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118375","Name":"End Document Type - Blank","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118400","Name":"End Journal Bank Charges","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119000","Name":"GST Service Management","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18441=1(<>''),Field18443=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119001","Name":"Service Document","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119002","Name":"Intra State Service to Registered/Unregistered Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{B90130D9-0471-4034-8687-11B04ABDCE72}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119003","Name":"Inter State Service to Registered/Unregistered Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{4DD701D1-41A9-432E-9E95-8F8D08AB2C67}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119004","Name":"Inter State Service to SEZ Unit Customer through Service Quote/ Order/ Invoice.","NodeType":"Use Case","TableID":5902,"CaseID":"{5CB02A72-982F-4AD6-A762-CE881DC52ACC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119005","Name":"Inter State Service to SEZ Development Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{0282EB09-4676-4A39-B2EC-EDC9568BA92B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119006","Name":"Intra State Service to Deemed Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{ADF43278-38CD-463B-8E08-DD604EC3C50C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE119007","Name":"Inter State Service to Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{1CB4368B-D6AF-4B89-AFEB-8641B0152451}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119008","Name":"Inter State Service to SEZ Unit Customer through Service Quote/ Order/ Invoice without payment of Duty.","NodeType":"Use Case","TableID":5902,"CaseID":"{EC2138A1-46D7-430B-B335-F8D6C345BB16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119010","Name":"Intra State Service to SEZ Development Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{4C0ECC95-F5CD-46B2-B302-84C3A5AD7D4E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119011","Name":"Inter State Service to Deemed Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{135115A7-1D82-4528-959B-9A35775455CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119012","Name":"Inter State Service to Export Customer through Service Quote/ Order/ Invoice With GST Without Payment Of Duty","NodeType":"Use Case","TableID":5902,"CaseID":"{BACE2666-3667-442B-9D81-BB46E6091905}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119200","Name":"End Service Document","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119201","Name":"Service Return","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119202","Name":"Inter State Return of Service to Registered/Unregistered Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{AA215442-D318-4160-A666-57E3FBE06CDD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119203","Name":"Intra State Return of Service to Registered/Unregistered Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{C0774889-632D-4799-AA04-DA25EB643832}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119204","Name":"Inter State Service to SEZ Development Customer through Service Credit Memo\n","NodeType":"Use Case","TableID":5902,"CaseID":"{95551286-5BF2-42D5-895A-4A4F450A424B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119205","Name":"Intra State Return of Service to Deemed Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{DD75810D-2D5B-438A-A3AB-079E1B1D7AB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119206","Name":"Inter State Service to Deemed Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{C211C520-8428-4E89-8A9A-446A5EC41D39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119207","Name":"Inter State Return of Service to SEZ Unit Customer through Service Credit Memo with payment of duty","NodeType":"Use Case","TableID":5902,"CaseID":"{6CFFB9A1-521E-4D60-AAFB-BDB044405A2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119208","Name":"Inter State Service to Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{0A055D50-A23B-48A5-BADA-9D00D97EED3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119209","Name":"Inter State Service to Export Customer through Service Credit Memo with GST Without Payment of Duty","NodeType":"Use Case","TableID":5902,"CaseID":"{B7321E84-D1D2-4C4C-857C-B0FB5658D87D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119210","Name":"Inter State Return of Service to SEZ Unit Customer through Service Credit Memo without payment of duty","NodeType":"Use Case","TableID":5902,"CaseID":"{FADCA984-0C4E-4AE6-9ACC-2BF4F9ADC17A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119400","Name":"End Service Return","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119401","Name":"Begin Exempeted","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18446=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119402","Name":"Intra State Service to Registered/Unregistered/Exempted Customer through Service Quote/ Order/ Invoice/ Credit Memo - Exempted","NodeType":"Use Case","TableID":5902,"CaseID":"{D460C15F-47A6-41A4-9B9F-8EA3738C2E40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119403","Name":"Inter State Service to Registered/Unregistered/Exempted Customer through Service Quote/ Order/ Invoice/ Credit Memo - Exempted","NodeType":"Use Case","TableID":5902,"CaseID":"{990AEEEE-91BD-4C0E-8346-897F141E4EDB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119410","Name":"End Exempeted","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119800","Name":"End GST Service Management","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119999","Name":"End - GST","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200001","Name":"TDS","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"TDS","IsTaxTypeRoot":true},{"Code":"TE-200002","Name":"Purchase","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(1|2),Field18716=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200003","Name":"Domestic Vendor","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field91=1(''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200004","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{DB230097-4AA7-44E2-9373-02A467DC95AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200005","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{A8E114BF-F8CD-44DB-A2B3-614BC18F4442}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200006","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":39,"CaseID":"{F39A0864-D2E7-40A5-9633-B6680CD3EC6F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200007","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200008","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified with Concessional Codes and Posting Date is greater than Start Date","NodeType":"Use Case","TableID":39,"CaseID":"{F8BF58D9-7681-458D-9DFC-71EA23A9F853}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200009","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where no PAN No. is specified along with Concessional Codes and Posting Date is greater then Start Date","NodeType":"Use Case","TableID":39,"CaseID":"{1ABE2C56-9700-4A30-A14A-5E8ECC2F32DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200010","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes with Applies-to ID.","NodeType":"Use Case","TableID":39,"CaseID":"{B8A33720-278B-45B4-8465-2D9FA273D813}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200011","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes In Case of Payment Overlook","NodeType":"Use Case","TableID":39,"CaseID":"{16861B6C-7897-42EB-8E26-7B4E885D00F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200015","Name":"End Domestic Vendor","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200050","Name":"NRI Vendor","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field91=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200051","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{5D4C69D3-E776-4E9D-B397-09336BFDC884}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200052","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{FEE5DFFF-0BC1-4246-AD90-6CB3DC44A451}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200053","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{487C3669-B12A-42C0-9FEA-D23AB1426BF6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200054","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":39,"CaseID":"{75222E87-A1A0-48EE-9211-D3F59009C287}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200100","Name":"End NRI Vendor","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200150","Name":"End Purchase","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200151","Name":"Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field30=1(0),Field18544=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200152","Name":"NRI Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2),Field12=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200153","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{271D5BC6-17E8-424E-9E34-3BEE548F938F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200154","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{D9B47164-1681-4C6F-A746-8D710E5F103D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200155","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{25C2D9C3-2A87-41A6-9AB9-DC76E818DF0C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200156","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{08737F79-35F1-4670-BD1D-E41764E3A9DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200200","Name":"End NRI Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200201","Name":"Domestic Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2),Field12=1(''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200202","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{B0C259BC-64CC-4818-887A-3337D357CDFF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200203","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{33BFBE99-9140-4112-A55B-35EC0D9B61B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200204","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{FA0E357D-1AC0-42AA-94DE-6DACA521D38E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200205","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200250","Name":"End Domestic Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200251","Name":"Customer","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200252","Name":"Calculation of Tax Deducted at Source through Bank Receipt Voucher/Cash Receipt Voucher/General Journal/Cash Receipt Journal for Customers with PAN and without Concessional Code.\n","NodeType":"Use Case","TableID":81,"CaseID":"{C1C8C9A9-1AE8-48D7-AB60-9EA08AA0AF21}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200253","Name":"Calculation of Tax Deducted at Source through Bank Receipt Voucher/Cash Receipt Voucher/General Journal/Cash Receipt Journal for Customers with PAN and Concessional Code.\n","NodeType":"Use Case","TableID":81,"CaseID":"{98E3D17E-B644-4DBA-836C-CF26A20EDD3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200300","Name":"End Customer","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200301","Name":"Provisional Entry","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200302","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{7D508D37-53AC-4E44-9669-743A8BA82A3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200303","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{25EADDE7-E634-4A01-9E4B-74E7C9D5AA62}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200304","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{9E57C058-0570-4828-B24A-760D35A38D19}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200305","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where PAN No. is specified without Concessional Codes.","NodeType":"Use Case","TableID":81,"CaseID":"{61ED733A-A96B-45ED-BE21-A98A8B65566B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200350","Name":"End Provisional Entry","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200400","Name":"End Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-299991","Name":"End TDS","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300001","Name":"TCS","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"TCS","IsTaxTypeRoot":true},{"Code":"TE-300002","Name":"Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18838=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300003","Name":"Sales Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(1|0|2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300004","Name":"TCS to be calculated on Customer Invoice with PAN and without Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{BC834CD9-7782-4B77-8D0E-0D7EF1679775}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300005","Name":"PAN No. Validations (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{E696BECA-20A6-498E-9615-114585216ABA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300006","Name":"TCS to be calculated on Customer Invoice without PAN and without Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{91492C74-9837-4256-8B07-1BA40247EA73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300007","Name":"TCS to be calculated on Customer Invoice with PAN and with Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{4DC37F56-3558-400D-ABB1-5573CCC0FD30}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300008","Name":"TCS to be calculated on Customer Invoice with Resource and Fixed Asset (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{B8AC2649-DEA6-42B1-BF69-62A706C6DC40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300009","Name":"TCS to be calculated on Customer Invoice without PAN and with Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{C8358DF6-AC70-4AB2-94E4-D609ADC635CA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300050","Name":"End Sales Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300051","Name":"Sales Return Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300052","Name":"TCS to be calculated on Customer Invoice without PAN and without Concessional (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{B3983817-AAEE-4AD8-97D8-16A875361BA7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300053","Name":"PAN No Validations (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{800AD5B2-89E5-4616-8281-37DDEC382E76}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300054","Name":"TCS to be calculated on Customer Invoice with Resource and Fixed Asset (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{F687A3C1-9192-42D2-A042-39C2B63B35D7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300055","Name":"TCS to be calculated on Customer Invoice with PAN and without Concessional (Through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{B1B995F9-C500-4846-9FE8-833A900F0846}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300056","Name":"TCS to be calculated on Customer Invoice with PAN and with Concessional (Through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{77DE8E48-908D-4E7E-9FBE-98B9EFCB7AE5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300057","Name":"TCS to be calculated on Customer Invoice without PAN and with Concessional (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{5E2AC8E9-8A09-4BA9-8C30-C1CD27CAA214}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300100","Name":"End Sales Retun Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300150","Name":"End Sales","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300151","Name":"Receipt","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1),Field6=1(1|2|3),Field30=1(0),Field18807=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300152","Name":"Invoice and Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2|1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300153","Name":"TCS to be calculated on Customer Invoice and Payment with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{593E67FC-EACA-4C9B-8F95-4A1D3D1712E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300154","Name":"TCS to be calculated on Customer Invoice and Payment without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{DA63D636-4773-418A-8123-6522A7867E5F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300155","Name":"TCS to be calculated on Customer Invoice and Payment with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{6B7BF4A0-0250-4480-9482-733992652D29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300156","Name":"TCS to be calculated on Customer Invoice and Payment without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{D9843455-A721-409B-8A37-D111331A8024}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300157","Name":"PAN No. Validations through General journal","NodeType":"Use Case","TableID":81,"CaseID":"{CB9FAD0D-74A9-4DD5-A83A-E2F6A1FABA06}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300158","Name":"TCS to be calculated on Receipt of Payment with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{42747DC4-6388-459E-9D2E-103F3F4E2AB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300159","Name":"TCS to be calculated on Receipt of Payment without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{82174562-748D-4C6F-AE37-852C7CCEFEAC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300160","Name":"TCS to be calculated on Receipt of Payment without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{1E2CC6D7-1793-4F6E-BF59-A79A941FD309}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300161","Name":"TCS to be calculated on Receipt of Payment with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{6F4B6558-D97D-463E-BCC2-A8AE3C7EB872}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300200","Name":"End Invoice and Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300201","Name":"Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300202","Name":"TCS to be calculated on Customer Credit Memo without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{4BC77C19-4CA3-4913-8EB5-11EDAE308A25}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300203","Name":"TCS to be calculated on Customer Credit Memo without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{3ED702E0-AFA2-4771-AD1F-8FBEF7383436}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300204","Name":"TCS to be calculated on Customer Credit Memo with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{088AD93D-6264-4C00-8E0D-F15F40E5E4F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300205","Name":"TCS to be calculated on Customer Credit Memo with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{994E3FD7-2FE1-4B6D-AC06-F819F8B94F07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300250","Name":"End Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300300","Name":"End Receipt","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-399991","Name":"END TCS","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-999999","Name":"End Tax Engine","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false}]]]>
+ ''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000311","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Registered/Unregistered","NodeType":"Use Case","TableID":39,"CaseID":"{F6F63738-94DD-4B0B-BAD6-4EC11668D327}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000312","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8D93354A-64E8-4DA5-A1A7-741A42B80B33}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000313","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{826B72ED-5C21-45CA-A966-8443C38B768A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000314","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{7C64DCF3-718C-405E-A389-582FD1E33E5D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000315","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{71ED6108-7E6C-42E3-BEC8-DF9AD0C7A27E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000316","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C724AA5A-92F2-4965-957B-C43EEACAABE6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000317","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account","NodeType":"Use Case","TableID":39,"CaseID":"{DEEB69C8-EDAA-4A5A-875E-A20DA52008BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000318","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{DE898176-3602-4CBD-BF29-EAF4A9C03987}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000319","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{F7192A60-5739-4B72-AB1D-FB48ED3EE0F9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000320","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{3E8E1EDA-828E-40BE-8FD4-3456546F47A6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000321","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{FD3380A2-217C-4059-A344-1D832B755088}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000322","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice- Fixed Asset","NodeType":"Use Case","TableID":39,"CaseID":"{E1914856-FF7A-4B3A-99D5-17190CE10C27}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000323","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8D7FD8C3-FCB1-4968-8FD6-08181778EC29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000324","Name":"Calculation of Cess where input tax Credit is Not Available for Goods through Purchase Quote/Order/Invoice -(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{1E087C72-9078-4C31-ABD5-38F01008E508}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000325","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{508FE302-0CAB-41B6-8C43-737EBE931312}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000326","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{68FE3FB0-9F3C-44A6-9686-F37192B1A371}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000327","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{2EA01E14-807E-4CC7-8494-9EAAFBA21709}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000328","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice -Fixed Asset(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{6ADC0F4A-6D69-4BAE-A94F-7DC0889758DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000329","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{C9822271-8F51-46B7-B4BD-A2B424B1699B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000330","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{C63F1B6C-96EE-41CB-879B-801CE9C734A6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000331","Name":"Calculation of Cess where input tax Credit is available through Purchase Quote/Order/Invoice - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{F748E0D1-BC76-4D68-8CBD-FF4189DC3517}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000332","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Quote/Order/Invoice - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{AE6444ED-20D1-4E69-A69C-7DCAEC9C4738}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000333","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Quote/Order/Invoice - Fixed Asset from Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{535A4B2C-EEA4-4267-8638-F57DE9153FDD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000340","Name":"End Cess on Purchase","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000350","Name":"Cess on Purchase Return","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3|5),Field7=1(<>''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000351","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Registered/Unregistered","NodeType":"Use Case","TableID":39,"CaseID":"{725E8FB9-C4CC-42B7-B060-5E86614A8168}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000352","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EFF1E5F5-6CC1-414D-BD1F-1095D42F9A4A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000353","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8BB1C380-7CFE-4B49-82AD-78BBA652EB5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000354","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{231587B2-D0BD-4362-9A3B-11839F7BB326}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000355","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{CEAE9F6C-7E67-4347-9E66-A9C6C54E4ECE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000356","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account","NodeType":"Use Case","TableID":39,"CaseID":"{F33121DD-68CB-423C-A98B-6FF10BD8CED7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000357","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{75A11E67-E9DF-446F-974A-AE9F91D8EA1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000358","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Goods from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{6F2DE875-4569-41DB-A28E-021E4D00378A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000359","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Service from SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{7D571F8D-B6A0-47E0-B80F-9AC703DF1D3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000360","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/ Credit Memo - Goods from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A622E949-C161-4AE2-B6DB-7D3C16E5D899}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000361","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset","NodeType":"Use Case","TableID":39,"CaseID":"{43F17130-4EA1-48FE-B1A8-716EE5DF7C16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000362","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Fixed Asset from SEZ Vendor With Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{3A6F385C-72E7-42C6-A696-47102B270402}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000364","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/ Credit Memo - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{6DEEF440-3A5B-4201-9D1B-59AC37AF4C36}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000365","Name":"Calculation of Cess where input tax Credit is Not available through Purchase Return Order/Credit Memo - Fixed Asset from SEZ Vendor Without Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{C08A9FD5-5ECC-4BB5-8A19-345060822129}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000366","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset(Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{CBDB09CC-FB6C-4475-89A3-62C04DADFA15}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000367","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo Unregistered Vendor- Item (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{39808C8A-4131-4B49-BF1D-D8FA64667B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000368","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{812C7B77-0622-4E71-9F4E-261C3874A680}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000369","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{3B82DBC4-FAAE-477D-892C-AD82ECDFEF7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000370","Name":"Calculation of Cess where input tax Credit is available through Purchase Return Order/Credit Memo -G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{B4A44DCF-6090-4813-9C09-193AB1A09B93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000371","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - G/L Account- Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{A79DCE33-C753-4680-A6A3-F824608702B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000372","Name":"Calculation of Cess where input tax Credit is Not Available through Purchase Return Order/Credit Memo - Fixed Asset - Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{FBD319E5-BDFD-43E8-B9EB-275F01FA6A40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000380","Name":"End Cess on Purchase Return","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000500","Name":"Cess on Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4),Field5=1(1|2|4|3),Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000501","Name":"Calculation of Cess on sales to Registered/Unregistered Customer through Sales Quote/Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{3D30F63D-D6C1-4B1B-ACFD-E252FAB190E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000502","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice with Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{9B4E1225-00F2-4467-BA93-29AD1F2EBD46}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000503","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice without Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{0F354915-7E17-421B-87D8-7E6C2716E173}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000504","Name":"Calculation of Cess on sales to Registered/Unregistered/Exempted/SEZ/SEZ Development/ Deemed Export Customer through Sales","NodeType":"Use Case","TableID":37,"CaseID":"{33CD3931-0BA0-4358-B808-5C6378CAA489}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000505","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Quote/Order/Invoice with Payment of Duty - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{37EFA642-056C-45E8-974E-6B41B335FC81}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000506","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo with Payment of Duty - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{DE8006B8-CF9F-474A-AE29-C7903A148261}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000600","Name":"End Cess on Sales","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000601","Name":"Cess on Sales Return","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3|5),Field5=1(2|1|3|4),Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000602","Name":"Calculation of Cess on sales to Registered/Unregistered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{272FFE9F-A7C9-4AF8-87DD-3EA53BA18511}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000603","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo with Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{9DB4ECE1-3397-4ADD-9EA8-40A8D82A6A9A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000604","Name":"Calculation of Cess on sales to SEZ Development/SEZ Unit Customer through Sales Return Order/Credit Memo without Payment of Duty","NodeType":"Use Case","TableID":37,"CaseID":"{423BECDD-68DC-4541-9047-8F6B797709E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000605","Name":"Calculation of Cess on sales to Registered/Unregistered/Exempted/ SEZ/ SEZ Development/ Deemed Export Customer through Sales Return Order/ Credit Memo - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{ED1E0A5D-C364-4F36-847E-AAE263B34185}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000700","Name":"End Cess on Sales Return","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000701","Name":"Cess on Transfer Order","NodeType":"Begin","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field3=1(<>''),Field18394=1(<>''),Field18395=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000702","Name":"Calculation of Cess in Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{631DEFA0-165E-4BDC-8F8A-AB2A88DF90AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-000750","Name":"End Cess on Transfer Order","NodeType":"End","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-001000","Name":"End GST Cess","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100001","Name":"GST","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"GST","IsTaxTypeRoot":true},{"Code":"TE-100011","Name":"Subcontracting GST For Delivery Challan Line","NodeType":"Begin","TableID":18469,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field54,Field55) WHERE(Field46=1(<>''),Field47=1(<>''),Field102=1(<>''),Field103=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100012","Name":"Intra-state Subcontracting GST For Delivery Challan Line for Registered Vendor","NodeType":"Use Case","TableID":18469,"CaseID":"{5388F401-5CDE-4918-A9B0-B7B134235921}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100013","Name":"Inter-state Subcontracting GST For Delivery Challan Line for Registered Vendor","NodeType":"Use Case","TableID":18469,"CaseID":"{6A75BFF5-C880-498F-AC1D-E9CF9BE7F888}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100099","Name":"Subcontracting GST For Delivery Challan Line","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100100","Name":"Subcontracting GST For GST Liability Line","NodeType":"Begin","TableID":18470,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field3,Field4) WHERE(Field46=1(<>''),Field47=1(<>''),Field102=1(<>''),Field103=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100101","Name":"Intra-state Subcontracting GST on GST Liability Line for Registered Vendor","NodeType":"Use Case","TableID":18470,"CaseID":"{81A83FF9-D7EB-4B5F-A2AE-ED346B7A9079}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100102","Name":"Inter-state Subcontracting GST on GST Liability Line for Registered Vendor","NodeType":"Use Case","TableID":18470,"CaseID":"{81A24E9D-52B9-4EFE-A18B-398C6BAD55ED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100199","Name":"Subcontracting GST For GST Liability Line","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100200","Name":"GST Finance Charge Memo","NodeType":"Begin","TableID":303,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field18142=1(<>''),Field18144=1(<>''))","TaxType":"GST","IsTaxTypeRoot":false},{"Code":"TE-100201","Name":"InterState GST Calculation on Finance Charge Memo For Registered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{10675EE2-5AA7-4D43-8794-03BA8CD85445}","Condition":"VERSION(1) SORTING(Field1,Field2)","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100202","Name":"Intrastate GST Calculation on Finance Charge Memo For Registered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{853FC9A7-4D6E-4511-8207-BB18D1FFC0E8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100203","Name":"InterState GST Calculation on Finance Charge Memo For SEZ Unit/SEZ Development/Deemed Export Customer With Payment of Duty.\n","NodeType":"Use Case","TableID":303,"CaseID":"{CAC3F49D-59DD-4F1A-B0F3-AC28F7552973}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100204","Name":"InterState GST Calculation on Finance Charge Memo For Unregistered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{C4BC4E11-E295-4A20-9F5F-801F2406A610}","Condition":"VERSION(1) SORTING(Field1,Field2)","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100205","Name":"Intrastate GST Calculation on Finance Charge Memo For Unregistered Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{34D44752-1655-43CC-8DD8-9CBA775C5554}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100206","Name":"Intrastate GST Calculation on Finance Charge Memo For Exempted Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{4C815B8B-6831-4E19-899D-361FBA9CFC43}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100207","Name":"InterState GST Calculation on Finance Charge Memo For Exempted Customer.\n","NodeType":"Use Case","TableID":303,"CaseID":"{EC7AE7B0-93FA-42C2-9717-BBD2E8FC4D4C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100208","Name":"InterState GST Calculation on Finance Charge Memo For SEZ Unit/SEZ Development/Deemed Export Customer Without Payment of Duty.\n","NodeType":"Use Case","TableID":303,"CaseID":"{6946230A-A2F4-4E4B-90C6-6C907D010EB5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-100300","Name":"GST Finance Charge Memo","NodeType":"End","TableID":303,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110001","Name":"Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18142=1(<>''),Field18144=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110501","Name":"Sales Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110601","Name":"Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110696","Name":"Sales Line No Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110700","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Order/Invoice - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{A4C57AB8-DBFF-473C-B2A3-739975737950}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110701","Name":"Intra State Sales of Exempted from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4911101A-A3D1-4596-836C-A9EB2F2CB24C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110702","Name":"Inter State Sales of Exempted from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{CA856646-6B6F-42D2-A4CC-64A8F52DE9F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110703","Name":"Inter State Sales of Exempted from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{CE4E5351-F5F5-413A-AAF9-6C5EA6530D93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110704","Name":"Intra State Sales of Exempted from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{887FEE8B-EFB6-4010-B79B-4CDB44F23CC8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110705","Name":"Intra State Exempted Sales for Deemed Export Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{332A3E45-C1C8-423A-9063-B55EFA585045}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110706","Name":"Export and Exempted to Foreign Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{74E6E05F-641D-4857-8F88-C48783B29B3E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110707","Name":"Intra state Sales of Charge Item from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{D2C0BC32-D71C-4FEC-A3FC-63A0586DA3D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110708","Name":"Inter State Sales of Exempted Charge Item from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{8E20FC81-1137-41B3-A90E-AE86CD66F718}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110720","Name":"End Sales Line No Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110721","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110722","Name":"Intra state Sales of Services from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A9D34135-2984-4C5D-99C0-5563408C59EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110723","Name":"Inter State Sales of Exempted Services from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E474605D-6956-438B-95F2-DA5BE6A6D741}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110740","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110741","Name":"Begin Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110742","Name":"Inter State Sales of Exempted Goods from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{144DB41F-813A-4EE0-87EC-7082D07652B7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110743","Name":"Intra state Sales of Goods from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{C3901ECF-9316-49A7-9897-B8C52A5A66A0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110760","Name":"End Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110761","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110762","Name":"Inter State Exempted Sales of Fixed Assets from Exempted Customer through Sales Quote/ Sales Order/ Sales Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A48A1647-673E-4C77-9997-143963591989}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110763","Name":"Intra state Sales of Fixed Asset from Exempted Customer through Sales Quote/ Order/ Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{26405773-06F9-4F36-B6B1-E80AA9987628}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110780","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-110801","Name":"End Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-111001","Name":"Not Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-111950","Name":"Sales Line No Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112001","Name":"Intra-State Sales of Services to Overseas Place of Supply to Registered Customer Through Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{FA5B2691-7B6B-43B4-92F1-9B6D10A216E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112002","Name":"GST Deemed Exports With Payment of Duty through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{B66179F8-E62E-45F8-9DE3-5351C859F85D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112003","Name":"Intra State Sales for Deemed Export Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2C82CF3D-40B2-4FCC-8F04-E649DADD1619}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112004","Name":"Intra State Sales for Deemed Export Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{1F930CB5-93A8-4BE9-B412-B9B44F1FBE2B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112005","Name":"Intra State Sales for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{71177393-F102-466E-AC36-1A460BC1C3E9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112010","Name":"End Sales Line No Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112051","Name":"Type - Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112052","Name":"Intra State Sales of Charge Item from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{7422E62E-F5A5-46C6-8A2D-9F9F4C082C91}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112053","Name":"Intra State Sales of Charge Item from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A9E13C42-F366-4E5F-A057-1E0B4E43D454}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112054","Name":"Inter State Sales of Charge Item from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{F5794DA7-0CC7-42C2-BEA0-18EB8F98BB5A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112075","Name":"Inter State Sales of Charge Item from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{207FA1CE-712A-475E-AC05-B36812DDE2C8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112076","Name":"Export Sales of Charge Item from SEZ Unit / Development through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4083D3D9-1F73-48ED-ABD1-12C0559D270F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112077","Name":"Export Sales of Charge Item from SEZ Unit / Development without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{EFF7E856-EF6B-4EC0-9AAE-C2E07B6CB15B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112078","Name":"Export Sales of Charge Item from SEZ Unit / Development through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{40065229-E7D9-4C0A-A0EB-5DE70DD4E9AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112079","Name":"GST Deemed Exports for Charge Item through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{929EB05F-45B5-4F4F-9DD4-61AFAB36F21B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112080","Name":"GST Deemed Exports for Charge Item Without Payment of Duty through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{A2608A05-D116-4475-B690-A6E26170BC2C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112081","Name":"Export Charge Item to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9D6C4AC2-81D1-47E7-8C7C-494F20F1719F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112082","Name":"Export and Charge Item to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9CBCEC6F-A01B-422B-8AAB-4B6BC90EC959}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112100","Name":"End- Type - Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112101","Name":"Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112102","Name":"Inter State Sales of Fixed Asset from Registered Customer through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{46CB3503-286F-43C3-9B04-FBBD5F2CBAF0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112103","Name":"Intra State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{636979B2-6B57-49C6-B0B8-B306261B3304}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112104","Name":"Intra State Sales of Fixed Asset from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A4044120-D393-4525-88F4-AB1A71F2E49C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112105","Name":"Inter State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{52FD8776-17C2-428A-B747-159404771D07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112106","Name":"Export Fixed Asset to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{AF5EE023-63DF-4210-AD71-6436230F6DFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112107","Name":"GST Deemed Exports of Fixed Asset through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{7B9EA3AF-2235-44F9-AE67-E0F9F74740E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112108","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8E2CB0E2-795D-4DC3-879B-5117E415DFB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112109","Name":"Export Fixed Asset to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8FDC8D41-E5D7-40D7-B962-80DA519596F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112110","Name":"Export Fixed Asset to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C99A231E-6BBF-4982-AEAF-6CAAC7E5BA9B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112111","Name":"Export Fixed Asset to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4490AC87-E83B-44C4-A6A8-EAF2650E8773}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112112","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice - Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{6EC9FAFD-8029-4B9C-8899-CB3C494682D1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112113","Name":"Export of Fixed Asset to SEZ Development Without Payment of Duty through Sales Quote/Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{24BF4F23-3693-4E31-ADDA-9D2F91057CA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112114","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{58789CA5-0F23-4972-B1FE-3EE6E8BC19A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112115","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{A18E31F4-0E06-42B6-B8E0-282B42CA2A28}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112214","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112249","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112250","Name":"Intra State Sales of Services from UnRegistered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{1BAE51D1-AD26-40F8-BFD2-156024A23A7B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112251","Name":"Inter State Sales of Services from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2E7A7A10-CCD5-4673-AF42-1EF83425931F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112252","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4529A161-49CC-44B6-95BA-CC141FA794B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112253","Name":"Intra State Sales of Services from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{4962D3B9-0349-4BE9-B173-22B456AEE6C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112254","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{BF9D05ED-BF8A-4BC8-9195-D008E4E381FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112255","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice. - POS","NodeType":"Use Case","TableID":37,"CaseID":"{E6D39823-CCCC-43DC-BD7E-CC6EEEBDB5EB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112256","Name":"Export and Service to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{DD3CF85B-64EA-4DD4-A626-C472E3B3B072}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112257","Name":"Export and Service to Foreign Customer With Payment of Duty through Sales Order/Invoice With GST on Assessable value.","NodeType":"Use Case","TableID":37,"CaseID":"{1C9C14DA-22A0-4F6B-968A-1F79BE11B7A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112258","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{ABD1A54F-36DA-45A7-AFED-451B98434B0C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112259","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B2150DAA-4B46-41F2-89BF-19F5FD89362E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112260","Name":"Export Services to SEZ Development Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{F8591F7C-5D5C-4976-B5F1-E3248733EBC5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112261","Name":"Export Services to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{21A349A2-B069-4AA5-86B9-34136BE37267}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112262","Name":"Export Service to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{512B21D6-5395-499F-A2BE-EF6D24385C89}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112263","Name":"Export Services to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{8638A2E3-3F44-4672-A54D-0D65B1528FF9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112264","Name":"Calculation of GST Services where Unregistered Transporter, TPT Location is different and Pick Up Location and Delivery Location is same through Sale Orders/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{99C83819-83BC-418A-A2A7-26A041F2F99A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112265","Name":"Inter State Sales of Services from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C6AAB568-68A3-4D8A-A708-ECD7EFD9A3EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112266","Name":"Intra State Sales of Service from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{9666CA08-2C56-43C5-B36F-7FD3745FE832}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112267","Name":"Inter State Sales of Service from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{D9221422-669E-485D-8224-053D641FE4F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112268","Name":"GST Deemed Exports of Services through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{67F7C66D-5296-4A5F-A85F-D4B91D1DBF97}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112269","Name":"Calculation of Transportation of Services from Registered Vendor, where TPT Location and Pick Up Location is same and Delivery Location is different. through Sales Order","NodeType":"Use Case","TableID":37,"CaseID":"{8D0E6401-974F-4F8E-9254-2AF9067E73DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112270","Name":"Calculation of Transportation of Services from Un-Registered Vendor, where TPT Location and Pick Up Location is same and Delivery Location is different. through Sales Order","NodeType":"Use Case","TableID":37,"CaseID":"{99F473AC-553E-4032-AEDB-0AE44C871CD2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112271","Name":"Calculation of GST in case of Transportation of Service where Registered Transporter State is different and Pick Up Location State and Delivery Location State is same through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{02B82B77-D7E5-4A49-89A2-6D46EC87AE61}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112272","Name":"Calculation of GST in case of Transportation of Service where Un-Registered Transporter State is different and Pick Up Location State and Delivery Location State is same through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{76F9EC4B-C6F3-4DBE-B1CA-04EFC5AD609E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112273","Name":"Calculation of Transportation of Services from Registered Vendor, , TPT Location is different and Pick Up Location is different and Delivery Location is different through Sale Orders","NodeType":"Use Case","TableID":37,"CaseID":"{CF4626CB-7022-41C6-95C6-E1FE28C8C370}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112274","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{C447C36E-72FA-4FEA-A49C-F976FE57275D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112275","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice -Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{5043629A-E2D7-4E0D-AD7F-C9D505507D01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112276","Name":"Intra State Sales of Service from Registered Customer through Sales Order/Invoice For Ship To Address.","NodeType":"Use Case","TableID":37,"CaseID":"{0321474A-ABD0-45DB-8CEA-B586A5CB7F49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112399","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112400","Name":"Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112401","Name":"Inter State Sales of Goods from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{11160E03-89D0-481D-B2EA-24898F3DB4AB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112402","Name":"Intra State Sales of Goods from UnRegistered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{364EABA8-DF5D-4174-951E-9C9B375830D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112403","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice - Kerala Food Cess","NodeType":"Use Case","TableID":37,"CaseID":"{A8BF5AD2-5132-40E7-9DF1-893B3940F6EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112404","Name":"Intra State Sales of Goods from Unregistered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{CFE77ACE-1F20-4126-98D9-8D14B18088EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112405","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B61CB389-28BD-4569-BF95-284B62972B23}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112406","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{6B464955-261F-4EAF-A749-7807444FC37C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112407","Name":"Export and Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{55AD5167-785F-4CC3-B633-84A8414EE100}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112408","Name":"Export and Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice With GST on Assessable value.","NodeType":"Use Case","TableID":37,"CaseID":"{23C292E2-9704-4112-9AB6-A2FCBDDFFA6A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112409","Name":"Export Goods to SEZ Unit Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{2961B717-F882-4174-A7D0-98737C7F49A2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112410","Name":"Export Goods to SEZ Unit With Price Inclusive of Tax through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9CF523A9-24DB-4928-A3CB-8DC5FCA4AF69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112411","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{6621F516-24B5-47CC-AB8B-6EF51F2616E3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112412","Name":"GST Deemed Exports of goods through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{759DC0B3-0697-4262-B0B6-12AA4A6E3822}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112413","Name":"Export Goods to Deemed Export Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{AA3E77B0-A08A-4756-90E5-F6561C7D4B9B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112414","Name":"Export and Goods to Foreign Customer Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{BAEC40C3-3C56-4B4F-95C9-ED6E1E39A019}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112415","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B618D919-C2A5-4BB8-B7EF-13784A51A6D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112416","Name":"Export Goods to SEZ Development Without Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{34D0EE0E-FC73-416C-A59C-484107E36965}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112417","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{74601C3A-21C1-4924-950E-039ADD6086E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112418","Name":"Inter State Sales of Goods from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{E06B429C-0CDD-4F49-9C4D-8546151805AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112419","Name":"Intra State Sales of Goods from Registered Customer through Sales Order/Invoice - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{888E76DA-FA62-4714-83A3-76777E325D84}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112420","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{277B1053-C551-4BF4-9518-7BFE200A8E18}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112421","Name":"Export Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice with Shipment locally as Intrastate.","NodeType":"Use Case","TableID":37,"CaseID":"{9F7A9C0A-BC4A-45C2-B79B-7D22EDB6ABBB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112422","Name":"Export Goods to Foreign Customer With Payment of Duty through Sales Order/Invoice with Shipment locally as Interstate.","NodeType":"Use Case","TableID":37,"CaseID":"{F69C2334-D38A-4CC1-B701-D7DC4C3B7CA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112423","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice - Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{13217522-8F07-4C15-9787-8B1840E8CC40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112424","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{FA8E63F5-19A9-4940-AD59-DB7067BE069A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112425","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote with FOC","NodeType":"Use Case","TableID":37,"CaseID":"{E449E955-A401-4C0D-9DB6-3920DA89D68E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112426","Name":"Intra State Sales of Goods from Registered/Unregistered Customer through Sales Quote with FOC","NodeType":"Use Case","TableID":37,"CaseID":"{E449E955-A401-4C0D-9DB6-3920DA89D68E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112427","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer with PIT","NodeType":"Use Case","TableID":37,"CaseID":"{5E4AA776-3C54-4909-8B29-0CED4FDE6D7A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112450","Name":"End Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112500","Name":"Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112501","Name":"Intra State Sales of Resource from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{D1629C9B-AA5B-4237-94CE-5B14BAF756C0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112502","Name":"Intra State Sales of Resource from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{9B0FE6DB-6121-44B0-8BD0-08B8060D7A92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112503","Name":"Inter State Sales of Resource from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{D95F6D4E-EEF5-41B7-8284-694BCBDFEABD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112504","Name":"Export Resource to Foreign Customer With Payment of Duty through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{60F5C368-9B10-45CB-BB1B-63DEF7520AB6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112505","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{77D07467-2180-4712-814A-A6292F8D5E59}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112506","Name":"GST Deemed Exports for Resource through Sales Order/ Invoice\n","NodeType":"Use Case","TableID":37,"CaseID":"{BE8902D9-72AA-41C9-BACE-1B781D7C8107}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112507","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{96B76AC2-66FF-4457-9DE3-3F2A3213C3E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112508","Name":"Inter State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{B2047EB4-AD5D-4E8B-BFFC-94FB1C4EED34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112509","Name":"Inter State Sales of Resources from Registered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{C8652C10-76BA-489E-985D-CFFC24D6276B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112510","Name":"Inter State Sales of Resource from Registered/Unregistered Customer through Sales Quote","NodeType":"Use Case","TableID":37,"CaseID":"{149E867B-BE67-4BA4-AE3B-36C10F7552F5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112511","Name":"Inter State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{6F89240D-BBA1-4BB9-85B6-0BE2154EE0B8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112512","Name":"Intra state Sales of Resources from Exempted Customer through Sales Quote/ Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{A1895816-94BF-4F67-819E-D3898920FAF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112513","Name":"Intra State Calculation of GST on Resource to SEZ Unit / Development Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{969F9BE2-D2C0-4DB5-BD38-F9DAC8AB8173}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112514","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{882CB936-42D9-4C2D-BFD9-028D5F5D3337}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112515","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{4B114178-6589-41CD-907E-8C46CCDFE895}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112516","Name":"Inter State Calculation of GST on Resource to SEZ Unit / Development Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E28ED0E6-8917-4D81-AD22-29D13FE94091}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112517","Name":"Inter State Calculation of GST on Resource to SEZ Unit / Development through Sales Order/ Invoice-Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{E9ED8CB8-E0BD-4E8A-88A5-1AA7348ACF20}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112518","Name":"GST Deemed Exports for Resource Without Payment of Duty through Sales Order/ Invoice","NodeType":"Use Case","TableID":37,"CaseID":"{E65CE6AA-C447-466E-A3FE-154D3F5A76DC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112519","Name":"Inter State Sales of Resource from UnRegistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{DF167294-5878-44C6-9220-01D93BEA09FF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112520","Name":"Inter State Sales of Resource from Unregistered Customer through Sales Order/Invoice without FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C8BA6CA4-7E8C-4053-980D-451FE32D8EFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112550","Name":"End Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112600","Name":"End -Not Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112601","Name":"Begin FOC","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18157=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112602","Name":"Begin Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112603","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112604","Name":"Intra State Sales for Goods from Registered Customer through Sales Order/Invoice With FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6333F9D2-02B8-4FF1-88EE-386041B7FCA4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112605","Name":"Inter State Sales of Goods from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C69C8C2B-3445-476C-80ED-776EC67B06D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112609","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112610","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112611","Name":"Intra State Sales of Goods from Unregistered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{A4B4B64C-1D4C-48EE-88E9-4BBC4F05EAE8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112612","Name":"Inter State Sales of Goods from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{E786A7D6-1147-46F6-BB75-1223AAC92007}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112616","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112617","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112618","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{BB38433A-2AE4-492D-8380-D8B5A6F80135}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112619","Name":"Export Goods to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{F0E83015-3886-4263-A0B7-A97BA3B7753C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112623","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112624","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112625","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice - Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{BE591554-5098-41FD-A200-5B5B48C19083}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112626","Name":"Export Goods to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{CF0F6DEA-A530-45B3-8B1B-CF86879E9EDA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112630","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112631","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112632","Name":"Intra State Sales for Deemed Export Customer for Goods through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{ADF93FBF-84BB-4DC9-8B87-EADDE08829F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112633","Name":"GST Deemed Exports of goods through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{4116F9D4-1957-46D1-BCED-580BD21C0908}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112634","Name":"Intra State Sales for Goods for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{17DA0FC6-FC3F-4AB5-A2C7-34D00B649941}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112635","Name":"GST Deemed Exports for Goods With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{44130B2E-FBA8-47DE-BF1F-AF9145AC13BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112637","Name":"EndGST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112638","Name":"End Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112639","Name":"Begin Type- G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112640","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112641","Name":"Intra State Sales of Services from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{03D7D334-04D2-4EC5-AE88-A67C1409C8BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112642","Name":"Inter State Sales of Services from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{08EACBE7-7B68-4B7B-8BCE-8D5D4FAD80F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112647","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112648","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112649","Name":"Intra State Sales of Services from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8D8429D6-2B1A-4081-900E-9D19C312335E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112650","Name":"Inter State Sales of Services from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EA505D2C-22A0-4B4B-B20F-18A0E1AE2C02}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112653","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112654","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112655","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{81345EC6-231D-4274-95D2-302FFE85B903}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112656","Name":"Export Services to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FD5FD103-5251-4063-92C9-CCFE016B971B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112661","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112662","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112663","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer For FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6807FDAC-8BCB-4B1A-84FF-882C6A9C15B7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112664","Name":"Export Services to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0561985A-B2F9-4C9C-BE39-7D6AE423104E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112669","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112670","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112671","Name":"Intra State Sales for Deemed Export Customer for Services through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3C1D2A94-CBAE-4190-BE50-AD56CF9218D9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112672","Name":"GST Deemed Exports of Services through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{05CEE5AD-FF50-479C-922C-1C51FE10F724}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112673","Name":"Intra State Sales for Services for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{741172E2-8B2D-461D-9081-71145F1316DF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112674","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112675","Name":"End Type- G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112676","Name":"Begin Type Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112677","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112678","Name":"Intra State Sales of Resource from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{9E8F612A-6306-4CD0-AA63-8F443733B9B5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112679","Name":"Inter State Sales of Resource from Registered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{E8ACBB6B-EAAF-46C6-A4EA-EFB502D8E110}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112684","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112685","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112686","Name":"Intra State Sales of Resource from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DC79D469-98CD-45FF-ADBB-27DFF74D2672}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112687","Name":"Inter State Sales of Resource from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{13827C55-0612-40EF-BED1-62D7605B9D68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112692","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112693","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112694","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{747B1A95-DF79-4286-A38B-A6F98F2D2DE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112695","Name":"Intra State Calculation of GST on Resource to SEZ Unit through Sales Order/ Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5582B9B9-2C0C-4036-A0E1-ED20495D47AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112701","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112702","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112703","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8B4B45EC-5B92-4383-935B-DE2E70579CA8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112704","Name":"Intra State Calculation of GST on Resource to SEZ Development through Sales Order/ Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{51CD0A49-E8DF-42A3-9180-84D1A7076A42}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112710","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112711","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112712","Name":"Intra State Sales for Deemed Export Customer for Resource through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{103E8A37-530C-4FFF-BB01-D298E7DF9FFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112713","Name":"GST Deemed Exports for Resource through Sales Order/ Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{F356E0FE-23C7-4D81-A149-3659F2CEFBB4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112714","Name":"Intra State Sales for Resource for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{29C6FB1D-F01C-426F-AC3E-76E9122FDB69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112715","Name":"GST Deemed Exports for Resource With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{97120CFC-A3A4-4545-8A71-881473ED33C7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112720","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112750","Name":"End Type Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112751","Name":"Begin Type- Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112752","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112753","Name":"Intra State Sales of Fixed Asset from Registered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{CF89D22F-0CD8-4E3C-A01C-6C159E03E5E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112754","Name":"Inter State Sales of Fixed Asset from Registered Customer through Sales Quote/Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5860DC76-AE27-4A12-808D-667172BEF336}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112760","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112761","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112762","Name":"Intra State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{84992760-0362-488C-8D49-0DE8065F945C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112763","Name":"Inter State Sales of Fixed Asset from Unregistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FBBCEAFB-3B22-4D36-969E-84AB2CDC7859}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112769","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112770","Name":"Begin GST Customer Type SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112771","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice - Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{FC888469-0E29-48BA-B417-07D5943D7C45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112772","Name":"Export Fixed Asset to SEZ Unit With Payment of Duty through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{307349C1-C724-4CB8-8878-7587CC2617EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112778","Name":"End GST Customer Type SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112779","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112780","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A8B33288-CA54-4DC6-B3E4-A14E3CCA4EFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112781","Name":"Export Fixed Asset to SEZ Development With Payment of Duty through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DA8695B6-D7D7-41E9-BE59-C26A19D03C2C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112789","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112790","Name":"Begin GST Customer Type - Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112791","Name":"Intra State Sales for Deemed Export Customer for Fixed Assets through Sales Order/Invoice For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{02A9B37F-66A8-446A-B5B0-703D594FF934}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112792","Name":"GST Deemed Exports of Fixed Asset through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{7E2F85F6-FFBA-45FE-80B5-39B654365ACD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112793","Name":"Intra State Sales for Resource for Deemed Export Customer through Sales Order/Invoice-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{29C6FB1D-F01C-426F-AC3E-76E9122FDB69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112794","Name":"GST Deemed Exports for Fixed Asset With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{23F3D552-5B8B-47A9-B217-903567666BCE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112800","Name":"End GST Customer Type - Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112820","Name":"End Type- Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112821","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112822","Name":"Begin GST Customer Type Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112823","Name":"GST Deemed Exports for Services With Payment of Duty through Sales Order/Invoice-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{53D88A93-5CE2-427C-81F0-6DCFC36F579F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112826","Name":"End GST Customer Type Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112827","Name":"End Type G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112840","Name":"End FOC","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112845","Name":"End Sales Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112848","Name":"Sales Return Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112849","Name":"Not Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112850","Name":"Type - G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112851","Name":"Intra-State Sales Return of Services to Overseas Place of Supply to Registered Customer Through Sales Return","NodeType":"Use Case","TableID":37,"CaseID":"{44F4B3DF-4625-4E8F-9BE3-53C61B67463B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112852","Name":"Intra State Sales Return of Services from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{BC238FA9-CAD7-43AB-8E7E-D6FFC7035EE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112853","Name":"Inter State Sales Return of Services from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{693D346E-069E-4306-9F7C-84665CD42141}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112854","Name":"Inter State Sales Return of Services from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{80BC1B3E-DB26-4E90-B780-43C8BA593655}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112855","Name":"Intra State Sales Return of Services from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{8A18FA5B-AD17-43D3-8981-5BB20A04EFA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112856","Name":"Intra State Sales Return of Services from Registered Customer through Return Order - POS","NodeType":"Use Case","TableID":37,"CaseID":"{1FF813B4-1776-4717-8C56-8F0E684ACE73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112857","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{DB44587F-08FB-4D5F-96A3-6CD4D4E30300}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112858","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{895C47DF-89E2-4A14-9329-5E260C1DBF05}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112859","Name":"Export Return of Services to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{81E2ACA0-D6DD-4B4A-ADEF-60B602660F25}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112860","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{1DE560C5-73C9-4476-9447-80FC42CD492C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112861","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo - POst GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{8139E94E-D43E-4C24-B6B3-C59F55737321}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112862","Name":"Export Return of Goods to Export Customer for item Type GL Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{4738101C-19E3-418C-A19D-61E67100D199}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112890","Name":"End - Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112895","Name":"Type - Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112896","Name":"Intra State Sales Return of Goods from Registered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{26581492-A8D9-41EB-B84E-40671AE8CC3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112897","Name":"Inter State Sales Return of Goods from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{77DC6AF2-5D31-4450-8F78-E2F7383B9EAB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112898","Name":"Intra State Sales Return of Goods from Unregistered Customer through Return Order.","NodeType":"Use Case","TableID":37,"CaseID":"{08F3F188-43F5-441F-AB95-BE332651AD3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112899","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{2167C0D3-971D-481A-86BA-F45FB92025FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112900","Name":"Intra State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{293882EE-DEB8-47A9-BAF1-9221422B247A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112901","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo - Price Including of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{77D351AF-2B06-49FB-B72A-CF9980E31A43}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112902","Name":"Export Return of Goods to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{BCB4C9B2-E212-4971-BE8C-914BC1DAAB1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112903","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{17ED9604-C26D-496C-B2F4-9124166CF719}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112904","Name":"Export Return of Goods to SEZ Unit Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A8ED1A73-743C-4D08-98E3-6D85C416E951}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112905","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{06F95F30-2C34-4CD2-9084-0B9101B9455D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112906","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A744EF89-44A8-4CE0-81F8-3D8094623CD1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112907","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{8153E2CA-FD9A-4A9F-A0E4-A657636F83DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112908","Name":"Export Return of Goods to Export Customer Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{E607F91D-D6E7-459A-801A-CBB9C7F8CE89}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112909","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo With Price Inclusive of Tax","NodeType":"Use Case","TableID":37,"CaseID":"{7AB59461-B75F-446E-A3EF-A2050873DFAD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112910","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo With Price Inclusive of Tax And Post GST To Customer","NodeType":"Use Case","TableID":37,"CaseID":"{88910F77-9493-481B-AF77-783FBD332B12}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-112950","Name":"End - Type - Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113000","Name":"Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113001","Name":"Intra-State Sales Return of Resources from Unregistered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{8F88FDD0-561E-4FEA-A663-4F4BAEC9D009}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113002","Name":"Inter State Sales Return of Resources from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{C9854015-8E55-43F1-A5F2-747FC1CF6A0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113003","Name":"Inter State Sales Return of Resources from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{52BFB82F-A54A-4E62-9DC3-2D608D6373B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113004","Name":"Intra-State Sales Return of Resources from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{6856A59C-FE7F-4DDA-B180-391F6E0D0A5F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113005","Name":"Export Return of Resource to Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{AD7D62C2-213F-4288-9506-BE3D205DBB95}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113006","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{FD76EB64-C01A-48C0-9F8E-3EE2E17BE515}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113007","Name":"Export Return of Resources to SEZ Unit / Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{D500E259-42B6-4346-BA2F-D76ECB9AFEE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113008","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{E62B6029-1BFA-456D-8D43-306AB7C78589}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113105","Name":"End - Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113106","Name":"Type- Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113107","Name":"Intra State Sales Return of Charge Item from Un-Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{41F1CFC3-B9F5-464D-9B6D-2C7B6C83186C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113108","Name":"Inter State Return of Charge Item from Unregistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{B3036F44-2238-4DC9-B250-70AA3FEC7821}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113109","Name":"Intra State Sales Return of Charge Item from Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{3835C90E-1BDF-4C46-B50E-C5375ED24ED4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113110","Name":"Inter State Sales Return of Charge Item from Registered Customer through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{DBE9B77E-9171-4F5C-A7CA-9156126D34FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113111","Name":"Export Return of Goods to Export Customer for item Type Charge Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{D8792403-FBC9-455C-8A3A-C67DAFDB6E53}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113112","Name":"Export Return of Charge-Item to SEZ Unit / Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{609F72CC-C49F-43F1-AB52-E56ED173368B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113113","Name":"Export Return of Charge-Item to SEZ Unit / Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{7F8B0021-4099-48C9-80BB-D977917CEA9E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113114","Name":"Export Return of Charge-Item to SEZ Unit / Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{57A0B7F8-E6C5-4CC4-89AD-11A14AF3C68B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113125","Name":"End Type- Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113140","Name":"Type- Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113141","Name":"Intra State Sales Return of Fixed Asset from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{884574EB-3354-459C-AF96-6EB624CCEFFE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113142","Name":"Intra State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{F7C5C8B6-2EB3-478E-AE6B-66BEEB6A3861}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113143","Name":"Inter State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{C915C6D6-9C5D-4C2F-BAB6-50E13850581E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113144","Name":"Inter State Sales Return of Fixed Asset from UnRegistered Customer through Sales Order/Invoice.","NodeType":"Use Case","TableID":37,"CaseID":"{7627B9EF-CB23-4EAB-88D9-3D894B6F6607}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113145","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{24F69259-FD27-49A7-B5E8-3CBF5351132F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113146","Name":"Export Return of Fixed Asset to SEZ Unit Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{200C22B1-5DC0-4A80-B377-B14F9613D061}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113147","Name":"Export Return of Fixed Asset to SEZ Development Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{E35E188E-728D-42BE-94F0-4B0476315B0B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113148","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo - Post GST To Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{7D7F45D3-E214-47D5-8CD5-ED31E8F4092F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113149","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1DD8BB1A-1AA9-4B82-9F6A-80F26AA8675D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113150","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{C6AFDFC6-874B-4B14-BCC9-8FC5B4992157}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113151","Name":"Export Return of Goods to Export Customer for item Type FA Without Payment of Duty through Sales Return Order/Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{AA85EF19-5F94-438E-ADC4-A9ACF0DCB0C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113160","Name":"End Type-Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113161","Name":"Begin No. Not Blank","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field6=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113162","Name":"Export Return of Services to Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{BB48AD27-2942-4C4A-B19C-4A7E76E181DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113163","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{D22C3484-E0DE-473F-9D62-2BB1DD4B10B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113164","Name":"Export to SEZ/ SEZ Development /Deemed Export Without Payment of Duty through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{2FF34432-5A9D-4C71-AF8B-6DDDC92F0A85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113165","Name":"Export Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{C502F69B-F76D-4D72-B7FC-A272A252590B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113166","Name":"Export Return to Deemed Export Customer Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{7BE46E73-EF21-4766-B4F2-34558460A2C9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113167","Name":"Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer.","NodeType":"Use Case","TableID":37,"CaseID":"{2F7B1F64-56F5-48C9-A6B2-A5F7F2BF8A2F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113168","Name":"Intra-State Sales Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{5FB236FB-7619-48A1-92D0-BD12F5C8A5C0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113169","Name":"Intra-State Sales Return to Deemed Export Customer Without Payment of Duty through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{A030C0C9-951C-4818-8A68-C6D5917C31BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113170","Name":"Intra-State Sales Return to Deemed Export Customer With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer","NodeType":"Use Case","TableID":37,"CaseID":"{0BD7BB2E-38E6-4254-82CB-713F429D787C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113180","Name":"End No. Not Blank","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113205","Name":"End - Not Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113305","Name":"Exempted","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18147=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113306","Name":"Intra state Sales Return of Exempted Resources from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{99E193A6-6A7C-4035-BCC1-F2BC49DC4F86}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113307","Name":"Inter State Sales Return of Exempted from Registered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{A485DD0E-AB08-49E5-9C7C-1FCA3398AE3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113308","Name":"Inter State Sales Return of Exempted Resources from Unregistered Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{A49C7425-A602-4445-873D-BCA89D3C2330}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113309","Name":"Export to SEZ/ SEZ Development /Deemed Export With Payment of Duty through Sales Return Order/ Credit Memo - Exempted","NodeType":"Use Case","TableID":37,"CaseID":"{D187D562-E011-4879-839D-A3CB824D11EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113310","Name":"Intra state Sales Return of Exempted Item from Registered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1A135F44-7A65-49A6-A08A-C87D453E5837}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113350","Name":"Intra state Sales Return of Exempted Resources from Unregistered Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{C2730DF7-9769-4732-819E-C39124E5E3F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113351","Name":"End -Exempted","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113380","Name":"Begin Type Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113381","Name":"Intra state Sales Return of Exempted Goods from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{DA8B91D0-1B63-44EE-BA57-0A40B1403080}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113382","Name":"Inter State Sales Return of Exempted Goods from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{246B0F60-6CA4-42A1-ACDD-30C38C89D2C4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113400","Name":"Begin Type Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113401","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113402","Name":"Intra state Sales Return of Exempted Services from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{D2A96240-2F58-406C-8774-03CD60C28E5D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113403","Name":"Inter State Sales Return of Exempted Services from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{E9E7486C-DBFB-432C-886F-017AD828CE5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113420","Name":"End Type - G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113421","Name":"Begin Type - Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113422","Name":"Intra state Sales Return of Resource from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{10E9D621-B3A8-49E2-BAA1-EB7D535C0712}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113430","Name":"End Type - Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113431","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113432","Name":"Inter State Exempted Sales Return of Fixed Assets from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{2D2466D5-E651-49FE-A00C-9DE16690874C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113433","Name":"Intra state Sales Return of Exempted Fixed Asset from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{1C2FBFBD-A18B-4A5D-819E-043993E5510C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113440","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113441","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113442","Name":"Inter State Sales Return of Exempted Charge Item from Exempted Customer through Sales Return Order/ Credit Memo","NodeType":"Use Case","TableID":37,"CaseID":"{0410BC8A-0231-4947-8ED6-982A68846120}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113443","Name":"Intra state Sales Return of Exempted Charge Item from Exempted Customer through Sales Return Order/Credit Memo.","NodeType":"Use Case","TableID":37,"CaseID":"{3277542B-B49C-4CCD-B661-F72C71CED698}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113445","Name":"End Type - Charge Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113449","Name":"Begin FOC","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18157=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113450","Name":"Begin Type Item","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113451","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113452","Name":"Intra State Sales Return of Goods from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{14FC3D2C-3DAF-4C04-AA69-6AE47D0D7552}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113453","Name":"Inter State Sales Return of Goods from Registered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A4A8C87F-D458-4DD2-B8E9-8393220FDD2D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113459","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113460","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113461","Name":"Intra State Sales Return of Goods from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{10CA76A8-8DE4-419A-8220-3DD88D8F8747}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113462","Name":"Inter State Sales Return of Goods from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{92CD1D91-1D76-46D8-B2E1-C62C54E62191}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113469","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113470","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113471","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{31F4991C-5E91-4AF3-B911-39F985BF48C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113472","Name":"Export Return of Goods to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{C3755AFF-81D3-4B1A-85B2-B2C8A60F9EAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113479","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113480","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113481","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo -Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{8E881E89-87C1-4745-9529-B82A784E83BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113482","Name":"Export Return of Goods to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{270F6442-0097-437D-9F91-5C15BD9EAB4D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113489","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113490","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113491","Name":"Intra-State Sales Return to Deemed Export Customer for Goods With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{913AAE94-3AEF-4F6D-80DB-F30FF5E5C067}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113492","Name":"Deemed Export for Goods With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{14586EFF-720D-4670-B023-EA4FBFF96B99}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113493","Name":"Intra-State Sales Return to Deemed Export Customer for Goods With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{9654C77E-D850-4AA2-9A47-FB003B1574B2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113494","Name":"Export Return to Deemed Export Customer With Payment of Duty for Goods through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{88F1A4B3-DCAC-499A-BD7A-A5EBA3EF3CB4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113499","Name":"EndGST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113500","Name":"End Type Item","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113501","Name":"Begin Type- G/L Account","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113502","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113503","Name":"Intra State Sales Return of Services from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{59157E34-743F-4293-A662-1A9C3D916178}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113504","Name":"Inter State Sales Return of Services from Registered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{D9AA8D5E-8135-47AA-A722-6356873CF5EF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113507","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113508","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113509","Name":"Intra State Sales Return of Services from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{B8757B78-D36C-4AB7-B532-353006120046}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113510","Name":"Inter State Sales Return of Services from Unregistered Customer through Return Order for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EFB5634E-C341-4922-9BC9-1CE76AD61D79}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113512","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113513","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113514","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo - POst GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{3397DBB8-098B-4A52-9BFA-E24A12B5F9E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113515","Name":"Export Return of Services to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0E655E71-19D9-4A10-8A28-FE4AFBA2A7C7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113517","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113518","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113519","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{DBA2CAA4-8EE2-4DD0-B413-383101DB034E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113520","Name":"Export Return of Services to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{ABF997C4-D467-4F97-94CD-10AFE3A66B3A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113523","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113524","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113525","Name":"Intra-State Sales Return to Deemed Export Customer for Services With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{6CC7879A-5AF1-4FD6-8713-7ECF54ABC412}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113526","Name":"Deemed Export for Services With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{861E4175-2832-49D7-8AF3-96E6C19F8E68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113527","Name":"Intra-State Sales Return to Deemed Export Customer for Services With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{6924DAF8-60F6-4C42-9266-200033C6D3F4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113528","Name":"Export Return to Deemed Export Customer With Payment of Duty for Service through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{1F11A81C-0551-4B07-AA30-23DA57E0FE16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113535","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113536","Name":"End Type- G/L Account","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113537","Name":"Begin Type- Resource","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113538","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113539","Name":"Intra-State Sales Return of Resources from Registered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{D6D5AACF-3FC9-4E46-AC66-66CB29D5293E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113540","Name":"Inter State Sales Return of Resources from Registered Customer through Sales Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{A0D756A0-DC72-49F9-A1F9-B926242C6AD2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113543","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113544","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113545","Name":"Intra-State Sales Return of Resources from Unregistered Customer through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{5131A9E4-A281-496F-9AF2-E60DC7D88A50}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113546","Name":"Inter State Sales Return of Resources from Unregistered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{40C0504C-93D7-4EC1-A4B8-7FE82C224BE4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113549","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113550","Name":"Begin GST Customer Type- SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113551","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{1F48109A-8444-4862-B9DA-190182B3FBAC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113552","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{F4C6236C-3805-4826-88FD-EAC2659389B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113557","Name":"End GST Customer Type- SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113558","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113559","Name":"Export Return of Resource to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{6C740BB7-2090-4E02-8611-2FD65CC51465}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113564","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113565","Name":"Begin GST Customer Type- Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113566","Name":"Intra-State Sales Return to Deemed Export Customer for Resource With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{858CA47F-FA82-4485-91A5-12B2EBF36D6F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113567","Name":"Deemed Export for Resource With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{220890E5-A6C0-4719-83C5-E2247EF9BEC3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113568","Name":"Intra-State Sales Return to Deemed Export Customer for Resource With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{11D160CF-FD98-4C47-928B-9F4125F584A9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113569","Name":"Export Return to Deemed Export Customer With Payment of Duty for Resource through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{EBFDB89B-5F22-4386-87CA-72157CBF122D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113574","Name":"End GST Customer Type- Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113575","Name":"End Type- Resource","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113576","Name":"Begin Type - Fixed Asset","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113577","Name":"Begin GST Customer Type- Registered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113578","Name":"Intra State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{291465B9-0C22-48B5-9EEA-4006CC372B1A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113579","Name":"Inter State Sales Return of Fixed Asset from Registered Customer through Sales Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{BFB628D6-4413-4628-B619-013EF3255CE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113583","Name":"End GST Customer Type- Registered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113584","Name":"Begin GST Customer Type- Unregistered","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113585","Name":"Intra State Sales Return of Fixed Asset from Unregistered Customer through Sales Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{7AFF7259-D09B-4C62-8575-34BEDEE4A72C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113586","Name":"Inter State Sales Return of Fixed Asset from UnRegistered Customer through Sales Order/Invoice for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3EAEA83A-B986-4C1E-9231-EDEAC919DE2F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113590","Name":"End GST Customer Type- Unregistered","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113591","Name":"Begin GST Customer Type SEZ Unit","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113592","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo- Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{0DD3F665-8D52-487D-A200-9BD69DB0A4A2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113593","Name":"Export Return of Fixed Asset to SEZ Unit With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{10BBEEB9-E622-4899-B4E0-C000CA753E54}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113597","Name":"End GST Customer Type SEZ Unit","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113598","Name":"Begin GST Customer Type- SEZ Development","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113599","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo - Post GST To Customer For FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{3AD6DDBC-A132-4ABA-B216-73133B85604A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113600","Name":"Export Return of Fixed Asset to SEZ Development With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{902158A0-97D5-4075-943E-3B30B800FB78}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113608","Name":"End GST Customer Type- SEZ Development","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113609","Name":"Begin GST Customer Type - Deemed Export","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18158=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113610","Name":"Intra-State Sales Return to Deemed Export Customer for Fixed Asset With Payment of Duty through Sales Return Order/Credit Memo-Post GST to Customer for FOC","NodeType":"Use Case","TableID":37,"CaseID":"{5629EBAA-46B2-4DD7-9511-1D6E697A6B0A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113611","Name":"Deemed Export for Fixed Asset With Payment of Duty through Sales Return Order/ Credit Memo-Post GST to Customer for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{4BFA98D3-CEF3-4573-B464-9E897EB9D4AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113612","Name":"Intra-State Sales Return to Deemed Export Customer for Fixed Asset With Payment of Duty through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{B3793372-9AD2-4F36-BA5C-3AF13BE44F2D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113613","Name":"Export Return to Deemed Export Customer With Payment of Duty for Fixed Asset through Sales Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":37,"CaseID":"{321E0F7B-A15D-4CE6-9C11-BF3FD3DEE918}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113620","Name":"End GST Customer Type - Deemed Export","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113630","Name":"End Type - Fixed Asset","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113635","Name":"End FOC","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-113639","Name":"End- Sales Return Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114640","Name":"End Sales","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114645","Name":"Purchase","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18080=1(<>''),Field18096=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114650","Name":"Purchase Document","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2|4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114660","Name":"GST Reverse Charge -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114670","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114672","Name":"Intra State Purchase of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{536EFB4F-1EBC-4731-861E-433F3BA23A4A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114673","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{93FE03BD-63C7-44B5-B40D-5974C8300527}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114800","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114850","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114851","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{01C97F7D-4263-4387-84E1-610D2EA4A762}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114853","Name":"Intra State Purchase of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Quote/Order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{78A245B3-3BAB-4347-B09A-FDE73A600BB2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114854","Name":"Inter State Purchase of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Quote/Order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{94FF400C-34A8-4760-A4E5-C4B367739FA3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114855","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{93FE03BD-63C7-44B5-B40D-5974C8300527}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114856","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{51395C06-549D-40B5-98C5-A7F6B73AF427}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114857","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{131AC7D7-6079-4C25-A3A6-CEAC66A6203D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114858","Name":"Intra State Purchase of G/L Account from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{D7A29410-A685-41B6-A8F9-268D65F062B6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114859","Name":"Inter State Purchase of G/L Account from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4DC1D2DC-A8F8-4443-A563-348B8E8961C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114860","Name":"Inter-State Purchase of Charge Item from Sez Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{85DAE7D1-95AC-4FD1-B1E0-5FFD980481BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114861","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{0E1A782B-CF1F-4CF0-8797-A1310519B1DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-114862","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{3E14881B-DB97-473E-9A0B-C8A0A2D604C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115000","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115001","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115002","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{71EC1D59-01EC-4486-8CB4-0957D4ADF38B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115003","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice-For GST Reverse Charge No","NodeType":"Use Case","TableID":39,"CaseID":"{CF902413-8C5A-4677-B070-1583FF5C13A4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115010","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115020","Name":"Type G/L Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115021","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BDA9C3AF-6736-46FB-B84C-ED078EA8F1B1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115022","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Not Available and GST Group as Goods through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{63842FED-75F4-44C8-897F-6D350858A29A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115030","Name":"End Type G/L Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115100","Name":"End GST Reverse Charge -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115150","Name":"GST Reverse Charge","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115151","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115152","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice Type-Debit Note","NodeType":"Use Case","TableID":39,"CaseID":"{2AB850AD-528A-498A-9E23-65E396AC61A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115153","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice Type-Debit Note","NodeType":"Use Case","TableID":39,"CaseID":"{B064E1CD-DB51-456E-AE19-7F2AC8C9DC11}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115154","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{89071509-BF13-4ED5-A45D-8D938DFEF265}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115200","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115201","Name":"Exempted Yes","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115202","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice for Exempted Goods","NodeType":"Use Case","TableID":39,"CaseID":"{700CF31E-E4A1-4183-AEF6-7C572C34C8AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115203","Name":"Inter State Purchase of Exempted Goods for Import Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{DF5E22A4-BD3C-4C80-B6D3-9F667C8037DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115205","Name":"End Exempted Yes","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115250","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115300","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115301","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{118F40D5-2D0E-45D6-B458-52D6BF00A035}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115302","Name":"Import of Services from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{8D8A9485-D248-4B9B-AB8C-EEDB746B190C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115350","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115351","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115352","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{20913086-F0CD-4AC8-AF0A-755723E44946}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115354","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice - For GST Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{D279BE29-1CB8-4F96-BA2C-0348368D0879}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115400","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115401","Name":"Begin Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115402","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FB4C68ED-BD93-4229-B1BB-91163250C066}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115403","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote With Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{9154D0D0-5D85-40BE-889D-764E65F8691C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115404","Name":"Import of Service from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice for Charge (Item)","NodeType":"Use Case","TableID":39,"CaseID":"{B8A8C947-5BA0-45B4-B8A4-33088F25782F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115415","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115450","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115451","Name":"GST Credit-Non Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115452","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115453","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{AE939960-28B0-426C-B5D7-D8535B9AE3C9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115454","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{27255CC6-70FC-4D33-91F1-5B83F03CE33E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115500","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115501","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115502","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{9167AE32-6B66-48FB-AF03-35D261A7C5BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115503","Name":"Import of Services without Input Tax Credit available from Foreign Vendor.","NodeType":"Use Case","TableID":39,"CaseID":"{F1AFD035-5F0A-4DD2-B15E-E0EEF0BA43D7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115506","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{387B69F6-70EC-4BCC-A4C0-AA1CFAB0D356}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115507","Name":"Inter-State Purchase of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{62A4192A-86D8-4431-A641-78EF2F348546}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115550","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115551","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115552","Name":"Intra-State Purchase of Resource from Registered Vendor where Input Tax Credit Not Available - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{A0CED092-3AAD-4121-A5A2-F4DEAC316621}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115553","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{FED218A8-8C3F-43D9-BBD5-E8BCBB30D8BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115554","Name":"Inter-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{C340D02B-697D-414F-9082-E4CC9B4B2A3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115555","Name":"Intra-State Purchase of Resource from Unregistered Vendor where Input Tax Credit Not Available - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{0EE4D825-CC7B-458D-9165-D32635F56F41}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115556","Name":"Intra-State Purchase of Resource From UnRegistered Vendor where Input Tax Credit Not Available through Purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{38BC1AAB-3066-483F-811E-E147662D48C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115580","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115581","Name":"Begin Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115582","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1C3087C6-66E1-4D66-8133-DF7F13FDB0D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115583","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C7BA99E0-7A62-41C9-93C4-36BDAD52C328}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115584","Name":"Import of Charge from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BFCC5C7F-F391-44D5-84F1-1D72DC7A9DEC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115595","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115649","Name":"End GST Credit-Non Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115650","Name":"End GST Reverse Charge","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115651","Name":"Extempted -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115652","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115653","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115654","Name":"Import of goods with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{4D6EF305-AE45-4735-9E9A-C9428D139D38}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115655","Name":"Import of goods with Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{24E498DD-9DFB-4097-9F32-C8EBD49B8D22}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115656","Name":"ISD - Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{E8B90257-9F0D-42F4-A340-13A648D11829}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115657","Name":"ISD - Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{874048A6-575B-456F-A2E7-26532DA3F1CA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115659","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{2C80FA78-CBBE-45E7-8C62-5010B692AC9C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115660","Name":"Inter-State Purchase of Goods from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{FF5D43D6-C93E-42D5-9CD3-E3FCA99E77DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115661","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{94D31994-F430-4825-A72E-D41F51F63952}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115662","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{53AA1183-8DEC-4542-A708-317C5CD7BDA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115663","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{E75A7A67-D332-41BE-B7EA-61C8BF69E9F7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115664","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{1440B152-A710-4982-86C0-5C27FEF4A7D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115665","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A8B3F6FB-A42D-4767-BD3D-D4C9BB11AEAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115666","Name":"Inter-State Purchase of Goods from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{B86AA24C-78CF-4F29-BD88-E17580D6992B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115667","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7BDD3EE0-29AE-4C15-A879-1DBF13ADA019}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115668","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{9FE211A9-770A-4396-BE84-B9625D975180}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115669","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{B7A4D05E-75C4-47F5-B502-9510B13E2DEA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115670","Name":"(POS) Intra-State Purchase of Service Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{F0AB5767-48C9-4F01-A346-D6CAA74EFCED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115700","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115701","Name":"Type-GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115702","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is Available.","NodeType":"Use Case","TableID":39,"CaseID":"{BACBB54A-0D30-4206-AA6A-5CF48A744D5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115703","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{9568C93C-FC46-477D-B554-A8EACAEAF21A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115704","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{F85B9211-93F9-4443-9784-BE52C220CE24}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115705","Name":"ISD - Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote ","NodeType":"Use Case","TableID":39,"CaseID":"{EF5146EB-771F-4DCE-80E7-ACC0B606829F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115706","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{0027CF9D-DA15-43A2-83D4-5CD214E0278B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115707","Name":"ISD-Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{700AF8A2-1315-41BC-9FE9-E00FB826DC80}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115708","Name":"Inter-State Purchase of Services from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{8A057230-A2A9-4E59-8101-9A947A8D8B91}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115709","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FC1AEFDA-0537-4D94-A576-F542B6710B71}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115710","Name":"Inter-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{5F9FDC49-A99D-4F72-AA5F-4E0BF5B3AC34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115711","Name":"Intra-State Purchase of Services from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{31C539BE-990C-4E00-AF1A-6BFA1333ED7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115712","Name":"Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{B03B25F1-806F-4CE3-86A2-A65BBE1F8360}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115713","Name":"Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry and GST Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C2D132AB-4A23-47FC-9A25-EEB973689456}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115714","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{04BA2F8D-9562-4551-8A98-C61CE5509B47}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115715","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{19625BAB-02B9-42E1-80EF-FED88D13FF40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115750","Name":"End Type-GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115751","Name":"Type-Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115752","Name":"Import of Fixed Asset with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{E076372D-BFB5-4911-B6EE-85F1F71B1569}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115753","Name":"Import of Fixed Asset with Input Tax Credit available from Import Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{7E44665E-5E48-4F98-8E9A-135669D3E75B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115754","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{C02EF3F0-A659-4762-854B-830A8D59B371}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115755","Name":"Intra State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4753502A-0359-4A8C-A37C-4DB4B6FCD790}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115756","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{4852FE50-F64A-454F-B43F-D46FE4BABECB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115757","Name":"Inter State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted goods(Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7C939AC1-1919-4919-A0D0-B62E3C72B382}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115758","Name":"Intra State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{975372FC-F93D-4E8B-81EA-57B6751B9F94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115759","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted goods(Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{B69B4BDA-5CAC-4C9C-B4DB-211912D30EF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115760","Name":"Inter-State Purchase of Fixed Asset from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{F3E7CEF3-5437-42EC-9DED-FE81F994FFCB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115761","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{B83A838B-C0A8-4E69-B735-86D011229B1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115762","Name":"Import of Fixed Asset with Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A7ED2E31-2CA7-4D60-A415-31A78736388D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115763","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{8B96F1E1-FC2C-48FD-AD1E-62986961AC0D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115764","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{FCC8AA84-E16B-4D3F-A139-946089738FB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115765","Name":"Inter-State Purchase of Fixed Asset from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{E246F7FE-DE34-4E3C-BD3B-D8943D9B966C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115766","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E365B9AF-953A-462B-A562-9B494D0B84B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115767","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted fixed asset with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{DA3FC765-67AA-4232-8C30-6CE3E6E6DFDC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115768","Name":"Import of Goods with Fixed Asset from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{D9172942-78EB-4305-950C-C9DEC70F16E6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115769","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{F7997B96-631E-456D-9FA2-028ADEC745C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115770","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{5E2D969D-2A4B-4288-900B-7D1527F80A8E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115800","Name":"End Type-Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115801","Name":"Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115802","Name":"Inter-State Purchase of Charge Item from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{21957E13-9751-40A2-B591-67ADE93573E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115803","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{4F234B8B-1B95-4938-B3DF-3D96784EAC77}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115804","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{AB0E6CA2-960E-4D6F-A7C6-D461F268627F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115805","Name":"Intra-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{72511E89-CA1E-4749-8648-F1EFD6F61D44}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115806","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available Bill to Location(POS) Through Purchase Invoice/Order/Quote","NodeType":"Use Case","TableID":39,"CaseID":"{0ABF122D-4ED5-4820-8411-7C39147B2819}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115807","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Available with Bill to Location(POS) through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{CD837506-8D55-4E71-8576-FA6B9934A6BB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115808","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor where Input Tax Credit is available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1DD024D8-C5D0-44DC-BD2E-3B4A395F33FE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115809","Name":"Intra-State Purchase of Charge Item from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc Through Purchase Invoice/Order/Quote-Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8EE30985-1662-4A16-B9B1-2C36589F4F94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115810","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{2A0E0C4E-331F-42B3-96D2-F9CFF01E6FC1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115811","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted charge item with no GST Impact through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{714E77D3-C569-418A-A932-DBFF272D3B92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115812","Name":"Import of Charge Item with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{B95176D6-58FF-487C-A25B-26E433D85356}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115813","Name":"Import with Input Tax Credit for Charge Item available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{13E5D66F-422B-4830-992B-39C740D6D560}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115814","Name":"Import of Charge with Input Tax Credit available from SEZ Vendor with Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8E537871-C8F7-4E07-8B32-84411C668443}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115815","Name":"Inter-State Purchase of Charge Item from Sez Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{05312E80-BE4E-4EB1-9A1E-AF55EA4D8E3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115816","Name":"(POS) Intra-State Purchase of Charge Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{E587BDAC-2C08-42CA-9657-B3EA423F30E7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115850","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115851","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115852","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{EC4815D3-A78F-4C4F-8C64-8FE9AF09050C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115853","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{4AC1A712-CC9B-4CB7-91EA-05245C1D7211}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115854","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{F5EA246D-523F-4FFA-B316-967933F01C16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115855","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{7342ECF9-7916-4923-AC4C-71E973942346}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115856","Name":"Intra-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{0FD2A76A-DECB-4FAC-8008-10D6762CDAFE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115857","Name":"Inter-State Purchase of Resource from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{20C477FD-F60A-4D5C-B919-BF3082993511}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115858","Name":"Import of Resource with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A106F715-2EC1-43B7-B0AE-33F6AEEF3B2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115859","Name":"Import of Resource from Foreign Vendor where Input Tax Credit is Available through Purchase Order/Invoice/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{45189151-3ACF-421C-8984-C932DC8A3A2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115860","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{FEC46768-8566-4C39-AE1D-62B0FD83D5D6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115861","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{56966B10-DE93-4980-A9FE-1CBB5DE6359B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115870","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115900","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115901","Name":"GST Credit-Non Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115902","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115903","Name":"Import of goods without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A7619228-F860-4E03-B21E-E0F01EFF6C52}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115904","Name":"Import of goods without Input Tax Credit Not available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{ABA6F00E-B423-49DF-8DF5-F74950011703}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115905","Name":"Import of goods without Input Tax Credit available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{C57B60DB-22D0-43D5-8460-B47D9F11AFC2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115906","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{E277B92E-D047-425F-B44D-E8EA58FAEE5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115908","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{09CD7163-15FB-4340-82BF-57373BE3E206}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115909","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{F4B17FC7-3605-47DD-804E-4573BCB3FAC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115910","Name":"Inter-State Purchase of Goods from Unregistered Vendor where Input Tax Credit is Not-Available","NodeType":"Use Case","TableID":39,"CaseID":"{9E59D4DD-C975-4F42-B5A2-AA98AC93FB7F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115911","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{5577B8ED-6471-4480-AD5A-63BA31696AB7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115912","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{A274F11C-332F-4EE3-AC91-2E2D95E9E2B6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115913","Name":"Intra-State Purchase of Goods from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{679E7F9F-9AAC-4CC5-A263-904ECC708057}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115914","Name":"Inter-State Purchase of Goods from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1B2046C2-4264-4272-A998-085B20832B87}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115915","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit isNon-Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F4F11B85-700B-4880-9A73-740FF36C4160}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115916","Name":"Inter-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{CE65AEFF-0248-437E-B8A6-87C60E49EFD4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115917","Name":"Intra-State Purchase of Goods from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{55BEA8B4-15ED-47B2-AD24-157BA39467EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115918","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{CCD1BD07-0A33-4DAB-9A3E-E66956E0F98B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115919","Name":"ISD - Intra-State Purchase of Type Item and GST Group Type as Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7D71FA6F-572E-4C61-B3CB-297E4521E1A9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115920","Name":"ISD-Inter-State Purchase of Type Item as Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{9304251B-68E9-41D1-A6FD-00424AB38EE6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115921","Name":"(POS) Intra-State Purchase of Item as Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{7C76E97A-E248-4CFE-82A9-18EB754ED886}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115950","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115951","Name":"Type-GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115952","Name":"Intra-State Purchase of Services From Registered Vendor where Input Tax Credit Not Available through Purchase Quote- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EB169AE5-8DE0-4490-8DFD-46CEE05AA5C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115953","Name":"Inter-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{67527223-25F5-48B0-A0C2-F0064BD92F18}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115954","Name":"Intra-State Purchase of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{46AD3622-5D72-4048-9FAC-3C31077C2DF0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115955","Name":"Intra-State Purchase of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FEE41ACD-C7C4-4653-9A34-15F7F0B70663}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115956","Name":"ISD-Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{EC905260-0D39-42CD-ADAE-27F4E74CE267}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115957","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{6A72F56C-CA49-4D53-939A-4FABC050BFB3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115958","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order","NodeType":"Use Case","TableID":39,"CaseID":"{0C3618F6-08BD-417F-8744-94A415595940}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115959","Name":"ISD - Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{61FB3B94-A2C7-4F3F-B4A8-801D842328E1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115960","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{BE0C902C-E9FC-4548-B8C7-AB70E21388BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115961","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{36A5E0EC-E197-4102-8FF0-F6DC9B4A47C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115962","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is not available.","NodeType":"Use Case","TableID":39,"CaseID":"{62216594-6660-492B-ACA0-F8BD3893DE49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115963","Name":"Intra-State Purchase of Services from POS as vendor state Registered Vendor where Input Tax Credit is Not available","NodeType":"Use Case","TableID":39,"CaseID":"{A52E9652-EFC8-4950-B8C1-A41D887AF962}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115964","Name":"Import of Services without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{C07C2110-2740-4FAD-975B-293FAAD86247}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115965","Name":"Intra-State Purchase of Services from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{D2457D2F-2B0E-4F56-BF93-007E245C4FF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115966","Name":"Intra-State Purchase of Services from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{0C6EE2B8-335F-4420-9B76-AEBF773BB40C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-115967","Name":"Inter-State Purchase of Service from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7642FECB-8BEE-4127-9523-47ECB7D29DC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116000","Name":"End Type-GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116001","Name":"Type-Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116002","Name":"Import of Fixed Asset from Foreign Vendor where Input Tax Credit is Not Available through Purchase Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{7307BDA2-283F-4094-82E0-41EC241CE177}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116003","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{47F223C1-06BE-4BD6-A98A-E001F8CE436E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116004","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available through Purchase Order/ Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{1A8DCBD9-6A50-4C2F-9364-9DB967B50A24}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116005","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{2E369D91-2885-47EB-886E-7AD35816B42E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116006","Name":"Intra State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{5DC7836A-BA61-4738-8506-BA91EC982903}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116007","Name":"Inter State Purchase of Fixed Asset from Exempted Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{62AD7817-C30F-4EC6-B68C-AC4828B07DF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116008","Name":"Intra State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{64233AA2-2DB0-4AC9-8078-0755AB5DA89D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116009","Name":"Intra-State Purchase of Fixed Asset from UnRegistered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{DB7C51C1-1F9F-40F2-82C2-82D59793413C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116010","Name":"Inter-State Purchase of Fixed Asset from Unregistered Vendor where Input Tax Credit is not available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F8D35423-18AA-4916-A10C-3DC5A6F80CB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116011","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{4FA8A9F3-D8C5-4B20-ACB0-F52BFE013A01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116012","Name":"Inter-State Purchase of Fixed Asset from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{718C2339-648B-4FC6-A496-737B12176D01}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116013","Name":"Intra-State Purchase of Fixed Asset from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{679F358F-4DB0-4587-9F0C-CE643B16A152}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116014","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{AFCCC11E-97B1-4627-8DFD-4184537E2509}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116015","Name":"Inter State Purchase of Fixed Asset from Composite Vendor/Supplier of exempted fixed asset for Non-Availment through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{D50E350F-963C-4C3C-9E78-08F12AB7D8F0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116016","Name":"Intra-State Purchase of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice For FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7E48E18F-D907-423A-BC62-256D7CFAA089}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116017","Name":"Inter-State Purchase of Fixed Asset from Registered Vendor where Input Tax Credit is not available through Purchase Order/ Invoice for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{65746F4E-A835-4278-98CA-B6AB0D0CBF6B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116050","Name":"End Type-Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116051","Name":"Type-Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116052","Name":"Intra-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{97664A61-096E-43D9-BF55-2D5672F02F7F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116053","Name":"Inter-State Purchase of Charge Item from UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{F4A8CF06-D6CE-4263-ACF3-F1FBB744FBFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116054","Name":"Inter-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{101CAF41-34AB-4EA1-9277-166954A7FF94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116055","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{64F0C586-3993-4F05-A127-332E7E46802D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116056","Name":"Intra-State Purchase of Charge Item from Registered Vendor when Input Tax Credit is Not Available With Bill to-Location purchase order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{666A5198-99BA-4EC0-A89A-C991109BBC0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116057","Name":"Inter-State Purchase of Charge Item from Unregistered Vendor where Input Tax Credit is Not-Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{66A099C8-9660-498E-9BEB-61296A76CFAF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116058","Name":"Intra-State Purchase of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8A58255B-97C9-4691-9DBF-1C041D4433DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116059","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted (Non Availment)goods with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C4DD33B4-D4DB-4F30-8C86-E2045B473C57}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116060","Name":"Inter-State Purchase of Charge Item from Registered Vendor where Input Tax Credit is not available with Bill to-Location","NodeType":"Use Case","TableID":39,"CaseID":"{CCE6E98E-5330-48BA-B42E-70E2BDE3E45B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116061","Name":"Inter State Purchase of Charge Item from Composite Vendor/Supplier of exempted charge item for Non-Availment through Purchase Quote/Order/Invoice with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{FFCC9396-D3C4-4A81-BDE8-23070BF8976F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116062","Name":"(POS) IntraState Purchase of Charge Item for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{A5676558-7FDC-4CEC-B562-37829B285BE3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116100","Name":"End Type-Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116101","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116102","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order.","NodeType":"Use Case","TableID":39,"CaseID":"{DBD883FC-4DD3-4C9C-B9AC-AAAF07FF4F3E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116103","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice.","NodeType":"Use Case","TableID":39,"CaseID":"{073D94DC-E7F0-4535-B269-7C36C626FD96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116104","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{B33DCDC5-21C3-4019-96E3-EF513EAED95E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116105","Name":"Import of Resource without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{B12DD0D6-A87C-4A8C-AE71-746B26156893}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116106","Name":"Import of Resource from Foreign Vendor where Input Tax Credit is not available through Purchase Order/Invoice/Quote.","NodeType":"Use Case","TableID":39,"CaseID":"{5D419270-CBAE-42FB-A135-DC1693C77985}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116107","Name":"Intra-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available purchase order/Invoice for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{10D6A0FE-F802-4235-B438-3A29B7C853ED}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116108","Name":"Inter-State Purchase of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Invoice/Order for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{F1A5130E-021A-40F9-8282-82CBFEE3FF07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116130","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116150","Name":"End GST Credit-Non Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116200","Name":"End Exempted -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116201","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116202","Name":"Inter-State Purchase of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{1FFB6082-63D3-4AF8-A83B-9AE92D2010E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116203","Name":"Intra State Purchase of Exempted Fixed Asset from Registered Vendor (Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{C7563021-CD85-4519-ADFB-BA848CA3022F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116204","Name":"Inter State Purchase of Exempted Goods-SEZ Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{97856AB0-DAB0-4CF3-B1B1-3A6EB1524E0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116205","Name":"Intra State Purchase of Exempted Goods and Services.","NodeType":"Use Case","TableID":39,"CaseID":"{2ED393A6-3B1D-49AC-9DBB-D5836930F61C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116206","Name":"Inter-State Purchase of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{AB2BDB68-471C-4EC0-B43A-92920239FBF9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116207","Name":"Intra State Purchase of Exempted Fixed Asset from Registered Vendor (Non-Availment) with no GST Impact through Purchase Quote/Order/Invoice","NodeType":"Use Case","TableID":39,"CaseID":"{F67095C1-F610-4B59-A1E5-7B58D83A6CF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116208","Name":"Inter State Purchase of Exempted Goods for Registered/Exempted/Composite Vendor","NodeType":"Use Case","TableID":39,"CaseID":"{07AC553C-0E84-41E3-B04A-19B63C3BCF75}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116250","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116251","Name":"Begin Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116252","Name":"Import of Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, without cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{A43577AE-11F7-4DF9-9EEF-F317ED83ADD4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116253","Name":"Import of Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{B45F2436-2E00-4A49-9A8E-7B9202FE0F0A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116260","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116300","Name":"End Purchase Document","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116301","Name":"Purchase Return Document","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116302","Name":"Exempted No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116303","Name":"GST Credit Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116304","Name":"Type-Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116305","Name":"Return of Import of goods with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{15A78CF5-A4CC-4804-95DA-6FB3DCBF2DBF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116306","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{BB9814B7-D039-49BC-BF5D-F80127620CAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116307","Name":"Purchase Credit Memo/Return Order for Imported Goods where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{48C973FB-77C2-476C-AB39-0E61F0F76F0D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116308","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{D0059E3B-4B5F-44E3-B2AD-B3DB74C1CEC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116309","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{BC7B8A8E-B343-439B-B240-B5D7D0253CC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116310","Name":"Inter-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{CFC3D6F5-144A-4731-8658-BA626457624A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116311","Name":"Intra-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available Through Purchase Invoice/Order/Quote - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{2E358EDE-097D-4846-A45B-BC2C1AE07FE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116312","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available with Bill To-Loc Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{F6EB6D82-74A5-413E-BE36-9308F41811A3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116313","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{7759D07C-F691-4738-8FB8-F682B03DA922}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116314","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{998A15E8-B4E6-460E-A89C-239F276E9B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116315","Name":"Inter-State Purchase Return of Goods from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{FFBADC05-CF47-4787-B31A-EB85F88CACE8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116316","Name":"Intra-State Purchase Return of Goods from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{FBEDC063-63EA-4FED-A3DD-8B5E175031CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116317","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{055AEE33-1301-4B59-BA0D-E76D2D542B34}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116318","Name":"Intra-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{C9F94259-EA6B-481B-AAF1-8D8F9F025902}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116319","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{90643BB8-1BEB-40C8-81B3-E6A3C5075C45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116350","Name":"End Type-Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116351","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116352","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is available through Return Order.","NodeType":"Use Case","TableID":39,"CaseID":"{AF13E308-74EA-4A38-86B9-B0EA0DCE1972}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116353","Name":"Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{0CCFD5FB-95C8-4189-ACFF-E7D9AE1DB368}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116354","Name":"ISD - Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{137A0843-A280-441F-8D87-5639EDB2B01E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116355","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{2A733D02-2125-4EA9-97E3-2068E5708A94}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116356","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{710042C6-833D-4CF4-B943-47CF6691F7DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116357","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{D2E1CF7B-EA38-4EB3-82C3-E2E6949625D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116358","Name":"Intra-State Purchase Return of Services from Unregistered Vendor when Input Tax Credit is Available (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{AEDED96A-9927-4DF4-B89B-22FA7C77C19F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116360","Name":"Inter-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{64A2BCC0-3E88-4613-B91D-540FF4977F86}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116361","Name":"Inter-State Purchase of Return of Services from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{6510FF1C-A0A5-4C52-8DE5-836BE2536650}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116362","Name":"Return of Import of Services with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{36710BC3-FED5-4726-8AB5-1DC108CF23AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116363","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Available Through Purchase Return Orders for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{47AA3C60-6575-4F87-8022-29790BB97A11}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116400","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116401","Name":"Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116402","Name":"Return of Import Fixed Asset with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{1201ECAE-F4F2-43D7-938E-15F5361C2062}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116403","Name":"Return of Import of Fixed Asset with Input Tax Credit available from Import Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{8EECE1FD-4BDB-4A37-92ED-00380C170CFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116404","Name":"Inter State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted goods(Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{A8A42D6F-2A47-4175-8ED8-F482D64554C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116405","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{CCF91681-45AA-45DC-94A6-52DBBF199CF5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116406","Name":"Intra State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted (Availment) goods with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{4E53918C-16B7-4834-86DE-E7422FC21E83}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116407","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{57322220-978A-459E-8EC5-05AB66E6B362}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116408","Name":"Intra-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{F37442C1-AB50-445F-A7C3-8DCA84931B69}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116409","Name":"Inter-State Purchase Return of Fixed Asset from Unregistered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{B5669E1C-A496-431B-A29F-69E527E37AA0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116410","Name":"Inter-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{E6B10245-E536-41CF-A9CC-AA043113F6F4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116411","Name":"Inter-State Purchase Return of Fixed Asset from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{38583B1E-682C-4B06-BB69-005849014E82}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116412","Name":"Intra-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1EB264E9-24DD-43EC-A17F-E623BF565203}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116413","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{8E9E924F-0BE8-4862-BDFE-39CB23848B3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116414","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is available through Purchase Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{B4B3EE78-57EC-4EE8-8F51-E7B868CF34B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116450","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116451","Name":"Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116452","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available through purchase return order/Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{9A744701-39FF-4CFF-AA72-F5856E82FBF4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116453","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{142D2618-98AC-4DD8-922F-11CF063DD8D8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116454","Name":"Inter-State Purchase Return of Charge Item to Unregistered Vendor when Input Tax Credit is Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{8B75A47C-8DD2-45C8-99D9-B04E18C531D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116455","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{06A818C9-817D-4983-B8D9-D96759380A68}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116456","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{4934B903-2938-4ED9-994C-36F89B08E352}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116457","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{8F83C983-4368-45FF-9319-952826F72162}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116458","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Available with Bill to-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{478E0789-2184-4644-8165-3B5169084277}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116459","Name":"Inter-State Purchase Return of Charge Item from UnRegistered Vendor when Input Tax Credit is Available With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{0E9F08C2-7CF2-4AC1-AFB4-57AC8383E732}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116460","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Available With Bill To-Loc - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{03418FFD-0AF9-48F5-A500-EC48BF9DE4E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116465","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116466","Name":"Type-Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116467","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available through Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{A8C8864E-5E75-431A-90D6-9AAB47623BA6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116468","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C6FDF908-18DE-47B6-ADED-1E654C153D2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116469","Name":"Inter-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{D8632F51-FEDB-4AF9-8A25-CFE374BD12BA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116470","Name":"Return of Import of Resource with Input Tax Credit available from SEZ Vendor with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{62CA4077-63DB-4812-8DBA-369BDD0A5A63}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116471","Name":"Intra-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{C9ED5F18-07B9-43AF-9221-448B962EC9CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116472","Name":"Intra-State Purchase Return of Resources from Registered Vendor where Input Tax Credit is available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{04F944A1-EF9C-440F-A89B-654782D13EAA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116473","Name":"Purchase Credit Memo/Return Order for Resource where Input Tax Credit is available.","NodeType":"Use Case","TableID":39,"CaseID":"{4001BD59-B35E-4BBC-B7AD-464FBB21E54A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116474","Name":"Intra-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{EE5198CD-9648-49CF-97C5-E71A9843EE27}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116475","Name":"Intra-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available Through Purchase Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{21A2DFFA-DF09-4531-BE3F-DFC7E50F3D1E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116476","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Available through Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{2E66DC31-92BB-4928-83E5-6F87FC544A85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116490","Name":"End Type-Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116500","Name":"End GST Credit Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116501","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116502","Name":"Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116503","Name":"Return of Import of goods where Input Tax Credit Not available from SEZ Vendor without cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{D66CD2EC-C8A4-48B9-A634-B14161E0E03B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116504","Name":"Return of Import goods without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry","NodeType":"Use Case","TableID":39,"CaseID":"{A4A0C6C8-FE70-4DA2-9E3D-E5F0CCA93A22}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116505","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{4684DF92-D578-4978-B4EC-04ACC07C8206}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116506","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{C8AEE991-4EDD-4562-BCE7-3DFA3502C8D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116507","Name":"Intra-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available through Return Order","NodeType":"Use Case","TableID":39,"CaseID":"{0120B543-BBCA-433A-B84D-3A07CA4BD763}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116508","Name":"Intra-State Purchase Return of Goods to UnRegistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{5F7E0B6C-3D83-418C-9829-C5E5E52460C6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116509","Name":"Intra-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{EB39C2FC-37D8-4778-8B44-9A45DDA46B2E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116510","Name":"Inter-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{938B00CD-0C55-4E7E-9E88-9D26724E10E2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116511","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available with Bill To-Loc purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{65C755B4-E396-453F-9425-896AFF64D1B3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116512","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{0D76D452-CCE9-473B-998A-71EDADD459AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116513","Name":"Intra-State Purchase Return of Goods to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{35C8BFED-ED88-46B7-AFE8-9F2C58421857}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116514","Name":"Inter-State Purchase Return of Goods from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E0AA74AA-F401-4115-B768-D41BB661B532}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116515","Name":"Intra-State Purchase Return of Goods to Registered Vendor when Input Tax Credit is Not Available purchase Return Order/ Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{A515D68A-A496-4A81-8F4E-EC21F207D5FF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116516","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is not available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{040A5713-75A6-4FD3-BCA9-7A335D697933}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116550","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116551","Name":"Type GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116552","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is Not Available.","NodeType":"Use Case","TableID":39,"CaseID":"{F14B809C-31CA-4B7D-989E-419B00D35F8F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116553","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is not available Through Return Order ","NodeType":"Use Case","TableID":39,"CaseID":"{C6B64855-0CA9-4749-B21E-AF9FA0AB33D4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116554","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{2CEB6A3E-11E4-420F-A3C6-886B920BEC29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116555","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{78DCCF81-7548-4028-A6AF-31AEB633FC3C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116556","Name":"ISD - Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{BD845B37-5E0F-4EF3-94CB-ED972B71A3C1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116557","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is Non-available through Purchase Return Orders/Purchase Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{E6B27281-EC3F-4040-B035-4179D33884CE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116558","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{58CCF42B-75BE-422F-90A5-93E52B2CC817}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116559","Name":"Intra-State/Intra-Union Territory Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A7F8D194-33DA-472D-87CB-693FB589CD45}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116560","Name":"Intra-State Purchase Return of Services from Registered Vendor where Input Tax Credit Not Available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{A4461039-C91C-4102-9438-866AF5607096}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116561","Name":"Intra-State Purchase Return of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{F7D97DC6-CF0E-4248-95A3-3C7189BF844D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116562","Name":"Intra-State Purchase Return of Services from UnRegistered Vendor where Input Tax Credit Not Available (Reverse Charge)","NodeType":"Use Case","TableID":39,"CaseID":"{01289E18-40A0-4AC7-92DA-601F5AF77AA0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116563","Name":"Inter-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7EE4EB63-5718-4880-80D7-DC82790F804D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116564","Name":"Inter-State Purchase Return of Services from Unregistered Vendor where Input Tax Credit Not Available -Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{6FB5A46A-83C0-495F-9495-7365027603EA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116565","Name":"Return of Import of Services without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry ","NodeType":"Use Case","TableID":39,"CaseID":"{7DBFAC05-5315-4A5F-B5BE-962A065F7D93}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116566","Name":"Intra-State Purchase Return of Services from Registered Vendor when Input Tax Credit is Not Available Purchase Return Order/Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{79A59A19-401F-444F-A3C4-F8CBBA06D4B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116567","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is Non-available through Purchase Return Orders/Purchase Credit Memo for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{4B185DAB-793D-4C0A-A303-417A61AC9B96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116568","Name":"Intra-State Purchase Return of Services from Registered Vendor when Pos as Vendor Input Tax Credit is Not Available Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{4F2FB4B9-25BE-4C8C-8D77-7E3D63F9DB40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116600","Name":"End Type GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116601","Name":"Type Fixed Asset","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116602","Name":"Purchase Return of Imported Fixed Asset from Foreign Vendor where Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{21811F58-E56B-4A1B-B6DA-C9BD8EECC3AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116603","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{11784DD8-7EF0-42CF-9A18-401A9ABC6466}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116604","Name":"Intra State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted (Non-Availment) goods with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{12EFA340-BD17-487B-A7CC-F23993B289CF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116605","Name":"Inter State Purchase Return of Fixed Asset from Composite Vendor/Supplier of exempted goods(Non-Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{8E46C7A8-FFB5-40D2-8DBB-26E9FEDDF17D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116606","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available","NodeType":"Use Case","TableID":39,"CaseID":"{079237F7-FA64-40B5-8BE7-A92428550117}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116607","Name":"Intra-State Purchase Return of Fixed Asset to Unregistered Vendor when Input Tax Credit is Not Available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{8EC585FC-1F0E-4A31-A28A-463F3239EB57}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116608","Name":"Inter-State Purchase Return of Fixed Asset to Unregistered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{028465BA-B14C-4266-9D47-75A8087EE299}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116609","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{BFB5B4F3-BBC1-4A5B-9B7C-C3572578CD78}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116610","Name":"Inter-State Purchase Return of Fixed Asset from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{3A542488-E9A7-41E5-BF0B-C73F9C82A8DB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116611","Name":"Intra-State Purchase Return of Fixed Asset to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{6A0A47A2-4A0F-4CCD-AC63-A70C76E05091}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116612","Name":"Intra-State Purchase Return of Fixed Asset from Registered Vendor when Input Tax Credit is Not Available for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{7601E944-F060-482E-B620-CF8555D00BB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116613","Name":"Inter-State Purchase Return of Fixed Asset to Registered Vendor where Input Tax Credit is not available with Bill To-Loc for FOC","NodeType":"Use Case","TableID":39,"CaseID":"{BC63870D-585E-4C07-A6A6-44DE28F260BE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116650","Name":"End Type Fixed Asset","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116661","Name":"Type Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116662","Name":"Intra-State Purchase Return of Charge Item from Registered Vendor when Input Tax Credit is Not Available purchase return order/Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{2653A4AF-CD57-4A29-B4C2-4FE3749AC4AD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116663","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Not Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{87FB95AD-905D-4832-9EC3-0330B674D601}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116664","Name":"Intra-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{1B728E5D-4A32-4E32-A2AA-FE3673AFC2CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116665","Name":"Inter-State Purchase Return of Charge Item to Unregistered Vendor when Input Tax Credit is not Available through purchase return order/ Credit memo","NodeType":"Use Case","TableID":39,"CaseID":"{79839F30-7F44-4411-BB2D-07FFA294A38D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116666","Name":"Intra-State Purchase Return of Charge Item to Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{7E781F55-9A83-4206-B18A-46C2CA5E8573}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116667","Name":"Inter-State Purchase Return of Charge Item from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{4F6B53B9-9961-4F29-8151-33C5D413CF58}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116668","Name":"Inter-State Purchase Return of Charge Item to Registered Vendor where Input Tax Credit is not available with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{38F58D78-84D4-40D9-BE77-CD33C02B49AF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116669","Name":"Inter-State Purchase Return of Charge Item from Unregistered Vendor when Input Tax Credit is Not Available With Bill To-Loc- Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{C85088E3-672F-4F2E-B1EF-19CBDFA5460B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116670","Name":"Intra-State Purchase Return of Charge Item to UnRegistered Vendor when Input Tax Credit is Not Available With Bill To-Loc Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{E5053EEB-44D1-4552-8084-67D72A90CECB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116675","Name":"End Type Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116685","Name":"Type Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116686","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{40E9E837-E785-42A1-B8ED-9B27D43D1FFC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116687","Name":"Return of Import Resource without Input Tax Credit available from SEZ Vendor with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{5C3AA147-EDD0-4271-9CB8-4A6F6C98962A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116688","Name":"Inter-State Purchase Return of Resource from Unregistered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{43D94D4C-82EA-4A44-B80F-E297292CAA10}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116689","Name":"Intra-State Purchase Return of Resources from Registered Vendor where Input Tax Credit Not Available -Reverse Charge.","NodeType":"Use Case","TableID":39,"CaseID":"{A170BEEF-350A-4B43-B333-CBEA1D197E1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116690","Name":"Purchase Credit Memo/Return Order for Resource where Input Tax Credit is not available.","NodeType":"Use Case","TableID":39,"CaseID":"{7C3076A9-460B-41BC-AED8-6B615E4835D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116691","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{545DC1C5-C848-43B9-BFCE-72C3A45C94BA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116692","Name":"Intra-State Purchase Return of Resource from Registered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{7B096619-70FB-4622-9E57-8EAE58DC1AB1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116693","Name":"Intra-State Purchase Return of Resource from Unregistered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{A2153C07-E791-4821-9542-F9C6C3737BAF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116694","Name":"Intra-State Purchase Return of Resource from Registered Vendor where Input Tax Credit Not Available through Purchase Return Order/Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{8B9B630B-1AC7-49A1-BA60-3A415B97C2BC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116695","Name":"Inter-State Purchase Return of Resource from Registered Vendor when Input Tax Credit is Not Available Through Purchase Return Order/ Credit Memo for FOC.","NodeType":"Use Case","TableID":39,"CaseID":"{4FD977C3-86DB-46A1-AEEF-A0A176F23BE1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116697","Name":"End Type Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116700","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116701","Name":"Begin Type Resource","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116702","Name":"Inter State Purchase Return of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo.","NodeType":"Use Case","TableID":39,"CaseID":"{F0453435-C2EF-43BB-BC81-39454E1DE4B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116703","Name":"Intra State Purchase Return of Resource from Composite Vendor/Supplier with no GST Impact through Purchase Credit Memo/Return order.","NodeType":"Use Case","TableID":39,"CaseID":"{28E2DDFD-2F63-47CB-986C-8E6F5D2356F3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116715","Name":"End Type Resource","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116750","Name":"End Exempted No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116751","Name":"Exempted","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18082=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116752","Name":"Intra State Purchase Return of Exempted Fixed Asset from Registered Vendor (Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{26260269-B2BE-4D01-AF43-91BCE15FFF05}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116753","Name":"Inter-State Purchase Return of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{8314CDF7-853B-4DEA-A6DF-CE478FB1D3BD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116754","Name":"Intra State Purchase Return of Exempted Fixed Asset from Registered Vendor (Non-Availment) with no GST Impact","NodeType":"Use Case","TableID":39,"CaseID":"{739B3C04-8659-438B-B9D5-EB62435B9025}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116755","Name":"Inter-State Purchase Return of Exempted Fixed Asset from Registered Vendor where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{43228213-4CEA-41C4-B28B-170B00BC81A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116756","Name":"Intra State Purchase Return of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Credit Memo/Return order","NodeType":"Use Case","TableID":39,"CaseID":"{5E1C6C44-CCBA-49ED-AD64-54D360467B0F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116757","Name":"Intra-State Purchase Return of Goods from Registered Exempted Vendor when Input Tax Credit is Available Through Purchase Return Orders","NodeType":"Use Case","TableID":39,"CaseID":"{8FCF5988-06C7-44E2-A7BD-A5A9B40CDEF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116758","Name":"Inter-State Purchase Return of Goods from Registered Exempted Vendor when Input Tax Credit is Available","NodeType":"Use Case","TableID":39,"CaseID":"{67FECB97-A3FA-4FC9-8A80-E214C3DF4CA9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116759","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{4F992CE7-BB8C-4129-923A-F53A771DF231}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116760","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{0371699B-6B05-4B16-99FB-604F142308AA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116800","Name":"End Exempted","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116901","Name":"GST Reverse Charge -No","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18085=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116902","Name":"GST Credit-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116903","Name":"Type -GL Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116904","Name":"(POS) Intra-State Purchase Return of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{3F057D29-C926-453B-8B17-6B5E431A20B4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-116950","Name":"End Type -GL Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117000","Name":"End GST Credit-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117001","Name":"Begin Type Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117002","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{2BF5B2FE-2191-416D-B63F-47052716FC1B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117003","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{F759EFFB-61F9-4B84-B9CD-01E2616A7B85}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117004","Name":"Inter State Purchase of Goods from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{F023887D-C599-4FE6-89E7-49C257DC208C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117005","Name":"Intra State Purchase of Goods from Composite Vendor/Supplier with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{13352A4D-EEAB-4FEA-A778-0BDAD73B550C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117015","Name":"End Type Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117016","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117017","Name":"Inter State Purchase of Charge from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{0CF4326B-FD68-4AE6-B52A-CD2AA2F2A788}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117020","Name":"End Type - Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117021","Name":"Inter State Purchase of other types except good from Composite Vendor/Supplier of exempted not goods with no GST Impact through Purchase Return Order/Credit Memo With Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{21E3248F-92C2-444C-B7E9-B48218AD918A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117022","Name":"Intra State Purchase of other types from Composite Vendor/Supplier of exempted not goods with no GST Impact through Purchase Return Order/Credit Memo with Bill To-Loc","NodeType":"Use Case","TableID":39,"CaseID":"{1988B611-ABD4-44C4-9CB5-67BB88E0002C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117023","Name":"Inter State Purchase of Service from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{BC9A772F-DBF9-4F4F-8607-212DC829C005}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117050","Name":"End GST Reverse Charge -No","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117051","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18095=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117052","Name":"Return of Import Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, with cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{047704F8-A619-401F-9653-12103103E14A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117053","Name":"Purchase Credit Memo/Return Order for Imported Goods where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{DA972CCF-D97D-4379-9704-AB397FA9E08F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117054","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is not available","NodeType":"Use Case","TableID":39,"CaseID":"{1005E09C-7F65-4E7A-AC0C-B071C455A412}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117055","Name":"(POS) Intra-State Return of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Return Order/ Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{8B6ADE91-D482-4071-B431-C299292EF2BF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117056","Name":"Return of Import Fixed Asset from SEZ Vendor where Input Tax Credit is Not Available, without cover of Bill of Entry.","NodeType":"Use Case","TableID":39,"CaseID":"{B5C09EE0-1CF9-4818-AADB-AC5E95626AE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117057","Name":"Intra-State Purchase Return of Goods from Registered Vendor where Input Tax Credit is not available - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{0EBD8B25-3C27-46AE-8CD7-4E870DB1315B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117058","Name":"Inter-State Purchase Return of Goods from Registered Vendor when Input Tax Credit is not Available Through Purchase Return Order/ Credit Memo - Reverse Charge","NodeType":"Use Case","TableID":39,"CaseID":"{97437C0C-3E99-4D15-9378-34AC4B8FD002}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117100","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117101","Name":"Begin Type G/L Account","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117102","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is available","NodeType":"Use Case","TableID":39,"CaseID":"{AA1B2E3A-4149-4352-B081-2A869CDE5353}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117120","Name":"End Type G/L Account","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117121","Name":"Begin Type - Charge Item","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field5=1(5))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117122","Name":"Intra State Purchase of Charge Item from Composite Vendor/Supplier of exempted goods with no GST Impact through Purchase Return Order/Credit Memo","NodeType":"Use Case","TableID":39,"CaseID":"{55B6317F-25F3-4C73-8AA5-AFA3EC519C88}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117125","Name":"End Type - Charge Item","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117150","Name":"End Purchase Return Document","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117200","Name":"End Purchase","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117201","Name":"Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18543=1(<>''),Field18001=1(<>''),Field18009=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117202","Name":"Account Type-Customer","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117203","Name":"Document Type- Invoice","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117204","Name":"GST Customer Type- Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18007=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117205","Name":"Intra-State Sales of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{3335E143-1F90-4E63-B6E7-5A4897019FFA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117206","Name":"Inter-State Sales of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{38C5A554-206D-44A5-9090-86CAC52A7715}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117207","Name":"Intra-State Sales of Service to Registered Customer through Sales Journal/Journal/General Journal - Kerala Cess","NodeType":"Use Case","TableID":81,"CaseID":"{C89845E0-C8B1-45B1-9C1B-04EC264B7AC7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117208","Name":"Intra-State Sales of Service to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{BBD37D0A-E328-4544-B5E1-03FCF65399D5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117209","Name":"Inter-State Sales of Services to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{CF221DCD-487C-4B3C-BBC4-FE16B6667E76}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117210","Name":"Intra-State Sales of Exempted Service to Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{B0D75B5B-C42D-4381-80D8-B312BD2360AE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117250","Name":"End GST Customer type- Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117251","Name":"GST Customer Type- Others","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18007=1(2|3|4|5|6|7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117252","Name":"Inter-State Sales of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F56F247A-8E36-496E-8672-C6FE2C81CE7B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117253","Name":"Intra-State Sales of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F719A304-09CF-479B-A123-2A4E34ED3133}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117254","Name":"Export Sales of Service to Export Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F807C5DC-40B1-4E22-AB49-06BC54A22558}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117255","Name":"IntraState - Export Sales of Service to Deemed Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{005ED1ED-F66A-4A08-8647-0554154F0DF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117256","Name":"Export Sales of Service to SEZ Development Customer with payment of duty through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{3DC33AD0-69AB-4B36-B58D-7C409957507C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117257","Name":"Export of Service to SEZ Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6F745F19-1955-4DAA-A3C4-BAC6D6326232}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117258","Name":"Inter State - Export Sales of Service to Deemed Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{FCB154BF-A72A-43A0-87AB-DF80DEAB4F1C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117300","Name":"End GST Customer Type- Others","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117350","Name":"End Document Type- Invoice","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117351","Name":"Document Type- Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117352","Name":"Inter-State Sales Return of Service to UnRegistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{CCF41113-DC62-47E2-B45B-87AF0248AF65}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117353","Name":"Inter-State Sales Return of Goods to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{674E08E2-EB2A-4C3D-924B-9370C6ED3DBF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117354","Name":"Intra-State Sales Return of Service to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6C9258C7-AF9C-43E4-A015-C4253265F37E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117355","Name":"Intra-State Sales Return of Service to Registered or Unregistered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{6C9258C7-AF9C-43E4-A015-C4253265F37E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117356","Name":"(POS) Intra-State Sales Return/Credit Note of Services for Overseas Place of Supply from Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{DF8067FF-2F97-485F-8364-3AC5536AD82D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117357","Name":"Export Sales Return of Service to Export Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{B8EE2ED8-F29F-465D-B6DC-A3A2A4BB1B3D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117358","Name":"Intra-State Sales Return of Service from Deemed Export Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{4BFBD63E-F561-4C68-AB29-BF4139D24F49}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117359","Name":"InterState Sales Return of Service to SEZ Development Customer with payment of duty through Sales Journal/Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{68AE0437-E71F-4AC5-8729-DDD40410D69D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117360","Name":"Sales Return of Service to SEZ Unit Customer with payment of duty through Sales Journal/Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{960BC8FC-FF34-4E46-A6A0-6FD2CB7BBDA2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117361","Name":"Inter State - Export Sales Return of Service to Deemed Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{FFBBBCDE-50F5-4D02-8B40-DAD63ED1491E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117362","Name":"Intra-State Sales Return of Goods to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{DF783FC9-39C3-492B-B94F-90BCF26C04E5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117363","Name":"Inter-State Sales Return of Service to Registered Customer through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{4E1D5479-C527-4295-A0C1-7D82D94860F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117400","Name":"End Document Type- Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117401","Name":"Document Type- Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117402","Name":"Inter-State GST on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{287ED69D-1488-4A48-BA50-E063EC8EF915}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117403","Name":"Intra-State GST on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{18F45902-76C4-4B57-AF7F-7D9B3A76D51F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117404","Name":"Export of Goods and Services to SEZ Development, through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{0B9F94CE-1C82-4FF7-9EF7-D51E156A0286}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117405","Name":"Export of Goods and Services to Foreign Customer through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{2E85F2F7-2ED8-42CC-95F5-B20D32DB41AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117406","Name":"GST Deemed Exports through Sales Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{AE574FA3-E537-4FC1-9F8D-E16EF5D7A40E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117407","Name":"Export of Goods and Services to SEZ Unit through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{B7D173ED-4B8F-4F13-95B8-B7C4890B3623}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117408","Name":"Export of Goods and Services to SEZ Unit through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{B8ACD224-FC70-4037-86AD-C18AA5DA085F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117409","Name":"Export of Goods and Services to SEZ Development through Sales Journal/Journal/General Journal Without Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{C9CE4C92-F6CD-4B97-BD13-D8EE824D7D66}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117410","Name":"Export of Goods and Services to Foreign Customer through Sales Journal/Journal/General Journal With Payment of Duty.","NodeType":"Use Case","TableID":81,"CaseID":"{DAC31111-29F4-4C8F-BEEC-C3B31668DAF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117450","Name":"End Document Type-Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117451","Name":"Document Type-Refund","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117453","Name":"Intra-State GST Refund on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{0628D305-F863-48E9-986E-0570995F7002}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117454","Name":"Inter-State GST Refund on Advance Payment Received From Customer","NodeType":"Use Case","TableID":81,"CaseID":"{F643A772-5CA6-4CC5-913C-9188C52DF8E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117499","Name":"End Document Type-Refund","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117500","Name":"End Account Type- Customer","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117501","Name":"Account Type-Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117502","Name":"Document Type- Invoice","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117503","Name":"GST Credit -Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117504","Name":"GST Reverse Charge -Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18023=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117505","Name":"Intra-State/Intra-Union Territory Purchase of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{3C23CDAC-6995-4B6C-9E4B-708B540C413B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117506","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{744B47C3-E4C1-4AC4-A37E-CBA3102A59A1}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117507","Name":"Purchase of Services from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{7E182C87-669C-4CD8-8336-41C2ABE6144C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117508","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{B8F32E0D-5D5E-4B84-AE3A-C0D4520470D3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117509","Name":"Inter-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{819CADCF-BE64-4BC6-93BA-59EDE239EB54}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117511","Name":"Interstate GST Calculation on Reverse Charge Exempt Transactions through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{25E8E204-2E63-4B79-824C-3C1185D6467C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117513","Name":"Intrastate GST Calculation on Reverse Charge Exempt Transactions through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DF134523-53D1-4137-B091-D9C5E1DB8D64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117550","Name":"End GST Reverse Charge -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117551","Name":"Begin Vendor Type - Composite","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117552","Name":"Inter-State Purchase of Service from Composite Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F3CD2FC6-4CEE-47EF-B0F5-9EB3E46CE74B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117553","Name":"Intra-State/Intra-Union Territory Purchase of Service from Composite Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B68BAE5C-F887-46E8-9B4C-7333EB6152E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117558","Name":"End Vendor Type - Composite","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117571","Name":"Begin Vendor type - Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117572","Name":"Intra-State/Intra-Union Territory Purchase of Goods from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{66A65EDD-B06A-4817-84C4-B61B035AC7EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117573","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{C2FE3376-EDB2-4C3E-A82D-F49D27D292DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117574","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{36017702-208F-4E8C-A75E-8872EA7D1205}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117575","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{26B7CC70-0C7D-4FD2-B00A-B7845C289215}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117576","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{02670909-9C35-49DA-B64F-E5EA4602693E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117577","Name":"ISD-Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{FA492219-9C2F-4986-B773-DAA35CA74796}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117578","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E73369B2-7A52-46D6-909F-BA116399AF39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117579","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E73369B2-7A52-46D6-909F-BA116399AF39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117580","Name":"(POS) Intra-State Sales of Services for Overseas Place of Supply from Registered Customer through Sales Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{5DAE448C-0BD5-4DC3-9BF9-B846921D2C71}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117581","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available through Purchase Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2341D31D-659B-4C70-B0FD-20C4494A4F1F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117585","Name":"End Vendor type - Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117586","Name":"Begin Vendor type - Import","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117587","Name":"Import of Services from Import Associate Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal-","NodeType":"Use Case","TableID":81,"CaseID":"{F6DED4E3-7405-4E6E-B0DF-1320041F130A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117588","Name":"Import of Purchase of Service from Import Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B4662B2E-9E63-4BA7-A683-248E5811B566}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117589","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{6D031AA1-2009-4D4A-A8E7-01D9116EDC5C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117592","Name":"End Vendor type - Import","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117593","Name":"Begin Vendor Type- SEZ","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117594","Name":"SEZ of Purchase of Service from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AB179237-EF7C-4BB1-9406-46B7B6DD1449}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117599","Name":"End Vendor Type-SEZ","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117600","Name":"End GST Credit-Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117601","Name":"GST Credit- Non Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117602","Name":"GST Reverse Charge-Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18023=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117603","Name":"Intra-State/Intra-Union Territory Purchase of Service from UnRegistered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{4CB6ACCD-BD47-4485-A757-62924EA09524}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117604","Name":"Purchase of Services from SEZ Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{B2CD61FA-9C30-4FE5-B5C5-5B535BA6DF96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117605","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{4D9AEA2D-B94B-40CC-B9D9-BC8D6FA19425}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117606","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal - Reverse Charge","NodeType":"Use Case","TableID":81,"CaseID":"{580975ED-52DE-4EF9-BD94-99425C52B570}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117607","Name":"Intra-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0751F148-5E1D-4EFB-9008-ECB2F2F6704D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117608","Name":"Inter-State Purchase of Services from Unregistered/Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{4D947EDC-3710-49D2-91D5-6446978D43EC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117650","Name":"End GST Reverse Charge -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117651","Name":"GST Input Service Distribution -Yes","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18022=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117652","Name":"ISD - Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{9639222B-DFA8-4F14-9A72-24E994C1C7DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117653","Name":"ISD-Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{19FC1701-0FE4-4ED3-83B8-07DAB075A043}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117700","Name":"End GST Input Service Distribution -Yes","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117701","Name":"GST Input Service Distribution -No","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18022=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117702","Name":"Intra-State/Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{E530DADD-215F-47FF-8A84-46A1E62353CF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117703","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{5305AA1D-CF40-43CC-B9E3-B9471E33DCB3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117750","Name":"End GST Input Service Distribution -No","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117751","Name":"Begin Vendor Type - Import","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(4))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117752","Name":"Import of Services from Foreign Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{774A6E80-FBB4-4413-9144-6ACA8C6546D2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117753","Name":"Import of Goods from Foreign Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{9236A009-169D-4464-8B2C-62C94B782C26}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117754","Name":"Import of Services from Associate Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{54CB1855-9AD0-4A47-9777-D811C7FA1FDE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117759","Name":"End Vendor Type - Import","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117760","Name":"Begin Vendor Type - Unregistered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117761","Name":"IGST on Transportation of Goods through Purchase Journal/Journal/General Journal for Unregistered Vendor with Non-Availment.","NodeType":"Use Case","TableID":81,"CaseID":"{26ED31B0-75B8-439C-8E16-56518665184F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117764","Name":"End Vendor Type - Unregistered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117765","Name":"Begin Vendor Type - Registered","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117766","Name":"Intra-State/ Intra-Union Territory Purchase of Service from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{15E17CFF-8262-4E83-8FD4-3EC012EEA465}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117767","Name":"Inter-State Purchase of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{A734B9DD-A4C1-427E-AF18-6A8B27474F50}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117768","Name":"Inter-State Purchase of Service from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DA8551C9-79B9-423C-801E-A8C868788300}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117769","Name":"Intra-State/ Intra-Union Territory Purchase of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{547DDC98-8D3C-46A0-84BE-03E71BA135DA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117770","Name":"(POS) Intra-State Purchase of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{997C3EE3-8453-43F1-A179-A32B19EFD8B8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117771","Name":"IGST on Transportation of Goods through Purchase Journal/Journal/General Journal for Registered Vendor with Non-Availment.","NodeType":"Use Case","TableID":81,"CaseID":"{4A025601-FF3D-4BA6-A567-0C31785D0D36}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117772","Name":"Place of supply as Vendors State in Purchase Transactions through Purchase Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{7ABC67E5-F6F0-4ECB-9634-55258429DFD8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117780","Name":"End Vendor Type - Registered","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117781","Name":"Begin Vendor Type-SEZ","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18008=1(6))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117782","Name":"SEZ of Services from SEZ Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8DF66C94-890C-4007-9341-18D0565000FE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117799","Name":"End Vendor Type- SEZ","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117800","Name":"End GST Credit -Non Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117850","Name":"End Document Type-Invoice","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117851","Name":"Document Type-Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117852","Name":"GST Credit -Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117853","Name":"Purchase return of Imported Goods where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{7B91DD35-F410-4971-A2BC-DBCB67520105}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117854","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{BBBBD283-C64C-4AFE-A14E-950791E18CF8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117856","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{9DFF9CBE-B1A5-4D28-A855-8783315A87D0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117857","Name":"Intra-State/ Intra-Union Territory Purchase Return of Goods to Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{85D7B57B-6657-4C5B-889D-282A48B9D0FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117858","Name":"Purchase Credit Memo/Return Order for Imported Services where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{C97F63C3-79EB-44D6-8AEA-B1710A9BBCE9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117859","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{D0EADC0B-CBC1-4E07-8ADF-5AE168893B04}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117860","Name":"Intra-State Purchase Return of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{789CE492-C2BE-4EEC-8E98-740310FDD0E3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117861","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0AAD1908-46DC-4370-8A8D-77096D9B30B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117862","Name":"Intra-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F857355F-9134-460C-89C8-FB0845206988}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117863","Name":"Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0AAD1908-46DC-4370-8A8D-77096D9B30B0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117864","Name":"Inter-State Purchase Return of Services to Registered Vendor where Input Tax Credit is available (Reverse Charge) through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{DA389E3B-A6C3-4DE1-9843-807B2161B9DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117865","Name":"ISD-Inter-State Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{812E9032-CA16-4FAB-A80B-94CD7BC5EB8D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117866","Name":"(POS) Intra-State Return/Credit Note of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F9A5047E-5B27-41E4-AF68-9497E3B52FAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117867","Name":"Inter-State Purchase Return of Service from Unregistered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B5A9628F-46F5-48C4-9CC0-09CBAE26D7EE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117868","Name":"Intra-State Purchase Return from Composite Vendor where Input Tax Credit is available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AFA9BC82-6757-44E3-B5E4-00029DACDA64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117869","Name":"Intra-State Purchase Return of Services from SEZ Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{B053F5FC-CD93-4EA7-AC71-1590E006FAAE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117870","Name":"Intra-State Return of Services to Registered/ Unregistered Vendor where Input Tax Credit is available through Purchase Journal/General Journal (Reverse Charge)","NodeType":"Use Case","TableID":81,"CaseID":"{4C68E757-379A-4FD3-A58A-91F57954A9FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117871","Name":"ISD - Intra-State/Intra-Union Territory Purchase Return of Service from Registered Vendor where Input Tax Credit is available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{783D79C8-B103-439F-9F75-9CB53B347C73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117900","Name":"End GST Credit- Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117901","Name":"GST Credit Non-Availment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field18033=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117902","Name":"Inter-State Purchase Return of Goods to Registered Vendor where Input Tax Credit is Not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{CB0F4A5D-EE91-402C-AA30-C8B724D7DCC5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117903","Name":"Intra-State/ Intra-Union Territory Return of Goods from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8E0D2716-6C6D-4CDF-863F-1E043223D7DF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117905","Name":"Inter-State Purchase Return of Service to Registered Vendor where Input Tax Credit is not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{F6932043-6A5A-4F55-B06A-DD7F76AFB52B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117906","Name":"Purchase return of Imported Goods where Input Tax Credit is Not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{8503C963-7C87-45CD-8543-607AE516F9F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117907","Name":"Purchase Credit Memo for Imported Services where Input Tax Credit is not available through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{A6239FAB-E9D2-4FFC-90CC-A5D7858C4CD8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117908","Name":"Purchase Credit Memo/Return Order for Imported Services from Import Associate Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{CF175943-0F1A-4814-BF17-756FB88F497C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117909","Name":"Inter-State Purchase Return of Services to Unregistered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{0C04EF8F-6F19-4C41-928B-9F32605898A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117910","Name":"ISD - Intra-State/Intra-Union Territory Purchase Return of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal ","NodeType":"Use Case","TableID":81,"CaseID":"{00B59093-4DB8-4152-99DB-7F9368A143A8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117911","Name":"(POS) Intra-State Return/Credit Note of Services for Overseas Place of Supply from Registered Vendor where Input Tax Credit is not available through Purchase Journal/Journal/General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{75C41C76-22FC-479E-836E-E9C838FF3320}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117912","Name":"Inter-State Purchase Return of Services to Registered Vendor where Input Tax Credit is not available (Reverse Charge) through Purchase Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{AE2974C0-8A1D-4821-8999-7617690C41FC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117913","Name":"Intra-State Return of Services to Registered/Unregistered Vendor where Input Tax Credit is not available through Purchase Journal and General Journal (Reverse charge)","NodeType":"Use Case","TableID":81,"CaseID":"{56D375F9-6B43-4460-B0F6-CAB18F44DE92}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117914","Name":"Intra-State Purchase Return of Service from Registered Vendor where Input Tax Credit is Not available through Purchase Journal/Journal/General Journal","NodeType":"Use Case","TableID":81,"CaseID":"{62275F50-6F85-4EA6-AA4F-0BACF20CF65E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-117950","Name":"End GST Credit Non-Availment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118000","Name":"End Document Type-Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118001","Name":"Document Type-Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118002","Name":"GST on Advance for Import Payment.","NodeType":"Use Case","TableID":81,"CaseID":"{7859624E-8AFD-4A64-B361-900053C11266}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118003","Name":"GST on Advance payment from SEZ Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{041E1938-9B6A-4173-937C-FF0FDC0E7309}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118004","Name":"Inter State GST on Advance Payment made to Registered/Unregistered Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{E411752D-2CC4-4CD4-9D35-1AE651319762}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118005","Name":"Intra State GST on Advance Payment made to Registered/Unregistered Vendor.","NodeType":"Use Case","TableID":81,"CaseID":"{0686E40E-9643-42C8-B4D1-7587447E98E0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118006","Name":"GST on Advance Payment made to Vendor through General Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{C60D4ED2-E3FC-41BC-BB8D-F1B521984712}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118050","Name":"End Document Type-Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118080","Name":"End Account Type- Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118090","Name":"GST Credit","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(0),Field18014=1(4|5|6|7))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118091","Name":"GST Opening Liability IGST","NodeType":"Use Case","TableID":81,"CaseID":"{BE4AF8DF-BB6D-432C-B598-B7B481D8D826}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118092","Name":"GST Opening Liability CGST","NodeType":"Use Case","TableID":81,"CaseID":"{5B85FA47-8603-4A7F-9B76-4A5AD999CA81}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118093","Name":"GST Opening TDS Credit - CGST","NodeType":"Use Case","TableID":81,"CaseID":"{7FD02BAE-DA8D-4100-962E-6A8F7FDE823C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118094","Name":"GST Opening TDS Credit - IGST","NodeType":"Use Case","TableID":81,"CaseID":"{09E58D68-C9B5-4A27-B4FE-3BCA8B383E14}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118095","Name":"GST Opening TDS Credit - SGST","NodeType":"Use Case","TableID":81,"CaseID":"{851F544F-7349-4E29-AF19-A0B3B72AB0AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118096","Name":"GST Opening TCS Credit - CGST","NodeType":"Use Case","TableID":81,"CaseID":"{AF9D718A-2832-4D92-A195-4D7DD81E2029}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118097","Name":"GST Opening TCS Credit - IGST","NodeType":"Use Case","TableID":81,"CaseID":"{33896D17-0F26-4376-8304-7BA20BE4E6D4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118098","Name":"GST Opening TCS Credit - SGST","NodeType":"Use Case","TableID":81,"CaseID":"{36207D8F-34B2-4AF3-83EC-96642DA44DFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118103","Name":"GST Opening IGST","NodeType":"Use Case","TableID":81,"CaseID":"{325D0E84-286F-437E-BFE1-EBB6F575AD39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118104","Name":"GST Opening CGST","NodeType":"Use Case","TableID":81,"CaseID":"{34A74D02-F64A-4329-B0B3-B20E07D5A79A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118105","Name":"GST Opening SGST","NodeType":"Use Case","TableID":81,"CaseID":"{BBA0DF22-691B-46EB-8500-8B270596F2E9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118106","Name":"GST Opening Liability SGST","NodeType":"Use Case","TableID":81,"CaseID":"{97CF7642-AB0E-4686-A5CE-3D7C7C641E7E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118108","Name":"Account Type - G/L * Tax Type End","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118110","Name":"Account Type - G/L Account","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118111","Name":"Intra-state purchase of services where Services is paid directly and service provider is registered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{77160361-37A9-43BD-A71B-BFA6853D1CFB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118112","Name":"Inter-state purchase of services where Services is paid directly and service provider is registered and GST Credit is Not Available on Purchase Journal and Gen. Journals","NodeType":"Use Case","TableID":81,"CaseID":"{869FF9BE-3EA8-424B-973E-E27D6E370807}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118113","Name":"Intra-state purchase of services where Services is paid directly through bank and service provider is registered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2D1A7414-2844-4128-B026-CA683BCEA058}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118114","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is registered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{5265955A-2DE6-49CD-AFBE-D314E2D049FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118115","Name":"Inter-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{2A85CD62-7897-47FF-808B-E0A11131071F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118116","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{EAD964E4-7CD1-4462-96B3-78A3FA9DE087}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118117","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{99AB0C39-33A7-47F5-8659-968DBAEEA2F2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118118","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal.","NodeType":"Use Case","TableID":81,"CaseID":"{F5F82273-FCF2-4165-A7A8-C46D44F45D4B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118119","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal and Bal Acc Type is Bank","NodeType":"Use Case","TableID":81,"CaseID":"{C246AFFB-B99E-4D9B-8278-39A30CC7E26F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118120","Name":"Intra-state purchase of services where Services is paid directly and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for Bal Acc Type Bank","NodeType":"Use Case","TableID":81,"CaseID":"{687FE3EB-C604-4E95-A9A8-C231EDB2D269}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118121","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for Bal Acc Type Bank","NodeType":"Use Case","TableID":81,"CaseID":"{E2D6E80E-D1E5-43FC-A060-2DEE839CBBA8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118122","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Available on Purchase Journal and Gen. Journal For G/L Account","NodeType":"Use Case","TableID":81,"CaseID":"{1DD2DEE4-08E3-42A8-B120-D28FC546F0A3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118123","Name":"Inter-state purchase of services where Services is paid directly through bank and service provider is Unregistered and GST Credit is Not Available on Purchase Journal and Gen. Journal for G/L Account","NodeType":"Use Case","TableID":81,"CaseID":"{486C52CB-591D-4538-9B21-505CB3F7AD9A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118125","Name":"End - Account Type - G/L Account","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118150","Name":"End Payment","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118151","Name":"Service Transfer","NodeType":"Begin","TableID":18351,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field11=1(<>''),Field12=1(<>''),Field20=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118152","Name":"Interstate Service Transfer Order","NodeType":"Use Case","TableID":18351,"CaseID":"{FEB751CF-3E8D-42AB-965E-51097FF60E64}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118153","Name":"IntraState Service Transfer Order","NodeType":"Use Case","TableID":18351,"CaseID":"{D68B3FE8-78C6-492D-AC1A-FFA29F17A50D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118200","Name":"End Service Transfer","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118201","Name":"Stock Transfer","NodeType":"Begin","TableID":5741,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2) WHERE(Field18394=1(<>''),Field18395=1(<>''),Field18396=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118202","Name":"IntraState Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{A59206F4-476D-4ED9-8665-08535755BB5E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118203","Name":"InterState Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{E52D7679-7E9C-4623-9CA7-AB704EF2465C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118204","Name":"Bonded Inter-State Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{AECAE480-71C8-41C4-B247-FB33DFC9C039}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118205","Name":"Bonded Intra-State Transfer Order","NodeType":"Use Case","TableID":5741,"CaseID":"{C215F153-718E-4936-BA99-ACB4E2F2BBC4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118250","Name":"End Stock Transfer","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118251","Name":"Journal Bank Charges","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field13=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118252","Name":"Document Type-Invoice","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118253","Name":"GST on Bank Charges against Customer Receipt (Intra Sate)","NodeType":"Use Case","TableID":18247,"CaseID":"{46054EB7-3CE7-421C-B047-00658AC5C150}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118254","Name":"Intra-State Bank Payment with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{7AC16E57-E977-41B3-9338-1399811A688B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118255","Name":"GST on Bank Charges against Customer Receipt (Inter State)","NodeType":"Use Case","TableID":18247,"CaseID":"{668C2032-DD90-4A23-8F30-04B69FE7C99E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118256","Name":"Inter-State Bank Payment with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{98A43A23-24F8-4FC2-9D4E-6B45D74B02FB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118300","Name":"End Document Type-Invoice","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118301","Name":"Document Type-Credit Memo","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118302","Name":"GST on Bank Charges against Customer Refund (Inter State)","NodeType":"Use Case","TableID":18247,"CaseID":"{2026E996-050E-4647-8D77-9B2E8FF1B068}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118303","Name":"Inter State GST Refund on Bank Charges.","NodeType":"Use Case","TableID":18247,"CaseID":"{4CB74CDB-63C8-492B-8819-BA937750388D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118304","Name":"Intra State Refund GST on Bank Charges.","NodeType":"Use Case","TableID":18247,"CaseID":"{7E6E164B-CB38-4B5A-ADAA-BB51CAEEA5A7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118305","Name":"Inter-State Bank Payment for Credit Memo with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{429F37B1-0D9F-4B5A-BC3F-AC53F994BC32}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118306","Name":"Intra-State Bank Payment for Credit Memo with Bank Charges with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{A26AB5CA-52E6-4626-A426-C656627502E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118350","Name":"End Document Type-Credit Memo","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118351","Name":"Document Type - Blank","NodeType":"Begin","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field2,Field3,Field4) WHERE(Field9=1(0))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118352","Name":"Intra-State Bank charges on bank Payment with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{F230C59A-547E-41CA-B6B9-5E8BE22A1BEF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118353","Name":"Inter-State Bank charges on bank Payment with GST.","NodeType":"Use Case","TableID":18247,"CaseID":"{50157D1D-C080-4AF0-8C63-0B5E918F5AF2}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118375","Name":"End Document Type - Blank","NodeType":"End","TableID":18247,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-118400","Name":"End Journal Bank Charges","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119000","Name":"GST Service Management","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field7=1(<>''),Field18441=1(<>''),Field18443=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119001","Name":"Service Document","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(0|1|2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119002","Name":"Intra State Service to Registered/Unregistered Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{B90130D9-0471-4034-8687-11B04ABDCE72}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119003","Name":"Inter State Service to Registered/Unregistered Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{4DD701D1-41A9-432E-9E95-8F8D08AB2C67}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119004","Name":"Inter State Service to SEZ Unit Customer through Service Quote/ Order/ Invoice.","NodeType":"Use Case","TableID":5902,"CaseID":"{5CB02A72-982F-4AD6-A762-CE881DC52ACC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119005","Name":"Inter State Service to SEZ Development Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{0282EB09-4676-4A39-B2EC-EDC9568BA92B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119006","Name":"Intra State Service to Deemed Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{ADF43278-38CD-463B-8E08-DD604EC3C50C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE119007","Name":"Inter State Service to Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{1CB4368B-D6AF-4B89-AFEB-8641B0152451}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119008","Name":"Inter State Service to SEZ Unit Customer through Service Quote/ Order/ Invoice without payment of Duty.","NodeType":"Use Case","TableID":5902,"CaseID":"{EC2138A1-46D7-430B-B335-F8D6C345BB16}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119010","Name":"Intra State Service to SEZ Development Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{4C0ECC95-F5CD-46B2-B302-84C3A5AD7D4E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119011","Name":"Inter State Service to Deemed Export Customer through Service Quote/ Order/ Invoice","NodeType":"Use Case","TableID":5902,"CaseID":"{135115A7-1D82-4528-959B-9A35775455CD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119012","Name":"Inter State Service to Export Customer through Service Quote/ Order/ Invoice With GST Without Payment Of Duty","NodeType":"Use Case","TableID":5902,"CaseID":"{BACE2666-3667-442B-9D81-BB46E6091905}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119200","Name":"End Service Document","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119201","Name":"Service Return","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119202","Name":"Inter State Return of Service to Registered/Unregistered Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{AA215442-D318-4160-A666-57E3FBE06CDD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119203","Name":"Intra State Return of Service to Registered/Unregistered Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{C0774889-632D-4799-AA04-DA25EB643832}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119204","Name":"Inter State Service to SEZ Development Customer through Service Credit Memo\n","NodeType":"Use Case","TableID":5902,"CaseID":"{95551286-5BF2-42D5-895A-4A4F450A424B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119205","Name":"Intra State Return of Service to Deemed Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{DD75810D-2D5B-438A-A3AB-079E1B1D7AB9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119206","Name":"Inter State Service to Deemed Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{C211C520-8428-4E89-8A9A-446A5EC41D39}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119207","Name":"Inter State Return of Service to SEZ Unit Customer through Service Credit Memo with payment of duty","NodeType":"Use Case","TableID":5902,"CaseID":"{6CFFB9A1-521E-4D60-AAFB-BDB044405A2A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119208","Name":"Inter State Service to Export Customer through Service Credit Memo","NodeType":"Use Case","TableID":5902,"CaseID":"{0A055D50-A23B-48A5-BADA-9D00D97EED3B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119209","Name":"Inter State Service to Export Customer through Service Credit Memo with GST Without Payment of Duty","NodeType":"Use Case","TableID":5902,"CaseID":"{B7321E84-D1D2-4C4C-857C-B0FB5658D87D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119210","Name":"Inter State Return of Service to SEZ Unit Customer through Service Credit Memo without payment of duty","NodeType":"Use Case","TableID":5902,"CaseID":"{FADCA984-0C4E-4AE6-9ACC-2BF4F9ADC17A}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119400","Name":"End Service Return","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119401","Name":"Begin Exempeted","NodeType":"Begin","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18446=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119402","Name":"Intra State Service to Registered/Unregistered/Exempted Customer through Service Quote/ Order/ Invoice/ Credit Memo - Exempted","NodeType":"Use Case","TableID":5902,"CaseID":"{D460C15F-47A6-41A4-9B9F-8EA3738C2E40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119403","Name":"Inter State Service to Registered/Unregistered/Exempted Customer through Service Quote/ Order/ Invoice/ Credit Memo - Exempted","NodeType":"Use Case","TableID":5902,"CaseID":"{990AEEEE-91BD-4C0E-8346-897F141E4EDB}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119410","Name":"End Exempeted","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119800","Name":"End GST Service Management","NodeType":"End","TableID":5902,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-119999","Name":"End - GST","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200001","Name":"TDS","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"TDS","IsTaxTypeRoot":true},{"Code":"TE-200002","Name":"Purchase","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(1|2),Field18716=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200003","Name":"Domestic Vendor","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field91=1(''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200004","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{DB230097-4AA7-44E2-9373-02A467DC95AC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200005","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{A8E114BF-F8CD-44DB-A2B3-614BC18F4442}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200006","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":39,"CaseID":"{F39A0864-D2E7-40A5-9633-B6680CD3EC6F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200007","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{1E42FDF3-1868-4205-A6D6-D2FC67BD132F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200008","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified with Concessional Codes and Posting Date is greater than Start Date","NodeType":"Use Case","TableID":39,"CaseID":"{F8BF58D9-7681-458D-9DFC-71EA23A9F853}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200009","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where no PAN No. is specified along with Concessional Codes and Posting Date is greater then Start Date","NodeType":"Use Case","TableID":39,"CaseID":"{1ABE2C56-9700-4A30-A14A-5E8ECC2F32DD}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200010","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes with Applies-to ID.","NodeType":"Use Case","TableID":39,"CaseID":"{B8A33720-278B-45B4-8465-2D9FA273D813}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200011","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified without Concessional Codes In Case of Payment Overlook","NodeType":"Use Case","TableID":39,"CaseID":"{16861B6C-7897-42EB-8E26-7B4E885D00F8}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200012","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes certificate value exceeded","NodeType":"Use Case","TableID":39,"CaseID":"{430D7BC2-7F79-4B77-A16C-63C758DA1FD0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200013","Name":"Calculation of Tax Deduction at Source on Vendor Invoice where PAN No. is specified along with Concessional Codes with certificate value","NodeType":"Use Case","TableID":39,"CaseID":"{3EFD6FE9-72B2-427F-A254-C36E7CA61D6D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200015","Name":"End Domestic Vendor","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200050","Name":"NRI Vendor","NodeType":"Begin","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field91=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200051","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{5D4C69D3-E776-4E9D-B397-09336BFDC884}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200052","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{FEE5DFFF-0BC1-4246-AD90-6CB3DC44A451}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200053","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":39,"CaseID":"{487C3669-B12A-42C0-9FEA-D23AB1426BF6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200054","Name":"Calculation of Tax Deduction at Source on Non-Resident Vendor Invoice where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":39,"CaseID":"{75222E87-A1A0-48EE-9211-D3F59009C287}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200100","Name":"End NRI Vendor","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200150","Name":"End Purchase","NodeType":"End","TableID":39,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200151","Name":"Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field30=1(0),Field18544=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200152","Name":"NRI Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2),Field12=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200153","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{271D5BC6-17E8-424E-9E34-3BEE548F938F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200154","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{D9B47164-1681-4C6F-A746-8D710E5F103D}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200155","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{25C2D9C3-2A87-41A6-9AB9-DC76E818DF0C}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200156","Name":"Calculation of Tax Deduction at Source through General Journal for Non-Residents Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{08737F79-35F1-4670-BD1D-E41764E3A9DE}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200200","Name":"End NRI Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200201","Name":"Domestic Vendor","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(2),Field12=1(''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200202","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{B0C259BC-64CC-4818-887A-3337D357CDFF}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200203","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{33BFBE99-9140-4112-A55B-35EC0D9B61B9}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200204","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{FA0E357D-1AC0-42AA-94DE-6DACA521D38E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200205","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{0CDED40A-A359-45E0-AAEC-AFE7BBCFBC96}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200206","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified along with Concessional Codes With Certificate Value","NodeType":"Use Case","TableID":81,"CaseID":"{5F2E69B7-0288-468A-83C8-D6A2AF993782}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200207","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes when certificate value exceed","NodeType":"Use Case","TableID":81,"CaseID":"{E3446842-7BE3-448E-A055-2BBA1A627C6E}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200208","Name":"Calculation of Tax Deduction at Source through General Journal for Vendor where PAN No. is specified without Concessional Codes when Posting date is greater then end date","NodeType":"Use Case","TableID":81,"CaseID":"{CC412FD1-030F-4F28-BBDC-46F25D2B7BF3}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200250","Name":"End Domestic Vendor","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200251","Name":"Customer","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200252","Name":"Calculation of Tax Deducted at Source through Bank Receipt Voucher/Cash Receipt Voucher/General Journal/Cash Receipt Journal for Customers with PAN and without Concessional Code.\n","NodeType":"Use Case","TableID":81,"CaseID":"{C1C8C9A9-1AE8-48D7-AB60-9EA08AA0AF21}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200253","Name":"Calculation of Tax Deducted at Source through Bank Receipt Voucher/Cash Receipt Voucher/General Journal/Cash Receipt Journal for Customers with PAN and Concessional Code.\n","NodeType":"Use Case","TableID":81,"CaseID":"{98E3D17E-B644-4DBA-836C-CF26A20EDD3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200300","Name":"End Customer","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200301","Name":"Provisional Entry","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200302","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{7D508D37-53AC-4E44-9669-743A8BA82A3F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200303","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where both PAN No. and Concessional Codes are not specified.\n","NodeType":"Use Case","TableID":81,"CaseID":"{25EADDE7-E634-4A01-9E4B-74E7C9D5AA62}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200304","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where no PAN No. is specified along with Concessional Codes.\n","NodeType":"Use Case","TableID":81,"CaseID":"{9E57C058-0570-4828-B24A-760D35A38D19}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200305","Name":"Calculation of Tax Deduction at Source with Provisional Entry through Purchase Journal for Vendor where PAN No. is specified without Concessional Codes.","NodeType":"Use Case","TableID":81,"CaseID":"{61ED733A-A96B-45ED-BE21-A98A8B65566B}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200350","Name":"End Provisional Entry","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-200400","Name":"End Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-299991","Name":"End TDS","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300001","Name":"TCS","NodeType":"Begin","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"TCS","IsTaxTypeRoot":true},{"Code":"TE-300002","Name":"Sales","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field18838=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300003","Name":"Sales Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(1|0|2))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300004","Name":"TCS to be calculated on Customer Invoice with PAN and without Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{BC834CD9-7782-4B77-8D0E-0D7EF1679775}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300005","Name":"PAN No. Validations (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{E696BECA-20A6-498E-9615-114585216ABA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300006","Name":"TCS to be calculated on Customer Invoice without PAN and without Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{91492C74-9837-4256-8B07-1BA40247EA73}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300007","Name":"TCS to be calculated on Customer Invoice with PAN and with Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{4DC37F56-3558-400D-ABB1-5573CCC0FD30}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300008","Name":"TCS to be calculated on Customer Invoice with Resource and Fixed Asset (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{B8AC2649-DEA6-42B1-BF69-62A706C6DC40}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300009","Name":"TCS to be calculated on Customer Invoice without PAN and with Concessional (through Sales Quote/ Sales Order/ Sales Invoice)","NodeType":"Use Case","TableID":37,"CaseID":"{C8358DF6-AC70-4AB2-94E4-D609ADC635CA}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300050","Name":"End Sales Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300051","Name":"Sales Return Document","NodeType":"Begin","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field3,Field4) WHERE(Field1=1(5|3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300052","Name":"TCS to be calculated on Customer Invoice without PAN and without Concessional (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{B3983817-AAEE-4AD8-97D8-16A875361BA7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300053","Name":"PAN No Validations (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{800AD5B2-89E5-4616-8281-37DDEC382E76}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300054","Name":"TCS to be calculated on Customer Invoice with Resource and Fixed Asset (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{F687A3C1-9192-42D2-A042-39C2B63B35D7}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300055","Name":"TCS to be calculated on Customer Invoice with PAN and without Concessional (Through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{B1B995F9-C500-4846-9FE8-833A900F0846}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300056","Name":"TCS to be calculated on Customer Invoice with PAN and with Concessional (Through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{77DE8E48-908D-4E7E-9FBE-98B9EFCB7AE5}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300057","Name":"TCS to be calculated on Customer Invoice without PAN and with Concessional (through Sales Return Order/ Credit Memo)","NodeType":"Use Case","TableID":37,"CaseID":"{5E2AC8E9-8A09-4BA9-8C30-C1CD27CAA214}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300100","Name":"End Sales Retun Document","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300150","Name":"End Sales","NodeType":"End","TableID":37,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300151","Name":"Receipt","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field3=1(1),Field6=1(1|2|3),Field30=1(0),Field18807=1(<>''))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300152","Name":"Invoice and Payment","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(2|1))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300153","Name":"TCS to be calculated on Customer Invoice and Payment with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{593E67FC-EACA-4C9B-8F95-4A1D3D1712E4}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300154","Name":"TCS to be calculated on Customer Invoice and Payment without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{DA63D636-4773-418A-8123-6522A7867E5F}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300155","Name":"TCS to be calculated on Customer Invoice and Payment with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{6B7BF4A0-0250-4480-9482-733992652D29}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300156","Name":"TCS to be calculated on Customer Invoice and Payment without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{D9843455-A721-409B-8A37-D111331A8024}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300157","Name":"PAN No. Validations through General journal","NodeType":"Use Case","TableID":81,"CaseID":"{CB9FAD0D-74A9-4DD5-A83A-E2F6A1FABA06}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300158","Name":"TCS to be calculated on Receipt of Payment with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{42747DC4-6388-459E-9D2E-103F3F4E2AB0}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300159","Name":"TCS to be calculated on Receipt of Payment without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{82174562-748D-4C6F-AE37-852C7CCEFEAC}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300160","Name":"TCS to be calculated on Receipt of Payment without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{1E2CC6D7-1793-4F6E-BF59-A79A941FD309}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300161","Name":"TCS to be calculated on Receipt of Payment with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{6F4B6558-D97D-463E-BCC2-A8AE3C7EB872}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300200","Name":"End Invoice and Payment","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300201","Name":"Credit Memo","NodeType":"Begin","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","Condition":"VERSION(1) SORTING(Field1,Field51,Field2) WHERE(Field6=1(3))","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300202","Name":"TCS to be calculated on Customer Credit Memo without PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{4BC77C19-4CA3-4913-8EB5-11EDAE308A25}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300203","Name":"TCS to be calculated on Customer Credit Memo without PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{3ED702E0-AFA2-4771-AD1F-8FBEF7383436}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300204","Name":"TCS to be calculated on Customer Credit Memo with PAN and with Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{088AD93D-6264-4C00-8E0D-F15F40E5E4F6}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300205","Name":"TCS to be calculated on Customer Credit Memo with PAN and without Concessional (Through General Journal) ","NodeType":"Use Case","TableID":81,"CaseID":"{994E3FD7-2FE1-4B6D-AC06-F819F8B94F07}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300250","Name":"End Credit Memo","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-300300","Name":"End Receipt","NodeType":"End","TableID":81,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-399991","Name":"END TCS","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false},{"Code":"TE-999999","Name":"End Tax Engine","NodeType":"End","TableID":0,"CaseID":"{00000000-0000-0000-0000-000000000000}","TaxType":"","IsTaxTypeRoot":false}]]]>
Codeunit Tax Base Tax Engine Setup - NamedType UseCaseTreeLbl
diff --git a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/Finance/2.Master Data/CreateAllocationAccountIT.Codeunit.al b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/Finance/2.Master Data/CreateAllocationAccountIT.Codeunit.al
index 48b6b05712..cb7797c372 100644
--- a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/Finance/2.Master Data/CreateAllocationAccountIT.Codeunit.al
+++ b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/Finance/2.Master Data/CreateAllocationAccountIT.Codeunit.al
@@ -1,3 +1,4 @@
+#if not CLEAN28
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
@@ -12,6 +13,9 @@ codeunit 12270 "Create Allocation Account IT"
{
InherentEntitlements = X;
InherentPermissions = X;
+ ObsoleteState = Pending;
+ ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset';
+ ObsoleteTag = '28.0';
trigger OnRun()
var
@@ -46,3 +50,5 @@ codeunit 12270 "Create Allocation Account IT"
LicensesTok: Label 'LICENSES', MaxLength = 20;
YearlyLicenseFeeTok: Label 'Yearly license fee, design software', MaxLength = 100;
}
+
+#endif
\ No newline at end of file
diff --git a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/ITContosoLocalization.Codeunit.al b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/ITContosoLocalization.Codeunit.al
index 9a312c5a4f..dfc328aac7 100644
--- a/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/ITContosoLocalization.Codeunit.al
+++ b/Apps/IT/ContosoCoffeeDemoDatasetIT/app/DemoData/ITContosoLocalization.Codeunit.al
@@ -74,10 +74,8 @@ codeunit 12251 "IT Contoso Localization"
Codeunit.Run(Codeunit::"Create VAT Statement IT");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
- begin
- Codeunit.Run(Codeunit::"Create Currency Ex. Rate IT");
- Codeunit.Run(Codeunit::"Create Allocation Account IT");
- end;
+ Codeunit.Run(Codeunit::"Create Currency Ex. Rate IT");
+
end;
end;
diff --git a/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateDemoEDocsIT.Codeunit.al b/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateDemoEDocsIT.Codeunit.al
index 9101f49193..528a74af98 100644
--- a/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateDemoEDocsIT.Codeunit.al
+++ b/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateDemoEDocsIT.Codeunit.al
@@ -9,7 +9,7 @@ using Microsoft.DemoData.Finance;
using Microsoft.DemoData.Jobs;
using Microsoft.DemoData.Purchases;
using Microsoft.eServices.EDocument.DemoData;
-using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Finance.GeneralLedger.Ledger;
using Microsoft.Purchases.Document;
using Microsoft.Purchases.Posting;
@@ -30,65 +30,72 @@ codeunit 12198 "Create Demo EDocs IT"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
local procedure GenerateContosoInboundEDocuments()
var
+ GLEntry: Record "G/L Entry";
CreateVendor: Codeunit "Create Vendor";
CreateGLAccount: Codeunit "Create G/L Account";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountIT: Codeunit "Create Allocation Account IT";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
- EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
AccountingServicesFebruaryLbl: Label 'Accounting support period: February', MaxLength = 100;
AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
BindSubscription(this);
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245', 0);
+ SavedWorkDate := WorkDate();
+ GLEntry.SetLoadFields("Posting Date");
+ GLEntry.SetCurrentKey("Posting Date");
+ GLEntry.FindLast();
+ SampleInvoiceDate := GLEntry."Posting Date" + 1;
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountIT.Licenses(),
- CreateAllocationAccountIT.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 120);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 120);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultingFeesDom(),
AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 380);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 380);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultingFeesDom(),
AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 40);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 40);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultingFeesDom(),
AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 320);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 320);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultingFeesDom(),
AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 140);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 140);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultingFeesDom(),
AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938', 783.2);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 783.2);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -100,7 +107,7 @@ codeunit 12198 "Create Demo EDocs IT"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982', 8767);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8767);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -109,6 +116,7 @@ codeunit 12198 "Create Demo EDocs IT"
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
UnbindSubscription(this);
+ WorkDate(SavedWorkDate);
end;
diff --git a/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateEDocSampleInvIT.Codeunit.al b/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateEDocSampleInvIT.Codeunit.al
index 8500dc985d..3d0e31f6b2 100644
--- a/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateEDocSampleInvIT.Codeunit.al
+++ b/Apps/IT/EDocumentIT/demo data/3.Transactions/CreateEDocSampleInvIT.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 12199 "Create E-Doc Sample Inv. IT"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsIT: Codeunit "Create Demo EDocs IT";
- CreateAllocationAccountIT: Codeunit "Create Allocation Account IT";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 12199 "Create E-Doc Sample Inv. IT"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountIT.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/CobrandTokenOK.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/CobrandTokenOK.txt
new file mode 100644
index 0000000000..5ce61596dd
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/CobrandTokenOK.txt
@@ -0,0 +1 @@
+{"cobrandId":10010352,"applicationId":"3A4CAE9B71A1CCD7FF41F51006E9ED00","session":{"cobSession":"08062013_0:9f86e8c84f9dc41b9fe4b5ac7cd47457e9da5d976cd97f41449a56d1b8e8ac4f926fb1e8dcbfbb984982842e388157d0f68c56edd3d6210d1efebffffba884b8"},"locale":"en_US"}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/ConsumerTokenOK.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/ConsumerTokenOK.txt
new file mode 100644
index 0000000000..2d74a2029a
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/ConsumerTokenOK.txt
@@ -0,0 +1 @@
+{"user":{"id":10042740,"loginName":"sbMemDjordje1","name":{"first":"FNAME","last":"LNAME"},"session":{"userSession":"consumertoken"},"preferences":{"currency":"USD","timeZone":"PST","dateFormat":"MM/dd/yyyy","locale": "en_US"}}}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/DuplicateSiteAccountsDetails.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/DuplicateSiteAccountsDetails.txt
new file mode 100644
index 0000000000..5f48d1918b
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/DuplicateSiteAccountsDetails.txt
@@ -0,0 +1 @@
+{"account":[{"CONTAINER":"bank","providerAccountId":10097740,"accountName":"DagCreditcard","accountStatus":"ACTIVE","accountNumber":"xxxx8803","aggregationSource":"USER","isAsset":true,"balance":{"amount":20000,"currency":"USD"},"id":10171852,"lastUpdated":"2015-11-26T13:19:50Z","userClassification":"PERSONAL","includeInNetWorth":true,"providerId":"8998","providerName":"HSBC","isManual":false,"availableBalance":{"amount":1636.44,"currency":"USD"},"currentBalance":{"amount":1636.44,"currency":"USD"},"autoRefresh":{"additionalStatus":"SCHEDULED","asOfDate":"2015-05-13T11:03:11Z","status":"ENABLED"},"accountType":"OTHER","classification":"PERSONAL","displayedName":"User","createdDate":"2014-07-31T09:08:00Z","dataset":[{"name":"ACCT_PROFILE","additionalStatus":"AVAILABLE_DATA_RETRIEVED","updateEligibility":"ALLOW_UPDATE","lastUpdateAttempt":"2015-11-26T13:19:50Z","lastUpdated":"2015-11-26T13:19:50Z"}],"holder":[{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"SECONDARY","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"PRIMARY","phoneNumber":[{"type":"landline","value":"87654321"}]}]},{"CONTAINER":"bank","providerAccountId":10097740,"accountName":"DagCreditcard","accountStatus":"ACTIVE","accountNumber":"xxxx8803","aggregationSource":"USER","isAsset":true,"balance":{"amount":20000,"currency":"USD"},"id":10171852,"lastUpdated":"2015-11-26T13:19:50Z","userClassification":"PERSONAL","includeInNetWorth":true,"providerId":"8998","providerName":"HSBC","isManual":false,"availableBalance":{"amount":1636.44,"currency":"USD"},"currentBalance":{"amount":1636.44,"currency":"USD"},"autoRefresh":{"additionalStatus":"SCHEDULED","asOfDate":"2015-05-13T11:03:11Z","status":"ENABLED"},"accountType":"OTHER","classification":"PERSONAL","displayedName":"User","createdDate":"2014-07-31T09:08:00Z","dataset":[{"name":"ACCT_PROFILE","additionalStatus":"AVAILABLE_DATA_RETRIEVED","updateEligibility":"ALLOW_UPDATE","lastUpdateAttempt":"2015-11-26T13:19:50Z","lastUpdated":"2015-11-26T13:19:50Z"}],"holder":[{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"SECONDARY","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"PRIMARY","phoneNumber":[{"type":"landline","value":"87654321"}]}]}]}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Empty.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Empty.txt
new file mode 100644
index 0000000000..9e26dfeeb6
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Empty.txt
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/FastlinkTokenOK.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/FastlinkTokenOK.txt
new file mode 100644
index 0000000000..17a2c7ff72
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/FastlinkTokenOK.txt
@@ -0,0 +1 @@
+{"user":{"accessTokens":[{"appId":"10003600","value":"fastlinktoken","url":"http://source.com:7100/authenticate/nodesmb/"}]}}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccounts.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccounts.txt
new file mode 100644
index 0000000000..76913e4c2e
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccounts.txt
@@ -0,0 +1 @@
+{"providerAccount":[{"id":10097740,"aggregationSource":"USER","providerId":8998,"consentId":"10003800","isManual":false,"createdDate":"2015-11-11T02:00:01Z","status":"SUCCESS","dataset":[{"name":"BASIC_AGG_DATA","additionalStatus":"AVAILABLE_DATA_RETRIEVED","updateEligibility":"ALLOW_UPDATE","lastUpdated":"2015-11-22T04:10:48Z","lastUpdateAttempt":"2015-11-22T04:10:48Z","nextUpdateScheduled":"2015-11-23T04:10:48Z"},{"name":"DagCreditcard","additionalStatus":" AVAILABLE_DATA_RETRIEVED ","updateEligibility":"ALLOW_UPDATE","lastUpdated":"2015-11-22T04:06:08Z","lastUpdateAttempt":"2015-11-22T04:06:08Z"}]}]}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetails.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetails.txt
new file mode 100644
index 0000000000..1332c4e8ac
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetails.txt
@@ -0,0 +1 @@
+{"account":[{"CONTAINER":"bank","providerAccountId":10097740,"accountName":"DagCreditcard","accountStatus":"ACTIVE","accountNumber":"xxxx8803","aggregationSource":"USER","isAsset":true,"balance":{"amount":20000,"currency":"USD"},"id":10171852,"lastUpdated":"2015-11-26T13:19:50Z","userClassification":"PERSONAL","includeInNetWorth":true,"providerId":"8998","providerName":"HSBC","isManual":false,"availableBalance":{"amount":1636.44,"currency":"USD"},"currentBalance":{"amount":1636.44,"currency":"USD"},"autoRefresh":{"additionalStatus":"SCHEDULED","asOfDate":"2015-05-13T11:03:11Z","status":"ENABLED"},"accountType":"OTHER","classification":"PERSONAL","displayedName":"User","createdDate":"2014-07-31T09:08:00Z","dataset":[{"name":"ACCT_PROFILE","additionalStatus":"AVAILABLE_DATA_RETRIEVED","updateEligibility":"ALLOW_UPDATE","lastUpdateAttempt":"2015-11-26T13:19:50Z","lastUpdated":"2015-11-26T13:19:50Z"}],"holder":[{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"SECONDARY","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"PRIMARY","phoneNumber":[{"type":"landline","value":"87654321"}]}]}]}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetailsMFA.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetailsMFA.txt
new file mode 100644
index 0000000000..dc97e7737a
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/SiteAccountsDetailsMFA.txt
@@ -0,0 +1 @@
+{"account":[{"CONTAINER":"bank","providerAccountId":10097740,"accountName":"DagCreditcard","accountStatus":"ACTIVE","accountNumber":"xxxx8803","aggregationSource":"USER","isAsset":true,"balance":{"amount":20000,"currency":"USD"},"id":10171852,"lastUpdated":"2015-01-01T13:19:50Z","userClassification":"PERSONAL","includeInNetWorth":true,"providerId":"8998","providerName":"HSBC","isManual":false,"availableBalance":{"amount":1636.44,"currency":"USD"},"currentBalance":{"amount":1636.44,"currency":"USD"},"autoRefresh":{"additionalStatus":"NOTSCHEDULED","asOfDate":"2015-01-01T11:03:11Z","status":"DISABLED"},"accountType":"OTHER","classification":"PERSONAL","displayedName":"User","createdDate":"2014-07-31T09:08:00Z","dataset":[{"name":"BASIC_AGG_DATA","additionalStatus":"AVAILABLE_DATA_RETRIEVED","updateEligibility":"ALLOW_UPDATE","lastUpdateAttempt":"2015-01-01T13:19:50Z","lastUpdated":"2015-01-01T13:19:50Z"}],"holder":[{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"SECONDARY","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"CUSTODIAN","phoneNumber":[{"type":"landline","value":"12345678"}]},{"ownership":"PRIMARY","phoneNumber":[{"type":"landline","value":"87654321"}]}]}]}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/StaleTokens.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/StaleTokens.txt
new file mode 100644
index 0000000000..2f3e1460fb
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/StaleTokens.txt
@@ -0,0 +1 @@
+{"errorCode": "415","errorDetail": "Token authentication failed for cobrand/user Stale conversation credentials"}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status403.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status403.txt
new file mode 100644
index 0000000000..aaa2698998
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status403.txt
@@ -0,0 +1 @@
+ForbiddenThis page is forbidden.
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status404.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status404.txt
new file mode 100644
index 0000000000..dee0399b95
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status404.txt
@@ -0,0 +1 @@
+File Not FoundThis page could not be found.
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status500.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status500.txt
new file mode 100644
index 0000000000..d1b396d893
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/Status500.txt
@@ -0,0 +1 @@
+Internal Server ErrorThis page is an internal server error.
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdata.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdata.txt
new file mode 100644
index 0000000000..e612cabf65
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdata.txt
@@ -0,0 +1 @@
+{"siteRefreshStatus":{"siteRefreshStatusId":1,"siteRefreshStatus":"REFRESH_TRIGGERED"},"siteRefreshMode":{"refreshModeId":2,"refreshMode":"NORMAL"},"updateInitTime":1451404379,"nextUpdate":1451405279,"code":0,"suggestedFlow":{"suggestedFlowId":2,"suggestedFlow":"REFRESH"},"itemRefreshInfo":[{"memItemId":10156840,"itemSuggestedFlow":{"suggestedFlowId":2,"suggestedFlow":"REFRESH"},"errorCode":0,"retryCount":0}],"noOfRetry":0,"isMFAInputRequired":false,"siteAddStatus":{"siteAddStatusId":14,"siteAddStatus":"ADDED"}}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdatadone.txt b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdatadone.txt
new file mode 100644
index 0000000000..8dd1ecbe86
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/refreshdatadone.txt
@@ -0,0 +1 @@
+{"siteRefreshStatus":{"siteRefreshStatusId":5,"siteRefreshStatus":"REFRESH_COMPLETED"},"siteRefreshMode":{"refreshModeId":2,"refreshMode":"NORMAL"},"updateInitTime":0,"nextUpdate":1451538403,"code":0,"itemRefreshInfo":[{"memItemId":10156840,"itemSuggestedFlow":{"suggestedFlowId":1,"suggestedFlow":"NOT_REFRESHABLE"},"itemSuggestedFlowReason":{"suggestedFlowReasonId":5,"suggestedFlowReason":"RECENTLY_REFRESHED"},"errorCode":0,"retryCount":0}],"noOfRetry":0,"isMFAInputRequired":false,"siteAddStatus":{"siteAddStatusId":14,"siteAddStatus":"ADDED"}}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/transactions.json b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/transactions.json
new file mode 100644
index 0000000000..2a68104df4
--- /dev/null
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/.resources/transactions.json
@@ -0,0 +1 @@
+{"transaction":[{"CONTAINER":"bank","id":15255715,"amount":{"amount":3465,"currency":"USD"},"baseType":"CREDIT","categoryType":"INCOME","categoryId":29,"category":"Salary/Regular Income","categorySource":"SYSTEM","highLevelCategoryId":10000012,"createdDate":"2013-01-16T00:00:00-0800","lastUpdated":"2013-01-16T00:00:00-0800","description":{"original":"DESC1","simple":"DESC1"},"type":"TRANSFER","subType":"TRANSFER","isManual":false,"sourceType":"AGGREGATED","date":"2013-01-16","postDate":"2013-01-16","status":"POSTED","accountId":10177990,"runningBalance":{"amount":9044.78,"currency":"USD"},"merchant":{"id":"70578693","source":"YODLEE","categoryLabel":["[Check Payment]"],"address":{"country":"US"}}},{"CONTAINER":"bank","id":15255717,"amount":{"amount":3103,"currency":"USD"},"baseType":"DEBIT","categoryType":"TRANSFER","categoryId":26,"category":"Credit Card Payments","categorySource":"SYSTEM","highLevelCategoryId":10000018,"createdDate":"2013-01-14T00:00:00Z","lastUpdated":"2013-01-10T00:00:00Z","description":{"original":"DESC2","simple":"DESC2"},"type":"PAYMENT","subType":"CREDIT_CARD_PAYMENT","isManual":false,"sourceType":"AGGREGATED","date":"2013-01-14","postDate":"2013-01-14","status":"POSTED","accountId":10177990,"runningBalance":{"amount":9044.78,"currency":"USD"},"merchant":{"id":"98740747","name":"Shopify","source":"YODLEE","categoryLabel":["Personal/Family"],"address":{"country":"US"}}},{"CONTAINER":"bank","id":15255716,"amount":{"amount":5646,"currency":"USD"},"baseType":"CREDIT","categoryType":"INCOME","categoryId":29,"category":"Salary/Regular Income","categorySource":"SYSTEM","highLevelCategoryId":10000012,"createdDate":"2013-01-10T00:00:00Z","lastUpdated":"2013-01-10T00:00:00Z","description":{"original":"DESC3","simple":"DESC3"},"type":"TRANSFER","subType":"TRANSFER","isManual":false,"sourceType":"AGGREGATED","date":"2013-01-10","postDate":"2013-01-10","status":"POSTED","accountId":10177990,"runningBalance":{"amount":9044.78,"currency":"USD"},"merchant":{"id":"70578693","source":"YODLEE","categoryLabel":["Check Payment"],"address":{"country":"US"}}}]}
\ No newline at end of file
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json b/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json
index 0c33d0d30c..afde6a52e9 100644
--- a/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/app.json
@@ -55,5 +55,8 @@
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
- "application": "28.0.0.0"
+ "application": "28.0.0.0",
+ "resourceFolders": [
+ ".resources"
+ ]
}
diff --git a/Apps/NA/EnvestnetYodleeBankFeeds/test/src/MSYodleeBankServiceTests.Codeunit.al b/Apps/NA/EnvestnetYodleeBankFeeds/test/src/MSYodleeBankServiceTests.Codeunit.al
index 2f319aaad2..ce3664ffb2 100644
--- a/Apps/NA/EnvestnetYodleeBankFeeds/test/src/MSYodleeBankServiceTests.Codeunit.al
+++ b/Apps/NA/EnvestnetYodleeBankFeeds/test/src/MSYodleeBankServiceTests.Codeunit.al
@@ -33,7 +33,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
CannotGetLinkedAccountsErr: Label 'The updated list of linked bank accounts could not be shown.';
GetAccountsFailedTxt: Label '/getAccountsFailed';
DetailsFailedTxt: Label '/detailsFailed';
- Error500Txt: Label '(500) Server Error.';
+ Error500Txt: Label '(500) Internal Server Error.';
DetailsOKTxt: Label '/detailsOK';
DetailsDuplicateAccountIdTxt: Label '/detailsDuplicateAccountId';
DetailsMFATxt: Label '/detailsMFA';
@@ -200,7 +200,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceHandles500();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -211,11 +211,11 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
// Exercise
ASSERTERROR MSYodleeBankServiceSetup.CheckSetup();
- Assert.ExpectedError(STRSUBSTNO(ServiceErr, '(500) Server Error.') + '\' + BadCobrandTxt);
+ Assert.ExpectedError(STRSUBSTNO(ServiceErr, '(500) Internal Server Error.') + '\' + BadCobrandTxt);
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceHandles404();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -230,7 +230,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceHandles403();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -245,7 +245,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceInvalidCobrandResponse();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -260,7 +260,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceHandles200();
var
MSYodleeBankServiceSetup: TestPage "MS - Yodlee Bank Service Setup";
@@ -436,7 +436,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestLogErrorOnConnectionFailure();
var
ActivityLog: Record "Activity Log";
@@ -451,7 +451,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
// Exercise
ASSERTERROR MSYodleeBankServiceSetup.CheckSetup();
- Assert.ExpectedError(STRSUBSTNO(ServiceErr, '(500) Server Error.') + '\' + BadCobrandTxt);
+ Assert.ExpectedError(STRSUBSTNO(ServiceErr, '(500) Internal Server Error.') + '\' + BadCobrandTxt);
// Assert Log Entry
ActivityLog.SETRANGE(Status, ActivityLog.Status::Failed);
@@ -501,7 +501,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestSessionTokens();
var
MSYodleeBankSession: Record "MS - Yodlee Bank Session";
@@ -544,7 +544,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestResetSessionTokens();
var
BankAccount: Record "Bank Account";
@@ -568,7 +568,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingServiceData();
var
BankAccount: Record "Bank Account";
@@ -606,7 +606,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingServiceRefreshData();
var
BankAccount: Record "Bank Account";
@@ -642,7 +642,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingServiceRefreshAutomatic();
var
BankAccount: Record "Bank Account";
@@ -661,7 +661,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,BankAccountRefreshMFAHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,BankAccountRefreshMFAHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingServiceRefreshMFA();
var
BankAccount: Record "Bank Account";
@@ -686,7 +686,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateGetLinkedAccountsFail();
var
BankAccount: Record "Bank Account";
@@ -708,7 +708,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateGetDetailedLinkedAccountsFail();
var
BankAccount: Record "Bank Account";
@@ -730,7 +730,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateFindsExistingAccounts();
var
BankAccount: Record "Bank Account";
@@ -756,7 +756,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,CloseBankLinkingHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,CloseBankLinkingHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateFindsExistingDuplicateAccount();
var
BankAccountList: TestPage "Bank Account List";
@@ -771,7 +771,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,FastlinkHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,FastlinkHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingCreateWithNoNewAccounts();
var
BankAccount: Record "Bank Account";
@@ -796,7 +796,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateLaunchFromNonLinkedBankAccount();
var
BankAccount: Record "Bank Account";
@@ -826,7 +826,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateRemovesUnlinkedAccounts();
var
BankAccount: Record "Bank Account";
@@ -861,7 +861,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdatePromptsMissingLinkings();
var
BankAccount: Record "Bank Account";
@@ -879,7 +879,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingActionHandler,BankLinkingActionHandlerStepTwo,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingActionHandler,BankLinkingActionHandlerStepTwo,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdatePromptsMissingLinkingsWithAction();
var
BankAccount: Record "Bank Account";
@@ -897,7 +897,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingCreateNewHandler,BankAccountCardHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingCreateNewHandler,BankAccountCardHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateMissLinksCreateNew();
var
BankAccount: Record "Bank Account";
@@ -924,7 +924,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingCreateNewHandler,BankAccountCardHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingCreateNewHandler,BankAccountCardHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateMissLinksReselect();
var
BankAccount: Record "Bank Account";
@@ -952,7 +952,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,FastlinkHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,FastlinkHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateAutoLink();
var
BankAccount: Record "Bank Account";
@@ -980,7 +980,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,FastlinkHandler,BankAccountCardHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,FastlinkHandler,BankAccountCardHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateCreateNewAndAutoLink();
var
BankAccount: Record "Bank Account";
@@ -1038,7 +1038,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateUnLinkAction();
var
BankAccountList: TestPage "Bank Account List";
@@ -1059,7 +1059,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,BankLinkingActionHandlerStepTwo,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,BankLinkingActionHandlerStepTwo,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateUnLinkActionFromLinkedAccount();
var
BankAccount: Record "Bank Account";
@@ -1093,7 +1093,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,BankAccountCardHandler,ConsentConfirmYes')]
+ [HandlerFunctions('MessageHandler,ConfirmHandler,BankLinkingUnlinkHandler,BankAccountCardHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestBankLinkingUpdateUnLinkActionFromNewLinkedAccount();
var
BankAccountList: TestPage "Bank Account List";
@@ -1113,7 +1113,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactions();
var
BankAccount: Record "Bank Account";
@@ -1135,7 +1135,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsWithActivityLogging();
var
BankAccount: Record "Bank Account";
@@ -1167,7 +1167,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,PaymentBankAccountListHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,PaymentBankAccountListHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsIntoNewPmtReconJnl();
var
BankAccount: Record "Bank Account";
@@ -1219,7 +1219,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestJobQueueRemovedOnAccountDeletion();
var
BankAccount: Record "Bank Account";
@@ -1333,7 +1333,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsViaJobQueue();
var
BankAccount: Record "Bank Account";
@@ -1361,7 +1361,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsViaJobQueueTwice();
var
BankAccount: Record "Bank Account";
@@ -1394,7 +1394,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsCurrencyMissmatch();
var
BankAccount: Record "Bank Account";
@@ -1418,7 +1418,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('BankStatementFilterHandler,ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestGetTransactionsWrongBankAccountID();
var
BankAccount: Record "Bank Account";
@@ -1463,7 +1463,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestServiceSetupFromIsolatedStorage();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -1622,7 +1622,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestCreateConsumerOnAuthenticate();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -1655,7 +1655,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,MessageHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestCreateConsumerSuccessWithNoTenantId();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -1689,7 +1689,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestRemoveConsumerOnDisable();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -1751,7 +1751,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
procedure TestRemoveConsumerOnNoLinkedBankAccounts();
var
MSYodleeBankServiceSetup: Record "MS - Yodlee Bank Service Setup";
@@ -1864,7 +1864,7 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
end;
[Test]
- [HandlerFunctions('ConfirmHandler,ConsentConfirmYes')]
+ [HandlerFunctions('ConfirmHandler,ConsentConfirmYes,HttpClientHandler')]
[NonDebuggable]
procedure TestRegisterConsumerShouldGenerateUserNameIfNotExist();
var
@@ -2431,5 +2431,179 @@ codeunit 139501 "MS - Yodlee Bank Service Tests"
COPYSTR(MSYodleeBankServiceSetup."Service URL" + Path, 1, MAXSTRLEN(MSYodleeBankServiceSetup."Service URL"));
MSYodleeBankServiceSetup.MODIFY();
end;
+
+ [HttpClientHandler]
+ internal procedure HttpClientHandler(Request: TestHttpRequestMessage; var Response: TestHttpResponseMessage): Boolean
+ begin
+ if Request.Path.Contains('/status500/cobrand/login') then begin
+ LoadResourceIntoHttpResponse('Status500.txt', Response);
+ Response.HttpStatusCode := 500;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/status404/cobrand/login') then begin
+ LoadResourceIntoHttpResponse('Status404.txt', Response);
+ Response.HttpStatusCode := 404;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/status403/cobrand/login') then begin
+ LoadResourceIntoHttpResponse('Status403.txt', Response);
+ Response.HttpStatusCode := 403;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/loginOK/cobrand/login') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('CobrandTokenOK.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/loginOK/user/login') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('ConsumerTokenOK.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/loginOK/user/accessTokens') then begin
+ if Request.QueryParameters.ContainsKey('appIds') and (Request.QueryParameters.Get('appIds') = '10003600') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('FastlinkTokenOK.txt', Response);
+ end;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/getAccountsFailed/loginOK/providerAccounts') then begin
+ LoadResourceIntoHttpResponse('Status500.txt', Response);
+ Response.HttpStatusCode := 500;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/detailsFailed/loginOK/providerAccounts') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('SiteAccounts.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/detailsFailed/loginOK/accounts') then begin
+ if Request.QueryParameters.ContainsKey('status') and (Request.QueryParameters.Get('status') = 'ACTIVE') then begin
+ Response.HttpStatusCode := 500;
+ LoadResourceIntoHttpResponse('Status500.txt', Response);
+ end;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/loginOK/providerAccounts') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('SiteAccounts.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/detailsOK/loginOK/accounts') then begin
+ Response.HttpStatusCode := 200;
+ if Request.QueryParameters.ContainsKey('status') then begin
+ if (Request.QueryParameters.Get('status') = 'ACTIVE') then
+ LoadResourceIntoHttpResponse('SiteAccountsDetails.txt', Response)
+ else
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ end else
+ if Request.QueryParameters.ContainsKey('accountId') then
+ LoadResourceIntoHttpResponse('SiteAccountsDetails.txt', Response)
+ else
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/transactions') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('transactions.json', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/startSiteRefresh') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('refreshdata.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/getSiteRefreshInfo') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('refreshdatadone.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/detailsMFA/loginOK/accounts') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('SiteAccountsDetailsMFA.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/resetToken/loginOK/providerAccounts') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('SiteAccounts.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/resetToken/loginOK/accounts') then begin
+ Response.HttpStatusCode := 200;
+ if Request.QueryParameters.ContainsKey('status') then begin
+ if (Request.QueryParameters.Get('status') = 'ACTIVE') then
+ LoadResourceIntoHttpResponse('StaleTokens.txt', Response)
+ else
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ end else
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/accountFails/loginOK/user/register') then begin
+ LoadResourceIntoHttpResponse('Status500.txt', Response);
+ Response.HttpStatusCode := 500;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/accountFails/loginOK/user/unregister') then begin
+ LoadResourceIntoHttpResponse('Status500.txt', Response);
+ Response.HttpStatusCode := 500;
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/user/register') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/user/unregister') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('Empty.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/detailsDuplicateAccountId/loginOK/accounts') then begin
+ Response.HttpStatusCode := 200;
+ LoadResourceIntoHttpResponse('DuplicateSiteAccountsDetails.txt', Response);
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/status200/cobrand/login') then begin
+ Response.HttpStatusCode := 200;
+ Response.Content.WriteFrom('{invalid response}');
+ exit(false);
+ end;
+
+ if Request.Path.Contains('/status200/user/login') then begin
+ Response.HttpStatusCode := 200;
+ Response.Content.WriteFrom('{invalid response}');
+ exit(false);
+ end;
+
+ exit(false);
+ end;
+
+ local procedure LoadResourceIntoHttpResponse(ResourceText: Text; var Response: TestHttpResponseMessage)
+ begin
+ Response.Content.WriteFrom(NavApp.GetResourceAsText(ResourceText, TextEncoding::UTF8));
+ end;
}
diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/CreateNLGLAccounts.Codeunit.al b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/CreateNLGLAccounts.Codeunit.al
index 21433afd9d..670fc754ad 100644
--- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/CreateNLGLAccounts.Codeunit.al
+++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/CreateNLGLAccounts.Codeunit.al
@@ -937,7 +937,7 @@ codeunit 11499 "Create NL GL Accounts"
ContosoGLAccount.InsertGLAccount(Othervehicleexpenses(), OthervehicleexpensesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(TotalVehicleExpenses(), TotalVehicleExpensesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"End-Total", '', '', 0, CreateGLAccount.VehicleExpenses() + '..' + TotalVehicleExpenses(), Enum::"General Posting Type"::Purchase, '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(FreightCosts(), FreightCostsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"Begin-Total", '', '', 0, '', Enum::"General Posting Type"::Purchase, '', '', false, false, false);
- ContosoGLAccount.InsertGLAccount(Freightfeesforgoods(), FreightfeesforgoodsName(), 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"::Purchase, '', '', true, false, false);
+ ContosoGLAccount.InsertGLAccount(Freightfeesforgoods(), FreightfeesforgoodsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', CreatePostingGroup.ZeroPostingGroup(), 0, '', Enum::"General Posting Type"::Purchase, '', CreateVATPostingGroups.NoVAT(), true, false, false);
ContosoGLAccount.InsertGLAccount(Customsandforwarding(), CustomsandforwardingName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(Freightfeesprojects(), FreightfeesprojectsName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(TotalFreightCosts(), TotalFreightCostsName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"End-Total", '', '', 0, FreightCosts() + '..' + TotalFreightCosts(), Enum::"General Posting Type"::Purchase, '', '', false, false, false);
@@ -973,7 +973,7 @@ codeunit 11499 "Create NL GL Accounts"
ContosoGLAccount.InsertGLAccount(Dataservices(), DataservicesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(Postalfees(), PostalfeesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(ConsumableExpensiblehardware(), ConsumableExpensiblehardwareName(), 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"::Purchase, '', '', true, false, false);
- ContosoGLAccount.InsertGLAccount(Softwareandsubscriptionfees(), SoftwareandsubscriptionfeesName(), 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"::Purchase, '', '', true, false, false);
+ ContosoGLAccount.InsertGLAccount(Softwareandsubscriptionfees(), SoftwareandsubscriptionfeesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', CreatePostingGroup.ZeroPostingGroup(), 0, '', Enum::"General Posting Type"::Purchase, '', CreateVATPostingGroups.NoVAT(), true, false, false);
ContosoGLAccount.InsertGLAccount(TotalOfficeExpenses(), TotalOfficeExpensesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"End-Total", '', '', 0, OfficeExpenses() + '..' + TotalOfficeExpenses(), Enum::"General Posting Type"::Purchase, '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(InsurancesandRisks(), InsurancesandRisksName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"Begin-Total", '', '', 0, '', Enum::"General Posting Type"::Purchase, '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(CorporateInsurance(), CorporateInsuranceName(), 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"::Purchase, '', '', true, false, false);
@@ -1002,7 +1002,7 @@ codeunit 11499 "Create NL GL Accounts"
ContosoGLAccount.InsertGLAccount(ITServices(), ITServicesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(MediaServices(), MediaServicesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(ConsultingServices(), ConsultingServicesName(), 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"::Purchase, '', '', true, false, false);
- ContosoGLAccount.InsertGLAccount(LegalFeesandAttorneyServices(), LegalFeesandAttorneyServicesName(), 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"::Purchase, '', '', true, false, false);
+ ContosoGLAccount.InsertGLAccount(LegalFeesandAttorneyServices(), LegalFeesandAttorneyServicesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::Posting, '', CreatePostingGroup.ZeroPostingGroup(), 0, '', Enum::"General Posting Type"::Purchase, '', CreateVATPostingGroups.NoVAT(), true, false, false);
ContosoGLAccount.InsertGLAccount(OtherExternalServices(), OtherExternalServicesName(), 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"::Purchase, '', '', true, false, false);
ContosoGLAccount.InsertGLAccount(TotalExternalServices(), TotalExternalServicesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"End-Total", '', '', 0, ExternalServices() + '..' + TotalExternalServices(), Enum::"General Posting Type"::Purchase, '', '', false, false, false);
ContosoGLAccount.InsertGLAccount(OtherExternalExpenses(), OtherExternalExpensesName(), Enum::"G/L Account Income/Balance"::"Income Statement", Enum::"G/L Account Category"::Expense, Enum::"G/L Account Type"::"Begin-Total", '', '', 0, '', Enum::"General Posting Type"::Purchase, '', '', false, false, false);
diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNL.Codeunit.al b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNL.Codeunit.al
new file mode 100644
index 0000000000..c8f07d3570
--- /dev/null
+++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNL.Codeunit.al
@@ -0,0 +1,24 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Localization;
+
+codeunit 11553 "Create Allocation Account NL"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ trigger OnRun()
+ var
+ FinanceModuleSetup: Record "Finance Module Setup";
+ CreateNLGLAccounts: Codeunit "Create NL GL Accounts";
+ begin
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateNLGLAccounts.Softwareandsubscriptionfees();
+ FinanceModuleSetup.Modify();
+ end;
+}
diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNL.Codeunit.al b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNL.Codeunit.al
index 5b2c5fa8f1..1624b6cfd6 100644
--- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNL.Codeunit.al
+++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNL.Codeunit.al
@@ -54,6 +54,7 @@ codeunit 11538 "Create Posting Groups NL"
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.DomesticPostingGroup(), CreatePostingGroups.ZeroPostingGroup(), CreateNLGLAccounts.ResaleofGoods(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.CostofMaterials(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.GoodsforResale(), '', CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.CostofMaterials(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.EUPostingGroup(), CreatePostingGroups.RetailPostingGroup(), CreateNLGLAccounts.ResaleofGoods(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.CostofMaterials(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.GoodsforResale(), '', CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.CostofMaterials(), '', '');
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.EUPostingGroup(), CreatePostingGroups.ZeroPostingGroup(), CreateNLGLAccounts.ResaleofGoods(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.CostofMaterials(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.GoodsforResale(), '', CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.CostofMaterials(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), CreatePostingGroups.RetailPostingGroup(), CreateNLGLAccounts.ResaleofGoods(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.CostofMaterials(), CreateNLGLAccounts.GoodsforResale(), CreateNLGLAccounts.GoodsforResale(), '', CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.CostofMaterials(), '', '');
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), CreatePostingGroups.ServicesPostingGroup(), CreateNLGLAccounts.SalesofServiceWork(), CreateNLGLAccounts.OtherExternalServices(), CreateNLGLAccounts.CostofLabor(), CreateNLGLAccounts.OtherExternalServices(), CreateNLGLAccounts.OtherExternalServices(), '', CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.SalesDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.PurchaseDiscounts(), CreateNLGLAccounts.CostofLabor(), '', '');
diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/NLContosoLocalization.Codeunit.al b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/NLContosoLocalization.Codeunit.al
index dc1a17a53a..f6ed998430 100644
--- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/NLContosoLocalization.Codeunit.al
+++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/DemoData/NLContosoLocalization.Codeunit.al
@@ -147,7 +147,7 @@ codeunit 11508 "NL Contoso Localization"
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Contoso Demo Tool", 'OnBeforeGeneratingDemoData', '', false, false)]
- local procedure OnBeforeGeneratingDemoData(Module: Enum "Contoso Demo Data Module")
+ local procedure OnBeforeGeneratingDemoData(ContosoDemoDataLevel: Enum "Contoso Demo Data Level"; Module: Enum "Contoso Demo Data Module")
var
CreateLocationNL: Codeunit "Create Location NL";
CreateItemNL: Codeunit "Create Item NL";
@@ -181,6 +181,8 @@ codeunit 11508 "NL Contoso Localization"
end;
Enum::"Contoso Demo Data Module"::Finance:
begin
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account NL");
BindSubscription(CreateCurrencyNL);
BindSubscription(CreateCurrencyExchRateNL);
BindSubscription(CreateResourceNL);
diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json
index 4ce60703b2..5e54509b80 100644
--- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json
+++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/app.json
@@ -25,7 +25,7 @@
"idRanges": [
{
"from": 11495,
- "to": 11550
+ "to": 11553
}
],
"resourceExposurePolicy": {
diff --git a/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateDemoEDocsNL.Codeunit.al b/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateDemoEDocsNL.Codeunit.al
new file mode 100644
index 0000000000..635e517ece
--- /dev/null
+++ b/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateDemoEDocsNL.Codeunit.al
@@ -0,0 +1,115 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11551 "Create Demo EDocs NL"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ ContosoInboundEDocument: Codeunit "Contoso Inbound E-Document";
+
+ trigger OnRun()
+ begin
+ GenerateContosoInboundEDocuments();
+ end;
+
+ procedure GetShipmentDHLInvoiceDescription(): Text[100]
+ var
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
+ begin
+ exit(ShipmentDHLLbl);
+ end;
+
+ local procedure GenerateContosoInboundEDocuments()
+ var
+ CreateVendor: Codeunit "Create Vendor";
+ CreateNLGLAccounts: Codeunit "Create NL GL Accounts";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+ CreateDeferralTemplate: Codeunit "Create Deferral Template";
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ AccountingServicesJanuaryLbl: Label 'Accounting support period: January', MaxLength = 100;
+ AccountingServicesFebruaryLbl: Label 'Accounting support period: February', MaxLength = 100;
+ AccountingServicesMarchLbl: Label 'Accounting support period: March', MaxLength = 100;
+ AccountingServicesDecemberLbl: Label 'Accounting support period: December', MaxLength = 100;
+ AccountingServicesMayLbl: Label 'Accounting support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
+ begin
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
+ CreateAllocationAccount.LicensesDescription(), 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.LegalFeesandAttorneyServices(),
+ AccountingServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.LegalFeesandAttorneyServices(),
+ AccountingServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.LegalFeesandAttorneyServices(),
+ AccountingServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.LegalFeesandAttorneyServices(),
+ AccountingServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.LegalFeesandAttorneyServices(),
+ AccountingServicesDecemberLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
+ '', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(),
+ '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateNLGLAccounts.Freightfeesforgoods(),
+ GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 8368.5);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
+ '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
+ '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
+ end;
+
+}
diff --git a/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateEDocSampleInvNL.Codeunit.al b/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateEDocSampleInvNL.Codeunit.al
new file mode 100644
index 0000000000..7da35629df
--- /dev/null
+++ b/Apps/NL/EDocument_NL/demo data/3.Transactions/CreateEDocSampleInvNL.Codeunit.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11552 "Create E-Doc Sample Inv. NL"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ CreateVendor: Codeunit "Create Vendor";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateDemoEDocsNL: Codeunit "Create Demo EDocs NL";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+
+ trigger OnRun()
+ var
+ YearlyLicenstCostLbl: Label 'Yearly license cost mapped to a G/L account';
+ BasicCoffeeEquipmentLbl: Label 'Basic coffee equipment mapped to vendor''s Item References';
+ CoffeeBeansAndPartsLbl: Label 'Coffee beans and parts with shipping cost that needs human intervention';
+ begin
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.ExportFabrikam(), '108239', CoffeeBeansAndPartsLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 180, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateDemoEDocsNL.GetShipmentDHLInvoiceDescription(), 1, 60, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.DomesticWorldImporter(), '108240', BasicCoffeeEquipmentLbl, 8368.5);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+ end;
+}
diff --git a/Apps/NL/EDocument_NL/demo data/EDocDemodataNL.Codeunit.al b/Apps/NL/EDocument_NL/demo data/EDocDemodataNL.Codeunit.al
new file mode 100644
index 0000000000..359f826426
--- /dev/null
+++ b/Apps/NL/EDocument_NL/demo data/EDocDemodataNL.Codeunit.al
@@ -0,0 +1,34 @@
+// ------------------------------------------------------------------------------------------------
+// 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 11554 "E-Doc. Demodata NL"
+{
+ 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":
+ begin
+ Codeunit.Run(Codeunit::"Create Demo EDocs NL");
+ Codeunit.Run(Codeunit::"Create E-Doc Sample Inv. NL");
+ end;
+ end;
+ end;
+}
diff --git a/Apps/NL/EDocument_NL/demo data/ExtensionLogo.png b/Apps/NL/EDocument_NL/demo data/ExtensionLogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/NL/EDocument_NL/demo data/ExtensionLogo.png differ
diff --git a/Apps/NL/EDocument_NL/demo data/app.json b/Apps/NL/EDocument_NL/demo data/app.json
new file mode 100644
index 0000000000..9729950cda
--- /dev/null
+++ b/Apps/NL/EDocument_NL/demo data/app.json
@@ -0,0 +1,58 @@
+{
+ "id": "a8b3c7d9-4e56-4a12-9b8f-3d7e5f1c9a2b",
+ "name": "E-Document Core Demo Data (NL)",
+ "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 apps covers both sales and purchase processes and can have different lifecycles from standard invoices in Business Central.",
+ "version": "28.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": "28.0.0.0"
+ },
+ {
+ "id": "de0dddf3-9917-430d-8d20-6e7679a08500",
+ "name": "E-Document Core Demo Data",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
+ "name": "Contoso Coffee Demo Dataset",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5b0a41a1-6c42-4123-a521-2265186cfb35",
+ "name": "Contoso Coffee Demo Dataset (NL)",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 11551,
+ "to": 11556
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "application": "28.0.0.0",
+ "target": "OnPrem",
+ "features": [
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/NL/IntrastatNL/app/AppResources/NL_DataExchDefMap.xml b/Apps/NL/IntrastatNL/app/AppResources/NL_DataExchDefMap.xml
index 4e31545461..eecb05313f 100644
--- a/Apps/NL/IntrastatNL/app/AppResources/NL_DataExchDefMap.xml
+++ b/Apps/NL/IntrastatNL/app/AppResources/NL_DataExchDefMap.xml
@@ -52,7 +52,7 @@
3
-
+
GETMONTH
Get Month From Date
diff --git a/Apps/NO/ContosoCoffeeDemoDatasetNO/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNO.Codeunit.al b/Apps/NO/ContosoCoffeeDemoDatasetNO/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNO.Codeunit.al
index e73b7730f0..95759cf4a0 100644
--- a/Apps/NO/ContosoCoffeeDemoDatasetNO/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNO.Codeunit.al
+++ b/Apps/NO/ContosoCoffeeDemoDatasetNO/app/DemoData/Finance/2.Master Data/CreatePostingGroupsNO.Codeunit.al
@@ -79,10 +79,12 @@ codeunit 10708 "Create Posting Groups NO"
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendDom(), NoVatPostingGroup(), '', CreateGLAccount.PurchRetailDom(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendDom(), CreatePostingGroups.RetailPostingGroup(), '', CreateGLAccount.PurchRetailDom(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendDom(), CreatePostingGroups.ServicesPostingGroup(), '', CreateGLAccount.PurchRetailDom(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(VendDom(), CreatePostingGroups.MiscPostingGroup(), '', CreateGLAccount.PurchRetailDom(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendFor(), NoVatPostingGroup(), '', CreateGLAccount.PurchRawMaterialsExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendFor(), CreatePostingGroups.RetailPostingGroup(), '', CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.InsertGeneralPostingSetup(VendFor(), CreatePostingGroups.ServicesPostingGroup(), '', CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(VendFor(), CreatePostingGroups.MiscPostingGroup(), '', CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateGLAccount.CostofResaleSoldInterim(), CreateGLAccount.InvAdjmtInterimRetail());
ContosoGenPostingSetup.SetOverwriteData(false);
end;
diff --git a/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateDemoEDocsNO.Codeunit.al b/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateDemoEDocsNO.Codeunit.al
new file mode 100644
index 0000000000..1bc7322cc2
--- /dev/null
+++ b/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateDemoEDocsNO.Codeunit.al
@@ -0,0 +1,115 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 10732 "Create Demo EDocs NO"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ ContosoInboundEDocument: Codeunit "Contoso Inbound E-Document";
+
+ trigger OnRun()
+ begin
+ GenerateContosoInboundEDocuments();
+ end;
+
+ procedure GetShipmentDHLInvoiceDescription(): Text[100]
+ var
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
+ begin
+ exit(ShipmentDHLLbl);
+ end;
+
+ local procedure GenerateContosoInboundEDocuments()
+ var
+ CreateVendor: Codeunit "Create Vendor";
+ CreateGLAccount: Codeunit "Create G/L Account";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+ CreateDeferralTemplate: Codeunit "Create Deferral Template";
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100;
+ ITServicesFebruaryLbl: Label 'IT Services Support period: February', MaxLength = 100;
+ ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
+ ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
+ ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
+ begin
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 750);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '',
+ 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 300);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 950);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 100);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 350);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 800);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 890);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
+ '', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(),
+ '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.DeliveryExpensesRetail(),
+ GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 9962.5);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
+ '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
+ '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
+ end;
+
+}
diff --git a/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateEDocSampleInvNO.Codeunit.al b/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateEDocSampleInvNO.Codeunit.al
new file mode 100644
index 0000000000..a88e97f9ce
--- /dev/null
+++ b/Apps/NO/EDocument_NO/demo data/3.Transactions/CreateEDocSampleInvNO.Codeunit.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 10733 "Create E-Doc Sample Inv. NO"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ CreateVendor: Codeunit "Create Vendor";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateDemoEDocsNO: Codeunit "Create Demo EDocs NO";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+
+ trigger OnRun()
+ var
+ YearlyLicenstCostLbl: Label 'Yearly license cost mapped to a G/L account';
+ BasicCoffeeEquipmentLbl: Label 'Basic coffee equipment mapped to vendor''s Item References';
+ CoffeeBeansAndPartsLbl: Label 'Coffee beans and parts with shipping cost that needs human intervention';
+ begin
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.ExportFabrikam(), '108239', CoffeeBeansAndPartsLbl, 3077.5);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 180, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateDemoEDocsNO.GetShipmentDHLInvoiceDescription(), 1, 60, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.DomesticWorldImporter(), '108240', BasicCoffeeEquipmentLbl, 9962.5);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl, 1250);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+ end;
+}
diff --git a/Apps/NO/EDocument_NO/demo data/EDocDemodataNO.Codeunit.al b/Apps/NO/EDocument_NO/demo data/EDocDemodataNO.Codeunit.al
new file mode 100644
index 0000000000..adbc3e342d
--- /dev/null
+++ b/Apps/NO/EDocument_NO/demo data/EDocDemodataNO.Codeunit.al
@@ -0,0 +1,34 @@
+// ------------------------------------------------------------------------------------------------
+// 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 10731 "E-Doc. Demodata NO"
+{
+ 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":
+ begin
+ Codeunit.Run(Codeunit::"Create Demo EDocs NO");
+ Codeunit.Run(Codeunit::"Create E-Doc Sample Inv. NO");
+ end;
+ end;
+ end;
+}
diff --git a/Apps/NO/EDocument_NO/demo data/ExtensionLogo.png b/Apps/NO/EDocument_NO/demo data/ExtensionLogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/NO/EDocument_NO/demo data/ExtensionLogo.png differ
diff --git a/Apps/NO/EDocument_NO/demo data/app.json b/Apps/NO/EDocument_NO/demo data/app.json
new file mode 100644
index 0000000000..079d2db3f3
--- /dev/null
+++ b/Apps/NO/EDocument_NO/demo data/app.json
@@ -0,0 +1,58 @@
+{
+ "id": "d0e5f9a1-7b89-5d45-0e0f-6a0a8c4f2e5f",
+ "name": "E-Document Core Demo Data (NO)",
+ "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": "28.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": "28.0.0.0"
+ },
+ {
+ "id": "de0dddf3-9917-430d-8d20-6e7679a08500",
+ "name": "E-Document Core Demo Data",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
+ "name": "Contoso Coffee Demo Dataset",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5b0a41a1-7b42-1719-a521-2265186cfb31",
+ "name": "Contoso Coffee Demo Dataset (NO)",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 10731,
+ "to": 10740
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "application": "28.0.0.0",
+ "target": "OnPrem",
+ "features": [
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNZ.Codeunit.al b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNZ.Codeunit.al
index 49756caee9..ef96229fdb 100644
--- a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNZ.Codeunit.al
+++ b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/Finance/2.Master Data/CreateAllocationAccountNZ.Codeunit.al
@@ -1,3 +1,4 @@
+#if not CLEAN28
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
@@ -12,6 +13,9 @@ codeunit 17180 "Create Allocation Account NZ"
{
InherentEntitlements = X;
InherentPermissions = X;
+ ObsoleteState = Pending;
+ ObsoleteReason = 'Replaced by Create Allocation Account Codeunit in ContosoCoffeeDemoDataset';
+ ObsoleteTag = '28.0';
trigger OnRun()
var
@@ -45,4 +49,5 @@ codeunit 17180 "Create Allocation Account NZ"
var
LicensesTok: Label 'LICENSES', MaxLength = 20;
YearlyLicenseFeeTok: Label 'Yearly license fee', MaxLength = 100;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/NZContosoLocalization.Codeunit.al b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/NZContosoLocalization.Codeunit.al
index e4ddd117d4..72dcf9c947 100644
--- a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/NZContosoLocalization.Codeunit.al
+++ b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/DemoData/NZContosoLocalization.Codeunit.al
@@ -111,10 +111,7 @@ codeunit 17142 "NZ Contoso Localization"
Codeunit.Run(Codeunit::"Create NZ Gen. Journ. Template");
end;
Enum::"Contoso Demo Data Level"::"Master Data":
- begin
- Codeunit.Run(Codeunit::"Create NZ Currency Ex. Rate");
- Codeunit.Run(Codeunit::"Create Allocation Account NZ");
- end;
+ Codeunit.Run(Codeunit::"Create NZ Currency Ex. Rate");
end;
end;
diff --git a/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateDemoEDocsNZ.Codeunit.al b/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateDemoEDocsNZ.Codeunit.al
index cdf87515c3..e267e1ad49 100644
--- a/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateDemoEDocsNZ.Codeunit.al
+++ b/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateDemoEDocsNZ.Codeunit.al
@@ -27,7 +27,7 @@ codeunit 17213 "Create Demo EDocs NZ"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -44,7 +44,7 @@ codeunit 17213 "Create Demo EDocs NZ"
CreateVendor: Codeunit "Create Vendor";
CreateGLAccount: Codeunit "Create G/L Account";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit of Measure";
- CreateAllocationAccountNZ: Codeunit "Create Allocation Account NZ";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100;
@@ -52,48 +52,53 @@ codeunit 17213 "Create Demo EDocs NZ"
ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245');
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245');
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountNZ.Licenses(), '',
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '',
6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419', 108);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 108);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425', 378);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 378);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesFebruaryLbl, 21, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437', 144);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 144);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesMarchLbl, 8, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456', 216);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 216);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesAprilLbl, 12, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479', 324);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 324);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesMayLbl, 18, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1484', 180);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1484', 180);
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
ITServicesDecember(), 10, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
diff --git a/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateEDocSampleInvNZ.Codeunit.al b/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateEDocSampleInvNZ.Codeunit.al
index 55e002ddd8..a6969e4d19 100644
--- a/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateEDocSampleInvNZ.Codeunit.al
+++ b/Apps/NZ/EDocument_NZ/demo data/3.Transactions/CreateEDocSampleInvNZ.Codeunit.al
@@ -21,7 +21,7 @@ codeunit 17214 "Create E-Doc Sample Inv. NZ"
CreateVendor: Codeunit "Create Vendor";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit of Measure";
CreateDemoEDocsNZ: Codeunit "Create Demo EDocs NZ";
- CreateAllocationAccountNZ: Codeunit "Create Allocation Account NZ";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -35,7 +35,7 @@ codeunit 17214 "Create E-Doc Sample Inv. NZ"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108240', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountNZ.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/DemoData/Finance/1.Setup Data/CreatePostingGroupsSE.Codeunit.al b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/DemoData/Finance/1.Setup Data/CreatePostingGroupsSE.Codeunit.al
index fa9baf2812..4ddae23fde 100644
--- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/DemoData/Finance/1.Setup Data/CreatePostingGroupsSE.Codeunit.al
+++ b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/DemoData/Finance/1.Setup Data/CreatePostingGroupsSE.Codeunit.al
@@ -46,10 +46,12 @@ codeunit 11213 "Create Posting Groups SE"
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.DomesticPostingGroup(), CreatePostingGroups.ServicesPostingGroup(), CreateGLAccount.SalesResourcesDom(), CreateGLAccount.PurchRetailDom(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.EUPostingGroup(), CreatePostingGroups.RetailPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateGLAccount.PurchRetailEU(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.EUPostingGroup(), CreatePostingGroups.MiscPostingGroup(), CreateGLAccount.SalesRetailEU(), CreateGLAccount.PurchRetailEU(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), NoVatPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), CreatePostingGroups.RetailPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), CreatePostingGroups.ServicesPostingGroup(), CreateGLAccount.SalesResourcesExport(), CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
+ ContosoGenPostingSetup.InsertGeneralPostingSetup(CreatePostingGroups.ExportPostingGroup(), CreatePostingGroups.MiscPostingGroup(), CreateGLAccount.SalesRetailExport(), CreateGLAccount.PurchRetailExport(), CreateGLAccount.InventoryAdjmtRetail(), CreateGLAccount.InventoryAdjmtRetail(), '', '', CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscountGranted(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.DiscReceivedRetail(), CreateGLAccount.CostofRetailSold(), CreateSEGLAccounts.Shipmentsnotinvoiced(), CreateSEGLAccounts.Receiptsnotinvoiced());
ContosoGenPostingSetup.SetOverwriteData(false);
end;
diff --git a/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateDemoEDocsSE.Codeunit.al b/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateDemoEDocsSE.Codeunit.al
new file mode 100644
index 0000000000..b4126e5f6e
--- /dev/null
+++ b/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateDemoEDocsSE.Codeunit.al
@@ -0,0 +1,115 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11252 "Create Demo EDocs SE"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ ContosoInboundEDocument: Codeunit "Contoso Inbound E-Document";
+
+ trigger OnRun()
+ begin
+ GenerateContosoInboundEDocuments();
+ end;
+
+ procedure GetShipmentDHLInvoiceDescription(): Text[100]
+ var
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
+ begin
+ exit(ShipmentDHLLbl);
+ end;
+
+ local procedure GenerateContosoInboundEDocuments()
+ var
+ CreateVendor: Codeunit "Create Vendor";
+ CreateGLAccount: Codeunit "Create G/L Account";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+ CreateDeferralTemplate: Codeunit "Create Deferral Template";
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100;
+ ITServicesFebruaryLbl: Label 'IT Services Support period: February', MaxLength = 100;
+ ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
+ ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
+ ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
+ begin
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(), '',
+ 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419', 144);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425', 456);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437', 48);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456', 168);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479', 384);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.ConsultantServices(),
+ ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938', 0);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
+ '', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(),
+ '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::"G/L Account", CreateGLAccount.DeliveryExpenses(),
+ GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
+ ContosoInboundEDocument.Generate();
+
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982', 9962.5);
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
+ '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.AddEDocPurchaseLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
+ '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
+ end;
+
+}
diff --git a/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateEDocSampleInvSE.Codeunit.al b/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateEDocSampleInvSE.Codeunit.al
new file mode 100644
index 0000000000..f20ca6ceb7
--- /dev/null
+++ b/Apps/SE/EDocument_SE/demo data/3.Transactions/CreateEDocSampleInvSE.Codeunit.al
@@ -0,0 +1,57 @@
+// ------------------------------------------------------------------------------------------------
+// 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.DemoData.Common;
+using Microsoft.DemoData.Finance;
+using Microsoft.DemoData.Jobs;
+using Microsoft.DemoData.Purchases;
+using Microsoft.eServices.EDocument.DemoData;
+using Microsoft.eServices.EDocument.Processing.Import.Purchase;
+using Microsoft.Purchases.Document;
+
+codeunit 11253 "Create E-Doc Sample Inv. SE"
+{
+ Access = Internal;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ var
+ EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
+ CreateVendor: Codeunit "Create Vendor";
+ CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
+ CreateJobItem: Codeunit "Create Job Item";
+ CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
+ CreateDemoEDocsSE: Codeunit "Create Demo EDocs SE";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
+
+ trigger OnRun()
+ var
+ YearlyLicenstCostLbl: Label 'Yearly license cost mapped to a G/L account';
+ BasicCoffeeEquipmentLbl: Label 'Basic coffee equipment mapped to vendor''s Item References';
+ CoffeeBeansAndPartsLbl: Label 'Coffee beans and parts with shipping cost that needs human intervention';
+ begin
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.ExportFabrikam(), '108239', CoffeeBeansAndPartsLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(), '', 50, 180, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateJobItem.ItemConsumable(), '', 50, 65, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateDemoEDocsSE.GetShipmentDHLInvoiceDescription(), 1, 60, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.DomesticWorldImporter(), '108240', BasicCoffeeEquipmentLbl, 9962.5);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(), '', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(), '', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+
+ EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108426', YearlyLicenstCostLbl);
+ EDocSamplePurchaseInvoice.AddLine(
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 1, 5000, '', CreateCommonUnitOfMeasure.Piece());
+ EDocSamplePurchaseInvoice.Generate();
+ end;
+}
diff --git a/Apps/SE/EDocument_SE/demo data/EDocDemodataSE.Codeunit.al b/Apps/SE/EDocument_SE/demo data/EDocDemodataSE.Codeunit.al
new file mode 100644
index 0000000000..a284708a3b
--- /dev/null
+++ b/Apps/SE/EDocument_SE/demo data/EDocDemodataSE.Codeunit.al
@@ -0,0 +1,34 @@
+// ------------------------------------------------------------------------------------------------
+// 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 11251 "E-Doc. Demodata SE"
+{
+ 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":
+ begin
+ Codeunit.Run(Codeunit::"Create Demo EDocs SE");
+ Codeunit.Run(Codeunit::"Create E-Doc Sample Inv. SE");
+ end;
+ end;
+ end;
+}
diff --git a/Apps/SE/EDocument_SE/demo data/ExtensionLogo.png b/Apps/SE/EDocument_SE/demo data/ExtensionLogo.png
new file mode 100644
index 0000000000..79a3aa399d
Binary files /dev/null and b/Apps/SE/EDocument_SE/demo data/ExtensionLogo.png differ
diff --git a/Apps/SE/EDocument_SE/demo data/app.json b/Apps/SE/EDocument_SE/demo data/app.json
new file mode 100644
index 0000000000..21eeb8880e
--- /dev/null
+++ b/Apps/SE/EDocument_SE/demo data/app.json
@@ -0,0 +1,58 @@
+{
+ "id": "b9c4d8e0-5f67-4b23-9c8d-4e8f6a2d0b3c",
+ "name": "E-Document Core Demo Data (SE)",
+ "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": "28.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": "28.0.0.0"
+ },
+ {
+ "id": "de0dddf3-9917-430d-8d20-6e7679a08500",
+ "name": "E-Document Core Demo Data",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5a0b41e9-7a42-4123-d521-2265186cfb31",
+ "name": "Contoso Coffee Demo Dataset",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5b0a41a1-7b42-4123-a521-2265356bab31",
+ "name": "Contoso Coffee Demo Dataset (SE)",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 11251,
+ "to": 11260
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "application": "28.0.0.0",
+ "target": "OnPrem",
+ "features": [
+ "TranslationFile"
+ ]
+}
diff --git a/Apps/SE/IntrastatSE/app/AppResources/DataExchDefMap.xml b/Apps/SE/IntrastatSE/app/AppResources/DataExchDefMap.xml
index fe3998761b..9e9ee0c9d4 100644
--- a/Apps/SE/IntrastatSE/app/AppResources/DataExchDefMap.xml
+++ b/Apps/SE/IntrastatSE/app/AppResources/DataExchDefMap.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateAccScheduleNameUS.Codeunit.al b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateAccScheduleNameUS.Codeunit.al
index abbd73801d..d615ac5e95 100644
--- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateAccScheduleNameUS.Codeunit.al
+++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateAccScheduleNameUS.Codeunit.al
@@ -59,11 +59,11 @@ codeunit 11492 "Create Acc. Schedule Name US"
BalanceSheetAuditLbl: Label 'Balance Sheet Audit Lead Schedule', MaxLength = 80;
BalanceSheetAuditTok: Label 'BS AUDIT', MaxLength = 10, Comment = 'Balance Sheet';
BalanceSheetDetailedTok: Label 'BS DET', MaxLength = 10, Comment = 'Balance Sheet Audit Lead Schedule';
- BalanceSheetInternalDescriptionLbl: Label 'A comprehensive row layout presenting a balance sheet structure with grouped sections for current assets, long-term assets, liabilities, and equity. This layout includes detailed account ranges and formulas to calculate totals such as total assets, total liabilities, and equity, ensuring alignment with accounting principles. Useful for financial position reporting, compliance statements, and period-end reconciliations.', MaxLength = 500;
+ BalanceSheetInternalDescriptionLbl: Label 'A comprehensive row layout presenting a full balance sheet structure with grouped sections for current assets, long-term assets, liabilities, and equity. This layout includes detailed account ranges and formulas to calculate totals such as total assets, total liabilities, and equity, ensuring alignment with accounting principles. Useful for financial position reporting, compliance statements, and period-end reconciliations.', MaxLength = 500;
BalanceSheetLbl: Label 'Balance Sheet', MaxLength = 80;
BalanceSheetSummarizedTok: Label 'BS SUM', MaxLength = 10, Comment = 'Balance Sheet Summarized';
BalanceSheetTok: Label 'BS', MaxLength = 10, Comment = 'Balance Sheet';
- IncomeStatementAuditInternalDescriptionLbl: Label 'An audit-focused row layout detailing a full income statement with granular account-level breakdowns for revenue streams, cost of goods, and operating expenses. Includes subsections for product, job, and service revenue, materials, labor, overhead, and detailed expense categories, plus formulas for gross margin, operating totals, and net income or loss. Useful for audit lead schedules, variance analysis, and supporting financial statement verification.', MaxLength = 500;
+ IncomeStatementAuditInternalDescriptionLbl: Label 'An audit-focused row layout detailing a full income statement with granular breakdowns for revenue streams, cost of goods, and operating expenses. Includes posting account ranges for product, job, and service revenue, materials, labor, overhead, and detailed expense categories, plus formulas for gross margin, operating totals, and net income or loss. Useful for audit lead schedules, variance analysis, and supporting financial statement verification.', MaxLength = 500;
IncomeStatementAuditLbl: Label 'Income Statement Audit Lead Schedule', MaxLength = 80;
IncomeStatementAuditTok: Label 'IS AUDIT', MaxLength = 10, Comment = 'Income Statement Audit Lead Schedule';
IncomeStatementInternalDescriptionLbl: Label 'A comprehensive multi-section row layout structuring a full income statement with detailed sections for revenue, cost of goods, operating expenses, and calculated margins. This layout includes posting account ranges for product, job, and service revenue, materials, labor, overhead, and expenses, plus formulas for gross margin, operating totals, and net income or loss. Useful for comprehensive profitability reporting, variance analysis, and financial statement preparation.', MaxLength = 500;
diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateColumnLayoutNameUS.Codeunit.al b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateColumnLayoutNameUS.Codeunit.al
index 4aafe50214..c1fea2c95d 100644
--- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateColumnLayoutNameUS.Codeunit.al
+++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateColumnLayoutNameUS.Codeunit.al
@@ -37,13 +37,13 @@ codeunit 11487 "Create Column Layout Name US"
end;
var
- PeriodandYeartoDateInternalDescriptionLbl: Label 'Two-column layout displaying figures for the current period and year-to-date using net change and net amount from general ledger entries. This structure provides a clear view of short-term performance alongside cumulative totals, enabling quick comparisons and trend analysis. Useful for income statement reporting, monitoring monthly results against overall progress, and supporting management decisions with accurate period and year-to-date financial insights.', MaxLength = 500;
+ PeriodandYeartoDateInternalDescriptionLbl: Label 'Two-column layout displaying figures for the current period and year-to-date using net change and net amount from ledger entries. This structure provides a clear view of short-term performance alongside cumulative totals, enabling quick comparisons and trend analysis. Useful for income statement reporting, monitoring monthly results against overall progress, and supporting management decisions with accurate period and year-to-date financial insights.', MaxLength = 500;
PeriodandYeartoDateLbl: Label 'Period and Year to Date', MaxLength = 80;
PeriodandYeartoDateTok: Label 'PTD + YTD', MaxLength = 10;
PeriodandYeartoDatewithPercentofTotalRevenueLbl: Label 'Period and Year to Date with Percent of Total Revenue', MaxLength = 80;
PeriodandYeartoDatewithPercentofTotalRevenueTok: Label 'PTD+YTD+%', MaxLength = 10;
- PeriodandYeartoDatewithPercentTotalRevenueInternalDescriptionLbl: Label 'Four-column layout displaying current period and year-to-date amounts along with percentages of total revenue for each. Combines actual and budget data using net amounts from general ledger entries and formulas for PTD% and YTD%. Ideal for monitoring short-term and cumulative performance, evaluating revenue contribution, and comparing actuals against budgets in financial analysis and reporting.', MaxLength = 500;
- ThisYeartoDatevsPriorYeartoDateInternalDescriptionLbl: Label 'Five-column layout comparing current year-to-date and prior year-to-date amounts, including percentage contributions for each and a calculated difference column. Uses net amounts from general ledger entries with formulas for CUR%, PRIOR%, and CUR-PRIOR. Useful for trend analysis, evaluating year-over-year performance, and identifying growth or decline across financial periods in reports.', MaxLength = 500;
+ PeriodandYeartoDatewithPercentTotalRevenueInternalDescriptionLbl: Label 'Four-column layout displaying current period and year-to-date amounts along with percentages of total revenue for each. Combines actual and budget data using net amounts from ledger entries and formulas for PTD% and YTD%. Ideal for monitoring short-term and cumulative performance, evaluating revenue contribution, and comparing actuals against budgets in financial analysis and reporting.', MaxLength = 500;
+ ThisYeartoDatevsPriorYeartoDateInternalDescriptionLbl: Label 'Five-column layout comparing current year-to-date and prior year-to-date amounts, including percentage contributions for each and a calculated difference column. Uses net amounts from ledger entries with formulas for CUR%, PRIOR%, and CUR-PRIOR. Useful for trend analysis, evaluating year-over-year performance, and identifying growth or decline across financial periods in reports.', MaxLength = 500;
ThisYeartoDatevsPriorYeartoDateLbl: Label 'This Year to Date vs. Prior Year to Date', MaxLength = 80;
ThisYeartoDatevsPriorYeartoDateTok: Label 'YTDCOMPARE', MaxLength = 10;
}
diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateFinancialReportUS.Codeunit.al b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateFinancialReportUS.Codeunit.al
index 61b839342e..f7b9148f96 100644
--- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateFinancialReportUS.Codeunit.al
+++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/1.Setup Data/CreateFinancialReportUS.Codeunit.al
@@ -45,16 +45,16 @@ codeunit 11497 "Create Financial Report US"
end;
var
- BalanceSheetAuditInternalDescriptionLbl: Label 'Provides a detailed audit-focused balance sheet layout with sections for cash, receivables, inventory, prepaid expenses, fixed assets, liabilities, and equity, including granular account-level rows and reconciliation formulas for accuracy. Incorporates twelve columns showing month-end balances for the current fiscal year to highlight trends and seasonal changes. Useful for audit preparation, variance analysis, compliance reviews, and monitoring monthly financial position shifts.', MaxLength = 500;
+ BalanceSheetAuditInternalDescriptionLbl: Label 'Provides an audit-focused balance sheet layout with detailed rows for cash, receivables, inventory, prepaid expenses, fixed assets, liabilities, and equity, including reconciliation formulas for accuracy. Incorporates twelve columns showing month-end balances for the current fiscal year to highlight trends and seasonal changes. Useful for audit preparation, variance analysis, compliance reviews, and monitoring monthly financial position shifts.', MaxLength = 500;
BalanceSheetAuditLbl: Label 'Balance Sheet Audit Lead Schedule', MaxLength = 80;
BalanceSheetAuditTok: Label 'BS AUDIT', MaxLength = 10, Comment = 'Balance Sheet';
- BalanceSheetInternalDescriptionLbl: Label 'Presents a complete balance sheet structure with grouped sections and subsections for assets, liabilities, and equity, including totals per section and formulas for total liabilities and equity, and check figure for accuracy. A single column shows a snapshot of the balance as of a specific date. Useful for reporting financial position, preparing compliance statements, validating balances, and supporting period-end reconciliations and reviews.', MaxLength = 500;
+ BalanceSheetInternalDescriptionLbl: Label 'Presents a complete balance sheet structure with grouped sections for assets, liabilities, and equity, including formulas for totals like total assets and total liabilities. Shows data with a single-column balance snapshot as of a specific date for accurate figures. Useful for reporting financial position, preparing compliance statements, validating balances, and supporting period-end reconciliations and reviews.', MaxLength = 500;
BalanceSheetLbl: Label 'Balance Sheet', MaxLength = 80;
BalanceSheetTok: Label 'BS', MaxLength = 10, Comment = 'Balance Sheet';
IncomeStatementAuditInternalDescriptionLbl: Label 'Provides an audit-focused income statement layout with granular breakdowns, covering revenue streams, cost of goods, and operating expenses with account ranges for product, job, and service revenue, materials, labor, overhead, and detailed expense categories, plus formulas for gross margin, operating totals, and net income or loss. Displays two columns for current period and year-to-date figures. Useful for audit lead schedules, variance analysis, and financial statement verification.', MaxLength = 500;
IncomeStatementAuditLbl: Label 'Income Statement Audit Lead Schedule', MaxLength = 80;
IncomeStatementAuditTok: Label 'IS AUDIT', MaxLength = 10, Comment = 'Income Statement Audit Lead Schedule';
- IncomeStatementInternalDescriptionLbl: Label 'Provides a summarized income statement with sections for revenue, cost of goods, operating expenses, with subrows for account ranges related to product, job, and service revenue, materials, labor, overhead, and expenses, plus formulas for gross margin, operating totals, net income or loss, and check figure for accuracy. A single column shows net change for the selected period. Useful for profitability reporting, variance analysis, and accurate financial statement preparation.', MaxLength = 500;
+ IncomeStatementInternalDescriptionLbl: Label 'Structures a comprehensive multi-section income statement, detailing revenue, cost of goods, operating expenses, and calculated margins with account ranges for product, job, and service revenue, materials, labor, overhead, and expenses, plus formulas for gross margin, operating totals, and net income or loss. Displays figures in a single column showing net change for the selected period. Useful for profitability reporting, variance analysis, and accurate financial statement preparation.', MaxLength = 500;
IncomeStatementLbl: Label 'Income Statement', MaxLength = 80;
IncomeStatementTok: Label 'IS', MaxLength = 10, Comment = 'Income Statement';
NetChangeTok: Label 'M-NETCHANG', MaxLength = 10, Comment = 'Net Change';
diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/2.Master Data/CreateAllocationAccountUS.Codeunit.al b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/2.Master Data/CreateAllocationAccountUS.Codeunit.al
index ad09a61472..c78b59eb67 100644
--- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/2.Master Data/CreateAllocationAccountUS.Codeunit.al
+++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/Finance/2.Master Data/CreateAllocationAccountUS.Codeunit.al
@@ -5,9 +5,6 @@
namespace Microsoft.DemoData.Finance;
-using Microsoft.DemoTool.Helpers;
-using Microsoft.Finance.AllocationAccount;
-
codeunit 11458 "Create Allocation Account US"
{
InherentEntitlements = X;
@@ -15,21 +12,12 @@ codeunit 11458 "Create Allocation Account US"
trigger OnRun()
var
- AllocationAccount: Record "Allocation Account";
- AllocAccountDistribution: Record "Alloc. Account Distribution";
- ContosoAllocationAccount: Codeunit "Contoso Allocation Account";
- CreateDimensionValue: Codeunit "Create Dimension Value";
+ FinanceModuleSetup: Record "Finance Module Setup";
CreateUSGLAccounts: Codeunit "Create US GL Accounts";
begin
- ContosoAllocationAccount.InsertAllocationAccount(
- Licenses(), LicensesDescription(),
- 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", CreateUSGLAccounts.LicenseFeesRoyalties(), CreateDimensionValue.AdministrationDepartment(), '');
- ContosoAllocationAccount.InsertAllocationAccountDistribution(
- Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
- AllocAccountDistribution."Destination Account Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(), CreateDimensionValue.SalesDepartment(), '');
+ FinanceModuleSetup.Get();
+ FinanceModuleSetup."Yearly License All. GLAcc No." := CreateUSGLAccounts.LicenseFeesRoyalties();
+ FinanceModuleSetup.Modify();
end;
procedure Licenses(): Code[20]
diff --git a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/USContosoLocalization.Codeunit.al b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/USContosoLocalization.Codeunit.al
index a459ff5bfd..7608b7e050 100644
--- a/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/USContosoLocalization.Codeunit.al
+++ b/Apps/US/ContosoCoffeeDemoDatasetUS/app/DemoData/USContosoLocalization.Codeunit.al
@@ -82,7 +82,6 @@ codeunit 11465 "US Contoso Localization"
Codeunit.Run(Codeunit::"Create Tax Area US");
Codeunit.Run(Codeunit::"Create Tax Area Line US");
Codeunit.Run(Codeunit::"Create Tax Detail US");
- Codeunit.Run(Codeunit::"Create Allocation Account US");
CreateResourceUS.UpdateResourcesTaxGroup();
end;
end;
@@ -176,6 +175,8 @@ codeunit 11465 "US Contoso Localization"
Enum::"Contoso Demo Data Module"::Finance:
begin
+ if ContosoDemoDataLevel = Enum::"Contoso Demo Data Level"::"Master Data" then
+ Codeunit.Run(Codeunit::"Create Allocation Account US");
BindSubscription(CreateAccScheduleLineUS);
BindSubscription(CreateCurrencyUS);
BindSubscription(CreateGenJnlTemplateUS);
diff --git a/Apps/US/EDocument_US/demo data/3.Transactions/CreateDemoEDocsUS.Codeunit.al b/Apps/US/EDocument_US/demo data/3.Transactions/CreateDemoEDocsUS.Codeunit.al
index f3e026306b..4149e47f96 100644
--- a/Apps/US/EDocument_US/demo data/3.Transactions/CreateDemoEDocsUS.Codeunit.al
+++ b/Apps/US/EDocument_US/demo data/3.Transactions/CreateDemoEDocsUS.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 11503 "Create Demo EDocs US"
procedure GetShipmentDHLInvoiceDescription(): Text[100]
var
- ShipmentDHLLbl: Label 'Shipment, DHL', MaxLength = 100;
+ ShipmentDHLLbl: Label 'Shipment', MaxLength = 100;
begin
exit(ShipmentDHLLbl);
end;
@@ -40,7 +40,7 @@ codeunit 11503 "Create Demo EDocs US"
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateEDocumentMasterData: Codeunit "Create E-Document Master Data";
CreateJobItem: Codeunit "Create Job Item";
- CreateAllocationAccountUS: Codeunit "Create Allocation Account US";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
CreateDeferralTemplate: Codeunit "Create Deferral Template";
EDocSamplePurchaseInvoice: Codeunit "E-Doc Sample Purchase Invoice";
ITServicesJanuaryLbl: Label 'IT Services Support period: January', MaxLength = 100;
@@ -48,44 +48,48 @@ codeunit 11503 "Create Demo EDocs US"
ITServicesMarchLbl: Label 'IT Services Support period: March', MaxLength = 100;
ITServicesAprilLbl: Label 'IT Services Support period: April', MaxLength = 100;
ITServicesMayLbl: Label 'IT Services Support period: May', MaxLength = 100;
+ SavedWorkDate, SampleInvoiceDate : Date;
begin
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '245');
+ SavedWorkDate := WorkDate();
+ SampleInvoiceDate := EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate();
+ WorkDate(SampleInvoiceDate);
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.EUGraphicDesign(), SampleInvoiceDate, '245');
ContosoInboundEDocument.AddEDocPurchaseLine(
- Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccountUS.Licenses(),
+ Enum::"Purchase Line Type"::"Allocation Account", CreateAllocationAccount.Licenses(),
'', 6, 500, CreateDeferralTemplate.DeferralCode1Y(), '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1419');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1419');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(),
ITServicesJanuaryLbl, 6, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1425');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1425');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(),
ITServicesFebruaryLbl, 19, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1437');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1437');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(),
ITServicesMarchLbl, 2, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1456');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1456');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(),
ITServicesAprilLbl, 7, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '1479');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticFirstUp(), SampleInvoiceDate, '1479');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::"G/L Account", CreateUSGLAccounts.LicenseFeesRoyalties(),
ITServicesMayLbl, 16, 200, '', CreateCommonUnitOfMeasure.Hour());
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), 'F12938');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.ExportFabrikam(), SampleInvoiceDate, 'F12938');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.WholeDecafBeansColombia(),
'', 50, 5, '', CreateCommonUnitOfMeasure.Piece());
@@ -97,7 +101,7 @@ codeunit 11503 "Create Demo EDocs US"
GetShipmentDHLInvoiceDescription(), 1, 60, '', '');
ContosoInboundEDocument.Generate();
- ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), EDocSamplePurchaseInvoice.GetSampleInvoicePostingDate(), '000982');
+ ContosoInboundEDocument.AddEDocPurchaseHeader(CreateVendor.DomesticWorldImporter(), SampleInvoiceDate, '000982');
ContosoInboundEDocument.AddEDocPurchaseLine(
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.SmartGrindHome(),
'', 100, 299, '', CreateCommonUnitOfMeasure.Piece());
@@ -105,6 +109,7 @@ codeunit 11503 "Create Demo EDocs US"
Enum::"Purchase Line Type"::Item, CreateEDocumentMasterData.PrecisionGrindHome(),
'', 50, 199, '', CreateCommonUnitOfMeasure.Piece());
ContosoInboundEDocument.Generate();
+ WorkDate(SavedWorkDate);
end;
}
\ No newline at end of file
diff --git a/Apps/US/EDocument_US/demo data/3.Transactions/CreateEDocSampleInvUS.Codeunit.al b/Apps/US/EDocument_US/demo data/3.Transactions/CreateEDocSampleInvUS.Codeunit.al
index d5bfe67da7..e57cc9a908 100644
--- a/Apps/US/EDocument_US/demo data/3.Transactions/CreateEDocSampleInvUS.Codeunit.al
+++ b/Apps/US/EDocument_US/demo data/3.Transactions/CreateEDocSampleInvUS.Codeunit.al
@@ -25,7 +25,7 @@ codeunit 11504 "Create E-Doc Sample Inv. US"
CreateJobItem: Codeunit "Create Job Item";
CreateCommonUnitOfMeasure: Codeunit "Create Common Unit Of Measure";
CreateDemoEDocsUS: Codeunit "Create Demo EDocs US";
- CreateAllocationAccountUS: Codeunit "Create Allocation Account US";
+ CreateAllocationAccount: Codeunit "Create Allocation Account";
trigger OnRun()
var
@@ -51,7 +51,7 @@ codeunit 11504 "Create E-Doc Sample Inv. US"
EDocSamplePurchaseInvoice.AddInvoice(CreateVendor.EUGraphicDesign(), '108427', YearlyLicenstCostLbl);
EDocSamplePurchaseInvoice.AddLine(
- Enum::"Purchase Line Type"::" ", '', CreateAllocationAccountUS.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
+ Enum::"Purchase Line Type"::" ", '', CreateAllocationAccount.LicensesDescription(), 6, 500, '', CreateCommonUnitOfMeasure.Piece());
EDocSamplePurchaseInvoice.Generate();
end;
}
\ No newline at end of file
diff --git a/Apps/US/HybridSL_US/app/Permissions/SLD365TeamMemberHSLUS.PermissionSetExt.al b/Apps/US/HybridSL_US/app/Permissions/SLD365TeamMemberExtHSLUS.PermissionSetExt.al
similarity index 100%
rename from Apps/US/HybridSL_US/app/Permissions/SLD365TeamMemberHSLUS.PermissionSetExt.al
rename to Apps/US/HybridSL_US/app/Permissions/SLD365TeamMemberExtHSLUS.PermissionSetExt.al
diff --git a/Apps/US/HybridSL_US/app/Permissions/SLIntelligentCloudHSLUS.PermissionSetExt.al b/Apps/US/HybridSL_US/app/Permissions/SLIntelligentCloudExtHSLUS.PermissionSetExt.al
similarity index 100%
rename from Apps/US/HybridSL_US/app/Permissions/SLIntelligentCloudHSLUS.PermissionSetExt.al
rename to Apps/US/HybridSL_US/app/Permissions/SLIntelligentCloudExtHSLUS.PermissionSetExt.al
diff --git a/Apps/US/HybridSL_US/app/app.json b/Apps/US/HybridSL_US/app/app.json
index 5b08701c72..8fe2e242d9 100644
--- a/Apps/US/HybridSL_US/app/app.json
+++ b/Apps/US/HybridSL_US/app/app.json
@@ -11,6 +11,8 @@
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"contextSensitiveHelpUrl": "https://learn.microsoft.com/dynamics365/business-central/",
"logo": "ExtensionLogo.png",
+ "platform": "28.0.0.0",
+ "application": "28.0.0.0",
"dependencies": [
{
"id": "58623bfa-0559-4bc2-ae1c-0979c29fd9e0",
@@ -18,7 +20,7 @@
"publisher": "Microsoft",
"version": "28.0.0.0"
},
- {
+ {
"id": "237981b4-9e3c-437c-9b92-988aae978e8f",
"publisher": "Microsoft",
"name": "Dynamics SL Migration",
@@ -30,16 +32,14 @@
"publisher": "Microsoft",
"version": "28.0.0.0"
}
- ],
+ ],
"idRanges": [
- {
+ {
"from": 47200,
"to": 47399
}
],
"screenshots": [],
- "platform": "28.0.0.0",
- "application": "28.0.0.0",
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
@@ -48,4 +48,4 @@
"features": [
"NoImplicitWith"
]
-}
\ No newline at end of file
+}
diff --git a/Apps/US/HybridSL_US/app/src/Codeunits/SLCloudMigrationUS.Codeunit.al b/Apps/US/HybridSL_US/app/src/Codeunits/SLCloudMigrationUS.Codeunit.al
index 6476b2b9f3..dcfd7d09cb 100644
--- a/Apps/US/HybridSL_US/app/src/Codeunits/SLCloudMigrationUS.Codeunit.al
+++ b/Apps/US/HybridSL_US/app/src/Codeunits/SLCloudMigrationUS.Codeunit.al
@@ -5,8 +5,8 @@
namespace Microsoft.DataMigration.SL;
-using System.Integration;
using Microsoft.Finance.VAT.Reporting;
+using System.Integration;
codeunit 47203 "SL Cloud Migration US"
{
diff --git a/Apps/US/HybridSL_US/app/src/Codeunits/SLPopulateVendor1099Data.Codeunit.al b/Apps/US/HybridSL_US/app/src/Codeunits/SLPopulateVendor1099Data.Codeunit.al
index bb09ad4160..7b535a9049 100644
--- a/Apps/US/HybridSL_US/app/src/Codeunits/SLPopulateVendor1099Data.Codeunit.al
+++ b/Apps/US/HybridSL_US/app/src/Codeunits/SLPopulateVendor1099Data.Codeunit.al
@@ -67,13 +67,13 @@ codeunit 47201 "SL Populate Vendor 1099 Data"
LogMessage(MessageCodeSkippedTxt, 'SL Vendor Next 1099 Year Data Migration is not enabled on the SL Company Migration Configuration page.');
SLCurr1099Yr := SLVendor1099MappingHelpers.GetCurrent1099YearFromSLAPSetup();
- if SLCurr1099Yr <> 0 then begin
+ if SLCurr1099Yr <> 0 then
Current1099YearOpen := SLVendor1099MappingHelpers.GetCurrent1099YearOpenStatus();
- end;
+
SLNext1099Yr := SLVendor1099MappingHelpers.GetNext1099YearFromSLAPSetup();
- if SLNext1099Yr <> 0 then begin
+ if SLNext1099Yr <> 0 then
Next1099YearOpen := SLVendor1099MappingHelpers.GetNext1099YearOpenStatus();
- end;
+
if not Current1099YearOpen and not Next1099YearOpen then begin
LogMessage(MessageCodeAbortedTxt, 'Neither the SL Current 1099 Year nor the Next 1099 Year is open for data entry.');
exit;
@@ -115,8 +115,6 @@ codeunit 47201 "SL Populate Vendor 1099 Data"
DataMigrationFacadeHelper: Codeunit "Data Migration Facade Helper";
SLHelperFunctions: Codeunit "SL Helper Functions";
CurrentYear: Integer;
- Day31: Integer;
- Month12: Integer;
NextYear: Integer;
VendorTaxBatchCode: Code[10];
begin
@@ -566,7 +564,6 @@ codeunit 47201 "SL Populate Vendor 1099 Data"
GenJournalBatch: Record "Gen. Journal Batch";
GenJournalLine: Record "Gen. Journal Line";
SL1099YearJournalBatchName: Code[20];
- NextYearJournalBatchName: Code[20];
begin
SL1099YearJournalBatchName := VendorTaxBatchNameTxt + Format(SL1099Year);
GenJournalLine.SetRange("Journal Batch Name", SL1099YearJournalBatchName);
diff --git a/Apps/US/HybridSL_US/app/src/Pages/SL1099MigrationLog.Page.al b/Apps/US/HybridSL_US/app/src/Pages/SL1099MigrationLogList.Page.al
similarity index 100%
rename from Apps/US/HybridSL_US/app/src/Pages/SL1099MigrationLog.Page.al
rename to Apps/US/HybridSL_US/app/src/Pages/SL1099MigrationLogList.Page.al
diff --git a/Apps/US/HybridSL_US/app/src/TableExt/SLCompanyAddSettingsExt.TableExt.al b/Apps/US/HybridSL_US/app/src/TableExt/SLCompanyAddSettingsExt.TableExt.al
index e9e690444e..b87bc9ab9e 100644
--- a/Apps/US/HybridSL_US/app/src/TableExt/SLCompanyAddSettingsExt.TableExt.al
+++ b/Apps/US/HybridSL_US/app/src/TableExt/SLCompanyAddSettingsExt.TableExt.al
@@ -10,7 +10,7 @@ tableextension 47200 "SL Company Add. Settings Ext." extends "SL Company Additio
{
fields
{
- field(57200; "Migrate Current 1099 Year"; Boolean)
+ field(47200; "Migrate Current 1099 Year"; Boolean)
{
Caption = 'Migrate Current 1099 Year';
InitValue = true;
@@ -26,7 +26,7 @@ tableextension 47200 "SL Company Add. Settings Ext." extends "SL Company Additio
end;
end;
}
- field(57201; "Migrate Next 1099 Year"; Boolean)
+ field(47201; "Migrate Next 1099 Year"; Boolean)
{
Caption = 'Migrate Next 1099 Year';
InitValue = true;
diff --git a/Apps/US/HybridSL_US/test/app.json b/Apps/US/HybridSL_US/test/app.json
index b64c58b0f9..17255c2408 100644
--- a/Apps/US/HybridSL_US/test/app.json
+++ b/Apps/US/HybridSL_US/test/app.json
@@ -4,14 +4,18 @@
"publisher": "Microsoft",
"version": "28.0.0.0",
"brief": "Tests for migrating Microsoft Dynamics SL Vendor 1099 Data to Dynamics 365 Business Central",
- "description": "Tests for the Dynamics SL Migration - US extension.",
- "resourceFolders": [".resources"],
+ "description": "Tests for the Dynamics SL Migration - US extension.",
+ "resourceFolders": [
+ ".resources"
+ ],
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://go.microsoft.com/fwlink/?linkid=2009037",
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2285106",
- "logo": "ExtensionLogo.png",
+ "logo": "ExtensionLogo.png",
+ "platform": "28.0.0.0",
+ "application": "28.0.0.0",
"dependencies": [
{
"id": "237981b4-9e3c-437c-9b92-988aae978e8f",
@@ -39,8 +43,6 @@
}
],
"screenshots": [],
- "platform": "28.0.0.0",
- "application": "28.0.0.0",
"idRanges": [
{
"from": 147650,
@@ -55,4 +57,4 @@
"features": [
"NoImplicitWith"
]
-}
\ No newline at end of file
+}
diff --git a/Apps/US/HybridSL_US/test/src/SLAPBalancesData.XmlPort.al b/Apps/US/HybridSL_US/test/src/SLAPBalancesData.XmlPort.al
index 1cc5ec81e6..344dfe7544 100644
--- a/Apps/US/HybridSL_US/test/src/SLAPBalancesData.XmlPort.al
+++ b/Apps/US/HybridSL_US/test/src/SLAPBalancesData.XmlPort.al
@@ -94,7 +94,7 @@ xmlport 147658 "SL AP Balances Data"
end;
SLAPBalances.VendID := VendID;
- SLAPBalances.CpnyID := CpnyID;
+ SLAPBalances.CpnyID := CopyStr(CpnyID, 1, MaxStrLen(SLAPBalances.CpnyID));
Evaluate(SLAPBalances.CYBox00, CYBox00);
Evaluate(SLAPBalances.CYBox01, CYBox01);
Evaluate(SLAPBalances.CYBox02, CYBox02);
diff --git a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocsImpl.Codeunit.al b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocsImpl.Codeunit.al
index 272fe67722..e5f6c1cff1 100644
--- a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocsImpl.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocsImpl.Codeunit.al
@@ -147,32 +147,43 @@ codeunit 10036 "IRS 1099 Form Docs Impl." implements "IRS 1099 Create Form Docs"
if TempIRS1099FormDocHeader.FindSet() then
repeat
TempDocID := TempIRS1099FormDocHeader.ID;
- IRS1099FormDocHeader := TempIRS1099FormDocHeader;
- IRS1099FormDocHeader.ID := 0;
- IRS1099FormDocHeader.Validate("Vendor No.");
- IRS1099FormDocHeader.Insert(true);
- IRS1099FormDocHeaderIDs.Add(IRS1099FormDocHeader.ID);
+ // Skip creating form document if no lines have "Include In 1099" = true
TempIRS1099FormDocLine.SetRange("Document ID", TempDocID);
- if TempIRS1099FormDocLine.FindSet() then
- repeat
- IRS1099FormDocLine := TempIRS1099FormDocLine;
- IRS1099FormDocLine.Validate("Document ID", IRS1099FormDocHeader.ID);
- IRS1099FormDocLine.Validate(Amount, IRS1099FormDocLine.Amount);
- IRS1099FormDocLine.Insert(true);
- if IRSFormsSetup."Collect Details For Line" then begin
- TempIRS1099FormDocLineDetail.SetRange("Document ID", TempDocID);
- TempIRS1099FormDocLineDetail.SetRange("Line No.", TempIRS1099FormDocLine."Line No.");
- if TempIRS1099FormDocLineDetail.FindSet() then
- repeat
- IRS1099FormDocLineDetail := TempIRS1099FormDocLineDetail;
- IRS1099FormDocLineDetail.Validate("Document ID", IRS1099FormDocLine."Document ID");
- IRS1099FormDocLineDetail.Insert(true);
- until TempIRS1099FormDocLineDetail.Next() = 0;
- end;
- until TempIRS1099FormDocLine.Next() = 0;
+ TempIRS1099FormDocLine.SetRange("Include In 1099", true);
+ if TempIRS1099FormDocLine.IsEmpty() then begin
+ TempIRS1099FormDocLine.SetRange("Include In 1099");
+ TempIRS1099FormDocLine.SetRange("Document ID");
+ end else begin
+ TempIRS1099FormDocLine.SetRange("Include In 1099");
+ IRS1099FormDocHeader := TempIRS1099FormDocHeader;
+ IRS1099FormDocHeader.ID := 0;
+ IRS1099FormDocHeader.Validate("Vendor No.");
+ IRS1099FormDocHeader.Insert(true);
+ IRS1099FormDocHeaderIDs.Add(IRS1099FormDocHeader.ID);
+ TempIRS1099FormDocLine.SetRange("Document ID", TempDocID);
+ if TempIRS1099FormDocLine.FindSet() then
+ repeat
+ IRS1099FormDocLine := TempIRS1099FormDocLine;
+ IRS1099FormDocLine.Validate("Document ID", IRS1099FormDocHeader.ID);
+ IRS1099FormDocLine.Validate(Amount, IRS1099FormDocLine.Amount);
+ IRS1099FormDocLine.Insert(true);
+ if IRSFormsSetup."Collect Details For Line" then begin
+ TempIRS1099FormDocLineDetail.SetRange("Document ID", TempDocID);
+ TempIRS1099FormDocLineDetail.SetRange("Line No.", TempIRS1099FormDocLine."Line No.");
+ if TempIRS1099FormDocLineDetail.FindSet() then
+ repeat
+ IRS1099FormDocLineDetail := TempIRS1099FormDocLineDetail;
+ IRS1099FormDocLineDetail.Validate("Document ID", IRS1099FormDocLine."Document ID");
+ IRS1099FormDocLineDetail.Insert(true);
+ until TempIRS1099FormDocLineDetail.Next() = 0;
+ end;
+ until TempIRS1099FormDocLine.Next() = 0;
+ TempIRS1099FormDocLine.SetRange("Document ID");
+ end;
until TempIRS1099FormDocHeader.Next() = 0;
end;
+
procedure AddTempFormLineFromBuffer(var TempIRS1099FormDocLine: Record "IRS 1099 Form Doc. Line" temporary; var TempIRS1099FormDocLineDetail: Record "IRS 1099 Form Doc. Line Detail" temporary; var TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary; LineAction: Enum "IRS 1099 Form Doc. Line Action")
var
CurrVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer";
diff --git a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocuments.Page.al b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocuments.Page.al
index 26f598930c..f2b0ccbd08 100644
--- a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocuments.Page.al
+++ b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocuments.Page.al
@@ -103,6 +103,24 @@ page 10036 "IRS 1099 Form Documents"
IRS1099FormDocument.RecreateForm(Rec);
end;
}
+ action(DeleteSelected)
+ {
+ Caption = 'Delete Selected';
+ Image = Delete;
+ Scope = Repeater;
+ ToolTip = 'Delete all selected IRS 1099 form documents.';
+
+ trigger OnAction()
+ var
+ IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
+ begin
+ IRS1099FormDocHeader := Rec;
+ CurrPage.SetSelectionFilter(IRS1099FormDocHeader);
+ if not IRS1099FormDocHeader.IsEmpty() then
+ if Confirm(DeleteSelectedQst, false) then
+ IRS1099FormDocHeader.DeleteAll(true);
+ end;
+ }
action(ReleaseAll)
{
Caption = 'Release All';
@@ -261,6 +279,7 @@ page 10036 "IRS 1099 Form Documents"
var
PeriodIsVisible: Boolean;
+ DeleteSelectedQst: Label 'Do you want to delete the selected IRS 1099 form documents?';
trigger OnOpenPage()
begin
diff --git a/Apps/US/IRSForms/app/src/Extensions/IRS1099BaseAppSubscribers.Codeunit.al b/Apps/US/IRSForms/app/src/Extensions/IRS1099BaseAppSubscribers.Codeunit.al
index a57762f9a3..57edfcffd1 100644
--- a/Apps/US/IRSForms/app/src/Extensions/IRS1099BaseAppSubscribers.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Extensions/IRS1099BaseAppSubscribers.Codeunit.al
@@ -133,6 +133,15 @@ codeunit 10032 "IRS 1099 BaseApp Subscribers"
PurchLine."1099 Liable" := (PurchHeader."IRS 1099 Form Box No." <> '')
end;
+ [EventSubscriber(ObjectType::Table, Database::"Standard Vendor Purchase Code", 'OnApplyStdCodesToPurchaseLinesOnAfterPurchLineInsert', '', false, false)]
+ local procedure Update1099LiableOnApplyStdCodesToPurchaseLinesOnAfterPurchLineInsert(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var StandardPurchaseLine: Record "Standard Purchase Line")
+ begin
+ if PurchaseLine."1099 Liable" = (PurchaseHeader."IRS 1099 Form Box No." <> '') then
+ exit;
+ PurchaseLine."1099 Liable" := (PurchaseHeader."IRS 1099 Form Box No." <> '');
+ PurchaseLine.Modify();
+ end;
+
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Page Management", 'OnConditionalCardPageIDNotFound', '', true, true)]
local procedure OnConditionalCardPageIDNotFound(RecordRef: RecordRef; var CardPageID: Integer);
begin
diff --git a/Apps/US/IRSForms/app/src/IRIS/GenerateXmlFileIRIS.Codeunit.al b/Apps/US/IRSForms/app/src/IRIS/GenerateXmlFileIRIS.Codeunit.al
index 23b40d11d9..af4014779c 100644
--- a/Apps/US/IRSForms/app/src/IRIS/GenerateXmlFileIRIS.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/IRIS/GenerateXmlFileIRIS.Codeunit.al
@@ -17,7 +17,7 @@ codeunit 10033 "Generate Xml File IRIS"
var
Helper: Codeunit "Helper IRIS";
- KeyVaultClient: Codeunit "Key Vault Client IRIS";
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
FeatureTelemetry: Codeunit "Feature Telemetry";
SubmissionIdGlobal: Integer;
RecordIdGlobal: Integer;
@@ -147,7 +147,7 @@ codeunit 10033 "Generate Xml File IRIS"
AddTransmitterInfo();
Helper.AppendXmlNode('VendorCd', 'I');
- Helper.AppendXmlNode('SoftwareId', KeyVaultClient.GetSoftwareId());
+ Helper.AppendXmlNode('SoftwareId', IRSFormsFacade.GetSoftwareId());
Helper.AppendXmlNode('TotalIssuerFormCnt', 'N'); // updated after all forms are added
@@ -176,7 +176,7 @@ codeunit 10033 "Generate Xml File IRIS"
GetMicrosoftData(TIN, CompanyName, StreetAddress, CityName, StateCode, PostCode, ContactName, ContactEmail, ContactPhone);
Helper.AppendXmlNode('TIN', Helper.FormatTIN(TIN));
Helper.AppendXmlNode('TINSubmittedTypeCd', 'BUSINESS_TIN');
- Helper.AppendXmlNode('TransmitterControlCd', KeyVaultClient.GetTCC());
+ Helper.AppendXmlNode('TransmitterControlCd', IRSFormsFacade.GetTCC());
Helper.AppendXmlNode('ForeignEntityInd', '0');
AddBusinessName(CompanyName);
@@ -328,7 +328,7 @@ codeunit 10033 "Generate Xml File IRIS"
ContactPerson := Helper.FormatContactPersonName(CompanyInformation."Contact Person");
PhoneNo := Helper.FormatPhoneNumber(CompanyInformation."Phone No.");
Email := CompanyInformation."E-Mail";
- if (ContactPerson = '') and (PhoneNo = '') and (Email = '') then
+ if ContactPerson = '' then
exit;
Helper.AddParentXmlNode('ContactPersonInformationGrp');
@@ -636,7 +636,7 @@ codeunit 10033 "Generate Xml File IRIS"
local procedure GetTestFileIndicator(): Text[1]
begin
- if KeyVaultClient.TestMode() then
+ if IRSFormsFacade.TestMode() then
exit('T'); // T for Test
exit('P'); // P for Production
@@ -835,7 +835,7 @@ codeunit 10033 "Generate Xml File IRIS"
StateCode := 'WA';
PostCode := '98052';
- KeyVaultClient.GetContactInfo(ContactName, ContactEmail, ContactPhone);
+ IRSFormsFacade.GetContactInfo(ContactName, ContactEmail, ContactPhone);
end;
procedure CreateGetStatusRequest(SearchParamType: Enum "Search Param Type IRIS"; SearchId: Text; var TempBlob: Codeunit "Temp Blob")
@@ -846,7 +846,7 @@ codeunit 10033 "Generate Xml File IRIS"
Error(EmptySearchIdErr);
InitGetStatusDocElement();
- Helper.AppendXmlNode('TransmitterControlCd', KeyVaultClient.GetTCC());
+ Helper.AppendXmlNode('TransmitterControlCd', IRSFormsFacade.GetTCC());
Helper.AppendXmlNode('SearchTypeCd', 'S'); // S - Status request (status only)
Helper.AppendXmlNode('SearchParameterTypeCd', Format(SearchParamType));
Helper.AppendXmlNode('SearchId', SearchId);
@@ -865,7 +865,7 @@ codeunit 10033 "Generate Xml File IRIS"
Error(EmptySearchIdErr);
InitGetStatusDocElement();
- Helper.AppendXmlNode('TransmitterControlCd', KeyVaultClient.GetTCC());
+ Helper.AppendXmlNode('TransmitterControlCd', IRSFormsFacade.GetTCC());
Helper.AppendXmlNode('SearchTypeCd', 'A'); // A - Acknowledgement request (status and errors)
Helper.AppendXmlNode('SearchParameterTypeCd', Format(SearchParamType));
Helper.AppendXmlNode('SearchId', SearchId);
diff --git a/Apps/US/IRSForms/app/src/IRIS/HelperIRIS.Codeunit.al b/Apps/US/IRSForms/app/src/IRIS/HelperIRIS.Codeunit.al
index 6b7630c0bf..eafc94c70b 100644
--- a/Apps/US/IRSForms/app/src/IRIS/HelperIRIS.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/IRIS/HelperIRIS.Codeunit.al
@@ -16,7 +16,7 @@ codeunit 10035 "Helper IRIS"
InherentPermissions = X;
var
- KeyVaultClient: Codeunit "Key Vault Client IRIS";
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
XMLDOMManagement: Codeunit "XML DOM Management";
TypeHelper: Codeunit "Type Helper";
XMLDoc: XmlDocument;
@@ -51,7 +51,7 @@ codeunit 10035 "Helper IRIS"
procedure CreateUniqueTransmissionIdentifier(): Text[100]
begin
// example of UTID: da20a4de-1357-11ed-861d-0242ac120002:IRIS:00000::A
- exit(StrSubstNo(UTIDTxt, CreateUUID(), GetApplicationID(), KeyVaultClient.GetTCC(), GetRequestType()));
+ exit(StrSubstNo(UTIDTxt, CreateUUID(), GetApplicationID(), IRSFormsFacade.GetTCC(), GetRequestType()));
end;
procedure CreateUUID(): Text[36]
diff --git a/Apps/US/IRSForms/app/src/IRIS/KeyVaultClientIRIS.Codeunit.al b/Apps/US/IRSForms/app/src/IRIS/KeyVaultClientIRIS.Codeunit.al
index d414648426..20ada8b0a5 100644
--- a/Apps/US/IRSForms/app/src/IRIS/KeyVaultClientIRIS.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/IRIS/KeyVaultClientIRIS.Codeunit.al
@@ -8,7 +8,7 @@ using System.Azure.KeyVault;
using System.Environment;
using System.Telemetry;
-codeunit 10057 "Key Vault Client IRIS"
+codeunit 10057 "Key Vault Client IRIS" implements "IRS 1099 IRIS Configuration"
{
Access = Internal;
InherentEntitlements = X;
@@ -37,6 +37,7 @@ codeunit 10057 "Key Vault Client IRIS"
ValueIsEmptyUserErr: Label '%1 value from Azure Key Vault is empty. Try the operation again later. If the issue persists, open a Business Central support request.', Comment = '%1 - parameter name, ex. Client ID';
ContactInfoIncorrectJSONErr: Label 'Cannot create JSON object from Contact Info string.';
+ #region Interface Methods
procedure GetTCC() TCC: Text
var
TCCKey: Text;
@@ -52,6 +53,62 @@ codeunit 10057 "Key Vault Client IRIS"
LogEmptyValueError('0000P7P', 'TCC', TCCKey);
end;
+ procedure GetSoftwareId() SoftwareID: Text
+ begin
+ if not AzureKeyVault.GetAzureKeyVaultSecret(SoftwareIDKeyTok, SoftwareID) then
+ LogKeyVaultError('0000P7Q', 'Software ID', SoftwareIDKeyTok);
+ if SoftwareID = '' then
+ LogEmptyValueError('0000P7Q', 'Software ID', SoftwareIDKeyTok);
+ end;
+
+ procedure GetConsentAppURL() ConsentAppURL: Text
+ begin
+ if not AzureKeyVault.GetAzureKeyVaultSecret(ConsentAppURLKeyTok, ConsentAppURL) then
+ FeatureTelemetry.LogError('0000P7U', Helper.GetIRISFeatureName(), '', StrSubstNo(CannotGetValueFromKeyVaultErr, 'Consent App URL', ConsentAppURLKeyTok));
+ if ConsentAppURL = '' then
+ FeatureTelemetry.LogError('0000P7U', Helper.GetIRISFeatureName(), '', StrSubstNo(ValueFromKeyVaultIsEmptyErr, 'Consent App URL', ConsentAppURLKeyTok));
+ end;
+
+ procedure GetContactInfo(var ContactName: Text; var ContactEmail: Text; var ContactPhone: Text)
+ var
+ ContactInfoJSONText: Text;
+ ContactInfoJSON: JsonObject;
+ JToken: JsonToken;
+ begin
+ if not AzureKeyVault.GetAzureKeyVaultSecret(ContactInfoKeyTok, ContactInfoJSONText) then begin
+ FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', StrSubstNo(CannotGetValueFromKeyVaultErr, 'Contact Info', ContactInfoKeyTok));
+ exit;
+ end;
+ if ContactInfoJSONText = '' then begin
+ FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', StrSubstNo(ValueFromKeyVaultIsEmptyErr, 'Contact Info', ContactInfoKeyTok));
+ exit;
+ end;
+
+ if not ContactInfoJSON.ReadFrom(ContactInfoJSONText) then begin
+ FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', ContactInfoIncorrectJSONErr);
+ exit;
+ end;
+
+ if ContactInfoJSON.Get('ContactName', JToken) then
+ ContactName := JToken.AsValue().AsText();
+ if ContactInfoJSON.Get('ContactEmail', JToken) then
+ ContactEmail := JToken.AsValue().AsText();
+ if ContactInfoJSON.Get('ContactPhone', JToken) then
+ ContactPhone := JToken.AsValue().AsText();
+ end;
+
+ procedure TestMode(): Boolean
+ var
+ EnvironmentInformation: Codeunit "Environment Information";
+ begin
+ if EnvironmentInformation.IsSandbox() then
+ exit(true);
+
+ exit(false);
+ end;
+ #endregion Interface Methods
+
+ #region Internal Methods
procedure GetSubmitEndpointURL() EndpointURL: Text
var
EndpointKey: Text;
@@ -82,14 +139,6 @@ codeunit 10057 "Key Vault Client IRIS"
LogEmptyValueError('0000PA9', 'Status Endpoint URL', EndpointKey);
end;
- procedure GetSoftwareId() SoftwareID: Text
- begin
- if not AzureKeyVault.GetAzureKeyVaultSecret(SoftwareIDKeyTok, SoftwareID) then
- LogKeyVaultError('0000P7Q', 'Software ID', SoftwareIDKeyTok);
- if SoftwareID = '' then
- LogEmptyValueError('0000P7Q', 'Software ID', SoftwareIDKeyTok);
- end;
-
procedure GetAPIClientIDFromKV(): Text[36]
var
APIClientID: Text;
@@ -117,42 +166,6 @@ codeunit 10057 "Key Vault Client IRIS"
LogEmptyValueError('0000P7T', 'Auth URL', AuthURLKeyTok);
end;
- procedure GetConsentAppURL() ConsentAppURL: Text
- begin
- if not AzureKeyVault.GetAzureKeyVaultSecret(ConsentAppURLKeyTok, ConsentAppURL) then
- FeatureTelemetry.LogError('0000P7U', Helper.GetIRISFeatureName(), '', StrSubstNo(CannotGetValueFromKeyVaultErr, 'Consent App URL', ConsentAppURLKeyTok));
- if ConsentAppURL = '' then
- FeatureTelemetry.LogError('0000P7U', Helper.GetIRISFeatureName(), '', StrSubstNo(ValueFromKeyVaultIsEmptyErr, 'Consent App URL', ConsentAppURLKeyTok));
- end;
-
- procedure GetContactInfo(var ContactName: Text; var ContactEmail: Text; var ContactPhone: Text)
- var
- ContactInfoJSONText: Text;
- ContactInfoJSON: JsonObject;
- JToken: JsonToken;
- begin
- if not AzureKeyVault.GetAzureKeyVaultSecret(ContactInfoKeyTok, ContactInfoJSONText) then begin
- FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', StrSubstNo(CannotGetValueFromKeyVaultErr, 'Contact Info', ContactInfoKeyTok));
- exit;
- end;
- if ContactInfoJSONText = '' then begin
- FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', StrSubstNo(ValueFromKeyVaultIsEmptyErr, 'Contact Info', ContactInfoKeyTok));
- exit;
- end;
-
- if not ContactInfoJSON.ReadFrom(ContactInfoJSONText) then begin
- FeatureTelemetry.LogError('0000PAB', Helper.GetIRISFeatureName(), '', ContactInfoIncorrectJSONErr);
- exit;
- end;
-
- if ContactInfoJSON.Get('ContactName', JToken) then
- ContactName := JToken.AsValue().AsText();
- if ContactInfoJSON.Get('ContactEmail', JToken) then
- ContactEmail := JToken.AsValue().AsText();
- if ContactInfoJSON.Get('ContactPhone', JToken) then
- ContactPhone := JToken.AsValue().AsText();
- end;
-
procedure GetCertificate() Certificate: Text
var
CertificateName: Text;
@@ -163,6 +176,7 @@ codeunit 10057 "Key Vault Client IRIS"
if not AzureKeyVault.GetAzureKeyVaultCertificate(CertificateName, Certificate) then
LogKeyVaultError('0000P7W', 'Certificate', CertificateName);
end;
+ #endregion Internal Methods
local procedure LogKeyVaultError(EventId: Text; ParameterName: Text; KeyName: Text)
begin
@@ -177,14 +191,4 @@ codeunit 10057 "Key Vault Client IRIS"
if GuiAllowed() then
Error(ValueIsEmptyUserErr, ParameterName);
end;
-
- procedure TestMode(): Boolean
- var
- EnvironmentInformation: Codeunit "Environment Information";
- begin
- if EnvironmentInformation.IsSandbox() then
- exit(true);
-
- exit(false);
- end;
-}
\ No newline at end of file
+}
diff --git a/Apps/US/IRSForms/app/src/IRIS/ProcessResponseIRIS.Codeunit.al b/Apps/US/IRSForms/app/src/IRIS/ProcessResponseIRIS.Codeunit.al
index 65b95c7208..37320d8f28 100644
--- a/Apps/US/IRSForms/app/src/IRIS/ProcessResponseIRIS.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/IRIS/ProcessResponseIRIS.Codeunit.al
@@ -19,8 +19,11 @@ codeunit 10047 "Process Response IRIS"
AckNamespaceUriTxt: Label 'urn:us:gov:treasury:irs:ir', Locked = true;
AckNamespacePrefixTxt: Label 'n1', Locked = true;
ParseSubmitTransmResponseEventTxt: Label 'ParseSubmitTransmissionResponse', Locked = true;
+ PreReceiptValidationEventTxt: Label 'PreReceiptValidation', Locked = true;
ReceiptIDNotFoundErr: Label 'Receipt ID was not found in the response.';
ReceiptIDEmptyErr: Label 'Empty Receipt ID was found in the response.';
+ PreReceiptValidationFailedTxt: Label 'Pre-receipt validation failed', Locked = true;
+ XmlSchemaValidationErrorTok: Label 'XML Schema Validation Error', Locked = true;
procedure GetReceiptID(ResponseContentBlob: Codeunit "Temp Blob"; var ReceiptID: Text[100]): Boolean
var
@@ -294,4 +297,18 @@ codeunit 10047 "Process Response IRIS"
TempErrorInfo."Xml Element Path" := CopyStr(XmlElementPath, 1, MaxStrLen(TempErrorInfo."Xml Element Path"));
TempErrorInfo.Insert(true);
end;
-}
\ No newline at end of file
+
+ procedure PreReceiptValidationFailed(var TempErrorInfo: Record "Error Information IRIS" temporary): Boolean
+ begin
+ // Pre-receipt validation errors indicate that the transmission was rejected before processing.
+ // In this case, even if a Receipt ID is returned, the transmission status should not be updated.
+ TempErrorInfo.Reset();
+ TempErrorInfo.SetRange("Error Code", XmlSchemaValidationErrorTok);
+ if not TempErrorInfo.IsEmpty() then begin
+ FeatureTelemetry.LogError('0000RH0', Helper.GetIRISFeatureName(), PreReceiptValidationEventTxt, PreReceiptValidationFailedTxt);
+ exit(true);
+ end;
+
+ exit(false);
+ end;
+}
diff --git a/Apps/US/IRSForms/app/src/IRIS/ProcessTransmissionIRIS.Codeunit.al b/Apps/US/IRSForms/app/src/IRIS/ProcessTransmissionIRIS.Codeunit.al
index 99f8075c50..3e99512977 100644
--- a/Apps/US/IRSForms/app/src/IRIS/ProcessTransmissionIRIS.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/IRIS/ProcessTransmissionIRIS.Codeunit.al
@@ -26,6 +26,7 @@ codeunit 10056 "Process Transmission IRIS"
RequestAcknowledgEventTxt: Label 'RequestAcknowledgment', Locked = true;
FormDocsUpdateStartedEventTxt: Label 'FormDocsUpdateStarted', Locked = true;
FormDocsUpdateCompletedEventTxt: Label 'FormDocsUpdateCompleted', Locked = true;
+ ReceiptIDUpdatedEventTxt: Label 'ReceiptIDUpdated', Locked = true;
TransmCanOnlyBeSentInSaaSErr: Label 'The transmission can only be sent electronically in the SaaS environment.';
TransmHasOpenedOrAbandonedDocsQst: Label 'The transmission contains opened or/and abandoned 1099 form documents which will not be sent to the IRS.\ Do you want to continue?';
TransmissionNotSentErr: Label 'The transmission has not been sent yet and cannot be replaced or corrected.';
@@ -281,15 +282,20 @@ codeunit 10056 "Process Transmission IRIS"
exit; // the error is shown inside SubmitTransmission
if ProcessResponse.GetReceiptID(ResponseContentBlob, ReceiptID) then
- UpdateReceiptID(TransmissionLog, Transmission, TransmissionType, TempIRS1099FormDocHeader, ReceiptID);
+ UpdateTransmissionLog(TransmissionLog, ReceiptID);
SetDocumentsInProgress(Transmission."Document ID");
Commit(); // save transmission log record before requesting the status
Sleep(3000); // wait for IRIS to process the transmission
RequestAcknowledgement(ReceiptID, UniqueTransmissionId, TransmissionStatus, SubmissionsStatus, TempErrorInfo);
- UpadateTransmissionStatus(Transmission, TransmissionStatus, SubmissionsStatus);
SetTransmissionErrors(Transmission."Document ID", UniqueTransmissionId, SubmissionsStatus, TempErrorInfo);
+
+ if ProcessResponse.PreReceiptValidationFailed(TempErrorInfo) then
+ exit;
+
+ UpdateReceiptID(Transmission, TransmissionType, TempIRS1099FormDocHeader, ReceiptID);
+ UpadateTransmissionStatus(Transmission, TransmissionStatus, SubmissionsStatus);
end;
procedure RequestStatus(ReceiptID: Text[100]; UniqueTransmissionId: Text[100]; var TransmissionStatus: Text)
@@ -461,6 +467,15 @@ codeunit 10056 "Process Transmission IRIS"
until TransmissionLogLine.Next() = 0;
end;
+ local procedure UpdateTransmissionLog(var TransmissionLog: Record "Transmission Log IRIS"; ReceiptID: Text[100])
+ begin
+ if ReceiptID = '' then
+ exit;
+
+ TransmissionLog."Receipt ID" := ReceiptID;
+ TransmissionLog.Modify(true);
+ end;
+
procedure SetTransmissionErrors(TransmissionDocumentID: Integer; UniqueTransmissionId: Text[100]; SubmissionsStatus: Dictionary of [Text, Text]; var TempErrorInfo: Record "Error Information IRIS" temporary)
var
ErrorInfo: Record "Error Information IRIS";
@@ -545,16 +560,13 @@ codeunit 10056 "Process Transmission IRIS"
ErrorInfoPage.Run();
end;
- local procedure UpdateReceiptID(var TransmissionLog: Record "Transmission Log IRIS"; var Transmission: Record "Transmission IRIS"; TransmissionType: Enum "Transmission Type IRIS"; var TempIRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" temporary; ReceiptID: Text[100])
+ local procedure UpdateReceiptID(var Transmission: Record "Transmission IRIS"; TransmissionType: Enum "Transmission Type IRIS"; var TempIRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" temporary; ReceiptID: Text[100])
var
IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
begin
if ReceiptID = '' then
exit;
- TransmissionLog."Receipt ID" := ReceiptID;
- TransmissionLog.Modify(true);
-
if Transmission."Receipt ID" = ReceiptID then
exit;
@@ -565,6 +577,8 @@ codeunit 10056 "Process Transmission IRIS"
Transmission."Receipt ID" := ReceiptID;
Transmission.Modify(true);
+ FeatureTelemetry.LogUsage('0000RGZ', Helper.GetIRISFeatureName(), ReceiptIDUpdatedEventTxt);
+
// update Receipt ID in the IRS 1099 Form Documents sent in this transmission
if TempIRS1099FormDocHeader.FindSet() then
repeat
@@ -577,10 +591,14 @@ codeunit 10056 "Process Transmission IRIS"
procedure UpadateTransmissionStatus(var Transmission: Record "Transmission IRIS"; TransmStatusText: Text; SubmissionsStatus: Dictionary of [Text, Text])
var
TransmissionStatus: Enum "Transmission Status IRIS";
+ CustomDimensions: Dictionary of [Text, Text];
+ PrevTransmStatusText: Text;
begin
if TransmStatusText = '' then
exit;
+ PrevTransmStatusText := Format(Transmission.Status);
+
if not Evaluate(TransmissionStatus, TransmStatusText) then begin
FeatureTelemetry.LogError('0000PSM', Helper.GetIRISFeatureName(), 'UpadateTransmissionStatus', StrSubstNo(UnexpectedStatusErr, TransmStatusText));
Message(UnexpectedStatusUserErr, TransmStatusText);
@@ -589,6 +607,10 @@ codeunit 10056 "Process Transmission IRIS"
Transmission.Validate(Status, TransmissionStatus);
Transmission.Modify(true);
+ CustomDimensions.Add('PreviousTransmissionStatus', PrevTransmStatusText);
+ CustomDimensions.Add('NewTransmissionStatus', TransmStatusText);
+ FeatureTelemetry.LogUsage('0000RGM', Helper.GetIRISFeatureName(), 'TransmissionStatusUpdated', CustomDimensions);
+
UpdateSubmissionsStatusAndReceiptId(Transmission, SubmissionsStatus);
end;
diff --git a/Apps/US/IRSForms/app/src/IRIS/SetupIRISUserID.Page.al b/Apps/US/IRSForms/app/src/IRIS/SetupIRISUserID.Page.al
index 6d8411f38f..4e7ec95d58 100644
--- a/Apps/US/IRSForms/app/src/IRIS/SetupIRISUserID.Page.al
+++ b/Apps/US/IRSForms/app/src/IRIS/SetupIRISUserID.Page.al
@@ -65,7 +65,7 @@ page 10068 "Setup IRIS User ID"
trigger OnDrillDown()
begin
- Message(GetIRISUserIDInstructionsTxt, KeyVaultClient.GetConsentAppURL());
+ Message(GetIRISUserIDInstructionsTxt, IRSFormsFacade.GetConsentAppURL());
end;
}
}
@@ -89,7 +89,7 @@ page 10068 "Setup IRIS User ID"
var
ConsentAppURL: Text;
begin
- ConsentAppURL := KeyVaultClient.GetConsentAppURL();
+ ConsentAppURL := IRSFormsFacade.GetConsentAppURL();
if ConsentAppURL = '' then
ConsentAppURL := ConsentAppURLTxt;
Hyperlink(ConsentAppURL);
@@ -119,7 +119,7 @@ page 10068 "Setup IRIS User ID"
IRSFormsSetup: Record "IRS Forms Setup";
UserParamsIRIS: Record "User Params IRIS";
Helper: Codeunit "Helper IRIS";
- KeyVaultClient: Codeunit "Key Vault Client IRIS";
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
OAuthClient: Codeunit "OAuth Client IRIS";
FeatureTelemetry: Codeunit "Feature Telemetry";
IRISAPIClientID: Text[36];
diff --git a/Apps/US/IRSForms/app/src/IRIS/TransmissionIRIS.Page.al b/Apps/US/IRSForms/app/src/IRIS/TransmissionIRIS.Page.al
index f9f5eae813..e8a7ff14b2 100644
--- a/Apps/US/IRSForms/app/src/IRIS/TransmissionIRIS.Page.al
+++ b/Apps/US/IRSForms/app/src/IRIS/TransmissionIRIS.Page.al
@@ -250,7 +250,7 @@ page 10058 "Transmission IRIS"
{
Caption = 'Request Status';
Image = Status;
- ToolTip = 'Request the status of the transmission from the IRS using Receipt ID. Use this action if the transmission was sent and the status was not updated or when the status is Processing.';
+ ToolTip = 'Request the status of the transmission from the IRS using Receipt ID. Use this action if the transmission was sent and the status was not updated or when the status is Processing. This action requires a Receipt ID to be assigned to the transmission.';
trigger OnAction()
var
@@ -270,8 +270,9 @@ page 10058 "Transmission IRIS"
UniqueTransmissionId := TransmissionLog."Unique Transmission ID";
ProcessTransmission.RequestAcknowledgement(Rec."Receipt ID", UniqueTransmissionId, TransmissionStatus, SubmissionsStatus, TempErrorInfo);
- ProcessTransmission.UpadateTransmissionStatus(Rec, TransmissionStatus, SubmissionsStatus);
ProcessTransmission.SetTransmissionErrors(Rec."Document ID", UniqueTransmissionId, SubmissionsStatus, TempErrorInfo);
+ if not ProcessResponse.PreReceiptValidationFailed(TempErrorInfo) then
+ ProcessTransmission.UpadateTransmissionStatus(Rec, TransmissionStatus, SubmissionsStatus);
Sleep(500);
ProcessDialog.Close();
@@ -281,8 +282,7 @@ page 10058 "Transmission IRIS"
{
Caption = 'Request Status by UTID';
Image = Status;
- ToolTip = 'Request the status of the transmission from the IRS using Unique Transmission Id. Use this action if the transmission was sent and the status was not updated or when the status is Processing.';
- Visible = false; // hidden because status is requested by Receipt ID by default
+ ToolTip = 'Request the status of the transmission from the IRS using Unique Transmission ID. Use this action when the Receipt ID is not available, for example, when a pre-receipt validation error (such as XML Schema Validation Error) was returned and the Receipt ID was not saved to the transmission record.';
trigger OnAction()
var
@@ -301,8 +301,9 @@ page 10058 "Transmission IRIS"
UniqueTransmissionId := TransmissionLog."Unique Transmission ID";
ProcessTransmission.RequestAcknowledgement('', UniqueTransmissionId, TransmissionStatus, SubmissionsStatus, TempErrorInfo);
- ProcessTransmission.UpadateTransmissionStatus(Rec, TransmissionStatus, SubmissionsStatus);
ProcessTransmission.SetTransmissionErrors(Rec."Document ID", UniqueTransmissionId, SubmissionsStatus, TempErrorInfo);
+ if not ProcessResponse.PreReceiptValidationFailed(TempErrorInfo) then
+ ProcessTransmission.UpadateTransmissionStatus(Rec, TransmissionStatus, SubmissionsStatus);
Sleep(500);
ProcessDialog.Close();
@@ -391,6 +392,7 @@ page 10058 "Transmission IRIS"
var
ProcessTransmission: Codeunit "Process Transmission IRIS";
+ ProcessResponse: Codeunit "Process Response IRIS";
ConfirmMgt: Codeunit "Confirm Management";
StatusStyle: Text;
ErrorInfoCaption: Text;
@@ -413,17 +415,17 @@ page 10058 "Transmission IRIS"
ConfirmAssignReceiptIDQst: Label 'Are you sure you want to assign the Receipt ID to the transmission manually?';
OverwriteReceiptIDQst: Label 'The transmission already has a Receipt ID. Do you want to overwrite it?';
SendOrigTransmConsentTxt: Label 'By choosing this action, you consent to use third party systems. These systems may have their own terms of use, license, pricing and privacy, and they may not meet the same compliance and security standards as Microsoft Dynamics 365 Business Central. Your privacy is important to us.';
- ReceiptIDNotAssignedErr: Label 'The Receipt ID is not assigned to the transmission.\\ If the the Receipt ID was not received for some reason (e.g., the session times out or is terminated) or it is accidentally lost or deleted, request the Receipt ID from the IRIS help desk. You will be required to identify yourself and provide the unique transmission ID which can be found on Transmission History page.\\ After you receive the Receipt ID, use the Assign Receipt ID action to associate it with the transmission and then request the status of the transmission.';
+ ReceiptIDNotAssignedErr: Label 'The Receipt ID is not assigned to the transmission.\\ Possible reasons:\- Pre-receipt validation error (e.g., XML Schema Validation Error) - use Request Status by UTID action.\- Receipt ID was lost or not received - contact IRIS help desk, provide them Unique Transmission ID from Transmission History, then use Assign Receipt ID action to set it and Request Status action to update the status.';
UTIDNotFoundErr: Label 'Unable to get Unique Transmission Id from the transmission history, because it does not have any records for the current transmission.';
TestModeMsg: Label 'This transmission is in test mode. No data will be reported to the IRS. All data will be transmitted to the IRIS Assurance Testing System (IRIS ATS) for testing purposes.';
ErrorInfoCaptionTxt: Label 'Show %1 error(s)', Comment = '%1 - number of errors';
local procedure SetTestModeFields()
var
- KeyVaultClient: Codeunit "Key Vault Client IRIS";
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
begin
TestModeText := 'Test Mode';
- TestModeVisible := KeyVaultClient.TestMode();
+ TestModeVisible := IRSFormsFacade.TestMode();
end;
local procedure SetActionsVisibility()
diff --git a/Apps/US/IRSForms/app/src/Interface/IRS1099IRISConfiguration.Interface.al b/Apps/US/IRSForms/app/src/Interface/IRS1099IRISConfiguration.Interface.al
new file mode 100644
index 0000000000..be53376ddf
--- /dev/null
+++ b/Apps/US/IRSForms/app/src/Interface/IRS1099IRISConfiguration.Interface.al
@@ -0,0 +1,43 @@
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Reporting;
+
+///
+/// The interface to retrieve IRS 1099 IRIS configuration values.
+///
+interface "IRS 1099 IRIS Configuration"
+{
+ ///
+ /// Gets the Transmitter Control Code (TCC).
+ ///
+ /// The TCC value.
+ procedure GetTCC(): Text
+
+ ///
+ /// Gets the Software ID.
+ ///
+ /// The Software ID value.
+ procedure GetSoftwareId(): Text
+
+ ///
+ /// Gets the Consent Application URL.
+ ///
+ /// The Consent App URL value.
+ procedure GetConsentAppURL(): Text
+
+ ///
+ /// Gets the contact information.
+ ///
+ /// Returns the contact name.
+ /// Returns the contact email.
+ /// Returns the contact phone number.
+ procedure GetContactInfo(var ContactName: Text; var ContactEmail: Text; var ContactPhone: Text)
+
+ ///
+ /// Determines if the system is running in test mode.
+ ///
+ /// True if running in test mode, false otherwise.
+ procedure TestMode(): Boolean
+}
diff --git a/Apps/US/IRSForms/app/src/Interface/IRSFormsFacade.Codeunit.al b/Apps/US/IRSForms/app/src/Interface/IRSFormsFacade.Codeunit.al
index 8d007a0555..5288830d8b 100644
--- a/Apps/US/IRSForms/app/src/Interface/IRSFormsFacade.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Interface/IRSFormsFacade.Codeunit.al
@@ -74,4 +74,29 @@ codeunit 10054 "IRS Forms Facade"
begin
IRSFormsOrchestrator.GetIRISXmlImplementation().CreateAcknowledgmentRequestXmlContent(SearchParamType, SearchId, TempBlob);
end;
+
+ procedure GetTCC(): Text
+ begin
+ exit(IRSFormsOrchestrator.GetIRISConfigurationImplementation().GetTCC());
+ end;
+
+ procedure GetSoftwareId(): Text
+ begin
+ exit(IRSFormsOrchestrator.GetIRISConfigurationImplementation().GetSoftwareId());
+ end;
+
+ procedure GetConsentAppURL(): Text
+ begin
+ exit(IRSFormsOrchestrator.GetIRISConfigurationImplementation().GetConsentAppURL());
+ end;
+
+ procedure GetContactInfo(var ContactName: Text; var ContactEmail: Text; var ContactPhone: Text)
+ begin
+ IRSFormsOrchestrator.GetIRISConfigurationImplementation().GetContactInfo(ContactName, ContactEmail, ContactPhone);
+ end;
+
+ procedure TestMode(): Boolean
+ begin
+ exit(IRSFormsOrchestrator.GetIRISConfigurationImplementation().TestMode());
+ end;
}
diff --git a/Apps/US/IRSForms/app/src/Interface/IRSFormsImplementation.Enum.al b/Apps/US/IRSForms/app/src/Interface/IRSFormsImplementation.Enum.al
index 981498320a..92bce9da7b 100644
--- a/Apps/US/IRSForms/app/src/Interface/IRSFormsImplementation.Enum.al
+++ b/Apps/US/IRSForms/app/src/Interface/IRSFormsImplementation.Enum.al
@@ -4,19 +4,21 @@
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.VAT.Reporting;
-enum 10031 "IRS Forms Implementation" implements "IRS 1099 Create Form Docs", "IRS 1099 Printing", "IRS 1099 Form Box Calc.", "IRS 1099 IRIS Transmission", "IRS 1099 IRIS Xml"
+enum 10031 "IRS Forms Implementation" implements "IRS 1099 Create Form Docs", "IRS 1099 Printing", "IRS 1099 Form Box Calc.", "IRS 1099 IRIS Transmission", "IRS 1099 IRIS Xml", "IRS 1099 IRIS Configuration"
{
Extensible = true;
DefaultImplementation = "IRS 1099 Create Form Docs" = "IRS 1099 Form Docs Impl.",
"IRS 1099 Printing" = "IRS 1099 Printing Impl.",
"IRS 1099 Form Box Calc." = "IRS 1099 Form Box Calc. Impl.",
"IRS 1099 IRIS Transmission" = "IRS 1099 IRIS Impl.",
- "IRS 1099 IRIS Xml" = "IRS 1099 IRIS Impl.";
+ "IRS 1099 IRIS Xml" = "IRS 1099 IRIS Impl.",
+ "IRS 1099 IRIS Configuration" = "Key Vault Client IRIS";
UnknownValueImplementation = "IRS 1099 Create Form Docs" = "IRS 1099 Form Docs Impl.",
"IRS 1099 Printing" = "IRS 1099 Printing Impl.",
"IRS 1099 Form Box Calc." = "IRS 1099 Form Box Calc. Impl.",
"IRS 1099 IRIS Transmission" = "IRS 1099 IRIS Impl.",
- "IRS 1099 IRIS Xml" = "IRS 1099 IRIS Impl.";
+ "IRS 1099 IRIS Xml" = "IRS 1099 IRIS Impl.",
+ "IRS 1099 IRIS Configuration" = "Key Vault Client IRIS";
value(0; Standard)
{
diff --git a/Apps/US/IRSForms/app/src/Interface/IRSFormsOrchestrator.Codeunit.al b/Apps/US/IRSForms/app/src/Interface/IRSFormsOrchestrator.Codeunit.al
index a33b9d7e24..781a22b0d2 100644
--- a/Apps/US/IRSForms/app/src/Interface/IRSFormsOrchestrator.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Interface/IRSFormsOrchestrator.Codeunit.al
@@ -35,6 +35,11 @@ codeunit 10034 "IRS Forms Orchestrator"
exit(GetImplementation());
end;
+ procedure GetIRISConfigurationImplementation(): Interface "IRS 1099 IRIS Configuration"
+ begin
+ exit(GetImplementation());
+ end;
+
local procedure GetImplementation(): Enum "IRS Forms Implementation"
var
IRSFormsSetup: Record "IRS Forms Setup";
diff --git a/Apps/US/IRSForms/app/src/Printing/IRS1099Print.Report.al b/Apps/US/IRSForms/app/src/Printing/IRS1099Print.Report.al
index f4b0da7de0..d523e9d60a 100644
--- a/Apps/US/IRSForms/app/src/Printing/IRS1099Print.Report.al
+++ b/Apps/US/IRSForms/app/src/Printing/IRS1099Print.Report.al
@@ -128,7 +128,7 @@ report 10032 "IRS 1099 Print"
}
}
- trigger OnOpenPage()
+ trigger OnInit()
begin
IRS1099FormReportType := IRS1099FormReportType::"Copy B";
end;
diff --git a/Apps/US/IRSForms/app/src/Reporting/IRS1099VendorOverview.Page.al b/Apps/US/IRSForms/app/src/Reporting/IRS1099VendorOverview.Page.al
index ad44a113a0..3a6de179c8 100644
--- a/Apps/US/IRSForms/app/src/Reporting/IRS1099VendorOverview.Page.al
+++ b/Apps/US/IRSForms/app/src/Reporting/IRS1099VendorOverview.Page.al
@@ -87,6 +87,8 @@ page 10072 "IRS 1099 Vendor Overview"
begin
Rec.Reset();
Rec.DeleteAll();
+ TempVendFormBoxBuffer.Reset();
+ TempVendFormBoxBuffer.DeleteAll();
IRS1099CalcParameters."Period No." := IRSReportingPeriodNo;
IRSFormsFacade.GetVendorFormBoxAmount(TempVendFormBoxBuffer, IRS1099CalcParameters);
TempVendFormBoxBuffer.SetRange("Buffer Type", TempVendFormBoxBuffer."Buffer Type"::Amount);
diff --git a/Apps/US/IRSForms/app/src/Setup/IRSFormsData.Codeunit.al b/Apps/US/IRSForms/app/src/Setup/IRSFormsData.Codeunit.al
index 84e0272e42..c839ae0b64 100644
--- a/Apps/US/IRSForms/app/src/Setup/IRSFormsData.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Setup/IRSFormsData.Codeunit.al
@@ -9,8 +9,6 @@ using System.Reflection;
codeunit 10039 "IRS Forms Data"
{
- Access = Internal;
-
var
StatementLineFilterExpressionTxt: Label 'Form Box No.: %1', Comment = '%1 = Form Box No.';
diff --git a/Apps/US/IRSForms/app/src/Setup/IRSReportingPeriod.Codeunit.al b/Apps/US/IRSForms/app/src/Setup/IRSReportingPeriod.Codeunit.al
index 7a727ba6ae..1a4cce4d44 100644
--- a/Apps/US/IRSForms/app/src/Setup/IRSReportingPeriod.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/Setup/IRSReportingPeriod.Codeunit.al
@@ -169,12 +169,14 @@ codeunit 10042 "IRS Reporting Period"
IRS1099FormBox: Record "IRS 1099 Form Box";
IRS1099FormStatementLine: Record "IRS 1099 Form Statement Line";
IRS1099VendorFormBoxAdj: Record "IRS 1099 Vendor Form Box Adj.";
+ IRS1099FormInstruction: Record "IRS 1099 Form Instruction";
NewIRS1099Form: Record "IRS 1099 Form";
NewIRS1099FormBox: Record "IRS 1099 Form Box";
NewIRS1099FormStatementLine: Record "IRS 1099 Form Statement Line";
IRS1099VendorFormBoxSetup: Record "IRS 1099 Vendor Form Box Setup";
NewIRS1099VendorFormBoxSetup: Record "IRS 1099 Vendor Form Box Setup";
NewIRS1099VendorFormBoxAdj: Record "IRS 1099 Vendor Form Box Adj.";
+ NewIRS1099FormInstruction: Record "IRS 1099 Form Instruction";
begin
if FromPeriodNo = ToPeriodNo then
Error(SamePeriodFromAndPeriodToErr);
@@ -231,6 +233,15 @@ codeunit 10042 "IRS Reporting Period"
until IRS1099VendorFormBoxAdj.Next() = 0;
UpdateSummaryMessage(SetupCompletedMessage, SomethingHasBeenCopied, IRS1099VendorFormBoxAdj.TableCaption, IRS1099VendorFormBoxAdj.Count(), SummaryMessageCreated);
end;
+ IRS1099FormInstruction.SetRange("Period No.", FromPeriodNo);
+ if IRS1099FormInstruction.FindSet() then begin
+ repeat
+ NewIRS1099FormInstruction := IRS1099FormInstruction;
+ NewIRS1099FormInstruction."Period No." := ToPeriodNo;
+ NewIRS1099FormInstruction.Insert();
+ until IRS1099FormInstruction.Next() = 0;
+ UpdateSummaryMessage(SetupCompletedMessage, SomethingHasBeenCopied, IRS1099FormInstruction.TableCaption, IRS1099FormInstruction.Count(), SummaryMessageCreated);
+ end;
SummaryMessageCreated := true;
end;
diff --git a/Apps/US/IRSForms/app/src/VendorFormBox/IRS1099FormBoxCalcImpl.Codeunit.al b/Apps/US/IRSForms/app/src/VendorFormBox/IRS1099FormBoxCalcImpl.Codeunit.al
index c43a116ab2..139bfd22fe 100644
--- a/Apps/US/IRSForms/app/src/VendorFormBox/IRS1099FormBoxCalcImpl.Codeunit.al
+++ b/Apps/US/IRSForms/app/src/VendorFormBox/IRS1099FormBoxCalcImpl.Codeunit.al
@@ -64,18 +64,18 @@ codeunit 10041 "IRS 1099 Form Box Calc. Impl." implements "IRS 1099 Form Box Cal
VendorNo: Code[20]; IRSReportingPeriod: Record "IRS Reporting Period");
var
PmtVendLedgEntry: Record "Vendor Ledger Entry";
+ TempInteger: Record "Integer" temporary;
begin
FilterPaymentVendorLedgerEntries(PmtVendLedgEntry, IRSReportingPeriod);
if PmtVendLedgEntry.FindSet() then
repeat
- GetAppliedVendorEntriesFromtPmtEntry(IRS1099VendEntryBuffer, TempIRS1099Form, PmtVendLedgEntry, VendorNo);
+ GetAppliedVendorEntriesFromtPmtEntry(IRS1099VendEntryBuffer, TempIRS1099Form, TempInteger, PmtVendLedgEntry, VendorNo);
until PmtVendLedgEntry.Next() = 0;
end;
- local procedure GetAppliedVendorEntriesFromtPmtEntry(var IRS1099VendEntryBuffer: Record "IRS 1099 Vend. Entry Buffer"; var TempIRS1099Form: Record "IRS 1099 Form" temporary; PmtVendLedgEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20])
+ local procedure GetAppliedVendorEntriesFromtPmtEntry(var IRS1099VendEntryBuffer: Record "IRS 1099 Vend. Entry Buffer"; var TempIRS1099Form: Record "IRS 1099 Form" temporary; var TempInteger: Record "Integer" temporary; PmtVendLedgEntry: Record "Vendor Ledger Entry"; VendorNo: Code[20])
var
PmtDtldVendLedgEntry, InvDtldVendLedgEntry : Record "Detailed Vendor Ledg. Entry";
- TempInteger: Record "Integer" temporary;
PaymentDiscountEntries: List of [Integer];
begin
if (VendorNo <> '') and (PmtVendLedgEntry."Vendor No." <> VendorNo) then
diff --git a/Apps/US/IRSForms/test library/app.json b/Apps/US/IRSForms/test library/app.json
index 29b8fdbe9b..e81d695d47 100644
--- a/Apps/US/IRSForms/test library/app.json
+++ b/Apps/US/IRSForms/test library/app.json
@@ -34,6 +34,10 @@
{
"from": 148000,
"to": 148004
+ },
+ {
+ "from": 148023,
+ "to": 148024
}
],
"resourceExposurePolicy": {
diff --git a/Apps/US/IRSForms/test library/src/IRSFormsImplTest.EnumExt.al b/Apps/US/IRSForms/test library/src/IRSFormsImplTest.EnumExt.al
new file mode 100644
index 0000000000..dd3b69df04
--- /dev/null
+++ b/Apps/US/IRSForms/test library/src/IRSFormsImplTest.EnumExt.al
@@ -0,0 +1,13 @@
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Reporting;
+
+enumextension 148023 "IRS Forms Impl. Test" extends "IRS Forms Implementation"
+{
+ value(148023; Test)
+ {
+ Implementation = "IRS 1099 IRIS Configuration" = "Mock Key Vault Client IRIS";
+ }
+}
diff --git a/Apps/US/IRSForms/test library/src/LibraryIRS1099Document.Codeunit.al b/Apps/US/IRSForms/test library/src/LibraryIRS1099Document.Codeunit.al
index 6fe4c9227e..c7ff2ab1ec 100644
--- a/Apps/US/IRSForms/test library/src/LibraryIRS1099Document.Codeunit.al
+++ b/Apps/US/IRSForms/test library/src/LibraryIRS1099Document.Codeunit.al
@@ -13,6 +13,8 @@ codeunit 148001 "Library IRS 1099 Document"
{
var
LibraryUtility: Codeunit "Library - Utility";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryInventory: Codeunit "Library - Inventory";
LibraryIRSReportingPeriod: Codeunit "Library IRS Reporting Period";
LibraryIRS1099FormBox: Codeunit "Library IRS 1099 Form Box";
Assert: Codeunit "Assert";
@@ -66,6 +68,31 @@ codeunit 148001 "Library IRS 1099 Document"
IRS1099FormDocImpl.CreateFormDocs(TempVendFormBoxBuffer, IRS1099CalcParameters);
end;
+ procedure CreateAndPostPurchaseDocument(DocumentType: Enum "Purchase Document Type"; VendorNo: Code[20]; Year: Integer; FormNo: Code[20]; FormBoxNo: Code[20]) PostedDocNo: Code[20]
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ PostingDate: Date;
+ i: Integer;
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, DocumentType, VendorNo);
+ PostingDate := LibraryRandom.RandDateFrom(DMY2Date(1, 1, Year), 360);
+ PurchaseHeader.Validate("Posting Date", PostingDate);
+ PurchaseHeader.Validate("Document Date", PostingDate);
+ PurchaseHeader.Validate("IRS 1099 Reporting Period", Format(Year));
+ PurchaseHeader.Validate("IRS 1099 Form No.", FormNo);
+ PurchaseHeader.Validate("IRS 1099 Form Box No.", FormBoxNo);
+ PurchaseHeader.Modify(true);
+
+ for i := 1 to 2 do begin
+ LibraryPurchase.CreatePurchaseLine(PurchaseLine, PurchaseHeader, "Purchase Line Type"::Item, LibraryInventory.CreateItemNo(), LibraryRandom.RandIntInRange(10, 20));
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandDecInRange(100, 200, 2));
+ PurchaseLine.Modify(true);
+ end;
+
+ exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ end;
+
procedure MockInvVendLedgEntry(var VendLedgEntry: Record "Vendor Ledger Entry"; StartingDate: Date; EndingDate: Date; VendorNo: Code[20]; FormNo: Code[20]; FormBoxNo: Code[20]): Integer
begin
MockVendLedgEntry(VendLedgEntry, "Gen. Journal Document Type"::Invoice, StartingDate, EndingDate, VendorNo, FormNo, FormBoxNo);
@@ -285,4 +312,12 @@ codeunit 148001 "Library IRS 1099 Document"
Assert.RecordCount(IRS1099FormDocLine, ExpectedCount);
end;
+ procedure DeleteFormDocuments()
+ var
+ IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
+ begin
+ IRS1099FormDocHeader.ModifyAll(Status, Enum::"IRS 1099 Form Doc. Status"::Open, false);
+ IRS1099FormDocHeader.DeleteAll(true);
+ end;
+
}
diff --git a/Apps/US/IRSForms/test library/src/LibraryIRS1099IRIS.Codeunit.al b/Apps/US/IRSForms/test library/src/LibraryIRS1099IRIS.Codeunit.al
new file mode 100644
index 0000000000..9f901c5a84
--- /dev/null
+++ b/Apps/US/IRSForms/test library/src/LibraryIRS1099IRIS.Codeunit.al
@@ -0,0 +1,111 @@
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Reporting;
+
+using Microsoft.Bank.BankAccount;
+using Microsoft.Foundation.Address;
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Vendor;
+using System.Utilities;
+
+codeunit 148023 "Library - IRS 1099 IRIS"
+{
+ var
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryERM: Codeunit "Library - ERM";
+
+ #region Company
+ procedure InitializeCompanyInformation()
+ var
+ CompanyInformation: Record "Company Information";
+ PostCode: Record "Post Code";
+ begin
+ PostCode.Validate(Code, '60402');
+ PostCode.Validate(City, 'Berwyn');
+ PostCode.Validate(County, 'IL');
+ PostCode.Validate("Country/Region Code", 'US');
+ PostCode.Insert();
+ CompanyInformation.Get();
+ CompanyInformation.Name := LibraryUtility.GenerateGUID();
+ CompanyInformation."Federal ID No." := '00-0123456';
+ CompanyInformation.Validate("Post Code", PostCode.Code);
+ CompanyInformation.Address := '6201 Roosevelt Rd';
+ CompanyInformation.Modify();
+ end;
+
+ procedure InitializeIRSFormsSetup()
+ var
+ CompanyInformation: Record "Company Information";
+ IRSFormsSetup: Record "IRS Forms Setup";
+ begin
+ CompanyInformation.Get();
+ IRSFormsSetup.InitSetup();
+ IRSFormsSetup.Validate("Business Name Control", CopyStr(CompanyInformation.Name, 1, 4));
+ IRSFormsSetup.Implementation := "IRS Forms Implementation"::Test;
+ IRSFormsSetup.Modify(true);
+ end;
+ #endregion Company
+
+ #region Transmission
+ procedure CreateTransmission(var Transmission: Record "Transmission IRIS"; PeriodNo: Code[20])
+ var
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
+ ReportingYear: Code[4];
+ begin
+ ReportingYear := CopyStr(PeriodNo, 1, 4);
+ IRSFormsFacade.CreateTransmission(Transmission, ReportingYear);
+ Transmission.SetRange("Period No.", ReportingYear);
+ Transmission.FindFirst();
+ end;
+
+ procedure CreateTransmissionXmlContent(Transmission: Record "Transmission IRIS"; TransmissionType: Enum "Transmission Type IRIS"; IsTest: Boolean; var UniqueTransmissionId: Text[100]; var TempIRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" temporary; var TempBlob: Codeunit "Temp Blob")
+ var
+ IRSFormsFacade: Codeunit "IRS Forms Facade";
+ begin
+ IRSFormsFacade.CreateTransmissionXmlContent(Transmission, TransmissionType, IsTest, UniqueTransmissionId, TempIRS1099FormDocHeader, TempBlob);
+ end;
+
+ procedure DeleteAllTransmissions()
+ var
+ Transmission: Record "Transmission IRIS";
+ TransmissionLog: Record "Transmission Log IRIS";
+ TransmissionLogLine: Record "Transmission Log Line IRIS";
+ begin
+ TransmissionLogLine.DeleteAll(true);
+ TransmissionLog.DeleteAll(true);
+ Transmission.ModifyAll(Status, Enum::"Transmission Status IRIS"::None);
+ Transmission.DeleteAll(true);
+ end;
+ #endregion Transmission
+
+ #region Vendor
+ procedure CreateUSVendor(var Vendor: Record Vendor)
+ begin
+ CreateVendor(Vendor, 'US', 'IL');
+ end;
+
+ procedure CreateVendor(var Vendor: Record Vendor; CountryRegionCode: Code[10]; ProvinceOrStateName: Text[30])
+ var
+ PostCode: Record "Post Code";
+ PaymentMethod: Record "Payment Method";
+ begin
+ PostCode.Validate(Code, LibraryUtility.GenerateRandomNumericText(5));
+ PostCode.Validate(City, LibraryUtility.GenerateGUID());
+ PostCode.Validate(County, ProvinceOrStateName);
+ PostCode.Validate("Country/Region Code", CountryRegionCode);
+ PostCode.Insert();
+
+ LibraryERM.CreatePaymentMethodWithBalAccount(PaymentMethod);
+
+ Vendor.Get(LibraryPurchase.CreateVendorNo());
+ Vendor."Federal ID No." := '00-0654321';
+ Vendor.Validate("Post Code", PostCode.Code);
+ Vendor.Validate(Address, LibraryUtility.GenerateGUID());
+ Vendor.Validate("Payment Method Code", PaymentMethod.Code); // CASH payment method
+ Vendor.Modify();
+ end;
+ #endregion Vendor
+}
diff --git a/Apps/US/IRSForms/test library/src/MockKeyVaultClientIRIS.Codeunit.al b/Apps/US/IRSForms/test library/src/MockKeyVaultClientIRIS.Codeunit.al
new file mode 100644
index 0000000000..14a4d71e6c
--- /dev/null
+++ b/Apps/US/IRSForms/test library/src/MockKeyVaultClientIRIS.Codeunit.al
@@ -0,0 +1,99 @@
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Reporting;
+
+codeunit 148024 "Mock Key Vault Client IRIS" implements "IRS 1099 IRIS Configuration"
+{
+ SingleInstance = true;
+
+ var
+ TCCValue: Text;
+ SoftwareIdValue: Text;
+ ConsentAppURLValue: Text;
+ ContactNameValue: Text;
+ ContactEmailValue: Text;
+ ContactPhoneValue: Text;
+ TestModeValue: Boolean;
+
+ #region Interface Methods
+ procedure GetTCC(): Text
+ begin
+ exit(TCCValue);
+ end;
+
+ procedure GetSoftwareId(): Text
+ begin
+ exit(SoftwareIdValue);
+ end;
+
+ procedure GetConsentAppURL(): Text
+ begin
+ exit(ConsentAppURLValue);
+ end;
+
+ procedure GetContactInfo(var ContactName: Text; var ContactEmail: Text; var ContactPhone: Text)
+ begin
+ ContactName := ContactNameValue;
+ ContactEmail := ContactEmailValue;
+ ContactPhone := ContactPhoneValue;
+ end;
+
+ procedure TestMode(): Boolean
+ begin
+ exit(TestModeValue);
+ end;
+ #endregion Interface Methods
+
+ #region Setup Methods
+ procedure SetTCC(NewTCC: Text)
+ begin
+ TCCValue := NewTCC;
+ end;
+
+ procedure SetSoftwareId(NewSoftwareId: Text)
+ begin
+ SoftwareIdValue := NewSoftwareId;
+ end;
+
+ procedure SetConsentAppURL(NewConsentAppURL: Text)
+ begin
+ ConsentAppURLValue := NewConsentAppURL;
+ end;
+
+ procedure SetContactInfo(NewContactName: Text; NewContactEmail: Text; NewContactPhone: Text)
+ begin
+ ContactNameValue := NewContactName;
+ ContactEmailValue := NewContactEmail;
+ ContactPhoneValue := NewContactPhone;
+ end;
+
+ procedure SetTestMode(NewTestMode: Boolean)
+ begin
+ TestModeValue := NewTestMode;
+ end;
+
+ procedure SetDefaultValues()
+ begin
+ TCCValue := 'TEST-TCC';
+ SoftwareIdValue := 'TEST-SOFTWARE-ID';
+ ConsentAppURLValue := 'https://test.consent.app/url';
+ ContactNameValue := 'Test Contact';
+ ContactEmailValue := 'test@example.com';
+ ContactPhoneValue := '1234567890';
+ TestModeValue := true;
+ end;
+
+ procedure ResetValues()
+ begin
+ Clear(TCCValue);
+ Clear(SoftwareIdValue);
+ Clear(ConsentAppURLValue);
+ Clear(ContactNameValue);
+ Clear(ContactEmailValue);
+ Clear(ContactPhoneValue);
+ Clear(TestModeValue);
+ end;
+ #endregion Setup Methods
+}
diff --git a/Apps/US/IRSForms/test/src/IRS1099DocumentTests.Codeunit.al b/Apps/US/IRSForms/test/src/IRS1099DocumentTests.Codeunit.al
index ef91e31fbe..110d8f2721 100644
--- a/Apps/US/IRSForms/test/src/IRS1099DocumentTests.Codeunit.al
+++ b/Apps/US/IRSForms/test/src/IRS1099DocumentTests.Codeunit.al
@@ -1069,6 +1069,68 @@ codeunit 148010 "IRS 1099 Document Tests"
DeleteDocuments();
end;
+ [Test]
+ procedure FormDocLineIncludeIn1099FalseWhenAmountBelowMinimum()
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ IRS1099FormBox: Record "IRS 1099 Form Box";
+ IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
+ PeriodNo: Code[20];
+ FormNo: Code[20];
+ FormBoxNo: Code[20];
+ VendNo: Code[20];
+ PostingDate: Date;
+ MinimumReportableAmount: Decimal;
+ InvoiceAmount: Decimal;
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 620124] No form document is created when payment amount is less than "Minimum Reportable Amount"
+ Initialize();
+
+ // [GIVEN] Minimum Reportable Amount = 600
+ MinimumReportableAmount := 600;
+ InvoiceAmount := 100;
+ PostingDate := WorkDate();
+
+ // [GIVEN] IRS Reporting Period "P" with Form "F" and Form Box "FB" with "Minimum Reportable Amount" = 600
+ PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
+ FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate);
+ FormBoxNo := LibraryIRS1099FormBox.CreateSingleFormBoxInReportingPeriod(PostingDate, FormNo);
+ IRS1099FormBox.Get(PeriodNo, FormNo, FormBoxNo);
+ IRS1099FormBox.Validate("Minimum Reportable Amount", MinimumReportableAmount);
+ IRS1099FormBox.Modify(true);
+
+ // [GIVEN] Vendor "V" with Form Box "FB"
+ VendNo := LibraryIRS1099FormBox.CreateVendorNoWithFormBox(PostingDate, FormNo, FormBoxNo);
+
+ // [GIVEN] Posted purchase invoice for vendor "V" with Amount = 100
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, VendNo);
+ PurchaseHeader.Validate("Posting Date", PostingDate);
+ PurchaseHeader.Modify(true);
+ LibraryPurchase.CreatePurchaseLineWithUnitCost(PurchaseLine, PurchaseHeader, LibraryInventory.CreateItemNo(), 1, InvoiceAmount);
+ LibraryERM.FindVendorLedgerEntry(
+ VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice,
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ VendorLedgerEntry.CalcFields(Amount);
+
+ // [GIVEN] Payment with amount 100 applied to the invoice
+ LibraryIRS1099Document.PostPaymentAppliedToInvoice(PostingDate, VendNo, VendorLedgerEntry."Document No.", -VendorLedgerEntry.Amount);
+
+ // [WHEN] Create form documents
+ LibraryIRS1099Document.CreateFormDocuments(PostingDate, PostingDate, VendNo, FormNo);
+
+ // [THEN] No form document header is created for vendor "V" when amount is below minimum reportable amount
+ IRS1099FormDocHeader.SetRange("Period No.", PeriodNo);
+ IRS1099FormDocHeader.SetRange("Vendor No.", VendNo);
+ IRS1099FormDocHeader.SetRange("Form No.", FormNo);
+ Assert.RecordIsEmpty(IRS1099FormDocHeader);
+
+ // Tear down
+ DeleteDocuments();
+ end;
+
local procedure Initialize()
var
IRSReportingPeriod: Record "IRS Reporting Period";
diff --git a/Apps/US/IRSForms/test/src/IRS1099FormCalcTests.Codeunit.al b/Apps/US/IRSForms/test/src/IRS1099FormCalcTests.Codeunit.al
index 842abf7a6d..6cf7441de1 100644
--- a/Apps/US/IRSForms/test/src/IRS1099FormCalcTests.Codeunit.al
+++ b/Apps/US/IRSForms/test/src/IRS1099FormCalcTests.Codeunit.al
@@ -42,7 +42,7 @@ codeunit 148014 "IRS 1099 Form Calc. Tests"
PurchaseLine: Record "Purchase Line";
VendorLedgerEntry: Record "Vendor Ledger Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
-PeriodNo: Code[20];
+ PeriodNo: Code[20];
FormNo: Code[20];
FormBoxNo: Code[20];
VendNo: Code[20];
@@ -51,7 +51,7 @@ PeriodNo: Code[20];
// [SCENARIO 495389] The calculation of the form boxes is correct for a single vendor and a single form
Initialize();
-PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
// [GIVEN] IRS Reporting "X" with "Starting Date" = 01.01.2024 and "Ending Date" = 31.12.2024
PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate);
@@ -82,7 +82,7 @@ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
// [THEN] Check connected entry
LibraryIRS1099FormBox.VerifyConnectedEntryInVendFormBoxBuffer(TempVendFormBoxBuffer, VendorLedgerEntry."Entry No.");
-end;
+ end;
[Test]
procedure SingleVendorSingleFormMultipleBoxes()
@@ -91,7 +91,7 @@ end;
PurchaseLine: Record "Purchase Line";
VendorLedgerEntry: Record "Vendor Ledger Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
-PeriodNo: Code[20];
+ PeriodNo: Code[20];
FormNo: Code[20];
FormBoxNo: array[2] of Code[20];
VendNo: Code[20];
@@ -103,7 +103,7 @@ PeriodNo: Code[20];
// [SCENARIO 495389] The calculation of the form boxes is correct for a single vendor and single form with multiple form boxes
Initialize();
-PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
// [GIVEN] MISC form with two boxes - MISC-01 and MISC-02
FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate);
@@ -146,7 +146,7 @@ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
LibraryIRS1099FormBox.VerifyConnectedEntryInVendFormBoxBuffer(TempVendFormBoxBuffer, ExpectedEntryNo[i]);
end;
-end;
+ end;
[Test]
procedure SingleVendorMultipleFormsAndBoxes()
@@ -155,7 +155,7 @@ end;
PurchaseLine: Record "Purchase Line";
VendorLedgerEntry: Record "Vendor Ledger Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
-PeriodNo: Code[20];
+ PeriodNo: Code[20];
FormNo: array[2] of Code[20];
FormBoxNo: array[2, 2] of Code[20];
ExpectedAmount: array[2, 2] of Decimal;
@@ -167,7 +167,7 @@ PeriodNo: Code[20];
// [SCENARIO 495389] The calculation of the form boxes is correct for a single vendor and multiple forms and form boxes
Initialize();
-PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
// [GIVEN] A single vendor
VendNo := LibraryPurchase.CreateVendorNo();
@@ -214,7 +214,7 @@ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
TempVendFormBoxBuffer, PeriodNo, FormNo[i], FormBoxNo[i, j], VendNo, ExpectedAmount[i, j]);
LibraryIRS1099FormBox.VerifyConnectedEntryInVendFormBoxBuffer(TempVendFormBoxBuffer, ExpectedEntryNo[i, j]);
end;
-end;
+ end;
[Test]
procedure MultipleVendorsMultipleFormsAndBoxes()
@@ -223,7 +223,7 @@ end;
PurchaseLine: Record "Purchase Line";
VendorLedgerEntry: Record "Vendor Ledger Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
-PeriodNo: Code[20];
+ PeriodNo: Code[20];
FormNo: array[2] of Code[20];
FormBoxNo: array[2, 2, 2] of Code[20];
VendNo: array[2] of Code[20];
@@ -235,7 +235,7 @@ PeriodNo: Code[20];
// [SCENARIO 495389] The calculation of the form boxes is correct for multiple vendors and multiple forms and form boxes
Initialize();
-PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
// [GIVEN] Forms MISC and NEC with two boxes each (MISC-01, MISC-02, NEC-01, NEC-02)
for i := 1 to ArrayLen(FormNo) do
@@ -288,7 +288,7 @@ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
LibraryIRS1099FormBox.VerifyConnectedEntryInVendFormBoxBuffer(TempVendFormBoxBuffer, ExpectedEntryNo[i, j, k]);
end;
-end;
+ end;
[Test]
procedure SingleRefundToCrMemo()
@@ -298,7 +298,7 @@ end;
InvVendorLedgerEntry: Record "Vendor Ledger Entry";
CrMemoVendorLedgerEntry: Record "Vendor Ledger Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
-PeriodNo: Code[20];
+ PeriodNo: Code[20];
FormNo: Code[20];
FormBoxNo: Code[20];
VendNo: Code[20];
@@ -307,7 +307,7 @@ PeriodNo: Code[20];
// [SCENARIO 495389] The calculation of the form boxes is correct for a single refund and credit memo
Initialize();
-PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
// [GIVEN] Form box MISC-01 is created for the period "X"
PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate);
@@ -356,7 +356,7 @@ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
TempVendFormBoxBuffer.Next();
TempVendFormBoxBuffer.TestField("Vendor Ledger Entry No.", CrMemoVendorLedgerEntry."Entry No.");
-end;
+ end;
[Test]
procedure OnlyAdjustment()
@@ -397,10 +397,84 @@ end;
IRSReportingPeriod.DeleteAll(true);
end;
+ [Test]
+ procedure TwoPaymentsPartiallyAppliedToOneInvoice()
+ var
+ IRSReportingPeriod: Record "IRS Reporting Period";
+ InvVendorLedgerEntry: Record "Vendor Ledger Entry";
+ PmtVendorLedgerEntry: array[2] of Record "Vendor Ledger Entry";
+ DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry";
+ TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
+ PeriodNo: Code[20];
+ FormNo: Code[20];
+ FormBoxNo: Code[20];
+ VendNo: Code[20];
+ InvAmount: Decimal;
+ PmtAmount: array[2] of Decimal;
+ ExpectedAmount: Decimal;
+ PostingDate: Date;
+ i: Integer;
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 618118] The calculation of the form box is correct when two payments are partially applied to one invoice
+ Initialize();
+
+ // [GIVEN] Form box "FB" is created for the period "P"
+ PostingDate := LibraryIRSReportingPeriod.GetPostingDate();
+ PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate);
+ FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate);
+ FormBoxNo := LibraryIRS1099FormBox.CreateSingleFormBoxInReportingPeriod(PostingDate, FormNo);
+ VendNo := LibraryIRS1099FormBox.CreateVendorNoWithFormBox(PostingDate, FormNo, FormBoxNo);
+
+ // [GIVEN] Posted invoice with "FB" code and amount = 1000
+ InvAmount := LibraryRandom.RandIntInRange(1000, 2000);
+ CreateVendorLedgerEntry(
+ InvVendorLedgerEntry, PostingDate, InvVendorLedgerEntry."Document Type"::Invoice, VendNo, FormNo, FormBoxNo, InvAmount);
+ CreateDetailedVendorLedgerEntry(
+ InvVendorLedgerEntry."Entry No.", 0, DetailedVendorLedgEntry."Entry Type"::"Initial Entry",
+ InvVendorLedgerEntry."Vendor No.", -InvAmount, true);
+
+ // [GIVEN] Two payments "P1" and "P2" each partially applied to the same invoice (400 and 600)
+ PmtAmount[1] := Round(InvAmount * 0.4);
+ PmtAmount[2] := InvAmount - PmtAmount[1];
+ for i := 1 to ArrayLen(PmtAmount) do begin
+ CreateVendorLedgerEntry(
+ PmtVendorLedgerEntry[i], PostingDate, PmtVendorLedgerEntry[i]."Document Type"::Payment, VendNo, FormNo, FormBoxNo, 0);
+ CreateDetailedVendorLedgerEntry(
+ PmtVendorLedgerEntry[i]."Entry No.", 0, DetailedVendorLedgEntry."Entry Type"::"Initial Entry",
+ VendNo, PmtAmount[i], true);
+ // Application entries linking payment to invoice
+ CreateDetailedVendorLedgerEntry(
+ InvVendorLedgerEntry."Entry No.", InvVendorLedgerEntry."Entry No.", DetailedVendorLedgEntry."Entry Type"::Application,
+ VendNo, PmtAmount[i], false);
+ CreateDetailedVendorLedgerEntry(
+ PmtVendorLedgerEntry[i]."Entry No.", InvVendorLedgerEntry."Entry No.", DetailedVendorLedgEntry."Entry Type"::Application,
+ VendNo, -PmtAmount[i], false);
+ end;
+
+ // [WHEN] Calculate form boxes for period "P"
+ LibraryIRS1099FormBox.GetVendorFormBoxAmount(TempVendFormBoxBuffer, PeriodNo, FormNo, VendNo);
+
+ // [THEN] A single form box record is created with amount equal to sum of payments
+ TempVendFormBoxBuffer.Reset();
+ TempVendFormBoxBuffer.SetRange("Buffer Type", TempVendFormBoxBuffer."Buffer Type"::Amount);
+ Assert.RecordCount(TempVendFormBoxBuffer, 1);
+ ExpectedAmount := PmtAmount[1] + PmtAmount[2];
+ LibraryIRS1099FormBox.VerifyCurrTempVendFormBoxBufferIncludedIn1099(
+ TempVendFormBoxBuffer, PeriodNo, FormNo, FormBoxNo, VendNo, ExpectedAmount);
+ // [THEN] Only one connected entry exists (invoice not double-counted)
+ LibraryIRS1099FormBox.VerifyConnectedEntryInVendFormBoxBuffer(TempVendFormBoxBuffer, InvVendorLedgerEntry."Entry No.");
+
+ // Tear Down
+ IRSReportingPeriod.SetRange("No.", PeriodNo);
+ IRSReportingPeriod.DeleteAll(true);
+ end;
+
[Test]
procedure PaymentAppliedToMultipleInvoicesEachWithPaymentDiscount()
var
InvVendorLedgerEntry: array[2] of Record "Vendor Ledger Entry";
+ IRSReportingPeriod: Record "IRS Reporting Period";
PmtVendorLedgerEntry: Record "Vendor Ledger Entry";
DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry";
TempVendFormBoxBuffer: Record "IRS 1099 Vend. Form Box Buffer" temporary;
@@ -464,6 +538,10 @@ end;
ExpectedAmount := InvAmount[1] + InvAmount[2] - PmtDiscAmount;
LibraryIRS1099FormBox.VerifyCurrTempVendFormBoxBufferIncludedIn1099(
TempVendFormBoxBuffer, PeriodNo, FormNo, FormBoxNo, VendNo, ExpectedAmount);
+
+ // Tear Down
+ IRSReportingPeriod.SetRange("No.", PeriodNo);
+ IRSReportingPeriod.DeleteAll(true);
end;
local procedure Initialize()
diff --git a/Apps/US/IRSForms/test/src/IRS1099IRISTests.Codeunit.al b/Apps/US/IRSForms/test/src/IRS1099IRISTests.Codeunit.al
new file mode 100644
index 0000000000..9dc69b8067
--- /dev/null
+++ b/Apps/US/IRSForms/test/src/IRS1099IRISTests.Codeunit.al
@@ -0,0 +1,216 @@
+// ------------------------------------------------------------------------------------------------
+// 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.VAT.Reporting;
+
+using Microsoft.Foundation.Company;
+using Microsoft.Purchases.Document;
+using Microsoft.Purchases.Vendor;
+using System.Utilities;
+
+codeunit 148022 "IRS 1099 IRIS Tests"
+{
+ Subtype = Test;
+ TestType = IntegrationTest;
+ TestPermissions = Disabled;
+
+ var
+ LibraryIRSReportingPeriod: Codeunit "Library IRS Reporting Period";
+ LibraryIRS1099FormBox: Codeunit "Library IRS 1099 Form Box";
+ LibraryIRS1099Document: Codeunit "Library IRS 1099 Document";
+ LibraryIRS1099IRIS: Codeunit "Library - IRS 1099 IRIS";
+ LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibrarySetupStorage: Codeunit "Library - Setup Storage";
+ LibraryXPathXMLReader: Codeunit "Library - XPath XML Reader";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryUtility: Codeunit "Library - Utility";
+ IsInitialized: Boolean;
+
+ [Test]
+ procedure ContactPersonInfoGrpNotAddedWhenContactPersonIsEmpty()
+ var
+ Transmission: Record "Transmission IRIS";
+ IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
+ TempIRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" temporary;
+ TempBlob: Codeunit "Temp Blob";
+ UniqueTransmissionId: Text[100];
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 619239] ContactPersonInformationGrp is not added to XML when Contact Person is empty but Phone No. and E-Mail are filled
+ Initialize();
+
+ // [GIVEN] Company Information with empty Contact Person but filled Phone No. and E-Mail
+ UpdateCompanyContactInfo('', '1234567890', 'test@example.com');
+
+ // [GIVEN] A vendor "V" with 1099 form document ready for transmission
+ CreateTransmissionWithSingleFormDoc(Transmission, IRS1099FormDocHeader);
+
+ // [WHEN] Create transmission XML
+ LibraryIRS1099IRIS.CreateTransmissionXmlContent(Transmission, Enum::"Transmission Type IRIS"::"O", false, UniqueTransmissionId, TempIRS1099FormDocHeader, TempBlob);
+
+ // [THEN] ContactPersonInformationGrp is not present in the XML
+ InitXMLReader(TempBlob);
+ LibraryXPathXMLReader.VerifyXmlNodeAbsence('//n1:ContactPersonInformationGrp');
+ end;
+
+ [Test]
+ procedure ContactPersonInfoGrpAddedWhenContactPersonIsFilled()
+ var
+ Transmission: Record "Transmission IRIS";
+ IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
+ TempIRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" temporary;
+ TempBlob: Codeunit "Temp Blob";
+ UniqueTransmissionId: Text[100];
+ ContactName: Text[50];
+ PhoneNo: Text[30];
+ Email: Text[80];
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 619239] ContactPersonInformationGrp is added to XML when Contact Person is filled
+ Initialize();
+
+ // [GIVEN] Company Information with filled Contact Person, Phone No. and E-Mail
+ ContactName := LibraryUtility.GenerateGUID();
+ PhoneNo := LibraryUtility.GenerateRandomPhoneNo();
+ Email := LibraryUtility.GenerateRandomEmail();
+ UpdateCompanyContactInfo(ContactName, PhoneNo, Email);
+
+ // [GIVEN] A vendor "V" with 1099 form document ready for transmission
+ CreateTransmissionWithSingleFormDoc(Transmission, IRS1099FormDocHeader);
+
+ // [WHEN] Create transmission XML
+ LibraryIRS1099IRIS.CreateTransmissionXmlContent(Transmission, Enum::"Transmission Type IRIS"::"O", false, UniqueTransmissionId, TempIRS1099FormDocHeader, TempBlob);
+
+ // [THEN] ContactPersonInformationGrp is present in the XML with ContactPersonNm
+ InitXMLReader(TempBlob);
+ LibraryXPathXMLReader.VerifyXmlNodeValue('//n1:ContactPersonInformationGrp/n1:ContactPersonNm', ContactName);
+ LibraryXPathXMLReader.VerifyXmlNodeValue('//n1:ContactPersonInformationGrp/n1:ContactPhoneNum', DelChr(PhoneNo, '=', ' -+()'));
+ LibraryXPathXMLReader.VerifyXmlNodeValue('//n1:ContactPersonInformationGrp/n1:ContactEmailAddressTxt', Email);
+ end;
+
+ local procedure Initialize()
+ var
+ MockKeyVaultClientIRIS: Codeunit "Mock Key Vault Client IRIS";
+ begin
+ LibraryTestInitialize.OnTestInitialize(Codeunit::"IRS 1099 IRIS Tests");
+
+ LibrarySetupStorage.Restore();
+ LibraryIRS1099IRIS.DeleteAllTransmissions();
+ LibraryIRS1099Document.DeleteFormDocuments();
+
+ if IsInitialized then
+ exit;
+
+ LibraryTestInitialize.OnBeforeTestSuiteInitialize(Codeunit::"IRS 1099 IRIS Tests");
+
+ LibraryIRS1099IRIS.InitializeCompanyInformation();
+ LibraryIRS1099IRIS.InitializeIRSFormsSetup();
+ MockKeyVaultClientIRIS.SetDefaultValues();
+ InitializeReportingPeriodAndForms(Date2DMY(WorkDate(), 3));
+
+ LibrarySetupStorage.SaveCompanyInformation();
+ LibrarySetupStorage.Save(Database::"IRS Forms Setup");
+
+ IsInitialized := true;
+ Commit();
+
+ LibraryTestInitialize.OnAfterTestSuiteInitialize(Codeunit::"IRS 1099 IRIS Tests");
+ end;
+
+ local procedure InitializeReportingPeriodAndForms(Year: Integer)
+ var
+ StartingDate: Date;
+ EndingDate: Date;
+ begin
+ StartingDate := DMY2Date(1, 1, Year);
+ EndingDate := CalcDate('', StartingDate);
+ LibraryIRSReportingPeriod.CreateSpecificReportingPeriod(Format(Year), StartingDate, EndingDate);
+
+ LibraryIRS1099FormBox.CreateSpecificFormInReportingPeriod(StartingDate, EndingDate, 'DIV');
+ LibraryIRS1099FormBox.CreateSpecificFormBoxInReportingPeriod(StartingDate, EndingDate, 'DIV', 'DIV-01-A');
+
+ LibraryIRS1099FormBox.CreateSpecificFormInReportingPeriod(StartingDate, EndingDate, 'INT');
+ LibraryIRS1099FormBox.CreateSpecificFormBoxInReportingPeriod(StartingDate, EndingDate, 'INT', 'INT-01');
+
+ LibraryIRS1099FormBox.CreateSpecificFormInReportingPeriod(StartingDate, EndingDate, 'MISC');
+ LibraryIRS1099FormBox.CreateSpecificFormBoxInReportingPeriod(StartingDate, EndingDate, 'MISC', 'MISC-03');
+
+ LibraryIRS1099FormBox.CreateSpecificFormInReportingPeriod(StartingDate, EndingDate, 'NEC');
+ LibraryIRS1099FormBox.CreateSpecificFormBoxInReportingPeriod(StartingDate, EndingDate, 'NEC', 'NEC-01');
+ end;
+
+ local procedure InitXMLReader(var TempBlob: Codeunit "Temp Blob")
+ begin
+ LibraryXPathXMLReader.InitializeXml(TempBlob, 'n1', 'urn:us:gov:treasury:irs:ir');
+ end;
+
+ local procedure CreateTransmissionWithSingleFormDoc(var Transmission: Record "Transmission IRIS"; var IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header")
+ begin
+ CreateReleasedFormDocument(IRS1099FormDocHeader, Date2DMY(WorkDate(), 3));
+ LibraryIRS1099IRIS.CreateTransmission(Transmission, IRS1099FormDocHeader."Period No.");
+ IRS1099FormDocHeader.Get(IRS1099FormDocHeader.ID);
+ end;
+
+ local procedure CreateReleasedFormDocument(var IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header"; Year: Integer)
+ var
+ Vendor: Record Vendor;
+ StartingDate: Date;
+ EndingDate: Date;
+ PeriodNo: Code[20];
+ FormNo: array[2] of Code[20];
+ FormBoxNo: array[2] of Code[20];
+ ExcludeFormBoxNoList: List of [Code[20]];
+ begin
+ StartingDate := DMY2Date(1, 1, Year);
+ EndingDate := CalcDate('', StartingDate);
+ PeriodNo := Format(Year);
+
+ LibraryIRS1099IRIS.CreateUSVendor(Vendor);
+
+ GetRandomFormAndFormBox(FormNo[1], FormBoxNo[1], Year, ExcludeFormBoxNoList);
+ GetRandomFormAndFormBox(FormNo[2], FormBoxNo[2], Year, ExcludeFormBoxNoList);
+
+ LibraryIRS1099Document.CreateAndPostPurchaseDocument("Purchase Document Type"::Invoice, Vendor."No.", Year, FormNo[1], FormBoxNo[1]);
+ LibraryIRS1099Document.CreateAndPostPurchaseDocument("Purchase Document Type"::Invoice, Vendor."No.", Year, FormNo[2], FormBoxNo[2]);
+
+ LibraryIRS1099Document.CreateFormDocuments(StartingDate, EndingDate, Vendor."No.");
+ IRS1099FormDocHeader.SetRange("Period No.", PeriodNo);
+ IRS1099FormDocHeader.SetRange("Vendor No.", Vendor."No.");
+ IRS1099FormDocHeader.FindFirst();
+ IRS1099FormDocHeader.Validate(Status, IRS1099FormDocHeader.Status::Released);
+ IRS1099FormDocHeader.Modify(true);
+ end;
+
+ local procedure GetRandomFormAndFormBox(var FormNo: Code[20]; var FormBoxNo: Code[20]; Year: Integer; var ExcludeFormBoxNoList: List of [Code[20]])
+ var
+ IRS1099FormBox: Record "IRS 1099 Form Box";
+ FormBoxNoList: List of [Code[20]];
+ RandomIndex: Integer;
+ begin
+ IRS1099FormBox.SetRange("Period No.", Format(Year));
+ IRS1099FormBox.FindSet();
+ repeat
+ if not ExcludeFormBoxNoList.Contains(IRS1099FormBox."No.") then
+ FormBoxNoList.Add(IRS1099FormBox."No.");
+ until IRS1099FormBox.Next() = 0;
+
+ RandomIndex := LibraryRandom.RandInt(FormBoxNoList.Count());
+ FormBoxNo := FormBoxNoList.Get(RandomIndex);
+ IRS1099FormBox.SetRange("No.", FormBoxNo);
+ IRS1099FormBox.FindFirst();
+ FormNo := IRS1099FormBox."Form No.";
+ ExcludeFormBoxNoList.Add(FormBoxNo);
+ end;
+
+ local procedure UpdateCompanyContactInfo(ContactPerson: Text[50]; PhoneNo: Text[30]; Email: Text[80])
+ var
+ CompanyInformation: Record "Company Information";
+ begin
+ CompanyInformation.Get();
+ CompanyInformation."Contact Person" := ContactPerson;
+ CompanyInformation."Phone No." := PhoneNo;
+ CompanyInformation."E-Mail" := Email;
+ CompanyInformation.Modify();
+ end;
+}
diff --git a/Apps/US/IRSForms/test/src/IRS1099LiableTests.Codeunit.al b/Apps/US/IRSForms/test/src/IRS1099LiableTests.Codeunit.al
index d9e977be4a..51d3e21a9f 100644
--- a/Apps/US/IRSForms/test/src/IRS1099LiableTests.Codeunit.al
+++ b/Apps/US/IRSForms/test/src/IRS1099LiableTests.Codeunit.al
@@ -18,6 +18,7 @@ codeunit 148019 "IRS 1099 Liable Tests"
LibraryIRSReportingPeriod: Codeunit "Library IRS Reporting Period";
LibraryIRS1099FormBox: Codeunit "Library IRS 1099 Form Box";
LibraryPurchase: Codeunit "Library - Purchase";
+ LibrarySmallBusiness: Codeunit "Library - Small Business";
LibraryERM: Codeunit "Library - ERM";
LibraryInventory: Codeunit "Library - Inventory";
LibraryRandom: Codeunit "Library - Random";
@@ -180,6 +181,59 @@ codeunit 148019 "IRS 1099 Liable Tests"
IRSReportingPeriod.DeleteAll(true);
end;
+ [Test]
+ procedure PurchLineHas1099LiableWhenStdPurchCodeAppliedAndHeaderHas1099Code()
+ var
+ IRSReportingPeriod: Record "IRS Reporting Period";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ StandardPurchaseCode: Record "Standard Purchase Code";
+ StandardPurchaseLine: Record "Standard Purchase Line";
+ StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code";
+ VendorNo: Code[20];
+ FormNo: Code[20];
+ FormBoxNo: Code[20];
+ PeriodNo: Code[20];
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 618160] Purchase line has "1099 Liable" option enabled when standard purchase codes are applied and header has "IRS 1099 Form Box No."
+ Initialize();
+
+ // [GIVEN] Vendor "V" with IRS 1099 Form Box No. "MISC-01"
+ PeriodNo := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(WorkDate());
+ FormNo := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(WorkDate(), WorkDate());
+ FormBoxNo := LibraryIRS1099FormBox.CreateSingleFormBoxInReportingPeriod(WorkDate(), WorkDate(), FormNo);
+ VendorNo := LibraryIRS1099FormBox.CreateVendorNoWithFormBox(WorkDate(), WorkDate(), FormNo, FormBoxNo);
+
+ // [GIVEN] Standard purchase code "SPC" with a G/L Account line for vendor "V"
+ LibrarySmallBusiness.CreateStandardPurchaseCode(StandardPurchaseCode);
+ LibrarySmallBusiness.CreateStandardPurchaseLine(StandardPurchaseLine, StandardPurchaseCode.Code);
+ StandardPurchaseLine.Validate(Type, StandardPurchaseLine.Type::"G/L Account");
+ StandardPurchaseLine.Validate("No.", LibraryERM.CreateGLAccountWithPurchSetup());
+ StandardPurchaseLine.Validate(Quantity, 1);
+ StandardPurchaseLine.Validate("Amount Excl. VAT", LibraryRandom.RandDec(100, 2));
+ StandardPurchaseLine.Modify(true);
+ LibrarySmallBusiness.CreateVendorPurchaseCode(StandardVendorPurchaseCode, VendorNo, StandardPurchaseCode.Code);
+ StandardVendorPurchaseCode.Validate("Insert Rec. Lines On Invoices", StandardVendorPurchaseCode."Insert Rec. Lines On Invoices"::Automatic);
+ StandardVendorPurchaseCode.Modify(true);
+
+ // [WHEN] Create purchase invoice for vendor "V"
+ PurchaseHeader."Document Type" := PurchaseHeader."Document Type"::Invoice;
+ PurchaseHeader.Validate("Buy-from Vendor No.", VendorNo);
+ PurchaseHeader.Insert(true);
+
+ // [THEN] Purchase line created from standard code has "1099 Liable" = true
+ PurchaseLine.SetRange("Document Type", PurchaseHeader."Document Type");
+ PurchaseLine.SetRange("Document No.", PurchaseHeader."No.");
+ PurchaseLine.FindFirst();
+ Assert.AreEqual(true, PurchaseLine."1099 Liable", 'Purchase line should have 1099 Liable enabled');
+
+ // Tear Down
+ IRSReportingPeriod.SetRange("No.", PeriodNo);
+ IRSReportingPeriod.DeleteAll(true);
+ StandardVendorPurchaseCode.Delete(true);
+ end;
+
local procedure Initialize()
var
LibraryERMCountryData: Codeunit "Library - ERM Country Data";
diff --git a/Apps/US/IRSForms/test/src/IRS1099VendorTests.Codeunit.al b/Apps/US/IRSForms/test/src/IRS1099VendorTests.Codeunit.al
index 4518622c07..648efac713 100644
--- a/Apps/US/IRSForms/test/src/IRS1099VendorTests.Codeunit.al
+++ b/Apps/US/IRSForms/test/src/IRS1099VendorTests.Codeunit.al
@@ -476,6 +476,91 @@ codeunit 148011 "IRS 1099 Vendor Tests"
IRS1099VendorOverviewPage.Close();
end;
+ [Test]
+ [HandlerFunctions('NoDataFoundMessageHandler')]
+ procedure VendorOverviewShowsDataForSelectedPeriodOnly()
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ IRS1099VendorOverviewPage: TestPage "IRS 1099 Vendor Overview";
+ PeriodNo1, PeriodNo2, FormNo1, FormNo2, FormBoxNo1, FormBoxNo2, VendorNo1, VendorNo2 : Code[20];
+ PostingDate1, PostingDate2 : Date;
+ ExpectedAmount1, ExpectedAmount2 : Decimal;
+ begin
+ // [FEATURE] [AI test]
+ // [SCENARIO 619930] When switching between reporting periods in IRS 1099 Vendor Overview, only data from the selected period is displayed
+ Initialize();
+
+ // [GIVEN] Two IRS Reporting Periods "P1" and "P2" for different years
+ PostingDate1 := LibraryIRSReportingPeriod.GetPostingDate();
+ PostingDate2 := CalcDate('<1Y>', PostingDate1);
+ PeriodNo1 := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate1);
+ PeriodNo2 := LibraryIRSReportingPeriod.CreateOneDayReportingPeriod(PostingDate2);
+
+ // [GIVEN] Form "F1", form box "FB1" and vendor "V1" setup for the first period
+ FormNo1 := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate1);
+ FormBoxNo1 := LibraryIRS1099FormBox.CreateSingleFormBoxInReportingPeriod(PostingDate1, FormNo1);
+ VendorNo1 := LibraryIRS1099FormBox.CreateVendorNoWithFormBox(PostingDate1, FormNo1, FormBoxNo1);
+
+ // [GIVEN] Invoice posted and paid for vendor "V1" in the first period
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, VendorNo1);
+ PurchaseHeader.Validate("Posting Date", PostingDate1);
+ LibraryPurchase.CreatePurchaseLineWithUnitCost(
+ PurchaseLine, PurchaseHeader, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(10), LibraryRandom.RandDecInRange(100, 200, 2));
+ LibraryERM.FindVendorLedgerEntry(
+ VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice,
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ VendorLedgerEntry.CalcFields(Amount);
+ ExpectedAmount1 := -VendorLedgerEntry.Amount;
+ LibraryIRS1099Document.PostPaymentAppliedToInvoice(PostingDate1, VendorNo1, VendorLedgerEntry."Document No.", -VendorLedgerEntry.Amount);
+
+ // [GIVEN] Form "F2", form box "FB2" and vendor "V2" setup for the second period
+ FormNo2 := LibraryIRS1099FormBox.CreateSingleFormInReportingPeriod(PostingDate2);
+ FormBoxNo2 := LibraryIRS1099FormBox.CreateSingleFormBoxInReportingPeriod(PostingDate2, FormNo2);
+ VendorNo2 := LibraryIRS1099FormBox.CreateVendorNoWithFormBox(PostingDate2, FormNo2, FormBoxNo2);
+
+ // [GIVEN] Invoice posted and paid for vendor "V2" in the second period
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, PurchaseHeader."Document Type"::Invoice, VendorNo2);
+ PurchaseHeader.Validate("Posting Date", PostingDate2);
+ LibraryPurchase.CreatePurchaseLineWithUnitCost(
+ PurchaseLine, PurchaseHeader, LibraryInventory.CreateItemNo(),
+ LibraryRandom.RandInt(10), LibraryRandom.RandDecInRange(300, 400, 2));
+ LibraryERM.FindVendorLedgerEntry(
+ VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice,
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true));
+ VendorLedgerEntry.CalcFields(Amount);
+ ExpectedAmount2 := -VendorLedgerEntry.Amount;
+ LibraryIRS1099Document.PostPaymentAppliedToInvoice(PostingDate2, VendorNo2, VendorLedgerEntry."Document No.", -VendorLedgerEntry.Amount);
+
+ // [GIVEN] User opens IRS 1099 Vendor Overview page and sets the reporting period to "P1"
+ IRS1099VendorOverviewPage.OpenView();
+ IRS1099VendorOverviewPage.IRSReportingPeriodNoField.SetValue(PeriodNo1);
+
+ // [THEN] The page shows data from the first period for vendor "V1"
+ Assert.IsTrue(IRS1099VendorOverviewPage.First(), 'Expected data for the first period');
+ IRS1099VendorOverviewPage."Vendor No.".AssertEquals(VendorNo1);
+ IRS1099VendorOverviewPage."Form No.".AssertEquals(FormNo1);
+ IRS1099VendorOverviewPage."Form Box No.".AssertEquals(FormBoxNo1);
+ IRS1099VendorOverviewPage.Amount.AssertEquals(ExpectedAmount1);
+
+ // [WHEN] User changes the IRS Reporting Period No. to the second period "P2"
+ IRS1099VendorOverviewPage.IRSReportingPeriodNoField.SetValue(PeriodNo2);
+
+ // [THEN] The page shows only data from the second period for vendor "V2"
+ Assert.IsTrue(IRS1099VendorOverviewPage.First(), 'Expected data for the second period');
+ IRS1099VendorOverviewPage."Vendor No.".AssertEquals(VendorNo2);
+ IRS1099VendorOverviewPage."Form No.".AssertEquals(FormNo2);
+ IRS1099VendorOverviewPage."Form Box No.".AssertEquals(FormBoxNo2);
+ IRS1099VendorOverviewPage.Amount.AssertEquals(ExpectedAmount2);
+
+ // [THEN] There is only one record (no data from the first period)
+ Assert.IsFalse(IRS1099VendorOverviewPage.Next(), 'Expected only one record from the second period');
+
+ IRS1099VendorOverviewPage.Close();
+ end;
+
local procedure Initialize()
var
IRSReportingPeriod: Record "IRS Reporting Period";
diff --git a/Apps/W1/APIV2/app/src/codeunits/APIV2WorkflowEventHandler.Codeunit.al b/Apps/W1/APIV2/app/src/codeunits/APIV2WorkflowEventHandler.Codeunit.al
deleted file mode 100644
index f1518c2def..0000000000
--- a/Apps/W1/APIV2/app/src/codeunits/APIV2WorkflowEventHandler.Codeunit.al
+++ /dev/null
@@ -1,29 +0,0 @@
-// ------------------------------------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// ------------------------------------------------------------------------------------------------
-namespace Microsoft.API.V2;
-
-using Microsoft.Inventory.Requisition;
-using System;
-using System.Automation;
-
-codeunit 30006 "APIV2 - Workflow Event Handler"
-{
- [EventSubscriber(ObjectType::Table, Database::"Workflow Webhook Subscription", 'OnCreateWorkflowEventConditions', '', false, false)]
- local procedure OnCreateWorkflowEventConditions(EventCode: Code[128]; ConditionsObject: DotNet JObject; var EventConditions: FilterPageBuilder; var ConditionsCount: Integer; var Result: Text; var IsHandled: Boolean; sender: Record "Workflow Webhook Subscription")
- var
- WorkflowEventHandling: Codeunit "Workflow Event Handling";
- RequestPageParametersHelper: Codeunit "Request Page Parameters Helper";
- WorkflowWebhookSetup: Codeunit "Workflow Webhook Setup";
- begin
- case EventCode of
- WorkflowEventHandling.RunWorkflowOnSendRequisitionWkshBatchForApprovalCode():
- begin
- IsHandled := true;
- sender.AddEventConditionsWrapper('Conditions', ConditionsObject, Page::"APIV2 - Requisition Wksh. Name", EventConditions, ConditionsCount);
- Result := RequestPageParametersHelper.GetViewFromDynamicRequestPage(EventConditions, WorkflowWebhookSetup.GetPurchPayCategoryTxt(), Database::"Requisition Wksh. Name");
- end;
- end;
- end;
-}
\ No newline at end of file
diff --git a/Apps/W1/APIV2/app/src/pages/APIV2RequisitionWkshName.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2RequisitionWkshName.Page.al
deleted file mode 100644
index 124441dfb0..0000000000
--- a/Apps/W1/APIV2/app/src/pages/APIV2RequisitionWkshName.Page.al
+++ /dev/null
@@ -1,64 +0,0 @@
-// ------------------------------------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// ------------------------------------------------------------------------------------------------
-namespace Microsoft.API.V2;
-
-using Microsoft.Inventory.Requisition;
-
-page 30099 "APIV2 - Requisition Wksh. Name"
-{
- APIVersion = 'v2.0';
- EntityCaption = 'Requisition Worksheet Name';
- EntitySetCaption = 'Requisition Worksheet Names';
- DelayedInsert = true;
- EntityName = 'requisitionWorksheetName';
- EntitySetName = 'requisitionWorksheetNames';
- SourceTable = "Requisition Wksh. Name";
- PageType = API;
- Extensible = false;
- APIGroup = 'automate';
- APIPublisher = 'microsoft';
- ODataKeyFields = SystemId;
-
- layout
- {
- area(content)
- {
- repeater(Group)
- {
- field(id; Rec.SystemId)
- {
- ApplicationArea = All;
- Editable = false;
- Caption = 'Id';
- }
- field(worksheetTemplateName; Rec."Worksheet Template Name")
- {
- ApplicationArea = All;
- Caption = 'Worksheet Template Name';
- }
- field(name; Rec.Name)
- {
- ApplicationArea = All;
- Caption = 'Name';
- }
- field(description; Rec.Description)
- {
- ApplicationArea = All;
- Caption = 'Description';
- }
- field(templateType; Rec."Template Type")
- {
- ApplicationArea = All;
- Caption = 'Template Type';
- }
- field(recurring; Rec.Recurring)
- {
- ApplicationArea = All;
- Caption = 'Recurring';
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml b/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml
index e2cd3d54d8..6b6a08ec26 100644
--- a/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml
+++ b/Apps/W1/BankAccRecWithAI/test/.resources/TestSuites/Accuracy.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateAccScheduleName.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateAccScheduleName.Codeunit.al
index ddc932272b..c29a1ff520 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateAccScheduleName.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateAccScheduleName.Codeunit.al
@@ -104,7 +104,7 @@ codeunit 5223 "Create Acc. Schedule Name"
end;
var
- AccountCategoriesOverviewInternalDescriptionLbl: Label 'Thirteen-row layout combining balance sheet and income statement sections with structured account category grouping and calculated formulas. This layout organizes assets, liabilities, equity, income, cost of goods sold, and expenses, and calculates key totals such as net income to provide a comprehensive financial overview. Useful for consolidated reporting, comparative analysis, and delivering actionable insights across accounting periods.', MaxLength = 500;
+ AccountCategoriesOverviewInternalDescriptionLbl: Label 'Twelve-row layout combining balance sheet and income statement sections with structured account category grouping and calculated formulas. This layout organizes assets, liabilities, equity, income, cost of goods sold, and expenses, and calculates key totals such as net income to provide a comprehensive financial overview. Useful for consolidated reporting, comparative analysis, and delivering actionable insights across accounting periods.', MaxLength = 500;
AccountCategoriesOverviewLbl: Label 'Account Categories overview', MaxLength = 80;
AccountCategoriesOverviewTok: Label 'ACC-CAT', MaxLength = 10;
BalanceSheetDetailedInternalDescriptionLbl: Label 'A detailed layout with expanded sections for current assets, long-term assets, liabilities, and equity, including granular account ranges for receivables, inventory, prepaid expenses, and fixed assets. This layout incorporates formulas for subtotals and reconciliation checks to ensure accuracy and completeness. Useful for in-depth financial analysis, audit support, and preparing comprehensive management reports.', MaxLength = 500;
@@ -113,13 +113,13 @@ codeunit 5223 "Create Acc. Schedule Name"
BalanceSheetSummarizedInternalDescriptionLbl: Label 'Eight-row layout presenting a summarized balance sheet with posting account ranges for assets, liabilities, and equity. This layout includes calculated totals for Assets and Liabilities & Equity, plus check-figure formulas to verify balance, and uses balance at date with net amount for point-in-time figures and clear bold totals. Useful for executive snapshots, period-end validation, and quick reconciliation.', MaxLength = 500;
BalanceSheetSummarizedLbl: Label 'Balance Sheet Summarized', MaxLength = 80;
BalanceSheetSummarizedTok: Label 'BS SUM', MaxLength = 10, Comment = 'Balance Sheet Summarized';
- CapitalStructureInternalDescriptionLbl: Label 'Seventeen-row layout analyzing liquidity and short-term obligations through structured grouping of current assets and liabilities. This layout includes detailed rows for liquid assets, receivables, inventory, WIP, and short-term liabilities, with formulas calculating totals and net positions. Useful for assessing working capital, liquidity ratios, and short-term financial health in management and compliance reporting.', MaxLength = 500;
+ CapitalStructureInternalDescriptionLbl: Label 'Sixteen-row layout analyzing liquidity and short-term obligations through structured grouping of current assets and liabilities. This layout includes detailed rows for liquid assets, receivables, inventory, WIP, and short-term liabilities, with formulas calculating totals and net positions. Useful for assessing working capital, liquidity ratios, and short-term financial health in management and compliance reporting.', MaxLength = 500;
CapitalStructureLbl: Label 'Capital Structure', MaxLength = 80;
CapitalStructureTok: Label 'ANALYSIS', MaxLength = 10;
CashCycleDataInternalDescriptionLbl: Label 'Eight-row layout calculating key metrics for cash cycle analysis, including total revenue, receivables, payables, and inventory balances. This layout incorporates formulas to derive days sales outstanding, days payment outstanding, days sales of inventory, and overall cash cycle in days. Useful for assessing working capital efficiency, optimizing payment terms, and improving liquidity management. Internal row definition used for providing data for the Cash Cycle Chart.', MaxLength = 500;
CashCycleDataLbl: Label 'Data for Cash Cycle Chart', MaxLength = 80;
CashCycleDataTok: Label 'I_CACYCLE', MaxLength = 10;
- CashFlowCalculationInternalDescriptionLbl: Label 'Detailed layout designed for cash flow analysis, grouping cash receipts and disbursements by categories such as receivables, payables, open orders, investments, and miscellaneous transactions. This layout includes formulas for totals, surplus, and overall cash flow, using net change for dynamic period movements. Useful for liquidity planning, forecasting, and monitoring operational and investment cash positions.', MaxLength = 500;
+ CashFlowCalculationInternalDescriptionLbl: Label 'Twenty-row layout designed for cash flow analysis, grouping cash receipts and disbursements by categories such as receivables, payables, open orders, investments, and miscellaneous transactions. This layout includes formulas for totals, surplus, and overall cash flow, using net change for dynamic period movements. Useful for liquidity planning, forecasting, and monitoring operational and investment cash positions.', MaxLength = 500;
CashFlowCalculationLbl: Label 'Calculation Of Cash Flow', MaxLength = 80;
CashFlowCalculationTok: Label 'CASHFLOW', MaxLength = 10;
CashFlowDataInternalDescriptionLbl: Label 'Four-row layout summarizing cash flow components with posting account ranges for receivables, payables, and liquid funds, plus a formula to calculate total cash flow. This layout uses balance at date with net amount for point-in-time financial positions, providing a clear snapshot of liquidity status. Useful for visual cash flow reporting, short-term financial planning, and monitoring available funds against obligations. Internal row definition used for providing data for the Cash Flow Chart.', MaxLength = 500;
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateColumnLayoutName.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateColumnLayoutName.Codeunit.al
index 2cf765d74a..d1a9539021 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateColumnLayoutName.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateColumnLayoutName.Codeunit.al
@@ -141,61 +141,61 @@ codeunit 5401 "Create Column Layout Name"
end;
var
- ActualBudgetComparisonInternalDescriptionLbl: Label 'Four-column layout comparing actual net change, budgeted net change, and variance using formulas for difference and percentage. Positive and negative variances are clearly calculated to highlight performance gaps. Useful for monitoring budget adherence, analyzing deviations, and evaluating financial results against planned targets in management reports for better decision-making.', MaxLength = 500;
+ ActualBudgetComparisonInternalDescriptionLbl: Label 'Four-column layout comparing actual net change, budgeted amounts, and variance using formulas for difference and percentage. Positive and negative variances are clearly calculated to highlight performance gaps. Useful for monitoring budget adherence, analyzing deviations, and evaluating financial results against planned targets in management reports for better decision-making.', MaxLength = 500;
ActualBudgetComparisonLbl: Label 'Actual / Budget Comparison', MaxLength = 80;
ActualBudgetComparisonTok: Label 'ACT/BUD', MaxLength = 10;
BalanceOnlyInternalDescriptionLbl: Label 'Single-column layout showing the net balance of general ledger entries as of a specific date using balance at date and net amount. This layout provides a clear snapshot of financial position at a point in time. Useful for balance sheet reporting, validating account balances, and supporting period-end reviews where accurate figures are critical for compliance and financial analysis.', MaxLength = 500;
BalanceOnlyLbl: Label 'Balance Only', MaxLength = 80;
BalanceOnlyTok: Label 'BAL ONLY', MaxLength = 10;
- BalanceSheetInternalDescriptionLbl: Label 'Twelve-column layout showing month-end balances for each month of the current fiscal year using balance at date and net amount from general ledger entries. This layout enables trend analysis across all months, helping identify seasonal fluctuations and financial position changes. Useful for monitoring monthly balance trends, supporting balance sheet reporting, and year-end reviews.', MaxLength = 500;
+ BalanceSheetInternalDescriptionLbl: Label 'Twelve-column layout showing month-end balances for each month of the current fiscal year using balance at date and net amount from ledger entries. This layout enables trend analysis across all months, helping identify seasonal fluctuations and financial position changes. Useful for monitoring monthly balance trends, supporting balance sheet reporting, and year-end reviews.', MaxLength = 500;
BalanceSheetLbl: Label 'BS 12 Months Balance Trending Current Fiscal Year', MaxLength = 80, Comment = 'BS - abbreviation of Balance Sheet';
BalanceSheetTrendTok: Label 'BSTREND', MaxLength = 10, Comment = 'Balance Sheet Trend';
BeginningBalanceDebitsCreditsEndingBalanceTok: Label 'BBDRCREB', MaxLength = 10, Comment = 'Beginning Balance Debits Credits Ending Balance';
- BudgetAnalysisInternalDescriptionLbl: Label 'Four-column layout showing actual net change, budgeted net change, and prior-year actual net change using general ledger entries and budget entries, with a formula for calculating variance percentage between the current period net change and budgeted net change. This layout provides a comprehensive view of performance against budget and historical trends. Useful for evaluating budget accuracy, analyzing year-over-year changes, and identifying variances for financial planning.', MaxLength = 500;
+ BudgetAnalysisInternalDescriptionLbl: Label 'Four-column layout showing actual net change, budgeted amounts, variance percentage, and prior-year net change using ledger and budget entries with a formula for variance. This layout provides a comprehensive view of performance against budget and historical trends. Useful for evaluating budget accuracy, analyzing year-over-year changes, and identifying variances for financial planning.', MaxLength = 500;
BudgetAnalysisLbl: Label 'Budget Analysis', MaxLength = 80;
BudgetAnalysisTok: Label 'BUDGANALYS', MaxLength = 10;
- CashFlowComparisonInternalDescriptionLbl: Label 'Three-column layout showing net change for the current month, balance up to date, and entire fiscal year totals using general ledger entry amounts. This structure supports quick comparisons between monthly, cumulative, and annual figures. Useful for trend analysis, identifying performance patterns, and providing a complete view of financial activity for management reporting purposes.', MaxLength = 500;
+ CashFlowComparisonInternalDescriptionLbl: Label 'Three-column layout showing net change for the current month, balance up to date, and entire fiscal year totals using ledger entry amounts. This structure supports quick comparisons between monthly, cumulative, and annual figures. Useful for trend analysis, identifying performance patterns, and providing a complete view of financial activity for management reporting purposes.', MaxLength = 500;
CashFlowComparisonLbl: Label 'Comparison month - year', MaxLength = 80;
CashFlowComparisonTok: Label 'CASHFLOW', MaxLength = 10;
- CurrentMonthBalanceInternalDescriptionLbl: Label 'Single-column layout showing the current month``s balance using balance at date and net amount from general ledger entries. This layout provides an immediate snapshot of financial position for the current month. Useful for short-term monitoring, supporting balance sheet reporting, and analyzing month-end figures to ensure accuracy and compliance with financial reporting standards.', MaxLength = 500;
+ CurrentMonthBalanceInternalDescriptionLbl: Label 'Three-column layout showing current month balance, prior month balance, and the calculated difference using balance at date and net amount from ledger entries. This layout helps identify month-over-month changes and trends. Useful for variance analysis, monitoring short-term financial movements, and supporting management decisions based on recent performance comparisons.', MaxLength = 500;
CurrentMonthBalanceLbl: Label 'BS Current Month Balance', MaxLength = 80, Comment = 'BS - abbreviation of Balance Sheet';
CurrentMonthBalanceTok: Label 'CB', Locked = true;
- CurrentMonthBalanceVPriorMonthInternalDescriptionLbl: Label 'Three-column layout showing current month balance, prior month balance, and the calculated difference using balance at date and net amount from general ledger entries. This layout helps identify month-over-month changes and trends. Useful for variance analysis, monitoring short-term financial movements, and supporting management decisions based on recent performance comparisons.', MaxLength = 500;
+ CurrentMonthBalanceVPriorMonthInternalDescriptionLbl: Label 'Three-column layout showing Current Month Balance, Prior Month Balance, and Difference (Current - Prior). Displays month-end net amounts and calculates change; useful for month-over-month balance comparisons, reconciliation, and anomaly detection.', MaxLength = 500;
CurrentMonthBalanceVPriorMonthLbl: Label 'BS Current Month Balance v Prior Month Balance', MaxLength = 80, Comment = 'BS - abbreviation of Balance Sheet';
CurrentMonthBalanceVPriorMonthTok: Label 'CB V PB', Locked = true;
- CurrentMonthBalanceVSameMonthPriorYearInternalDescriptionLbl: Label 'Three-column layout showing current month balance, same month prior year balance, and the calculated difference using balance at date and net amount from general ledger entries. This layout enables year-over-year comparisons to identify seasonal trends and performance shifts. Useful for variance analysis, strategic planning, and evaluating financial consistency across fiscal periods.', MaxLength = 500;
+ CurrentMonthBalanceVSameMonthPriorYearInternalDescriptionLbl: Label 'Three-column layout showing current month balance, same month prior year balance, and the calculated difference using balance at date and net amount from ledger entries. This layout enables year-over-year comparisons to identify seasonal trends and performance shifts. Useful for variance analysis, strategic planning, and evaluating financial consistency across fiscal periods.', MaxLength = 500;
CurrentMonthBalanceVSameMonthPriorYearLbl: Label 'BS Current Month Balance v Same Month Prior Year Balance', MaxLength = 80, Comment = 'BS - abbreviation of Balance Sheet';
CurrentMonthBalanceVSameMonthPriorYearTok: Label 'CB V SPYB', Locked = true;
CurrentMonthNetChangeBudgetInternalDescriptionLbl: Label 'Thirteen-column layout showing monthly budgeted net changes for all 12 months plus a total column using formulas and budget entries. This structure supports comprehensive budget tracking and trend analysis across the fiscal year. Useful for monitoring planned income statement activity, evaluating budget adherence, and supporting financial planning and forecasting processes.', MaxLength = 500;
CurrentMonthNetChangeBudgetLbl: Label 'IS 12 Months Net Change Budget Only', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthNetChangeBudgetTok: Label 'CNC BUD', Locked = true;
- CurrentMonthNetChangeInternalDescriptionLbl: Label 'Single-column layout showing the current month''s net change using net change and net amount from general ledger entries. This layout provides insight into income statement activity for the period. Useful for tracking monthly performance, analyzing revenue and expense fluctuations, and supporting short-term financial decision-making with accurate and timely data.', MaxLength = 500;
+ CurrentMonthNetChangeInternalDescriptionLbl: Label 'Single-column layout showing the current month''s net change using net change and net amount from ledger entries. This layout provides insight into income statement activity for the period. Useful for tracking monthly performance, analyzing revenue and expense fluctuations, and supporting short-term financial decision-making with accurate and timely data.', MaxLength = 500;
CurrentMonthNetChangeLbl: Label 'IS Current Month Net Change', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthNetChangeTok: Label 'CNC', Locked = true;
- CurrentMonthNetChangeVPriorMonthInternalDescriptionLbl: Label 'Three-column layout showing current month net change, prior month net change, and the calculated difference using net change and net amount from general ledger entries. This layout helps identify short-term trends and performance shifts. Useful for variance analysis, monitoring income statement movements, and supporting management decisions based on recent financial activity comparisons.', MaxLength = 500;
+ CurrentMonthNetChangeVPriorMonthInternalDescriptionLbl: Label 'Three-column layout showing current month net change, prior month net change, and the calculated difference using net change and net amount from ledger entries. This layout helps identify short-term trends and performance shifts. Useful for variance analysis, monitoring income statement movements, and supporting management decisions based on recent financial activity comparisons.', MaxLength = 500;
CurrentMonthNetChangeVPriorMonthLbl: Label 'IS Current Month Net Change v Prior Month Net Change', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthNetChangeVPriorMonthTok: Label 'CNC V PNC', Locked = true;
- CurrentMonthNetChangeVSameMonthPriorYearInternalDescriptionLbl: Label 'Three-column layout showing current month net change, same month prior year net change, and the calculated difference using net change and net amount from general ledger entries. This layout enables year-over-year comparisons to identify seasonal trends and performance changes. Useful for variance analysis, strategic planning, and evaluating financial consistency across fiscal periods.', MaxLength = 500;
+ CurrentMonthNetChangeVSameMonthPriorYearInternalDescriptionLbl: Label 'Three-column layout showing current month net change, same month prior year net change, and the calculated difference using net change and net amount from ledger entries. This layout enables year-over-year comparisons to identify seasonal trends and performance changes. Useful for variance analysis, strategic planning, and evaluating financial consistency across fiscal periods.', MaxLength = 500;
CurrentMonthNetChangeVSameMonthPriorYearLbl: Label 'IS Current Month Net Change v Same Month Prior Year Net Change', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthNetChangeVSameMonthPriorYearTok: Label 'CNC VSPYNC', Locked = true;
- CurrentMonthVBudgetYearToDateInternalDescriptionLbl: Label 'Ten-column layout showing current month actual and budget amounts with variance, year-to-date actual and budget with variance, plus total budget and remaining budget using general ledger and budget entries with formulas. Useful for monitoring actual vs budget performance, tracking cumulative results, and managing budget utilization throughout the fiscal year for better financial control.', MaxLength = 500;
+ CurrentMonthVBudgetYearToDateInternalDescriptionLbl: Label 'Ten-column layout showing current month actual and budget amounts with variance, year-to-date actual and budget with variance, plus total budget and remaining budget using ledger and budget entries with formulas. Useful for monitoring actual vs budget performance, tracking cumulative results, and managing budget utilization throughout the fiscal year for better financial control.', MaxLength = 500;
CurrentMonthVBudgetYearToDateLbl: Label 'IS Current Month v Budget Year to Date v Budget and Bud Total and Bud Remaining', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthVBudgetYearToDateTok: Label 'CVC YTDBUD', Locked = true;
CurrentMonthVPriorMonthCYInternalDescriptionLbl: Label 'Seven-column layout showing current month and prior month net changes with calculated difference for the current year, plus same month prior year comparison and its difference using net change and formulas. Useful for analyzing month-over-month and year-over-year income statement trends, identifying performance shifts, and supporting variance analysis for management reporting.', MaxLength = 500;
CurrentMonthVPriorMonthCYLbl: Label 'IS Current Month v Prior Month for CY and Current Month v Prior Month for PY', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
CurrentMonthVPriorMonthCYTok: Label 'CNCVPNCYOY', Locked = true;
- DefaultLayoutInternalDescriptionLbl: Label 'Four-column layout displaying net change and balance at date, split into debit and credit amounts using general ledger entries. Positive values appear in debit columns, while negative values show in credit columns for clear interpretation. This layout is useful for detailed financial reporting, analyzing account movements, and supporting balance sheet and trial balance reconciliation by providing transparent debit-credit segregation across periods.', MaxLength = 500;
+ DefaultLayoutInternalDescriptionLbl: Label 'Four-column layout displaying net change and balance at date, split into debit and credit amounts using ledger entries. Positive values appear in debit columns, while negative values show in credit columns for clear interpretation. This layout is useful for detailed financial reporting, analyzing account movements, and supporting balance sheet and trial balance reconciliation by providing transparent debit-credit segregation across periods.', MaxLength = 500;
DefaultLayoutLbl: Label 'Standard Column Layout', MaxLength = 80;
DefaultLayoutTok: Label 'DEFAULT', MaxLength = 10;
- IncomeStatementInternalDescriptionLbl: Label 'Thirteen-column layout displaying monthly net changes for each month of the current fiscal year plus a total column calculated using formulas and general ledger entries. This structure provides a detailed view of income statement activity across all periods, enabling trend analysis and cumulative performance tracking. Useful for monitoring monthly revenue and expense movements, identifying seasonal patterns, and supporting financial planning, forecasting, and management reporting.', MaxLength = 500;
+ IncomeStatementInternalDescriptionLbl: Label 'Thirteen-column layout displaying monthly net changes for each month of the current fiscal year plus a total column calculated using formulas and ledger entries. This structure provides a detailed view of income statement activity across all periods, enabling trend analysis and cumulative performance tracking. Useful for monitoring monthly revenue and expense movements, identifying seasonal patterns, and supporting financial planning, forecasting, and management reporting.', MaxLength = 500;
IncomeStatementLbl: Label 'IS 12 Months Net Change Trending Current Fiscal Year', MaxLength = 80, Comment = 'IS - abbreviation of Income Statement';
IncomeStatementTrendTok: Label 'ISTREND', MaxLength = 10, Comment = 'Income Statement Trend';
- KeyCashFlowRatioInternalDescriptionLbl: Label 'Single-column layout displaying a key financial figure as of a specific date using balance at date and net amount from general ledger entries. This layout provides a clear snapshot of account balances at a point in time, ensuring accurate representation of financial position. Useful for balance sheet reporting, validating period-end figures, and supporting management decisions that require precise and timely data for compliance and performance analysis.', MaxLength = 500;
+ KeyCashFlowRatioInternalDescriptionLbl: Label 'Single-column layout displaying a key financial figure as of a specific date using balance at date and net amount from ledger entries. This layout provides a clear snapshot of account balances at a point in time, ensuring accurate representation of financial position. Useful for balance sheet reporting, validating period-end figures, and supporting management decisions that require precise and timely data for compliance and performance analysis.', MaxLength = 500;
KeyCashFlowRatioLbl: Label 'Key Cash Flow Ratio', MaxLength = 80;
KeyCashFlowRatioTok: Label 'DEGREE', MaxLength = 10;
- PeriodsDefinitionInternalDescriptionLbl: Label 'Three-column layout displaying net changes for the current period and two preceding periods using net change and net amount from general ledger entries. This structure provides a quick view of short-term financial performance, enabling trend analysis across consecutive periods. Useful for mini charts, dashboards, and reports that highlight recent activity, helping management monitor fluctuations and make timely decisions based on current and prior period comparisons.', MaxLength = 500;
+ PeriodsDefinitionInternalDescriptionLbl: Label 'Three-column layout displaying net changes for the current period and two preceding periods using net change and net amount from ledger entries. This structure provides a quick view of short-term financial performance, enabling trend analysis across consecutive periods. Useful for mini charts, dashboards, and reports that highlight recent activity, helping management monitor fluctuations and make timely decisions based on current and prior period comparisons.', MaxLength = 500;
PeriodsDefinitionLbl: Label 'Periods Definition for Mini Charts', MaxLength = 80;
PeriodsDefinitionTok: Label 'PERIODS', MaxLength = 10;
- TrialBalanceInternalDescriptionLbl: Label 'Four-column layout showing beginning balance, debit and credit movements, and calculated ending balance using general ledger entry amounts and a formula. This structure helps reconcile account activity and verify accuracy of postings. Useful for preparing trial balances, validating period-end balances, and ensuring that all transactions are correctly reflected in financial reports.', MaxLength = 500;
+ TrialBalanceInternalDescriptionLbl: Label 'Four-column layout showing beginning balance, debit and credit movements, and calculated ending balance using ledger entry amounts and a formula. This structure helps reconcile account activity and verify accuracy of postings. Useful for preparing trial balances, validating period-end balances, and ensuring that all transactions are correctly reflected in financial reports.', MaxLength = 500;
TrialBalanceLbl: Label 'TB Beginning Balance Debits Credits Ending Balance', MaxLength = 80, Comment = 'TB - abbreviation of Trial Balance';
}
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateDeferralTemplate.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateDeferralTemplate.Codeunit.al
index 27c976e88b..330774a116 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateDeferralTemplate.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateDeferralTemplate.Codeunit.al
@@ -14,13 +14,27 @@ codeunit 5389 "Create Deferral Template"
trigger OnRun()
var
+ FinanceModuleSetup: Record "Finance Module Setup";
ContosoDeferralTemplate: Codeunit "Contoso Deferral Template";
CreateGLAccount: Codeunit "Create G/L Account";
DeferralAccountNo: Code[20];
begin
+#if not CLEAN28
OnDefineDeferralAccountNo(DeferralAccountNo);
+ if DeferralAccountNo = '' then
+ if FinanceModuleSetup.Get() then
+ DeferralAccountNo := FinanceModuleSetup."Deferral Account No.";
+
+ if DeferralAccountNo = '' then
+ DeferralAccountNo := CreateGLAccount.OtherAccruedExpensesandDeferredIncome();
+#else
+ if DeferralAccountNo = '' then
+ if FinanceModuleSetup.Get() then
+ DeferralAccountNo := FinanceModuleSetup."Deferral Account No.";
+
if DeferralAccountNo = '' then
DeferralAccountNo := CreateGLAccount.OtherAccruedExpensesandDeferredIncome();
+#endif
ContosoDeferralTemplate.InsertDeferralTemplate(DeferralCode3M(), Description3M(), DeferralAccountNo, 100, Enum::"Deferral Calculation Method"::"Equal per Period", Enum::"Deferral Calculation Start Date"::"Beginning of Next Period", 3, '%4, %6');
ContosoDeferralTemplate.InsertDeferralTemplate(DeferralCode1Y(), Description1Y(), DeferralAccountNo, 100, Enum::"Deferral Calculation Method"::"Equal per Period", Enum::"Deferral Calculation Start Date"::"Beginning of Next Period", 12, '%4, %6');
end;
@@ -51,8 +65,13 @@ codeunit 5389 "Create Deferral Template"
Description3MTok: Label '3 months, equal, begin next period', MaxLength = 100;
Description1YTok: Label '1 year, equal, begin next period', MaxLength = 100;
+#if not CLEAN28
+#pragma warning disable AS0018
[IntegrationEvent(false, false)]
+ [Obsolete('This event will be removed in future releases.', '28.0')]
local procedure OnDefineDeferralAccountNo(var DeferralAccountNo: Code[20])
begin
end;
+#pragma warning restore AS0018
+#endif
}
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateAllocationAccount.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateAllocationAccount.Codeunit.al
new file mode 100644
index 0000000000..67ed13ef86
--- /dev/null
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateAllocationAccount.Codeunit.al
@@ -0,0 +1,60 @@
+// ------------------------------------------------------------------------------------------------
+// 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 5426 "Create Allocation Account"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ trigger OnRun()
+ var
+ FinanceModuleSetup: Record "Finance Module Setup";
+ 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
+ FinanceModuleSetup.Get();
+ ContosoAllocationAccount.InsertAllocationAccount(
+ Licenses(), LicensesDescription(),
+ 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",
+ GetGLAccForAllocationDistribution(CreateGLAccount.Software(), FinanceModuleSetup."Yearly License All. GLAcc No."), CreateDimensionValue.AdministrationDepartment(), '');
+ ContosoAllocationAccount.InsertAllocationAccountDistribution(
+ Licenses(), 20000, AllocAccountDistribution."Account Type"::Fixed, 1, 50,
+ AllocAccountDistribution."Destination Account Type"::"G/L Account",
+ GetGLAccForAllocationDistribution(CreateGLAccount.Software(), FinanceModuleSetup."Yearly License All. GLAcc No."), CreateDimensionValue.SalesDepartment(), '');
+ end;
+
+ procedure Licenses(): Code[20]
+ begin
+ exit(LicensesTok);
+ end;
+
+ procedure LicensesDescription(): Text[100]
+ begin
+ exit(YearlyLicenseFeeTok);
+ end;
+
+ local procedure GetGLAccForAllocationDistribution(DefaultAccountNo: Code[20]; FinModuleAccountNo: Code[20]): Code[20]
+ begin
+ if FinModuleAccountNo <> '' then
+ exit(FinModuleAccountNo)
+ else
+ exit(DefaultAccountNo);
+ end;
+
+ var
+ LicensesTok: Label 'LICENSES', MaxLength = 20;
+ YearlyLicenseFeeTok: Label 'Yearly license fee', MaxLength = 100;
+}
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateFinancialReport.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateFinancialReport.Codeunit.al
index 261d52a248..8c4464e9be 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateFinancialReport.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateFinancialReport.Codeunit.al
@@ -19,7 +19,7 @@ codeunit 5425 "Create Financial Report"
AccountScheduleName: Codeunit "Create Acc. Schedule Name";
begin
ContosoAccountSchedule.InsertFinancialReport(AccountCategoriesOverview(), AccountCategoriesOverviewLbl, AccountScheduleName.AccountCategoriesOverview(), ColumnLayoutName.PeriodsDefinition(), AccCatInternalDescriptionLbl);
- ContosoAccountSchedule.InsertFinancialReport(CapitalStructure(), CapitalStructureLbl, AccountScheduleName.CapitalStructure(), ColumnLayoutName.BalanceOnly(), CapitalStructureLblInternalDescriptionLbl);
+ ContosoAccountSchedule.InsertFinancialReport(CapitalStructure(), CapitalStructureLbl, AccountScheduleName.CapitalStructure(), ColumnLayoutName.BalanceOnly(), CapitalStructureInternalDescriptionLbl);
ContosoAccountSchedule.InsertFinancialReport(CalculationOfCashFlow(), CalculationOfCashFlowLbl, AccountScheduleName.CashFlowCalculation(), ColumnLayoutName.CashFlowComparison(), CalculationOfCashFlowInternalDescriptionLbl);
ContosoAccountSchedule.InsertFinancialReport(Revenues(), RevenuesLbl, AccountScheduleName.Revenues(), ColumnLayoutName.BudgetAnalysis(), RevenuesInternalDescriptionLbl);
@@ -108,23 +108,23 @@ codeunit 5425 "Create Financial Report"
end;
var
- AccCatInternalDescriptionLbl: Label 'Organizes account categories into structured rows grouped by balance sheet and income statement with calculated totals like income this year and net income, combined with columns showing net changes for the current and two prior periods. Useful for delivering consolidated financial overviews, short-term trend analysis, and comparative reporting to help management monitor fluctuations and make timely, informed decisions. Requires account categories to be defined on general ledger accounts.', MaxLength = 500;
+ AccCatInternalDescriptionLbl: Label 'Organizes balance sheet and income statement categories into structured rows with calculated totals like net income, combined with columns showing net changes for the current and two prior periods. Useful for delivering consolidated financial overviews, short-term trend analysis, dashboards, and comparative reporting to help management monitor fluctuations and make timely, informed decisions.', MaxLength = 500;
AccountCategoriesOverviewLbl: Label 'Account Categories overview', MaxLength = 80;
AccountCategoriesOverviewTok: Label 'ACC-CAT', MaxLength = 10;
- BalanceSheetDetailedInternalDescriptionLbl: Label 'Provides a detailed balance sheet layout with sections for current and long-term assets, current and long-term liabilities, and equity, including granular account ranges and reconciliation formulas for accuracy. Incorporates twelve columns showing month-end balances for the current fiscal year to highlight trends and seasonal changes. Useful for in-depth financial analysis, audit support, monitoring monthly financial position shifts, and preparing comprehensive management and compliance reports.', MaxLength = 500;
+ BalanceSheetDetailedInternalDescriptionLbl: Label 'Provides a detailed balance sheet layout with expanded sections for current and long-term assets, liabilities, and equity, including granular account ranges and reconciliation formulas for accuracy. Incorporates twelve columns showing month-end balances for the current fiscal year to reveal trends and seasonal changes. Useful for in-depth financial analysis, audit support, and preparing comprehensive management and compliance reports.', MaxLength = 500;
BalanceSheetDetailedLbl: Label 'Balance Sheet Detailed', MaxLength = 80;
BalanceSheetDetailedTok: Label 'BS DET', MaxLength = 10, Comment = 'Balance Sheet Detailed';
- BalanceSheetSummarizedInternalDescriptionLbl: Label 'Provides a concise balance sheet layout with a row layout summarizing assets, liabilities, and equity, including totals and check figure formulas for accuracy. Includes twelve columns showing month-end balances for the current fiscal year to highlight trends and seasonal changes. Useful for executive snapshots, quick reconciliation, period-end validation, and monitoring monthly financial position shifts for reporting and compliance.', MaxLength = 500;
+ BalanceSheetSummarizedInternalDescriptionLbl: Label 'Provides a concise balance sheet layout with a row layout summarizing assets, liabilities, and equity, including totals and check-figure formulas for accuracy. Includes twelve columns showing month-end balances for the current fiscal year to highlight trends and seasonal changes. Useful for executive snapshots, quick reconciliation, period-end validation, and monitoring monthly financial position shifts for reporting and compliance.', MaxLength = 500;
BalanceSheetSummarizedLbl: Label 'Balance Sheet Summarized', MaxLength = 80;
BalanceSheetSummarizedTok: Label 'BS SUM', MaxLength = 10, Comment = 'Balance Sheet Summarized';
- CalculationOfCashFlowInternalDescriptionLbl: Label 'Analyzes cash flow entries grouping receipts and disbursements by categories like receivables, payables, open orders, investments, and miscellaneous transactions, with formulas for totals, surplus, and overall cash flow using net change for dynamic movements. Includes three columns comparing monthly, cumulative, and fiscal year figures. Useful for liquidity planning, forecasting, trend analysis, and monitoring operational and investment cash positions.', MaxLength = 500;
+ CalculationOfCashFlowInternalDescriptionLbl: Label 'Analyzes cash flow analysis, grouping receipts and disbursements by categories like receivables, payables, open orders, investments, and miscellaneous transactions, with formulas for totals, surplus, and overall cash flow using net change for dynamic movements. Includes three columns comparing monthly, cumulative, and annual figures. Useful for liquidity planning, forecasting, trend analysis, and monitoring operational and investment cash positions.', MaxLength = 500;
CalculationOfCashFlowLbl: Label 'Calculation Of Cash Flow', MaxLength = 80;
CalculationOfCashFlowTok: Label 'CASHFLOW', MaxLength = 10;
CapitalStructureLbl: Label 'Capital Structure', MaxLength = 80;
- CapitalStructureLblInternalDescriptionLbl: Label 'Analyzes liquidity and short-term obligations with a row layout grouping current assets of accounts receivables and inventory, and short-term liabilities of accounts payable and personnel-related items, with a total line for current assets minus short-term Liabilities. A single column shows a snapshot of the balance as of a specific date. Useful for assessing working capital, liquidity ratios, and short-term financial health, supporting compliance, period-end reviews, and management reporting.', MaxLength = 500;
+ CapitalStructureInternalDescriptionLbl: Label 'Analyzes liquidity and short-term obligations with a row layout grouping current assets, receivables, inventory, WIP, and short-term liabilities, calculating totals and net positions. Paired with a single-column balance snapshot as of a specific date. Useful for assessing working capital, liquidity ratios, and short-term financial health, supporting compliance, period-end reviews, and management reporting.', MaxLength = 500;
CapitalStructureTok: Label 'ANALYSIS', MaxLength = 10;
- CashCycleInternalDescriptionLbl: Label 'Calculates key cash cycle metrics, including revenue, receivables, payables, and inventory balances, with formulas for days of sales outstanding, days of payment outstanding, days sales of inventory, and overall cash cycle in days. Includes three columns showing net changes for the current and two prior periods to enable short-term trend analysis. Useful for assessing working capital efficiency and improving liquidity management. Internal report used for providing data for the Cash Cycle chart.', MaxLength = 500;
- CashFlowInternalDescriptionLbl: Label 'Summarizes cash flow components, including receivables, payables, and liquid funds, with a formula to calculate total cash flow using balance at date for point-in-time positions. Includes three columns showing net changes for the current and two prior periods to enable short-term trend analysis. Useful for visual cash flow reporting, short-term financial planning, and monitoring available funds against obligations. Internal report used for providing data for the Cash Flow chart.', MaxLength = 500;
+ CashCycleInternalDescriptionLbl: Label 'Calculates key cash cycle metrics, including revenue, receivables, payables, and inventory balances, with formulas for DSO, DPO, DSI, and overall cash cycle in days. Includes three columns showing net changes for the current and two prior periods to enable short-term trend analysis. Useful for assessing working capital efficiency, optimizing payment terms, improving liquidity management, and supporting dashboards and mini charts. Internal report used for providing data for the Cash Cycle chart.', MaxLength = 500;
+ CashFlowInternalDescriptionLbl: Label 'Summarizes cash flow components, including receivables, payables, and liquid funds, with a formula to calculate total cash flow using balance at date for point-in-time positions. Incorporates three columns showing net changes for the current and two prior periods to enable short-term trend analysis. Useful for visual cash flow reporting, short-term financial planning, and monitoring available funds against obligations. Internal report used for providing data for the Cash Flow chart.', MaxLength = 500;
DataForCashCycleChartLbl: Label 'Data for Cash Cycle Chart', MaxLength = 80;
DataForCashCycleChartTok: Label 'I_CACYCLE', MaxLength = 10;
DataForCashFlowChartLbl: Label 'Data for Cash Flow Chart', MaxLength = 80;
@@ -134,17 +134,17 @@ codeunit 5425 "Create Financial Report"
DataForReducedTrialBalanceInfoPartLbl: Label 'Data for Reduced Trial Balance Info Part', MaxLength = 80;
DataForReducedTrialBalanceInfoPartTok: Label 'I_MINTRIAL', MaxLength = 10;
IncExpInternalDescriptionLbl: Label 'Analyzes income and expense components, including revenue, goods sold, external costs, personnel costs, depreciation, and other expenses, with formulas for total expenditure and earnings before interest using net change for accurate period tracking. Incorporates three columns showing net changes for the current and two prior periods. Useful for profitability analysis, expense monitoring, and management reporting. Internal report used for providing data for the Income & Expense chart.', MaxLength = 500;
- IncomeStatementDetailedInternalDescriptionLbl: Label 'Provides a summarized income statement with sections for revenue, cost of goods, operating expenses, with subrows for account ranges like product revenue and labor, plus formulas for gross margin, operating totals, net income or loss, and check figure for accuracy. Includes thirteen columns showing monthly net changes across the fiscal year with a total column. Useful for financial statement preparation, profitability analysis, trend monitoring, and management reporting.', MaxLength = 500;
+ IncomeStatementDetailedInternalDescriptionLbl: Label 'Provides a detailed multi-section income statement layout, covering revenue categories, cost of goods, and operating expenses with account ranges for materials, labor, overhead, and expense types, plus formulas for gross margin, operating totals, and net income or loss. Includes thirteen columns showing monthly net changes across the fiscal year with a total column. Useful for financial statement preparation, profitability analysis, trend monitoring, and management reporting.', MaxLength = 500;
IncomeStatementDetailedLbl: Label 'Income Statement Detailed', MaxLength = 80;
IncomeStatementDetailedTok: Label 'IS DET', MaxLength = 10, Comment = 'Income Statement Detailed';
IncomeStatementSummarizedInternalDescriptionLbl: Label 'Summarizes key income statement components, including revenue, cost of goods, and operating expenses, with formulas for gross margin, margin percentage, and net income or loss. Includes thirteen columns showing monthly net changes across the fiscal year plus a total column for cumulative performance. Useful for high-level reporting, management summaries, streamlined financial analysis, and monitoring profitability trends.', MaxLength = 500;
IncomeStatementSummarizedLbl: Label 'Income Statement Summarized', MaxLength = 80;
IncomeStatementSummarizedTok: Label 'IS SUM', MaxLength = 10, Comment = 'Income Statement Summarized';
ReducedTrialBalInternalDescriptionLbl: Label 'Summarizes nine key trial balance metrics in a structured layout, covering revenue, cost, operating expenses, and other expenses, with formulas for gross margin, operating margin, their percentages, and income before interest and tax. Includes three columns showing net changes for the current and two prior periods. Useful for quick profitability checks, margin analysis, and delivering condensed financial insights. Internal report used for providing data for the Reduced Trial Balance info part.', MaxLength = 500;
- RevenuesInternalDescriptionLbl: Label 'Categorizes revenue streams, including product sales, services, job-related income, and other income sources, with totals for retail and area-specific revenues to consolidate reporting. Shows columns for actual net change, budgeted amounts, variance percentage, and prior-year actual net change figures for performance comparison. Useful for revenue analysis, tracking budget accuracy, identifying variances, and evaluating year-over-year trends for financial planning.', MaxLength = 500;
+ RevenuesInternalDescriptionLbl: Label 'Categorizes revenue streams, including product sales, services, job-related income, and other income sources, with totals for retail and area-specific revenues to consolidate reporting. Shows actual net change, budgeted amounts, variance percentage, and prior-year figures for performance comparison. Useful for revenue analysis, tracking budget accuracy, identifying variances, and evaluating year-over-year trends for financial planning.', MaxLength = 500;
RevenuesLbl: Label 'Revenues', MaxLength = 80;
RevenuesTok: Label 'REVENUE', MaxLength = 10;
- TrialBalanceInternalDescriptionLbl: Label 'Displays a comprehensive trial balance layout listing all general ledger accounts with debit and credit balances, ensuring total debits equal total credits for accuracy. Shows beginning balance, debit and credit movements, and calculated ending balance for reconciliation. Useful for validating ledger integrity, preparing financial statements, reconciling account activity, and supporting audit and compliance processes.', MaxLength = 500;
+ TrialBalanceInternalDescriptionLbl: Label 'Displays a comprehensive trial balance layout listing all G/L accounts with debit and credit balances, ensuring total debits equal total credits for accuracy. Shows beginning balance, debit and credit movements, and calculated ending balance for reconciliation. Useful for validating ledger integrity, preparing financial statements, reconciling account activity, and supporting audit and compliance processes.', MaxLength = 500;
TrialBalanceLbl: Label 'Trial Balance', MaxLength = 80;
TrialBalanceTok: Label 'TB', MaxLength = 10, Comment = 'Trial Balance';
}
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModule.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModule.Codeunit.al
index 823c747c0a..2e509adb08 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModule.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModule.Codeunit.al
@@ -75,6 +75,7 @@ codeunit 5415 "Finance Module" implements "Contoso Demo Data Module"
Codeunit.Run(Codeunit::"Categ. Generate Acc. Schedules");
Codeunit.Run(Codeunit::"Create Currency Exchange Rate");
Codeunit.Run(Codeunit::"Create Resource");
+ Codeunit.Run(Codeunit::"Create Allocation Account");
end;
procedure CreateTransactionalData()
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModuleSetup.Table.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModuleSetup.Table.al
index 8525acc00e..54496c2cac 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModuleSetup.Table.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/FinanceModuleSetup.Table.al
@@ -5,6 +5,7 @@
namespace Microsoft.DemoData.Finance;
+using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.VAT.Setup;
table 4772 "Finance Module Setup"
@@ -38,6 +39,15 @@ table 4772 "Finance Module Setup"
Caption = 'No VAT Product Posting Group';
TableRelation = "VAT Product Posting Group";
}
+ field(5; "Yearly License All. GLAcc No."; Code[20])
+ {
+ Caption = 'Yearly License Allocation G/L Account No.';
+ TableRelation = "G/L Account";
+ }
+ field(6; "Deferral Account No."; Code[20])
+ {
+ Caption = 'Deferral Account No.';
+ }
}
keys
diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso Helpers/ContosoSales.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso Helpers/ContosoSales.Codeunit.al
index 5d4b6e2b4d..8701c7e38a 100644
--- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso Helpers/ContosoSales.Codeunit.al
+++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/Contoso Helpers/ContosoSales.Codeunit.al
@@ -128,4 +128,4 @@ codeunit 5124 "Contoso Sales"
else
exit(10000);
end;
-}
+}
\ No newline at end of file
diff --git a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookIntegrationImpl.Codeunit.al b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookIntegrationImpl.Codeunit.al
index fc0e6f2d5a..d7ffb11a16 100644
--- a/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookIntegrationImpl.Codeunit.al
+++ b/Apps/W1/EDocumentConnectors/Microsoft365/app/src/OutlookIntegrationImpl.Codeunit.al
@@ -92,6 +92,7 @@ codeunit 6386 "Outlook Integration Impl." implements IDocumentReceiver, IDocumen
if not EmailAccountV4Exists() then
exit(false);
end;
+ EmailAccounts.SetShowCreateAccount(true);
EmailAccounts.EnableLookupMode();
EmailAccounts.FilterConnectorV4Accounts(true);
if EmailAccounts.RunModal() <> Action::LookupOK then
diff --git a/Apps/W1/Email - SMTP Connector/app/src/SMTPAccountWizard.Page.al b/Apps/W1/Email - SMTP Connector/app/src/SMTPAccountWizard.Page.al
index e391a74ccc..a3f0e10af2 100644
--- a/Apps/W1/Email - SMTP Connector/app/src/SMTPAccountWizard.Page.al
+++ b/Apps/W1/Email - SMTP Connector/app/src/SMTPAccountWizard.Page.al
@@ -406,7 +406,7 @@ page 4511 "SMTP Account Wizard"
begin
// STEP 3 -> FINALIZE
if Step3Visible then begin
- if IsOAuthAuth() then
+ if IsOAuthAuth() and CustomOAuth then
AuthenticateWithOAuth2CustomAppReg();
EnsureAccountCreated();
diff --git a/Apps/W1/Email - SMTP Connector/test/src/SMTPAccountAuthTests.Codeunit.al b/Apps/W1/Email - SMTP Connector/test/src/SMTPAccountAuthTests.Codeunit.al
index 3beabc4cf6..e47df6dfcd 100644
--- a/Apps/W1/Email - SMTP Connector/test/src/SMTPAccountAuthTests.Codeunit.al
+++ b/Apps/W1/Email - SMTP Connector/test/src/SMTPAccountAuthTests.Codeunit.al
@@ -565,6 +565,115 @@ codeunit 139762 "SMTP Account Auth Tests"
Reply := true;
end;
+ [Test]
+ procedure TestOAuth2FlowWithoutCustomOAuth()
+ var
+ SMTPAccountWizard: TestPage "SMTP Account Wizard";
+ begin
+ // [SCENARIO] User sets up an SMTP account with OAuth 2.0 authentication without custom OAuth app registration
+ // [GIVEN] A new SMTP Account Wizard page is opened
+ SMTPAccountWizard.OpenNew();
+
+ // [WHEN] User fills in the basic account information on Step 1
+ SMTPAccountWizard.NameField.SetValue('Test OAuth Account');
+ SMTPAccountWizard.SenderTypeField.SetValue('Specific User');
+ SMTPAccountWizard.EmailAddress.SetValue('test@example.com');
+ SMTPAccountWizard.ServerUrl.SetValue('smtp.office365.com');
+ SMTPAccountWizard.ServerPort.SetValue(587);
+ SMTPAccountWizard.Authentication.SetValue('OAuth 2.0');
+
+ // [WHEN] User clicks Next to go to Step 2 (Custom OAuth question)
+ SMTPAccountWizard.Next.Invoke();
+
+ // [THEN] Step 2 should be visible with the custom OAuth option
+ // [WHEN] User does NOT enable custom OAuth and clicks Next to go to Step 3
+ // Custom checkbox should be unchecked by default
+ SMTPAccountWizard.Next.Invoke();
+
+ // [THEN] Step 3 should be visible
+ // [WHEN] User sets secure connection and clicks Next to finalize
+ SMTPAccountWizard.SecureConnection.SetValue(true);
+
+ // [THEN] User should be able to complete the wizard without providing Client Id, Client Secret, or Tenant Id
+ // The wizard should complete successfully without calling AuthenticateWithOAuth2CustomAppReg
+ SMTPAccountWizard.Next.Invoke();
+
+ end;
+
+ [Test]
+ procedure TestOAuth2FlowWithCustomOAuth()
+ var
+ SMTPAccountWizard: TestPage "SMTP Account Wizard";
+ begin
+ // [SCENARIO] User sets up an SMTP account with OAuth 2.0 authentication with custom OAuth app registration
+ // [GIVEN] A new SMTP Account Wizard page is opened
+ SMTPAccountWizard.OpenNew();
+
+ // [WHEN] User fills in the basic account information on Step 1
+ SMTPAccountWizard.NameField.SetValue('Test Custom OAuth Account');
+ SMTPAccountWizard.SenderTypeField.SetValue('Specific User');
+ SMTPAccountWizard.EmailAddress.SetValue('customoauth@example.com');
+ SMTPAccountWizard.ServerUrl.SetValue('smtp.office365.com');
+ SMTPAccountWizard.ServerPort.SetValue(587);
+ SMTPAccountWizard.Authentication.SetValue('OAuth 2.0');
+
+ // [WHEN] User clicks Next to go to Step 2 (Custom OAuth question)
+ SMTPAccountWizard.Next.Invoke();
+
+ // [THEN] Step 2 should be visible with the custom OAuth option
+ // [WHEN] User enables custom OAuth
+ SMTPAccountWizard.Custom.SetValue(true);
+
+ // [WHEN] User clicks Next to go to Step 3
+ SMTPAccountWizard.Next.Invoke();
+
+ // [THEN] Step 3 should be visible with OAuth fields
+ // [WHEN] User fills in the OAuth credentials
+ SMTPAccountWizard.UserName.SetValue('customoauth@example.com');
+ SMTPAccountWizard.SecureConnection.SetValue(true);
+ SMTPAccountWizard.ClientId.SetValue('test-client-id-12345');
+ SMTPAccountWizard.ClientSecret.SetValue('test-client-secret-67890');
+ SMTPAccountWizard."Tenant Id".SetValue('CDEF7890-ABCD-0123-1234-567890ABCDEF');
+
+ // [WHEN] User clicks Next to finalize
+ // [THEN] The wizard should call AuthenticateWithOAuth2CustomAppReg and attempt OAuth authentication
+ asserterror SMTPAccountWizard.Next.Invoke();
+ Assert.ExpectedError('Consent authorization failed. Please try again or contact your administrator');
+
+ // [THEN] The wizard should close and account should be created with custom OAuth settings
+ SMTPAccountWizard.Close();
+ end;
+
+ [Test]
+ procedure TestBasicAuthFlowSkipsOAuthSteps()
+ var
+ SMTPAccountWizard: TestPage "SMTP Account Wizard";
+ begin
+ // [SCENARIO] User sets up an SMTP account with Basic authentication - should skip OAuth steps
+ // [GIVEN] A new SMTP Account Wizard page is opened
+ SMTPAccountWizard.OpenNew();
+
+ // [WHEN] User fills in the basic account information on Step 1
+ SMTPAccountWizard.NameField.SetValue('Test Basic Auth Account');
+ SMTPAccountWizard.SenderTypeField.SetValue('Specific User');
+ SMTPAccountWizard.EmailAddress.SetValue('basic@example.com');
+ SMTPAccountWizard.ServerUrl.SetValue('smtp.example.com');
+ SMTPAccountWizard.ServerPort.SetValue(587);
+ SMTPAccountWizard.Authentication.SetValue('Basic');
+
+ // [WHEN] User clicks Next
+ SMTPAccountWizard.Next.Invoke();
+
+ // [THEN] Should go directly to Step 3 (skipping Step 2 - Custom OAuth question)
+ // [WHEN] User fills in credentials
+ SMTPAccountWizard.UserName.SetValue('basic@example.com');
+ SMTPAccountWizard.Password.SetValue('testpassword');
+ SMTPAccountWizard.SecureConnection.SetValue(true);
+
+ // [WHEN] User clicks Next to finalize
+ SMTPAccountWizard.Next.Invoke();
+ end;
+
#endregion
#region Wizard page tests
diff --git a/Apps/W1/ExciseTaxes/app/ExtensionLogo.png b/Apps/W1/ExciseTaxes/app/ExtensionLogo.png
new file mode 100644
index 0000000000..7ab63bb28b
Binary files /dev/null and b/Apps/W1/ExciseTaxes/app/ExtensionLogo.png differ
diff --git a/Apps/W1/ExciseTaxes/app/app.json b/Apps/W1/ExciseTaxes/app/app.json
new file mode 100644
index 0000000000..9394ad2c2e
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/app.json
@@ -0,0 +1,40 @@
+{
+ "id": "a7bd3b4e-5469-4185-88b5-06745dd4c153",
+ "name": "Excise Taxes",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0",
+ "logo": "./ExtensionLogo.png",
+ "brief": "Excise Tax module enables users to calculate and report excise taxes on items and fixed assets based on different tax bases (weight, volume, content). Supports multiple tax types including plastic, sugar, cannabis, petrol, cigarettes, and spirit taxes.",
+ "description": "Excise Tax module provides comprehensive functionality for calculating, collecting, and reporting excise taxes across various tax types. The solution supports weight-based taxes (plastic, cigarettes), content-based taxes (sugar, THC), volume-based taxes (petrol), and alcohol content-based taxes (spirits). Users can configure tax rates by entry types, automatically calculate taxes from Item and Fixed Asset ledger entries, and generate compliance reports. The module includes journal-based processing with batch management and configurable tax type captions for different jurisdictions.",
+ "privacyStatement": "https://go.microsoft.com/fwlink/?linkid=724009",
+ "EULA": "https://go.microsoft.com/fwlink/?linkid=724013",
+ "help": "https://go.microsoft.com/fwlink/?linkid=2139719",
+ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2139719",
+ "url": "https://go.microsoft.com/fwlink/?linkid=724011",
+ "dependencies": [
+ {
+ "id": "b3780cd9-f8f8-4a83-a4d5-0c2ad87b28af",
+ "name": "Sustainability",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ }
+ ],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "application": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 7412,
+ "to": 7460
+ }
+ ],
+ "features": [
+ "TranslationFile"
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "target": "Cloud"
+}
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesAdmin.permissionset.al b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesAdmin.permissionset.al
new file mode 100644
index 0000000000..9ca99ac466
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesAdmin.permissionset.al
@@ -0,0 +1,14 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+permissionset 7453 "ExciseTaxes - Admin"
+{
+ Caption = 'Excise Taxes - Admin';
+ Access = Public;
+ Assignable = true;
+
+ IncludedPermissionSets = "ExciseTaxes - Edit";
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesEdit.permissionset.al b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesEdit.permissionset.al
new file mode 100644
index 0000000000..280736c073
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesEdit.permissionset.al
@@ -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.ExciseTaxes;
+
+permissionset 7452 "ExciseTaxes - Edit"
+{
+ Caption = 'Excise Taxes - Edit';
+ Access = Public;
+ Assignable = true;
+
+ IncludedPermissionSets = "ExciseTaxes - Read";
+
+ Permissions =
+ tabledata "Excise Tax Type" = IMD,
+ tabledata "Excise Tax Item/FA Rate" = IMD,
+ tabledata "Excise Tax Entry Permission" = IMD;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesObjects.permissionset.al b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesObjects.permissionset.al
new file mode 100644
index 0000000000..0f611247f9
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesObjects.permissionset.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+permissionset 7450 "ExciseTaxes - Objects"
+{
+ Caption = 'Excise Taxes - Objects';
+ Access = Internal;
+ Assignable = false;
+
+ Permissions =
+ table "Excise Tax Type" = X,
+ table "Excise Tax Item/FA Rate" = X,
+ table "Excise Tax Entry Permission" = X,
+ page "Excise Tax Types" = X,
+ page "Excise Tax Type Card" = X,
+ page "Excise Tax Item/FA Rates" = X,
+ page "Excise Tax Entry Permissions" = X,
+ report "Create Excise Tax Jnl. Entries" = X;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesRead.permissionset.al b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesRead.permissionset.al
new file mode 100644
index 0000000000..052598e6b9
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/ExciseTaxesRead.permissionset.al
@@ -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.ExciseTaxes;
+
+permissionset 7451 "ExciseTaxes - Read"
+{
+ Caption = 'Excise Taxes - Read';
+ Access = Public;
+ Assignable = true;
+
+ IncludedPermissionSets = "ExciseTaxes - Objects";
+
+ Permissions =
+ tabledata "Excise Tax Type" = R,
+ tabledata "Excise Tax Item/FA Rate" = R,
+ tabledata "Excise Tax Entry Permission" = R;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/d365BasicExciseTaxes.PermissionsetExt.al b/Apps/W1/ExciseTaxes/app/src/Permissions/d365BasicExciseTaxes.PermissionsetExt.al
new file mode 100644
index 0000000000..dae1c87c37
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/d365BasicExciseTaxes.PermissionsetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using System.Security.AccessControl;
+
+permissionsetextension 7454 "D365 BASIC ExciseTaxes" extends "D365 BASIC"
+{
+ IncludedPermissionSets = "ExciseTaxes - Edit";
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/d365BusFullAccessExciseTaxes.PermissionsetExt.al b/Apps/W1/ExciseTaxes/app/src/Permissions/d365BusFullAccessExciseTaxes.PermissionsetExt.al
new file mode 100644
index 0000000000..e3c75e6ad5
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/d365BusFullAccessExciseTaxes.PermissionsetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using System.Security.AccessControl;
+
+permissionsetextension 7455 "D365 BUS FULL ACCESS ExciseTaxes" extends "D365 BUS FULL ACCESS"
+{
+ IncludedPermissionSets = "ExciseTaxes - Admin";
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/d365ReadExciseTaxes.PermissionsetExt.al b/Apps/W1/ExciseTaxes/app/src/Permissions/d365ReadExciseTaxes.PermissionsetExt.al
new file mode 100644
index 0000000000..46ae9556ac
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/d365ReadExciseTaxes.PermissionsetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using System.Security.AccessControl;
+
+permissionsetextension 7456 "D365 READ ExciseTaxes" extends "D365 READ"
+{
+ IncludedPermissionSets = "ExciseTaxes - Read";
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/Permissions/d365TeamMemberExciseTaxes.PermissionsetExt.al b/Apps/W1/ExciseTaxes/app/src/Permissions/d365TeamMemberExciseTaxes.PermissionsetExt.al
new file mode 100644
index 0000000000..88a41dc384
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/Permissions/d365TeamMemberExciseTaxes.PermissionsetExt.al
@@ -0,0 +1,12 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using System.Security.AccessControl;
+
+permissionsetextension 7457 "D365 TEAM MEMBER ExciseTaxes" extends "D365 TEAM MEMBER"
+{
+ IncludedPermissionSets = "ExciseTaxes - Edit";
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxCalculation.Codeunit.al b/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxCalculation.Codeunit.al
new file mode 100644
index 0000000000..e0cc360a3d
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxCalculation.Codeunit.al
@@ -0,0 +1,302 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.FixedAssets.Ledger;
+using Microsoft.Foundation.NoSeries;
+using Microsoft.Inventory.Item;
+using Microsoft.Inventory.Ledger;
+using Microsoft.Purchases.Payables;
+using Microsoft.Sustainability.ExciseTax;
+
+codeunit 7412 "Excise Tax Calculation"
+{
+ Permissions = tabledata "Item Ledger Entry" = rm,
+ tabledata "FA Ledger Entry" = rm;
+
+ var
+ ExciseJournalBatch: Record "Sust. Excise Journal Batch";
+
+ internal procedure UpdateItemLedgerEntryExciseTaxInfo(ExciseTaxesTransactionLog: Record "Sust. Excise Taxes Trans. Log")
+ var
+ ItemLedgerEntry: Record "Item Ledger Entry";
+ begin
+ if ExciseTaxesTransactionLog."Item Ledger Entry No." = 0 then
+ exit;
+
+ ItemLedgerEntry.SetLoadFields("Excise Tax Posted");
+ ItemLedgerEntry.Get(ExciseTaxesTransactionLog."Item Ledger Entry No.");
+ ItemLedgerEntry."Excise Tax Posted" := true;
+ ItemLedgerEntry.Modify();
+ end;
+
+ internal procedure UpdateFALedgerEntryExciseTaxInfo(ExciseTaxesTransactionLog: Record "Sust. Excise Taxes Trans. Log")
+ var
+ FALedgerEntry: Record "FA Ledger Entry";
+ begin
+ if ExciseTaxesTransactionLog."FA Ledger Entry No." = 0 then
+ exit;
+
+ FALedgerEntry.SetLoadFields("Excise Tax Posted");
+ FALedgerEntry.Get(ExciseTaxesTransactionLog."FA Ledger Entry No.");
+ FALedgerEntry."Excise Tax Posted" := true;
+ FALedgerEntry.Modify();
+ end;
+
+ internal procedure IsExciseTaxEntry(var ExciseJnlLine: Record "Sust. Excise Jnl. Line"): Boolean
+ var
+ ExciseJnlBatch: Record "Sust. Excise Journal Batch";
+ begin
+ ExciseJnlBatch.SetLoadFields(Type);
+ if ExciseJnlBatch.Get(ExciseJnlLine."Journal Template Name", ExciseJnlLine."Journal Batch Name") then
+ if ExciseJnlBatch.Type = ExciseJnlBatch.Type::Excises then
+ exit(true);
+ end;
+
+ internal procedure CreateExciseJournalLineForItem(TaxTypeCode: Code[20]; StartingDate: Date; EndingDate: Date; ItemFilter: Text[250]; PostingDate: Date)
+ var
+ Item: Record Item;
+ begin
+ Item.SetLoadFields("Excise Tax Type");
+ Item.SetRange("Excise Tax Type", TaxTypeCode);
+ if ItemFilter <> '' then
+ Item.SetFilter("No.", ItemFilter);
+
+ if Item.FindSet() then
+ repeat
+ ProcessEntryTypesForSource(Item."No.", "Sust. Excise Jnl. Source Type"::Item, Item."Excise Tax Type", StartingDate, EndingDate, PostingDate);
+ until Item.Next() = 0;
+ end;
+
+ internal procedure CreateExciseJournalLineForFixedAsset(TaxTypeCode: Code[20]; StartingDate: Date; EndingDate: Date; FixedAssetFilter: Text[250]; PostingDate: Date)
+ var
+ FixedAsset: Record "Fixed Asset";
+ begin
+ FixedAsset.SetLoadFields("Excise Tax Type");
+ if FixedAssetFilter <> '' then
+ FixedAsset.SetFilter("No.", FixedAssetFilter);
+
+ FixedAsset.SetRange("Excise Tax Type", TaxTypeCode);
+ if FixedAsset.FindSet() then
+ repeat
+ if FixedAsset."Excise Tax Type" <> '' then
+ ProcessEntryTypesForSource(FixedAsset."No.", "Sust. Excise Jnl. Source Type"::"Fixed Asset", FixedAsset."Excise Tax Type", StartingDate, EndingDate, PostingDate);
+ until FixedAsset.Next() = 0;
+ end;
+
+ internal procedure SetExciseJournalBatch(var ExciseJnlBatch: Record "Sust. Excise Journal Batch")
+ begin
+ ExciseJournalBatch := ExciseJnlBatch;
+ end;
+
+ local procedure GetLastLineNo(TemplateName: Code[10]; BatchName: Code[10]): Integer
+ var
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJnlLine.SetRange("Journal Template Name", TemplateName);
+ ExciseJnlLine.SetRange("Journal Batch Name", BatchName);
+ if ExciseJnlLine.FindLast() then
+ exit(ExciseJnlLine."Line No." + 10000);
+
+ exit(10000);
+ end;
+
+ local procedure ProcessEntryTypesForSource(SourceNo: Code[20]; SourceType: Enum "Sust. Excise Jnl. Source Type"; TaxType: Code[20]; StartingDate: Date; EndingDate: Date; PostingDate: Date)
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ TempExciseEntryPermission: Record "Excise Tax Entry Permission" temporary;
+ begin
+ ExciseTaxEntryPermission.GetAllowedEntryTypes(TaxType, TempExciseEntryPermission);
+
+ if SourceType = SourceType::"Fixed Asset" then
+ TempExciseEntryPermission.SetRange("Excise Entry Type", TempExciseEntryPermission."Excise Entry Type"::Purchase);
+
+ if not TempExciseEntryPermission.FindSet() then
+ exit;
+
+ repeat
+ CreateExciseJournalLineForItemAndFixedAsset(TaxType, SourceNo, SourceType, TempExciseEntryPermission."Excise Entry Type", StartingDate, EndingDate, PostingDate);
+ until TempExciseEntryPermission.Next() = 0;
+ end;
+
+ local procedure CreateExciseJournalLineForItemAndFixedAsset(TaxType: Code[20]; SourceNo: Code[20]; SourceType: Enum "Sust. Excise Jnl. Source Type"; EntryType: Enum "Excise Entry Type"; StartingDate: Date; EndingDate: Date; PostingDate: Date)
+ begin
+ case SourceType of
+ "Sust. Excise Jnl. Source Type"::Item:
+ CreateExciseJournalLineForItem(TaxType, SourceNo, EntryType, StartingDate, EndingDate, PostingDate);
+ "Sust. Excise Jnl. Source Type"::"Fixed Asset":
+ CreateExciseJournalLineForFixedAsset(TaxType, SourceNo, EntryType, StartingDate, EndingDate, PostingDate);
+ end;
+ end;
+
+ local procedure CreateExciseJournalLineForItem(TaxType: Code[20]; ItemNo: Code[20]; EntryType: Enum "Excise Entry Type"; StartingDate: Date; EndingDate: Date; PostingDate: Date)
+ var
+ ItemLedgerEntry: Record "Item Ledger Entry";
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ LineNo: Integer;
+ begin
+ ExciseJournalBatch.TestField("Journal Template Name");
+ ExciseJournalBatch.TestField(Type, ExciseJournalBatch.Type::Excises);
+
+ LineNo := GetLastLineNo(ExciseJournalBatch."Journal Template Name", ExciseJournalBatch.Name);
+
+ ItemLedgerEntry.SetRange("Item No.", ItemNo);
+ ItemLedgerEntry.SetRange("Posting Date", StartingDate, EndingDate);
+ ItemLedgerEntry.SetRange("Excise Tax Posted", false);
+ SetFilterOnILEEntryType(EntryType, ItemLedgerEntry);
+ if ItemLedgerEntry.FindSet() then
+ repeat
+ if not ExciseJournalLineExist(ItemLedgerEntry) then begin
+ InitializeExciseJournalLine(ExciseJnlLine, ExciseJournalBatch, PostingDate, LineNo);
+ UpdateExciseJournalLineFromItemLedgerEntry(ExciseJnlLine, ItemLedgerEntry, TaxType, EntryType);
+ ExciseJnlLine.Insert(true);
+ LineNo += 10000;
+ end;
+ until ItemLedgerEntry.Next() = 0;
+ end;
+
+ local procedure CreateExciseJournalLineForFixedAsset(TaxType: Code[20]; FANo: Code[20]; EntryType: Enum "Excise Entry Type"; FromDate: Date; ToDate: Date; PostingDate: Date)
+ var
+ FALedgerEntry: Record "FA Ledger Entry";
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ LineNo: Integer;
+ begin
+ ExciseJournalBatch.TestField("Journal Template Name");
+ ExciseJournalBatch.TestField(Type, ExciseJournalBatch.Type::Excises);
+
+ LineNo := GetLastLineNo(ExciseJournalBatch."Journal Template Name", ExciseJournalBatch.Name);
+
+ FALedgerEntry.SetRange("FA No.", FANo);
+ FALedgerEntry.SetRange("Posting Date", FromDate, ToDate);
+ FALedgerEntry.SetRange("FA Posting Type", FALedgerEntry."FA Posting Type"::"Acquisition Cost");
+ FALedgerEntry.SetRange("Excise Tax Posted", false);
+ if FALedgerEntry.FindSet() then
+ repeat
+ if not ExciseJournalLineExist(FALedgerEntry) then begin
+ InitializeExciseJournalLine(ExciseJnlLine, ExciseJournalBatch, PostingDate, LineNo);
+ UpdateExciseJournalLineFromFALedgerEntry(ExciseJnlLine, FALedgerEntry, TaxType, EntryType);
+ ExciseJnlLine.Insert(true);
+ LineNo += 10000;
+ end;
+ until FALedgerEntry.Next() = 0;
+ end;
+
+ local procedure GetPartnerDetailFromILE(ItemLedgerEntry: Record "Item Ledger Entry"; var PartnerType: Enum "Sust. Excise Jnl. Partner Type"; var PartnerNo: Code[20])
+ begin
+ case ItemLedgerEntry."Source Type" of
+ ItemLedgerEntry."Source Type"::Customer:
+ begin
+ PartnerType := PartnerType::Customer;
+ PartnerNo := ItemLedgerEntry."Source No.";
+ end;
+ ItemLedgerEntry."Source Type"::Vendor:
+ begin
+ PartnerType := PartnerType::Vendor;
+ PartnerNo := ItemLedgerEntry."Source No.";
+ end;
+ else begin
+ PartnerType := PartnerType::" ";
+ PartnerNo := '';
+ end;
+ end;
+ end;
+
+ local procedure SetFilterOnILEEntryType(EntryType: Enum "Excise Entry Type"; var ItemLedgerEntry: Record "Item Ledger Entry")
+ begin
+ case EntryType of
+ "Excise Entry Type"::Purchase:
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::Purchase);
+ "Excise Entry Type"::Sale:
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::Sale);
+ "Excise Entry Type"::"Positive Adjmt.":
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::"Positive Adjmt.");
+ "Excise Entry Type"::"Negative Adjmt.":
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::"Negative Adjmt.");
+ "Excise Entry Type"::Output:
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::Output);
+ "Excise Entry Type"::"Assembly Output":
+ ItemLedgerEntry.SetRange("Entry Type", ItemLedgerEntry."Entry Type"::"Assembly Output");
+ end;
+ end;
+
+ local procedure GetPartnerNo(FALedgerEntry: Record "FA Ledger Entry"): Code[20]
+ var
+ VendorLedgerEntry: Record "Vendor Ledger Entry";
+ begin
+ if FALedgerEntry."Document Type" <> FALedgerEntry."Document Type"::Invoice then
+ exit;
+
+ VendorLedgerEntry.SetRange("Document No.", FALedgerEntry."Document No.");
+ VendorLedgerEntry.SetRange("Document Type", VendorLedgerEntry."Document Type"::Invoice);
+ if VendorLedgerEntry.FindFirst() then
+ exit(VendorLedgerEntry."Vendor No.");
+ end;
+
+ local procedure InitializeExciseJournalLine(var ExciseJnlLine: Record "Sust. Excise Jnl. Line"; ExciseJnlBatch: Record "Sust. Excise Journal Batch"; PostingDate: Date; LineNo: Integer);
+ var
+ NoSeriesBatch: Codeunit "No. Series - Batch";
+ begin
+ ExciseJnlLine.Init();
+ ExciseJnlLine."Journal Template Name" := ExciseJnlBatch."Journal Template Name";
+ ExciseJnlLine."Journal Batch Name" := ExciseJnlBatch.Name;
+ ExciseJnlLine."Line No." := LineNo;
+ ExciseJnlLine."Posting Date" := PostingDate;
+ ExciseJnlLine."Document No." := NoSeriesBatch.GetNextNo(ExciseJnlBatch."No Series", ExciseJnlLine."Posting Date");
+ ExciseJnlLine."Document Type" := ExciseJnlLine."Document Type"::Journal;
+ ExciseJnlLine."Source Code" := ExciseJnlBatch."Source Code";
+ ExciseJnlLine."Reason Code" := ExciseJnlBatch."Reason Code";
+ end;
+
+ local procedure UpdateExciseJournalLineFromItemLedgerEntry(var ExciseJnlLine: Record "Sust. Excise Jnl. Line"; ItemLedgerEntry: Record "Item Ledger Entry"; TaxType: Code[20]; EntryType: Enum "Excise Entry Type")
+ var
+ PartnerType: Enum "Sust. Excise Jnl. Partner Type";
+ PartnerNo: Code[20];
+ begin
+ GetPartnerDetailFromILE(ItemLedgerEntry, PartnerType, PartnerNo);
+ ExciseJnlLine.Description := ItemLedgerEntry.Description;
+ ExciseJnlLine."Excise Tax Type" := TaxType;
+ ExciseJnlLine."Excise Entry Type" := EntryType;
+ ExciseJnlLine.Validate("Partner Type", PartnerType);
+ ExciseJnlLine.Validate("Partner No.", PartnerNo);
+ ExciseJnlLine.Validate("Source Type", ExciseJnlLine."Source Type"::Item);
+ ExciseJnlLine.Validate("Source No.", ItemLedgerEntry."Item No.");
+ ExciseJnlLine.Validate("Source Qty.", Abs(ItemLedgerEntry.Quantity));
+ ExciseJnlLine."Item Ledger Entry No." := ItemLedgerEntry."Entry No.";
+ end;
+
+ local procedure UpdateExciseJournalLineFromFALedgerEntry(var ExciseJnlLine: Record "Sust. Excise Jnl. Line"; FALedgerEntry: Record "FA Ledger Entry"; TaxType: Code[20]; EntryType: Enum "Excise Entry Type")
+ begin
+ ExciseJnlLine.Description := FALedgerEntry.Description;
+ ExciseJnlLine."Excise Tax Type" := TaxType;
+ ExciseJnlLine."Excise Entry Type" := EntryType;
+ ExciseJnlLine.Validate("Partner Type", ExciseJnlLine."Partner Type"::Vendor);
+ ExciseJnlLine.Validate("Partner No.", GetPartnerNo(FALedgerEntry));
+ ExciseJnlLine.Validate("Source Type", ExciseJnlLine."Source Type"::"Fixed Asset");
+ ExciseJnlLine.Validate("Source No.", FALedgerEntry."FA No.");
+ ExciseJnlLine.Validate("Source Qty.", 1);
+ ExciseJnlLine."FA Ledger Entry No." := FALedgerEntry."Entry No.";
+ end;
+
+ local procedure ExciseJournalLineExist(ItemLedgerEntry: Record "Item Ledger Entry"): Boolean
+ var
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJournalLine.SetLoadFields("Item Ledger Entry No.");
+ ExciseJournalLine.SetRange("Item Ledger Entry No.", ItemLedgerEntry."Entry No.");
+ if not ExciseJournalLine.IsEmpty() then
+ exit(true);
+ end;
+
+ local procedure ExciseJournalLineExist(FALedgerEntry: Record "FA Ledger Entry"): Boolean
+ var
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJournalLine.SetLoadFields("FA Ledger Entry No.");
+ ExciseJournalLine.SetRange("FA Ledger Entry No.", FALedgerEntry."Entry No.");
+ if not ExciseJournalLine.IsEmpty() then
+ exit(true);
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxTransSubscriber.Codeunit.al b/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxTransSubscriber.Codeunit.al
new file mode 100644
index 0000000000..c7986d1fcd
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/codeunit/ExciseTaxTransSubscriber.Codeunit.al
@@ -0,0 +1,87 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Inventory.Item;
+using Microsoft.Sustainability.ExciseTax;
+
+codeunit 7413 "Excise Tax Trans Subscriber"
+{
+ [EventSubscriber(ObjectType::Table, Database::"Sust. Excise Taxes Trans. Log", OnAfterCopyFromSustainabilityExciseJnlLine, '', false, false)]
+ local procedure OnAfterCopyFromSustainabilityExciseJnlLine(var SustExciseTaxesTransactionLog: Record "Sust. Excise Taxes Trans. Log"; SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line")
+ var
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ if not ExciseTaxCalculation.IsExciseTaxEntry(SustainabilityExciseJnlLine) then
+ exit;
+
+ SustExciseTaxesTransactionLog."Excise Tax Type" := SustainabilityExciseJnlLine."Excise Tax Type";
+ SustExciseTaxesTransactionLog."Tax Rate %" := SustainabilityExciseJnlLine."Tax Rate %";
+ SustExciseTaxesTransactionLog."Tax Amount" := SustainabilityExciseJnlLine."Tax Amount";
+ SustExciseTaxesTransactionLog."Quantity for Excise Tax" := SustainabilityExciseJnlLine."Quantity for Excise Tax";
+ SustExciseTaxesTransactionLog."Excise Unit of Measure Code" := SustainabilityExciseJnlLine."Excise Unit of Measure Code";
+ SustExciseTaxesTransactionLog."Excise Entry Type" := SustainabilityExciseJnlLine."Excise Entry Type";
+ SustExciseTaxesTransactionLog."FA Ledger Entry No." := SustainabilityExciseJnlLine."FA Ledger Entry No.";
+ ExciseTaxCalculation.UpdateItemLedgerEntryExciseTaxInfo(SustExciseTaxesTransactionLog);
+ ExciseTaxCalculation.UpdateFALedgerEntryExciseTaxInfo(SustExciseTaxesTransactionLog);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sust. Excise Jnl.-Check", OnBeforeTestEmissionAmount, '', false, false)]
+ local procedure OnBeforeTestEmissionAmount(SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line"; var IsHandled: Boolean)
+ var
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ if ExciseTaxCalculation.IsExciseTaxEntry(SustainabilityExciseJnlLine) then
+ IsHandled := true;
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Sust. Excise Jnl. Line", OnValidateSourceNoBeforeTestFieldPartnerNo, '', false, false)]
+ local procedure OnValidateSourceNoBeforeTestFieldPartnerNo(var SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line"; var IsHandled: Boolean)
+ var
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ if ExciseTaxCalculation.IsExciseTaxEntry(SustainabilityExciseJnlLine) then
+ IsHandled := true;
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Sust. Excise Jnl. Line", OnAfterCopyFromItem, '', false, false)]
+ local procedure OnAfterCopyFromItem(var ExciseJournalLine: Record "Sust. Excise Jnl. Line"; Item: Record Item)
+ var
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ if not ExciseTaxCalculation.IsExciseTaxEntry(ExciseJournalLine) then
+ exit;
+
+ ExciseJournalLine.Validate("Excise Unit of Measure Code", Item."Excise Unit of Measure Code");
+ ExciseJournalLine.Validate("Quantity for Excise Tax", Item."Quantity for Excise Tax");
+ ExciseJournalLine.Validate("Tax Rate %", GetTaxRateForSource(ExciseJournalLine."Excise Tax Type", ExciseJournalLine."Source Type", ExciseJournalLine."Source No.", ExciseJournalLine."Posting Date"));
+ end;
+
+ [EventSubscriber(ObjectType::Table, Database::"Sust. Excise Jnl. Line", OnAfterCopyFromFixedAsset, '', false, false)]
+ local procedure OnAfterCopyFromFixedAsset(var ExciseJournalLine: Record "Sust. Excise Jnl. Line"; FixedAsset: Record "Fixed Asset")
+ var
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ if not ExciseTaxCalculation.IsExciseTaxEntry(ExciseJournalLine) then
+ exit;
+
+ ExciseJournalLine.TestField("Excise Tax Type");
+ ExciseJournalLine.Validate("Excise Unit of Measure Code", FixedAsset."Excise Unit of Measure Code");
+ ExciseJournalLine.Validate("Quantity for Excise Tax", FixedAsset."Quantity for Excise Tax");
+ ExciseJournalLine.Validate("Tax Rate %", GetTaxRateForSource(ExciseJournalLine."Excise Tax Type", ExciseJournalLine."Source Type", ExciseJournalLine."Source No.", ExciseJournalLine."Posting Date"));
+ end;
+
+ local procedure GetTaxRateForSource(TaxTypeCode: Code[20]; SourceType: Enum "Sust. Excise Jnl. Source Type"; SourceNo: Code[20]; EffectiveDate: Date): Decimal
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ TaxRate: Decimal;
+ ExciseSourceType: Enum "Excise Source Type";
+ begin
+ ExciseSourceType := ExciseTaxItemFARate.ConvertSustSourceTypeToExciseSourceType(SourceType);
+ if ExciseTaxItemFARate.GetEffectiveTaxRate(TaxTypeCode, ExciseSourceType, SourceNo, EffectiveDate, TaxRate) then
+ exit(TaxRate);
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/enum/ExciseEntryType.Enum.al b/Apps/W1/ExciseTaxes/app/src/enum/ExciseEntryType.Enum.al
new file mode 100644
index 0000000000..c0b0a7996e
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/enum/ExciseEntryType.Enum.al
@@ -0,0 +1,39 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+enum 7412 "Excise Entry Type"
+{
+ Extensible = true;
+
+ value(0; " ")
+ {
+ Caption = ' ';
+ }
+ value(1; Purchase)
+ {
+ Caption = 'Purchase';
+ }
+ value(2; Sale)
+ {
+ Caption = 'Sales';
+ }
+ value(3; "Positive Adjmt.")
+ {
+ Caption = 'Positive Adjustment';
+ }
+ value(4; "Negative Adjmt.")
+ {
+ Caption = 'Negative Adjustment';
+ }
+ value(5; Output)
+ {
+ Caption = 'Output';
+ }
+ value(6; "Assembly Output")
+ {
+ Caption = 'Assembly Output';
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/enum/ExciseSourceType.Enum.al b/Apps/W1/ExciseTaxes/app/src/enum/ExciseSourceType.Enum.al
new file mode 100644
index 0000000000..597d58f064
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/enum/ExciseSourceType.Enum.al
@@ -0,0 +1,24 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+enum 7413 "Excise Source Type"
+{
+ Caption = 'Excise Source Type';
+ Extensible = true;
+
+ value(0; " ")
+ {
+ Caption = ' ';
+ }
+ value(1; Item)
+ {
+ Caption = 'Item';
+ }
+ value(2; "Fixed Asset")
+ {
+ Caption = 'Fixed Asset';
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/enum/ExciseTaxBasis.Enum.al b/Apps/W1/ExciseTaxes/app/src/enum/ExciseTaxBasis.Enum.al
new file mode 100644
index 0000000000..7f33de6efd
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/enum/ExciseTaxBasis.Enum.al
@@ -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.ExciseTaxes;
+
+enum 7414 "Excise Tax Basis"
+{
+ Extensible = true;
+
+ value(0; Weight)
+ {
+ Caption = 'Weight';
+ }
+ value(1; "Sugar Content")
+ {
+ Caption = 'Sugar Content';
+ }
+ value(2; "THC Content")
+ {
+ Caption = 'THC Content';
+ }
+ value(3; Volume)
+ {
+ Caption = 'Volume';
+ }
+ value(4; "Spirit Volume")
+ {
+ Caption = 'Spirit Volume';
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxEntryPermissions.Page.al b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxEntryPermissions.Page.al
new file mode 100644
index 0000000000..e219e00908
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxEntryPermissions.Page.al
@@ -0,0 +1,75 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using System.Utilities;
+
+page 7413 "Excise Tax Entry Permissions"
+{
+ PageType = List;
+ ApplicationArea = All;
+ SourceTable = "Excise Tax Entry Permission";
+ DataCaptionExpression = GetCaption();
+ Caption = 'Excise Tax Entry Permissions';
+
+ layout
+ {
+ area(Content)
+ {
+ repeater(Permissions)
+ {
+ field("Excise Tax Type Code"; Rec."Excise Tax Type Code")
+ {
+ ToolTip = 'Specifies the excise tax type code.';
+ Visible = false;
+ Editable = false;
+ }
+ field("Excise Entry Type"; Rec."Excise Entry Type")
+ {
+ ToolTip = 'Specifies the entry type (Purchase, Sale, etc.).';
+ }
+ field(Allowed; Rec.Allowed)
+ {
+ ToolTip = 'Specifies if this entry type is allowed for the tax type.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(Processing)
+ {
+ action("Setup Default Permissions")
+ {
+ ApplicationArea = All;
+ Caption = 'Setup Default Permissions';
+ ToolTip = 'Create default permissions for all entry types.';
+ Image = Setup;
+
+ trigger OnAction()
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ begin
+ if not ConfirmManagement.GetResponseOrDefault(StrSubstNo(ConfirmForInsertMsg, Rec."Excise Tax Type Code"), false) then
+ exit;
+
+ ExciseTaxEntryPermission.SetDefaultPermissions(Rec."Excise Tax Type Code");
+ CurrPage.Update(false);
+ end;
+ }
+ }
+ }
+
+ var
+ ConfirmManagement: Codeunit "Confirm Management";
+ ConfirmForInsertMsg: Label 'Are you sure you want to Setup all default permissions for tax type %1?', Comment = '%1 = Excise Tax Type Code';
+ EntryPermissionsCaptionLbl: Label '%1 for Tax Type: %2', Comment = '%1=Current Rec TableCaption, %2=Excise Tax Type Code';
+
+ local procedure GetCaption(): Text[100]
+ begin
+ exit(StrSubstNo(EntryPermissionsCaptionLbl, Rec.TableCaption, Rec."Excise Tax Type Code"));
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxItemFARates.Page.al b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxItemFARates.Page.al
new file mode 100644
index 0000000000..4b5f00bd80
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxItemFARates.Page.al
@@ -0,0 +1,55 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+page 7412 "Excise Tax Item/FA Rates"
+{
+ PageType = List;
+ ApplicationArea = All;
+ SourceTable = "Excise Tax Item/FA Rate";
+ DataCaptionExpression = GetCaption();
+ Caption = 'Excise Tax Item/FA Rates';
+ DelayedInsert = true;
+
+ layout
+ {
+ area(Content)
+ {
+ repeater(Rates)
+ {
+ field("Excise Tax Type Code"; Rec."Excise Tax Type Code")
+ {
+ ToolTip = 'Specifies the excise tax type code.';
+ Editable = false;
+ Visible = false;
+ }
+ field("Source Type"; Rec."Source Type")
+ {
+ ToolTip = 'Specifies whether this rate applies to an Item or Fixed Asset.';
+ }
+ field("Source No."; Rec."Source No.")
+ {
+ ToolTip = 'Specifies the Item or Fixed Asset number.';
+ }
+ field("Tax Rate %"; Rec."Tax Rate %")
+ {
+ ToolTip = 'Specifies the tax rate percentage.';
+ }
+ field("Effective From Date"; Rec."Effective From Date")
+ {
+ ToolTip = 'Specifies when this tax rate becomes effective.';
+ }
+ }
+ }
+ }
+
+ var
+ EntryPermissionsCaptionLbl: Label '%1 for Tax Type: %2', Comment = '%1=Current Rec TableCaption, %2=Excise Tax Type Code';
+
+ local procedure GetCaption(): Text[100]
+ begin
+ exit(StrSubstNo(EntryPermissionsCaptionLbl, Rec.TableCaption, Rec."Excise Tax Type Code"));
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypeCard.Page.al b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypeCard.Page.al
new file mode 100644
index 0000000000..15c2a82d0e
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypeCard.Page.al
@@ -0,0 +1,80 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+page 7415 "Excise Tax Type Card"
+{
+ PageType = Card;
+ ApplicationArea = All;
+ SourceTable = "Excise Tax Type";
+ Caption = 'Excise Tax Type Card';
+
+ layout
+ {
+ area(Content)
+ {
+ group(General)
+ {
+ Caption = 'General';
+ field("Code"; Rec.Code)
+ {
+ ToolTip = 'Specifies the unique tax identifier.';
+ }
+ field(Description; Rec.Description)
+ {
+ ToolTip = 'Specifies the tax name for UI display.';
+ }
+ field("Tax Basis"; Rec."Tax Basis")
+ {
+ ToolTip = 'Specifies how this tax is calculated (Weight, Sugar Content, THC Content, Volume, Spirit Volume).';
+ }
+ field(Enabled; Rec.Enabled)
+ {
+ ToolTip = 'Specifies whether this tax type is active and available for use.';
+ }
+ }
+ group(Reporting)
+ {
+ Caption = 'Reporting';
+ field("Report Caption"; Rec."Report Caption")
+ {
+ ToolTip = 'Specifies additional description for reporting purposes.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(Processing)
+ {
+ action("Configure Rates")
+ {
+ Caption = 'Configure Entry Permissions';
+ ToolTip = 'Configure entry type permissions for this tax type.';
+ Image = Setup;
+ RunObject = Page "Excise Tax Entry Permissions";
+ RunPageLink = "Excise Tax Type Code" = field(Code);
+ }
+ action("Tax Rates")
+ {
+ Caption = 'Tax Rates';
+ ToolTip = 'Configure tax rates for specific items, fixed assets.';
+ Image = Setup;
+ RunObject = Page "Excise Tax Item/FA Rates";
+ RunPageLink = "Excise Tax Type Code" = field(Code);
+ }
+ }
+ area(Promoted)
+ {
+ actionref("Configure Rates_Promoted"; "Configure Rates")
+ {
+ }
+ actionref("Tax Rates_Promoted"; "Tax Rates")
+ {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypes.Page.al b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypes.Page.al
new file mode 100644
index 0000000000..4faa490835
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/page/ExciseTaxTypes.Page.al
@@ -0,0 +1,70 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+page 7414 "Excise Tax Types"
+{
+ PageType = List;
+ ApplicationArea = All;
+ UsageCategory = Lists;
+ SourceTable = "Excise Tax Type";
+ CardPageId = "Excise Tax Type Card";
+ Caption = 'Excise Tax Types';
+ Editable = false;
+
+ layout
+ {
+ area(Content)
+ {
+ repeater(General)
+ {
+ field("Code"; Rec.Code)
+ {
+ ToolTip = 'Specifies the unique tax identifier.';
+ }
+ field(Description; Rec.Description)
+ {
+ ToolTip = 'Specifies the tax name for UI display.';
+ }
+ field(Enabled; Rec.Enabled)
+ {
+ ToolTip = 'Specifies whether this tax type is active and available for use.';
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(Processing)
+ {
+ action("Entry Permissions")
+ {
+ Caption = 'Configure Entry Permissions';
+ ToolTip = 'Configure entry type permissions for this tax type.';
+ Image = Setup;
+ RunObject = Page "Excise Tax Entry Permissions";
+ RunPageLink = "Excise Tax Type Code" = field(Code);
+ }
+ action("Item/FA Rates")
+ {
+ Caption = 'Item/FA Rates';
+ ToolTip = 'Configure tax rates for specific items and fixed assets.';
+ Image = Setup;
+ RunObject = Page "Excise Tax Item/FA Rates";
+ RunPageLink = "Excise Tax Type Code" = field(Code);
+ }
+ }
+ area(Promoted)
+ {
+ actionref("Entry Permissions_Promoted"; "Entry Permissions")
+ {
+ }
+ actionref("Item/FA Rates_Promoted"; "Item/FA Rates")
+ {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseFixedAssetCardExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseFixedAssetCardExt.PageExt.al
new file mode 100644
index 0000000000..2ba4420fcf
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseFixedAssetCardExt.PageExt.al
@@ -0,0 +1,36 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+
+pageextension 7412 "Excise Fixed Asset Card Ext" extends "Fixed Asset Card"
+{
+ layout
+ {
+ addafter(Maintenance)
+ {
+ group("Excise Tax")
+ {
+ Caption = 'Excise Tax';
+ field("Excise Tax Type"; Rec."Excise Tax Type")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies which excise tax type applies to this fixed asset.';
+ }
+ field("Quantity for Excise Tax"; Rec."Quantity for Excise Tax")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the amount per unit based on tax basis';
+ }
+ field("Excise Unit of Measure Code"; Rec."Excise Unit of Measure Code")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the unit of measure for tax basis.';
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemCardExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemCardExt.PageExt.al
new file mode 100644
index 0000000000..351a27a956
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemCardExt.PageExt.al
@@ -0,0 +1,36 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Inventory.Item;
+
+pageextension 7415 "Excise Item Card Ext" extends "Item Card"
+{
+ layout
+ {
+ addafter(Sustainability)
+ {
+ group("Excise Tax")
+ {
+ Caption = 'Excise Tax';
+ field("Excise Tax Type"; Rec."Excise Tax Type")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies which excise tax type applies to this item.';
+ }
+ field("Quantity for Excise Tax"; Rec."Quantity for Excise Tax")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the amount per unit based on tax basis.';
+ }
+ field("Excise Unit of Measure Code"; Rec."Excise Unit of Measure Code")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the unit of measure for tax basis.';
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemLedgerEntriesExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemLedgerEntriesExt.PageExt.al
new file mode 100644
index 0000000000..00e9460a44
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseItemLedgerEntriesExt.PageExt.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Inventory.Ledger;
+
+pageextension 7419 "Excise Item Ledger Entries Ext" extends "Item Ledger Entries"
+{
+ layout
+ {
+ addlast(Control1)
+ {
+ field("Excise Tax Posted"; Rec."Excise Tax Posted")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies whether excise tax has been posted for this item ledger entry.';
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalBatchExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalBatchExt.PageExt.al
new file mode 100644
index 0000000000..f5dcd6b081
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalBatchExt.PageExt.al
@@ -0,0 +1,22 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Sustainability.ExciseTax;
+
+pageextension 7413 "Excise Journal Batch Ext" extends "Sust. Excise Jnl. Batches"
+{
+ layout
+ {
+ addafter(Description)
+ {
+ field("Excise Tax Type Filter"; Rec."Excise Tax Type Filter")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the excise tax type filter for this batch. Only journal lines with this tax type will be allowed.';
+ }
+ }
+ }
+}
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalLineExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalLineExt.PageExt.al
new file mode 100644
index 0000000000..ae627c54b7
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseJournalLineExt.PageExt.al
@@ -0,0 +1,101 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Sustainability.ExciseTax;
+
+pageextension 7414 "Excise Journal Line Ext" extends "Sustainability Excise Journal"
+{
+ layout
+ {
+ modify("Entry Type")
+ {
+ Visible = not EnableExciseTax;
+ }
+ modify("Total Emission Cost")
+ {
+ Visible = not EnableExciseTax;
+ }
+ addafter("Posting Date")
+ {
+ field("Excise Tax Type"; Rec."Excise Tax Type")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ ToolTip = 'Specifies the excise tax type for this journal line.';
+ }
+ field("Excise Entry Type"; Rec."Excise Entry Type")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ ToolTip = 'Specifies which entry type was used to calculate the quantity from Item Ledger Entries for this journal line.';
+ }
+ }
+ addafter("Source Unit of Measure Code")
+ {
+ field("Excise Unit of Measure Code"; Rec."Excise Unit of Measure Code")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ Editable = false;
+ ToolTip = 'Specifies the unit of measure for the excise tax quantity.';
+ }
+ }
+ addafter("Source Qty.")
+ {
+ field("Quantity for Excise Tax"; Rec."Quantity for Excise Tax")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ Editable = false;
+ ToolTip = 'Specifies the quantity for excise tax calculation.';
+ }
+ field("Tax Rate %"; Rec."Tax Rate %")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ ToolTip = 'Specifies the tax rate percentage applied to this journal line.';
+ }
+ field("Tax Amount"; Rec."Tax Amount")
+ {
+ ApplicationArea = All;
+ Visible = EnableExciseTax;
+ ToolTip = 'Specifies the calculated excise tax amount for this journal line.';
+ }
+ }
+ }
+ actions
+ {
+ addlast(processing)
+ {
+ action("Generate Excise Tax Entries")
+ {
+ ApplicationArea = All;
+ Caption = 'Generate Excise Tax Entries';
+ ToolTip = 'Generate excise tax journal entries based on Item Ledger Entry quantities for the specified date range.';
+ Image = CreateDocuments;
+ Enabled = EnableExciseTax;
+
+ trigger OnAction()
+ var
+ CreateExciseTaxJnlEntries: Report "Create Excise Tax Jnl. Entries";
+ begin
+ CreateExciseTaxJnlEntries.SetExciseJournalLine(Rec);
+ CreateExciseTaxJnlEntries.RunModal();
+ end;
+ }
+ }
+ modify(Calculate)
+ {
+ Enabled = not EnableExciseTax;
+ }
+ addafter(Calculate_Promoted)
+ {
+ actionref("Generate Excise Tax Entries_Promoted"; "Generate Excise Tax Entries")
+ {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseTaxTransLogExt.PageExt.al b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseTaxTransLogExt.PageExt.al
new file mode 100644
index 0000000000..d440f17305
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/pageextension/ExciseTaxTransLogExt.PageExt.al
@@ -0,0 +1,116 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.Ledger;
+using Microsoft.Inventory.Ledger;
+using Microsoft.Sustainability.ExciseTax;
+
+pageextension 7416 "Excise Tax Trans Log Ext" extends "Sust. Excise Taxes Trans. Logs"
+{
+ layout
+ {
+ addafter("Log Type")
+ {
+ field("Excise Tax Type"; Rec."Excise Tax Type")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the excise tax type.';
+ }
+ field("Excise Entry Type"; Rec."Excise Entry Type")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the excise entry type.';
+ }
+ }
+ addafter("Source Unit of Measure Code")
+ {
+ field("Excise Unit of Measure Code"; Rec."Excise Unit of Measure Code")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the unit of measure for excise tax calculation.';
+ }
+ }
+ addafter("Source Qty.")
+ {
+ field("Quantity for Excise Tax"; Rec."Quantity for Excise Tax")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the quantity for tax calculation.';
+ }
+ field("Tax Rate %"; Rec."Tax Rate %")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the tax rate percentage.';
+ }
+ field("Tax Amount"; Rec."Tax Amount")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the calculated tax amount.';
+ }
+ }
+ addafter("Certificate Amount")
+ {
+ field("Item Ledger Entry No."; Rec."Item Ledger Entry No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the related item ledger entry number.';
+ Visible = false;
+ }
+ field("FA Ledger Entry No."; Rec."FA Ledger Entry No.")
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the related fixed asset ledger entry number.';
+ Visible = false;
+ }
+ }
+ }
+
+ actions
+ {
+ addlast(Navigation)
+ {
+ group("Excise Tax")
+ {
+ Caption = 'Excise Tax';
+
+ action("Item Ledger Entry")
+ {
+ ApplicationArea = All;
+ Caption = 'Item Ledger Entry';
+ ToolTip = 'View the related item ledger entry.';
+ RunObject = Page "Item Ledger Entries";
+ RunPageLink = "Entry No." = field("Item Ledger Entry No.");
+ Enabled = Rec."Item Ledger Entry No." <> 0;
+ Image = ItemLedger;
+ }
+ action("FA Ledger Entry")
+ {
+ ApplicationArea = All;
+ Caption = 'FA Ledger Entry';
+ ToolTip = 'View the related fixed asset ledger entry.';
+ RunObject = Page "FA Ledger Entries";
+ RunPageLink = "Entry No." = field("FA Ledger Entry No.");
+ Enabled = Rec."FA Ledger Entry No." <> 0;
+ Image = FixedAssets;
+ }
+ }
+ }
+ addlast(Promoted)
+ {
+ group("Excise Tax_Promoted")
+ {
+ Caption = 'Excise Tax';
+
+ actionref("Item Ledger Entry_Promoted"; "Item Ledger Entry")
+ {
+ }
+ actionref("FA Ledger Entry_Promoted"; "FA Ledger Entry")
+ {
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/report/CreateExciseTaxJnlEntries.Report.al b/Apps/W1/ExciseTaxes/app/src/report/CreateExciseTaxJnlEntries.Report.al
new file mode 100644
index 0000000000..774451ad9d
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/report/CreateExciseTaxJnlEntries.Report.al
@@ -0,0 +1,197 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Inventory.Item;
+using Microsoft.Sustainability.ExciseTax;
+
+report 7412 "Create Excise Tax Jnl. Entries"
+{
+ ProcessingOnly = true;
+ Caption = 'Generate Excise Tax Journal Entries';
+ ApplicationArea = Basic, Suite;
+
+ dataset
+ {
+ dataitem("Excise Tax Type"; "Excise Tax Type")
+ {
+ RequestFilterFields = Code;
+ DataItemTableView = where(Enabled = const(true));
+
+ trigger OnAfterGetRecord()
+ var
+ ExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ ExciseTaxCalculation: Codeunit "Excise Tax Calculation";
+ begin
+ ExciseJournalBatch.Get(ExciseJournalLine."Journal Template Name", ExciseJournalLine."Journal Batch Name");
+ ExciseJournalBatch.TestField(Type, ExciseJournalBatch.Type::Excises);
+ if ExciseJournalBatch."Excise Tax Type Filter" <> '' then
+ if ExciseJournalBatch."Excise Tax Type Filter" <> "Excise Tax Type".Code then
+ exit;
+
+ ExciseTaxCalculation.SetExciseJournalBatch(ExciseJournalBatch);
+ ExciseTaxCalculation.CreateExciseJournalLineForItem("Excise Tax Type".Code, StartingDate, EndingDate, ItemFilter, PostingDate);
+ ExciseTaxCalculation.CreateExciseJournalLineForFixedAsset("Excise Tax Type".Code, StartingDate, EndingDate, FixedAssetFilter, PostingDate);
+ ProcessedTaxTypes += 1;
+ end;
+
+ trigger OnPreDataItem()
+ begin
+ LinesCountBefore := GetCurrentJournalLineCount();
+ end;
+
+ trigger OnPostDataItem()
+ begin
+ CountCreatedJournalLines();
+ end;
+ }
+ }
+
+ requestpage
+ {
+ SaveValues = true;
+
+ layout
+ {
+ area(content)
+ {
+ group("Posting Information")
+ {
+ Caption = 'Posting Information';
+
+ field("Posting Date"; PostingDate)
+ {
+ ApplicationArea = All;
+ Caption = 'Posting Date';
+ ToolTip = 'Specifies the posting date for the generated journal lines.';
+
+ trigger OnValidate()
+ begin
+ if PostingDate = 0D then
+ Error(PostingDateRequiredErr);
+ end;
+ }
+ }
+ group("Date Filters")
+ {
+ Caption = 'Date Filters';
+
+ field("Starting Date"; StartingDate)
+ {
+ ApplicationArea = All;
+ Caption = 'Starting Date';
+ ToolTip = 'Specifies the starting date for filtering Item Ledger Entries and FA Ledger Entries. Only entries with posting dates from this date onwards will be included in the journal line generation.';
+
+ trigger OnValidate()
+ begin
+ ValidateDateRange();
+ end;
+ }
+ field("Ending Date"; EndingDate)
+ {
+ ApplicationArea = All;
+ Caption = 'Ending Date';
+ ToolTip = 'Specifies the ending date for filtering Item Ledger Entries and FA Ledger Entries. Only entries with posting dates up to this date will be included in the journal line generation.';
+
+ trigger OnValidate()
+ begin
+ ValidateDateRange();
+ end;
+ }
+ }
+ group("Source Filters")
+ {
+ Caption = 'Source Filters';
+
+ field("Item Filter"; ItemFilter)
+ {
+ ApplicationArea = All;
+ Caption = 'Item Filter';
+ ToolTip = 'Specifies the item filter. Leave blank to include all items.';
+ TableRelation = Item;
+ }
+ field("Fixed Asset Filter"; FixedAssetFilter)
+ {
+ ApplicationArea = All;
+ Caption = 'Fixed Asset Filter';
+ ToolTip = 'Specifies the fixed asset filter. Leave blank to include all fixed assets.';
+ TableRelation = "Fixed Asset";
+ }
+ }
+ }
+ }
+ }
+
+ trigger OnPreReport()
+ begin
+ if PostingDate = 0D then
+ Error(PostingDateRequiredErr);
+
+ if StartingDate = 0D then
+ Error(StartingDateRequiredErr);
+
+ if EndingDate = 0D then
+ Error(EndingDateRequiredErr);
+
+ if StartingDate > EndingDate then
+ Error(StartingDateLaterErr);
+ end;
+
+ trigger OnPostReport()
+ begin
+ Message(ProcessingCompletedMsg, ProcessedTaxTypes, TotalJournalLines, StartingDate, EndingDate);
+ end;
+
+ var
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ StartingDate: Date;
+ EndingDate: Date;
+ PostingDate: Date;
+ ItemFilter: Text[250];
+ FixedAssetFilter: Text[250];
+ ProcessedTaxTypes: Integer;
+ TotalJournalLines: Integer;
+ LinesCountBefore: Integer;
+ EndingDateEarlierErr: Label 'Ending Date cannot be earlier than Starting Date.';
+ StartingDateLaterErr: Label 'Starting Date cannot be later than Ending Date.';
+ PostingDateRequiredErr: Label 'Posting Date is required. Please specify a posting date.';
+ StartingDateRequiredErr: Label 'Starting Date is required. Please specify a starting date.';
+ EndingDateRequiredErr: Label 'Ending Date is required. Please specify an ending date.';
+ ProcessingCompletedMsg: Label 'Processing completed successfully:\Tax Types Processed: %1\Journal Lines Created: %2\Date Range: %3 to %4', Comment = '%1 = Number of tax types processed, %2 = Number of journal lines created, %3 = Starting Date, %4 = Ending Date';
+
+ procedure SetExciseJournalLine(var NewExciseJournalLine: Record "Sust. Excise Jnl. Line")
+ begin
+ ExciseJournalLine := NewExciseJournalLine;
+ end;
+
+ local procedure CountCreatedJournalLines()
+ var
+ LinesCountAfter: Integer;
+ begin
+ LinesCountAfter := GetCurrentJournalLineCount();
+ TotalJournalLines := LinesCountAfter - LinesCountBefore;
+ end;
+
+ local procedure GetCurrentJournalLineCount(): Integer
+ var
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ TotalCount: Integer;
+ begin
+ TotalCount := 0;
+
+ ExciseJnlLine.SetRange("Journal Template Name", ExciseJournalLine."Journal Template Name");
+ ExciseJnlLine.SetRange("Journal Batch Name", ExciseJournalLine."Journal Batch Name");
+ TotalCount += ExciseJnlLine.Count;
+
+ exit(TotalCount);
+ end;
+
+ local procedure ValidateDateRange()
+ begin
+ if (EndingDate <> 0D) and (StartingDate <> 0D) and (EndingDate < StartingDate) then
+ Error(EndingDateEarlierErr);
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxEntryPermission.Table.al b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxEntryPermission.Table.al
new file mode 100644
index 0000000000..2f59240a67
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxEntryPermission.Table.al
@@ -0,0 +1,93 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+table 7414 "Excise Tax Entry Permission"
+{
+ Caption = 'Excise Tax Entry Permission';
+ DataClassification = CustomerContent;
+ LookupPageId = "Excise Tax Entry Permissions";
+ DrillDownPageId = "Excise Tax Entry Permissions";
+
+ fields
+ {
+ field(1; "Excise Tax Type Code"; Code[20])
+ {
+ Caption = 'Excise Tax Type Code';
+ TableRelation = "Excise Tax Type".Code;
+ NotBlank = true;
+ }
+ field(2; "Excise Entry Type"; Enum "Excise Entry Type")
+ {
+ Caption = 'Excise Entry Type';
+ NotBlank = true;
+ }
+ field(3; Allowed; Boolean)
+ {
+ Caption = 'Allowed';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Excise Tax Type Code", "Excise Entry Type")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Excise Tax Type Code")
+ {
+ }
+ key(Key3; "Excise Entry Type")
+ {
+ }
+ }
+
+ procedure IsEntryTypeAllowed(TaxTypeCode: Code[20]; EntryType: Enum "Excise Entry Type"): Boolean
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ begin
+ ExciseTaxEntryPermission.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxEntryPermission.SetRange("Excise Entry Type", EntryType);
+ ExciseTaxEntryPermission.SetRange(Allowed, true);
+ exit(not ExciseTaxEntryPermission.IsEmpty());
+ end;
+
+ procedure GetAllowedEntryTypes(TaxTypeCode: Code[20]; var TempExciseEntryType: Record "Excise Tax Entry Permission" temporary)
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ begin
+ TempExciseEntryType.Reset();
+ TempExciseEntryType.DeleteAll();
+
+ ExciseTaxEntryPermission.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxEntryPermission.SetRange(Allowed, true);
+ if ExciseTaxEntryPermission.FindSet() then
+ repeat
+ TempExciseEntryType := ExciseTaxEntryPermission;
+ TempExciseEntryType.Insert();
+ until ExciseTaxEntryPermission.Next() = 0;
+ end;
+
+ procedure SetDefaultPermissions(TaxTypeCode: Code[20])
+ begin
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::Purchase);
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::Sale);
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::"Positive Adjmt.");
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::"Negative Adjmt.");
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::Output);
+ CreatePermissionRecord(TaxTypeCode, "Excise Entry Type"::"Assembly Output");
+ end;
+
+ local procedure CreatePermissionRecord(TaxTypeCode: Code[20]; EntryType: Enum "Excise Entry Type")
+ begin
+ if Rec.Get(TaxTypeCode, EntryType) then
+ exit;
+
+ Rec.Init();
+ Rec."Excise Tax Type Code" := TaxTypeCode;
+ Rec."Excise Entry Type" := EntryType;
+ Rec.Insert(true);
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxItemFARate.Table.al b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxItemFARate.Table.al
new file mode 100644
index 0000000000..43b1fc2eac
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxItemFARate.Table.al
@@ -0,0 +1,172 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Inventory.Item;
+using Microsoft.Sustainability.ExciseTax;
+
+table 7413 "Excise Tax Item/FA Rate"
+{
+ Caption = 'Excise Tax Item/FA Rate';
+ DataClassification = CustomerContent;
+ LookupPageId = "Excise Tax Item/FA Rates";
+ DrillDownPageId = "Excise Tax Item/FA Rates";
+
+ fields
+ {
+ field(1; "Excise Tax Type Code"; Code[20])
+ {
+ Caption = 'Excise Tax Type Code';
+ TableRelation = "Excise Tax Type".Code;
+ NotBlank = true;
+ }
+ field(2; "Source Type"; Enum "Excise Source Type")
+ {
+ Caption = 'Source Type';
+ NotBlank = true;
+ }
+ field(3; "Source No."; Code[20])
+ {
+ Caption = 'Source No.';
+ TableRelation = if ("Source Type" = const(Item)) Item
+ else
+ if ("Source Type" = const("Fixed Asset")) "Fixed Asset";
+
+ trigger OnLookup()
+ begin
+ case "Source Type" of
+ "Source Type"::Item:
+ LookupItem();
+ "Source Type"::"Fixed Asset":
+ LookupFixedAsset();
+ end;
+ end;
+
+ trigger OnValidate()
+ begin
+ if "Source No." <> '' then
+ ValidateSourceNo();
+ end;
+ }
+ field(4; "Tax Rate %"; Decimal)
+ {
+ Caption = 'Tax Rate %';
+ DecimalPlaces = 2 : 5;
+ MinValue = 0;
+ MaxValue = 100;
+ }
+ field(5; "Effective From Date"; Date)
+ {
+ Caption = 'Effective From Date';
+ NotBlank = true;
+ }
+ field(7; Description; Text[100])
+ {
+ Caption = 'Description';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Excise Tax Type Code", "Source Type", "Source No.", "Effective From Date")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Excise Tax Type Code")
+ {
+ }
+ }
+
+ trigger OnInsert()
+ begin
+ TestField("Excise Tax Type Code");
+ TestField("Source Type");
+ TestField("Effective From Date");
+ if "Source No." <> '' then
+ ValidateSourceNo();
+ end;
+
+ trigger OnModify()
+ begin
+ TestField("Excise Tax Type Code");
+ TestField("Source Type");
+ TestField("Effective From Date");
+ if "Source No." <> '' then
+ ValidateSourceNo();
+ end;
+
+ var
+ ItemDoesNotExistErr: Label 'Item %1 does not exist.', Comment = '%1 = Item No.';
+ FixedAssetDoesNotExistErr: Label 'Fixed Asset %1 does not exist.', Comment = '%1 = Fixed Asset No.';
+
+ local procedure ValidateSourceNo()
+ var
+ Item: Record Item;
+ FixedAsset: Record "Fixed Asset";
+ begin
+ case "Source Type" of
+ "Source Type"::Item:
+ if not Item.Get("Source No.") then
+ Error(ItemDoesNotExistErr, "Source No.");
+ "Source Type"::"Fixed Asset":
+ if not FixedAsset.Get("Source No.") then
+ Error(FixedAssetDoesNotExistErr, "Source No.");
+ end;
+ end;
+
+ local procedure LookupItem()
+ var
+ Item: Record Item;
+ begin
+ if Page.RunModal(Page::"Item List", Item) = Action::LookupOK then
+ "Source No." := Item."No.";
+ end;
+
+ local procedure LookupFixedAsset()
+ var
+ FixedAsset: Record "Fixed Asset";
+ begin
+ if Page.RunModal(Page::"Fixed Asset List", FixedAsset) = Action::LookupOK then
+ "Source No." := FixedAsset."No.";
+ end;
+
+ procedure GetEffectiveTaxRate(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; EffectiveDate: Date; var TaxRate: Decimal): Boolean
+ begin
+ if FindTaxRate(TaxTypeCode, SourceType, SourceNo, EffectiveDate, TaxRate) then
+ exit(true);
+
+ if FindTaxRate(TaxTypeCode, SourceType, '', EffectiveDate, TaxRate) then
+ exit(true);
+ end;
+
+ local procedure FindTaxRate(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; EffectiveDate: Date; var TaxRate: Decimal): Boolean
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.SetCurrentKey("Excise Tax Type Code", "Source Type", "Source No.", "Effective From Date");
+ ExciseTaxItemFARate.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxItemFARate.SetRange("Source Type", SourceType);
+ ExciseTaxItemFARate.SetRange("Source No.", SourceNo);
+ ExciseTaxItemFARate.SetFilter("Effective From Date", '<=%1', EffectiveDate);
+ if not ExciseTaxItemFARate.FindLast() then
+ exit(false);
+
+ TaxRate := ExciseTaxItemFARate."Tax Rate %";
+ exit(true);
+ end;
+
+ procedure ConvertSustSourceTypeToExciseSourceType(SustSourceType: Enum "Sust. Excise Jnl. Source Type"): Enum "Excise Source Type"
+ begin
+ case SustSourceType of
+ "Sust. Excise Jnl. Source Type"::Item:
+ exit("Excise Source Type"::Item);
+ "Sust. Excise Jnl. Source Type"::"Fixed Asset":
+ exit("Excise Source Type"::"Fixed Asset");
+ end;
+
+ exit("Excise Source Type"::" ");
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxType.Table.al b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxType.Table.al
new file mode 100644
index 0000000000..c80c687c52
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/table/ExciseTaxType.Table.al
@@ -0,0 +1,63 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+table 7412 "Excise Tax Type"
+{
+ Caption = 'Excise Tax Type';
+ DataClassification = CustomerContent;
+ LookupPageId = "Excise Tax Types";
+ DrillDownPageId = "Excise Tax Types";
+
+ fields
+ {
+ field(1; "Code"; Code[20])
+ {
+ Caption = 'Code';
+ NotBlank = true;
+ }
+ field(2; Description; Text[100])
+ {
+ Caption = 'Description';
+ }
+ field(3; "Tax Basis"; Enum "Excise Tax Basis")
+ {
+ Caption = 'Tax Basis';
+ }
+ field(4; Enabled; Boolean)
+ {
+ Caption = 'Enabled';
+ }
+ field(5; "Report Caption"; Text[50])
+ {
+ Caption = 'Report Caption';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Code")
+ {
+ Clustered = true;
+ }
+ }
+
+ trigger OnDelete()
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxEntryPermission.SetRange("Excise Tax Type Code", Code);
+ if not ExciseTaxEntryPermission.IsEmpty() then
+ Error(CannotDeleteTaxTypeWithRateConfigurationsErr, Code, ExciseTaxEntryPermission.TableCaption());
+
+ ExciseTaxItemFARate.SetRange("Excise Tax Type Code", Code);
+ if not ExciseTaxItemFARate.IsEmpty() then
+ Error(CannotDeleteTaxTypeWithRateConfigurationsErr, Code, ExciseTaxItemFARate.TableCaption());
+ end;
+
+ var
+ CannotDeleteTaxTypeWithRateConfigurationsErr: Label 'Cannot delete tax type %1 because it has rate %2 entries.', Comment = '%1 = Excise Tax Type Code, %2 = Table Caption';
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFALedgerEntryExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFALedgerEntryExt.TableExt.al
new file mode 100644
index 0000000000..ca5bb2ad02
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFALedgerEntryExt.TableExt.al
@@ -0,0 +1,20 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.Ledger;
+
+tableextension 7416 "Excise FA Ledger Entry Ext" extends "FA Ledger Entry"
+{
+ fields
+ {
+ field(7412; "Excise Tax Posted"; Boolean)
+ {
+ Caption = 'Excise Tax Posted';
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFixedAssetExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFixedAssetExt.TableExt.al
new file mode 100644
index 0000000000..a400cbb035
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseFixedAssetExt.TableExt.al
@@ -0,0 +1,74 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.UOM;
+
+tableextension 7418 "Excise Fixed Asset Ext" extends "Fixed Asset"
+{
+ fields
+ {
+ field(7412; "Excise Tax Type"; Code[20])
+ {
+ Caption = 'Excise Tax Type';
+ TableRelation = "Excise Tax Type".Code where(Enabled = const(true));
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ if "Excise Tax Type" <> '' then begin
+ ExciseTaxType.Get("Excise Tax Type");
+ if not ExciseTaxType.Enabled then
+ Error(ExciseTaxTypeNotEnabledErr, "Excise Tax Type");
+
+ if Rec."Excise Tax Type" <> xRec."Excise Tax Type" then begin
+ Rec.TestField("Quantity for Excise Tax", 0);
+ Rec.TestField("Excise Unit of Measure Code", '');
+ end;
+
+ end else begin
+ "Quantity for Excise Tax" := 0;
+ "Excise Unit of Measure Code" := '';
+ end;
+ end;
+ }
+
+ field(7413; "Quantity for Excise Tax"; Decimal)
+ {
+ Caption = 'Quantity for Excise Tax';
+ DecimalPlaces = 0 : 5;
+ MinValue = 0;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if ("Quantity for Excise Tax" <> 0) and ("Excise Tax Type" = '') then
+ Error(MustSpecifyExciseTaxTypeForQuantityErr);
+ end;
+ }
+
+ field(7414; "Excise Unit of Measure Code"; Code[10])
+ {
+ Caption = 'Excise Tax Unit of Measure';
+ TableRelation = "Unit of Measure".Code;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if ("Excise Unit of Measure Code" <> '') and ("Excise Tax Type" = '') then
+ Error(MustSpecifyExciseTaxTypeForUOMErr);
+ end;
+ }
+ }
+
+ var
+ ExciseTaxTypeNotEnabledErr: Label 'Excise tax type %1 is not enabled.', Comment = '%1 = Excise Tax Type Code';
+ MustSpecifyExciseTaxTypeForQuantityErr: Label 'You must specify an Excise Tax Type before entering a quantity.';
+ MustSpecifyExciseTaxTypeForUOMErr: Label 'You must specify an Excise Tax Type before entering a UOM.';
+
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemExt.TableExt.al
new file mode 100644
index 0000000000..d8ba433707
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemExt.TableExt.al
@@ -0,0 +1,70 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Foundation.UOM;
+using Microsoft.Inventory.Item;
+
+tableextension 7417 "Excise Item Ext" extends Item
+{
+ fields
+ {
+ field(7412; "Excise Tax Type"; Code[20])
+ {
+ Caption = 'Excise Tax Type';
+ TableRelation = "Excise Tax Type".Code where(Enabled = const(true));
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ if "Excise Tax Type" <> '' then begin
+ ExciseTaxType.Get("Excise Tax Type");
+ if not ExciseTaxType.Enabled then
+ Error(ExciseTaxTypeNotEnabledErr, "Excise Tax Type");
+
+ if Rec."Excise Tax Type" <> xRec."Excise Tax Type" then begin
+ Rec.TestField("Quantity for Excise Tax", 0);
+ Rec.TestField("Excise Unit of Measure Code", '');
+ end;
+
+ end else begin
+ "Quantity for Excise Tax" := 0;
+ "Excise Unit of Measure Code" := '';
+ end;
+ end;
+ }
+ field(7413; "Quantity for Excise Tax"; Decimal)
+ {
+ Caption = 'Quantity for Excise Tax';
+ DecimalPlaces = 0 : 5;
+ MinValue = 0;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if ("Quantity for Excise Tax" <> 0) and ("Excise Tax Type" = '') then
+ Error(MustSpecifyExciseTaxTypeErr, Rec.FieldCaption("Excise Tax Type"), Rec.FieldCaption("Quantity for Excise Tax"));
+ end;
+ }
+ field(7414; "Excise Unit of Measure Code"; Code[10])
+ {
+ Caption = 'Excise Tax Unit of Measure Code';
+ TableRelation = "Unit of Measure".Code;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if ("Excise Unit of Measure Code" <> '') and ("Excise Tax Type" = '') then
+ Error(MustSpecifyExciseTaxTypeErr, Rec.FieldCaption("Excise Tax Type"), Rec.FieldCaption("Excise Unit of Measure Code"));
+ end;
+ }
+ }
+
+ var
+ ExciseTaxTypeNotEnabledErr: Label 'Excise tax type %1 is not enabled.', Comment = '%1 = Excise Tax Type Code';
+ MustSpecifyExciseTaxTypeErr: Label 'You must specify an %1 before entering a %2.', Comment = '%1 = Field Caption, %2 = Field Caption';
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemLedgerEntryExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemLedgerEntryExt.TableExt.al
new file mode 100644
index 0000000000..0db3b53ff7
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseItemLedgerEntryExt.TableExt.al
@@ -0,0 +1,20 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Inventory.Ledger;
+
+tableextension 7415 "Excise Item Ledger Entry Ext" extends "Item Ledger Entry"
+{
+ fields
+ {
+ field(7412; "Excise Tax Posted"; Boolean)
+ {
+ Caption = 'Excise Tax Posted';
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseJournalLineExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseJournalLineExt.TableExt.al
new file mode 100644
index 0000000000..c7dcd2d3a1
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseJournalLineExt.TableExt.al
@@ -0,0 +1,136 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.Ledger;
+using Microsoft.Foundation.UOM;
+using Microsoft.Sustainability.ExciseTax;
+
+tableextension 7413 "Excise Journal Line Ext" extends "Sust. Excise Jnl. Line"
+{
+ fields
+ {
+ field(7412; "Excise Tax Type"; Code[20])
+ {
+ Caption = 'Excise Tax Type';
+ TableRelation = "Excise Tax Type".Code where(Enabled = const(true));
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ var
+ ExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ begin
+ if "Excise Tax Type" <> xRec."Excise Tax Type" then begin
+ "Excise Entry Type" := "Excise Entry Type"::" ";
+ "Excise Unit of Measure Code" := '';
+ "Quantity for Excise Tax" := 0;
+ "Tax Rate %" := 0;
+ "Tax Amount" := 0;
+ end;
+
+ if ExciseJournalBatch.Get("Journal Template Name", "Journal Batch Name") and ("Excise Tax Type" <> '') then
+ ExciseJournalBatch.ValidateTaxTypeForBatch("Excise Tax Type");
+ end;
+ }
+ field(7413; "Excise Entry Type"; Enum "Excise Entry Type")
+ {
+ Caption = 'Excise Entry Type';
+ Editable = false;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ if "Excise Entry Type" <> xRec."Excise Entry Type" then
+ ValidateEntryTypeAllowed();
+ end;
+ }
+ field(7414; "Excise Unit of Measure Code"; Code[10])
+ {
+ Caption = 'Excise Tax Unit of Measure';
+ TableRelation = "Unit of Measure".Code;
+ DataClassification = CustomerContent;
+ }
+ field(7415; "Quantity for Excise Tax"; Decimal)
+ {
+ Caption = 'Quantity for Excise Tax';
+ DecimalPlaces = 0 : 5;
+ MinValue = 0;
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ begin
+ Rec."Tax Amount" := CalculateTaxAmount(Rec."Tax Rate %", Rec."Source Qty.", Rec."Quantity for Excise Tax");
+ end;
+ }
+ field(7416; "Tax Rate %"; Decimal)
+ {
+ Caption = 'Tax Rate %';
+ DecimalPlaces = 2 : 5;
+ MinValue = 0;
+ MaxValue = 100;
+ DataClassification = CustomerContent;
+ Editable = false;
+
+ trigger OnValidate()
+ begin
+ if Rec."Tax Rate %" <> 0 then
+ Rec.TestField("Excise Tax Type");
+
+ Rec."Tax Amount" := CalculateTaxAmount(Rec."Tax Rate %", Rec."Source Qty.", Rec."Quantity for Excise Tax");
+ end;
+ }
+ field(7417; "Tax Amount"; Decimal)
+ {
+ Caption = 'Tax Amount';
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ field(7420; "FA Ledger Entry No."; Integer)
+ {
+ Caption = 'FA Ledger Entry No.';
+ TableRelation = "FA Ledger Entry"."Entry No.";
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ modify("Source Qty.")
+ {
+ trigger OnAfterValidate()
+ begin
+ Rec."Tax Amount" := CalculateTaxAmount(Rec."Tax Rate %", Rec."Source Qty.", Rec."Quantity for Excise Tax");
+ end;
+ }
+ }
+
+ trigger OnInsert()
+ var
+ ExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ begin
+ if ("Excise Tax Type" = '') and ExciseJournalBatch.Get(Rec."Journal Template Name", Rec."Journal Batch Name") then
+ if ExciseJournalBatch."Excise Tax Type Filter" <> '' then
+ "Excise Tax Type" := ExciseJournalBatch."Excise Tax Type Filter";
+ end;
+
+ var
+ EntryTypeNotAllowedForTaxTypeErr: Label 'Entry Type %1 is not allowed for Tax Type %2', Comment = '%1 = Excise Entry Type, %2 = Excise Tax Type';
+
+ local procedure ValidateEntryTypeAllowed()
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ begin
+ if ("Excise Tax Type" = '') then
+ exit;
+
+ if not ExciseTaxEntryPermission.IsEntryTypeAllowed("Excise Tax Type", "Excise Entry Type") then
+ Error(EntryTypeNotAllowedForTaxTypeErr, "Excise Entry Type", "Excise Tax Type");
+ end;
+
+ local procedure CalculateTaxAmount(TaxRatePer: Decimal; Quantity: Decimal; QtyForTax: Decimal): Decimal
+ begin
+ if (TaxRatePer = 0) or (Quantity = 0) or (QtyForTax = 0) then
+ exit(0);
+
+ exit((TaxRatePer / 100) * Quantity * QtyForTax);
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseTaxesTransLogExt.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseTaxesTransLogExt.TableExt.al
new file mode 100644
index 0000000000..c3586d9fcd
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/ExciseTaxesTransLogExt.TableExt.al
@@ -0,0 +1,65 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.FixedAssets.Ledger;
+using Microsoft.Foundation.UOM;
+using Microsoft.Sustainability.ExciseTax;
+
+tableextension 7414 "Excise Taxes Trans. Log Ext" extends "Sust. Excise Taxes Trans. Log"
+{
+ fields
+ {
+ field(7412; "Excise Tax Type"; Code[20])
+ {
+ Caption = 'Excise Tax Type';
+ TableRelation = "Excise Tax Type".Code where(Enabled = const(true));
+ DataClassification = CustomerContent;
+ }
+ field(7413; "Excise Entry Type"; Enum "Excise Entry Type")
+ {
+ Caption = 'Excise Entry Type';
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
+ field(7414; "Excise Unit of Measure Code"; Code[10])
+ {
+ Caption = 'Excise Tax Unit of Measure';
+ TableRelation = "Unit of Measure".Code;
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ field(7415; "Quantity for Excise Tax"; Decimal)
+ {
+ Caption = 'Quantity for Excise Tax';
+ DecimalPlaces = 0 : 5;
+ MinValue = 0;
+ Editable = false;
+ DataClassification = CustomerContent;
+ }
+ field(7416; "Tax Rate %"; Decimal)
+ {
+ Caption = 'Tax Rate %';
+ DecimalPlaces = 2 : 5;
+ MinValue = 0;
+ MaxValue = 100;
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ field(7417; "Tax Amount"; Decimal)
+ {
+ Caption = 'Tax Amount';
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ field(7420; "FA Ledger Entry No."; Integer)
+ {
+ Caption = 'FA Ledger Entry No.';
+ TableRelation = "FA Ledger Entry"."Entry No.";
+ DataClassification = CustomerContent;
+ Editable = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/app/src/tableextension/SustainabilityBatchExcise.TableExt.al b/Apps/W1/ExciseTaxes/app/src/tableextension/SustainabilityBatchExcise.TableExt.al
new file mode 100644
index 0000000000..9aa92687be
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/app/src/tableextension/SustainabilityBatchExcise.TableExt.al
@@ -0,0 +1,40 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.ExciseTaxes;
+
+using Microsoft.Sustainability.ExciseTax;
+
+tableextension 7412 "Sustainability Batch Excise" extends "Sust. Excise Journal Batch"
+{
+ fields
+ {
+ field(7412; "Excise Tax Type Filter"; Code[20])
+ {
+ Caption = 'Excise Tax Type Filter';
+ TableRelation = "Excise Tax Type".Code where(Enabled = const(true));
+ DataClassification = CustomerContent;
+
+ trigger OnValidate()
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ if "Excise Tax Type Filter" <> '' then begin
+ ExciseTaxType.Get("Excise Tax Type Filter");
+ Description := CopyStr(StrSubstNo(TaxBatchDescLbl, ExciseTaxType.Description), 1, MaxStrLen(Description));
+ end;
+ end;
+ }
+ }
+
+ var
+ TaxTypeMismatchBatchFilterErr: Label 'Tax type %1 does not match batch filter %2', Comment = '%1 = Excise Tax Type Code, %2 = Excise Tax Type Filter Code';
+ TaxBatchDescLbl: Label '%1 Tax Batch', Comment = '%1 = Excise Tax Type Description';
+
+ procedure ValidateTaxTypeForBatch(ExciseTaxType: Code[20])
+ begin
+ if ("Excise Tax Type Filter" <> '') and (ExciseTaxType <> '') and (ExciseTaxType <> "Excise Tax Type Filter") then
+ Error(TaxTypeMismatchBatchFilterErr, ExciseTaxType, "Excise Tax Type Filter");
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/test/ExtensionLogo.png b/Apps/W1/ExciseTaxes/test/ExtensionLogo.png
new file mode 100644
index 0000000000..4d2c9a626c
Binary files /dev/null and b/Apps/W1/ExciseTaxes/test/ExtensionLogo.png differ
diff --git a/Apps/W1/ExciseTaxes/test/app.json b/Apps/W1/ExciseTaxes/test/app.json
new file mode 100644
index 0000000000..68ee17ad49
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/test/app.json
@@ -0,0 +1,65 @@
+{
+ "id": "0fe902fd-6065-4247-b798-506ba16d9730",
+ "name": "Excise Taxes Tests",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0",
+ "brief": "Tests for Microsoft Excise Taxes app.",
+ "description": "Tests for Microsoft Excise Taxes app.",
+ "privacyStatement": "https://go.microsoft.com/fwlink/?linkid=724009",
+ "EULA": "https://go.microsoft.com/fwlink/?linkid=724013",
+ "help": "https://go.microsoft.com/fwlink/?linkid=2139719",
+ "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2139719",
+ "url": "https://go.microsoft.com/fwlink/?linkid=724011",
+ "logo": "./ExtensionLogo.png",
+ "dependencies": [
+ {
+ "id": "a7bd3b4e-5469-4185-88b5-06745dd4c153",
+ "name": "Excise Taxes",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "b3780cd9-f8f8-4a83-a4d5-0c2ad87b28af",
+ "name": "Sustainability",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5d86850b-0d76-4eca-bd7b-951ad998e997",
+ "name": "Tests-TestLibraries",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "5095f467-0a01-4b99-99d1-9ff1237d286f",
+ "name": "Library Variable Storage",
+ "publisher": "Microsoft",
+ "version": "28.0.0.0"
+ },
+ {
+ "id": "40860557-a18d-42ad-aecb-22b7dd80dc80",
+ "publisher": "Microsoft",
+ "name": "Permissions Mock",
+ "version": "28.0.0.0"
+ }
+ ],
+ "internalsVisibleTo": [],
+ "screenshots": [],
+ "platform": "28.0.0.0",
+ "application": "28.0.0.0",
+ "idRanges": [
+ {
+ "from": 148350,
+ "to": 148360
+ }
+ ],
+ "resourceExposurePolicy": {
+ "allowDebugging": true,
+ "allowDownloadingSource": true,
+ "includeSourceInSymbolFile": true
+ },
+ "features": [
+ "TranslationFile"
+ ],
+ "target": "OnPrem"
+}
diff --git a/Apps/W1/ExciseTaxes/test/src/ExciseTaxCalculationTests.Codeunit.al b/Apps/W1/ExciseTaxes/test/src/ExciseTaxCalculationTests.Codeunit.al
new file mode 100644
index 0000000000..b52e70d475
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/test/src/ExciseTaxCalculationTests.Codeunit.al
@@ -0,0 +1,746 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Test.ExciseTaxes;
+
+using Microsoft.ExciseTaxes;
+using Microsoft.FixedAssets.Depreciation;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.FixedAssets.Journal;
+using Microsoft.FixedAssets.Posting;
+using Microsoft.Inventory.Item;
+using Microsoft.Purchases.Document;
+using Microsoft.Sales.Document;
+using Microsoft.Sustainability.ExciseTax;
+using System.TestLibraries.Utilities;
+
+codeunit 148351 "Excise Tax Calculation Tests"
+{
+ Subtype = Test;
+ TestType = Uncategorized;
+ TestPermissions = Disabled;
+
+ var
+ Assert: Codeunit Assert;
+ LibraryFixedAsset: Codeunit "Library - Fixed Asset";
+ LibraryExciseTax: Codeunit "Library - Excise Tax";
+ LibraryPurchase: Codeunit "Library - Purchase";
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ IsInitialized: Boolean;
+ TotalTaxAmtMismatchTransLogPurchaseLbl: Label 'Total tax amount mismatch in transaction log for purchase';
+ UnexpectedJournalLineCntLbl: Label 'Unexpected number of excise journal lines';
+ UnexpectedTransLogCntLbl: Label 'Unexpected number of excise tax transaction log entries';
+ ExciseRecordNotCreatedLbl: Label '%1 was not created successfully', Comment = '%1= TableCaption';
+ ExciseTaxBasisMismatchLbl: Label 'Excise Tax Basis mismatch';
+ QtyForExciseTaxMissingLbl: Label 'Qty for Excise Tax was not populated';
+
+ [Test]
+ procedure ExciseTaxTypeCreationForWeightBasis()
+ var
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721]Verify Excise Tax Type and Rate creation for By weight basis tax.
+ Initialize();
+
+ // [WHEN] Create Excise tax of By weight basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ // [THEN] Excise Tax Type created with Weight basis
+ VerifyTaxTypeCreated(TaxTypeCode, ExciseTaxBasis::Weight);
+
+ // [THEN] Excise Tax Rate created for Item source type
+ VerifyTaxRateCreated(TaxTypeCode, Enum::"Excise Source Type"::Item);
+ end;
+
+ [Test]
+ procedure ExciseTaxTypeCreationForSugarContentBasis()
+ var
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Excise Tax Type and Rate creation for By sugar content basis tax.
+ Initialize();
+
+ // [WHEN] Create Excise tax of By sugar content basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::"Sugar Content");
+
+ // [THEN] Excise Tax Type created with Sugar Content basis
+ VerifyTaxTypeCreated(TaxTypeCode, ExciseTaxBasis::"Sugar Content");
+
+ // [THEN] Excise Tax Rate created for Item source type
+ VerifyTaxRateCreated(TaxTypeCode, Enum::"Excise Source Type"::Item);
+ end;
+
+ [Test]
+ procedure ExciseTaxTypeCreationForTHCContentBasis()
+ var
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Excise Tax Type and Rate creation for By THC content basis tax.
+ Initialize();
+
+ // [WHEN] Create Excise tax of By THC content basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::"THC Content");
+
+ // [THEN] Excise Tax Type created with THC Content basis
+ VerifyTaxTypeCreated(TaxTypeCode, ExciseTaxBasis::"THC Content");
+
+ // [THEN] Excise Tax Rate created for Item source type
+ VerifyTaxRateCreated(TaxTypeCode, Enum::"Excise Source Type"::Item);
+ end;
+
+ [Test]
+ procedure ExciseTaxTypeCreationForVolumeBasis()
+ var
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Excise Tax Type and Rate creation for By volume basis tax.
+ Initialize();
+
+ // [WHEN] Create Excise tax of By volume basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Volume);
+
+ // [THEN] Excise Tax Type created with Volume basis
+ VerifyTaxTypeCreated(TaxTypeCode, ExciseTaxBasis::Volume);
+
+ // [THEN] Excise Tax Rate created for Item source type
+ VerifyTaxRateCreated(TaxTypeCode, Enum::"Excise Source Type"::Item);
+ end;
+
+ [Test]
+ procedure ExciseTaxTypeCreationForSpiritVolumeBasis()
+ var
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Excise Tax Type and Rate creation for By spirit volume basis tax.
+ Initialize();
+
+ // [WHEN] Create Excise tax of By spirit volume basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::"Spirit Volume");
+
+ // [THEN] Excise Tax Type created with Spirit Volume basis
+ VerifyTaxTypeCreated(TaxTypeCode, ExciseTaxBasis::"Spirit Volume");
+
+ // [THEN] Excise Tax Rate created for Item source type
+ VerifyTaxRateCreated(TaxTypeCode, Enum::"Excise Source Type"::Item);
+ end;
+
+ [Test]
+ procedure ItemExciseDetail()
+ var
+ Item: Record Item;
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Item excise tax detail populated.
+ Initialize();
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ // [WHEN] Create item with excise tax
+ LibraryExciseTax.CreateItemWithExciseTax(Item, TaxTypeCode);
+
+ // [THEN] Verify item excise tax detail populated
+ VerifyItemExciseTaxDetail(Item."No.", TaxTypeCode);
+ end;
+
+ [Test]
+ procedure FAExciseDetail()
+ var
+ FixedAsset: Record "Fixed Asset";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ begin
+ // [SCENARIO 453721] Verify Fixed Asset excise tax detail populated.
+ Initialize();
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ // [WHEN] Create fixed asset with excise tax
+ LibraryExciseTax.CreateFixedAssetWithExciseTax(FixedAsset, TaxTypeCode);
+
+ // [THEN] Verify FA excise tax detail populated
+ VerifyFAExciseDetail(FixedAsset."No.", TaxTypeCode);
+ end;
+
+ [Test]
+ [HandlerFunctions('ExciseTaxReportRequestPageHandler,MessageHandler')]
+ procedure ExciseTaxJournalLineGenerationFromPurchase()
+ var
+ Item: Record Item;
+ SustExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ SustExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ SustainabilityExciseJournalMgt: Codeunit "Sust. Excise Journal Mgt.";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ Quantity: Decimal;
+ TaxPercentage: Decimal;
+ begin
+ // [SCENARIO 453721] Calculate Excise by weight from Purchase ILEs and verify journal lines and transaction log.
+ Initialize();
+
+ //[GIVEN] Random tax percentage between 1 and 10; random quantities for 3 purchase ILEs.
+ Quantity := LibraryRandom.RandInt(2000);
+ TaxPercentage := LibraryRandom.RandInt(10);
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate; create item with excise tax; create 3 purchase ILEs for the item.
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ // [GIVEN] Create item with excise tax
+ LibraryExciseTax.CreateItemWithExciseTax(Item, TaxTypeCode);
+
+ // [GIVEN] Create hierarchical rate for item source type
+ LibraryExciseTax.CreateExciseTaxItemFARate(TaxTypeCode, Enum::"Excise Source Type"::Item, Item."No.", TaxPercentage, CalcDate('<-CY>', WorkDate()), LibraryRandom.RandText(10));
+
+ // [GIVEN] Configure excise journal batch for excise journal line generation
+ SustExciseJournalBatch := SustainabilityExciseJournalMgt.GetASustainabilityJournalBatch();
+ SustExciseJournalBatch.Validate(Type, SustExciseJournalBatch.Type::Excises);
+ SustExciseJournalBatch.Validate("Excise Tax Type Filter", TaxTypeCode);
+ SustExciseJournalBatch.Modify(true);
+
+ // [GIVEN] Create and post purchase documents to generate ILEs
+ CreateAndPostPurchase(Item."No.", Quantity);
+
+ // [WHEN] Generate excise journal lines from ILEs within date range; hierarchical rate applied; one journal line per ILE.
+ GenerateExciseJournalLines(SustExciseJournalBatch);
+
+ // [THEN] Verify journal line count for tax type
+ SustExciseJnlLine.SetRange("Journal Template Name", SustExciseJournalBatch."Journal Template Name");
+ SustExciseJnlLine.SetRange("Journal Batch Name", SustExciseJournalBatch.Name);
+ SustExciseJnlLine.SetRange("Excise Tax Type", TaxTypeCode);
+ SustExciseJnlLine.FindSet();
+ Assert.AreEqual(1, SustExciseJnlLine.Count(), UnexpectedJournalLineCntLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('ExciseTaxReportRequestPageHandler,MessageHandler')]
+ procedure NoJournalLinesGeneratedWhenEntryTypeNotAllowed()
+ var
+ Item: Record Item;
+ ExciseTaxType: Record "Excise Tax Type";
+ SustExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ SustExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ SustainabilityExciseJournalMgt: Codeunit "Sust. Excise Journal Mgt.";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ Quantity: Decimal;
+ TaxPercentage: Decimal;
+ begin
+ // [SCENARIO 453721] No excise journal lines generated when purchase entry type not allowed.
+ Initialize();
+
+ //[GIVEN] Random tax percentage between 1 and 10; random quantities for 3 purchase ILEs.
+ Quantity := LibraryRandom.RandInt(2000);
+ TaxPercentage := LibraryRandom.RandInt(10);
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate; create item with excise tax; create 3 purchase ILEs for the item.
+ ExciseTaxType := LibraryExciseTax.CreateExciseTaxType('', ExciseTaxBasis::Weight, true);
+
+ LibraryExciseTax.CreateExciseTaxEntryPermission(ExciseTaxType.Code, "Excise Entry Type"::Purchase, false);
+
+ // [GIVEN] Create item with excise tax
+ LibraryExciseTax.CreateItemWithExciseTax(Item, ExciseTaxType.Code);
+
+ // [GIVEN] Create hierarchical rate for item source type
+ LibraryExciseTax.CreateExciseTaxItemFARate(ExciseTaxType.Code, Enum::"Excise Source Type"::Item, Item."No.", TaxPercentage, CalcDate('<-CY>', WorkDate()), LibraryRandom.RandText(10));
+
+ // [GIVEN] Configure excise journal batch for excise journal line generation
+ SustExciseJournalBatch := SustainabilityExciseJournalMgt.GetASustainabilityJournalBatch();
+ SustExciseJournalBatch.Validate(Type, SustExciseJournalBatch.Type::Excises);
+ SustExciseJournalBatch.Validate("Excise Tax Type Filter", ExciseTaxType.Code);
+ SustExciseJournalBatch.Modify(true);
+
+ // [GIVEN] Create and post purchase documents to generate ILEs
+ CreateAndPostPurchase(Item."No.", Quantity);
+
+ // [WHEN] Generate excise journal lines from ILEs within date range; hierarchical rate applied; one journal line per ILE.
+ GenerateExciseJournalLines(SustExciseJournalBatch);
+
+ // [THEN] Verify journal line count for tax type
+ SustExciseJnlLine.SetRange("Journal Template Name", SustExciseJournalBatch."Journal Template Name");
+ SustExciseJnlLine.SetRange("Journal Batch Name", SustExciseJournalBatch.Name);
+ SustExciseJnlLine.SetRange("Excise Tax Type", ExciseTaxType.Code);
+ Assert.AreEqual(0, SustExciseJnlLine.Count(), UnexpectedJournalLineCntLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('ExciseTaxReportRequestPageHandler,MessageHandler')]
+ procedure OneExciseJournalLineGeneratedWhenTwoILEPosted()
+ var
+ Item: Record Item;
+ ExciseTaxType: Record "Excise Tax Type";
+ SustExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ SustExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ SustainabilityExciseJournalMgt: Codeunit "Sust. Excise Journal Mgt.";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ Quantity: Decimal;
+ TaxPercentage: Decimal;
+ begin
+ // [SCENARIO 453721] One excise journal line generated when two ILEs posted for same item on same date.
+ Initialize();
+
+ //[GIVEN] Random tax percentage between 1 and 10; random quantities for 3 purchase ILEs.
+ Quantity := LibraryRandom.RandInt(2000);
+ TaxPercentage := LibraryRandom.RandInt(10);
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate; create item with excise tax; create 3 purchase ILEs for the item.
+ ExciseTaxType := LibraryExciseTax.CreateExciseTaxType('', ExciseTaxBasis::Weight, true);
+
+ LibraryExciseTax.CreateExciseTaxEntryPermission(ExciseTaxType.Code, "Excise Entry Type"::Sale, true);
+
+ // [GIVEN] Create item with excise tax
+ LibraryExciseTax.CreateItemWithExciseTax(Item, ExciseTaxType.Code);
+
+ // [GIVEN] Create hierarchical rate for item source type
+ LibraryExciseTax.CreateExciseTaxItemFARate(ExciseTaxType.Code, Enum::"Excise Source Type"::Item, Item."No.", TaxPercentage, CalcDate('<-CY>', WorkDate()), LibraryRandom.RandText(10));
+
+ // [GIVEN] Configure excise journal batch for excise journal line generation
+ SustExciseJournalBatch := SustainabilityExciseJournalMgt.GetASustainabilityJournalBatch();
+ SustExciseJournalBatch.Validate(Type, SustExciseJournalBatch.Type::Excises);
+ SustExciseJournalBatch.Validate("Excise Tax Type Filter", ExciseTaxType.Code);
+ SustExciseJournalBatch.Modify(true);
+
+ // [GIVEN] Create and post purchase and sales documents to generate ILEs
+ CreateAndPostPurchase(Item."No.", Quantity);
+ CreateAndPostSales(Item."No.", Quantity);
+
+ // [WHEN] Generate excise journal lines from ILEs within date range; hierarchical rate applied; one journal line per ILE.
+ GenerateExciseJournalLines(SustExciseJournalBatch);
+
+ // [THEN] Verify journal line count for tax type
+ SustExciseJnlLine.SetRange("Journal Template Name", SustExciseJournalBatch."Journal Template Name");
+ SustExciseJnlLine.SetRange("Journal Batch Name", SustExciseJournalBatch.Name);
+ SustExciseJnlLine.SetRange("Excise Tax Type", ExciseTaxType.Code);
+ Assert.AreEqual(1, SustExciseJnlLine.Count(), UnexpectedJournalLineCntLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('ExciseTaxReportRequestPageHandler,MessageHandler,UIConfirmHandler')]
+ procedure VerifyJournalLinesForPurchaseEntries()
+ var
+ Item: Record Item;
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ SustExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ SustainabilityExciseJournalMgt: Codeunit "Sust. Excise Journal Mgt.";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ Quantity: array[3] of Decimal;
+ ExpectedTotal: Decimal;
+ TaxPercentage: Decimal;
+ begin
+ // [SCENARIO 453721] Calculate Excise by weight from Purchase ILEs and verify journal lines and transaction log.
+ Initialize();
+
+ //[GIVEN] Random tax percentage between 1 and 10; random quantities for 3 purchase ILEs.
+ Quantity[1] := LibraryRandom.RandInt(2000);
+ Quantity[2] := LibraryRandom.RandInt(3000);
+ Quantity[3] := LibraryRandom.RandInt(4000);
+ TaxPercentage := LibraryRandom.RandInt(10);
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate; create item with excise tax; create 3 purchase ILEs for the item.
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ // [GIVEN] Create item with excise tax
+ LibraryExciseTax.CreateItemWithExciseTax(Item, TaxTypeCode);
+
+ // [GIVEN] Create hierarchical rate for item source type
+ LibraryExciseTax.CreateExciseTaxItemFARate(TaxTypeCode, Enum::"Excise Source Type"::Item, Item."No.", TaxPercentage, CalcDate('<-CY>', WorkDate()), LibraryRandom.RandText(10));
+
+ // [GIVEN] Configure excise journal batch for excise journal line generation
+ SustExciseJournalBatch := SustainabilityExciseJournalMgt.GetASustainabilityJournalBatch();
+ SustExciseJournalBatch.Validate(Type, SustExciseJournalBatch.Type::Excises);
+ SustExciseJournalBatch.Validate("Excise Tax Type Filter", TaxTypeCode);
+ SustExciseJournalBatch.Modify(true);
+
+ // [GIVEN] Create and post purchase documents to generate ILEs
+ CreateAndPostPurchase(Item."No.", Quantity[1]);
+ CreateAndPostPurchase(Item."No.", Quantity[2]);
+ CreateAndPostPurchase(Item."No.", Quantity[3]);
+
+ // [WHEN] Generate excise journal lines from ILEs within date range; hierarchical rate applied; one journal line per ILE.
+ GenerateExciseJournalLines(SustExciseJournalBatch);
+
+ // [THEN] Verify journal line count for tax type
+ VerifyJournalLineCountForTaxType(TaxTypeCode, 3);
+
+ // [GIVEN] Sum journal amounts for tax type
+ ExpectedTotal := SumJournalTaxAmountForTaxType(TaxTypeCode);
+
+ // [GIVEN] Update Description in Excise Journal Line.
+ ExciseJournalLine.SetRange("Journal Template Name", SustExciseJournalBatch."Journal Template Name");
+ ExciseJournalLine.SetRange("Journal Batch Name", SustExciseJournalBatch.Name);
+ ExciseJournalLine.ModifyAll(Description, LibraryRandom.RandText(100));
+
+ // [WHEN] Register excise journal
+ RegisterExciseJournal(SustExciseJournalBatch."Journal Template Name", SustExciseJournalBatch.Name);
+
+ // [THEN] "Sust. Excise Jnl. Line" contains 3 lines with tax amounts 150, 90, 60; total 300. "Sust. Excise Taxes Trans. Log" has 3 entries mirroring journal lines.
+ VerifyTransactionLogCountForTaxType(TaxTypeCode, 3);
+ Assert.AreEqual(ExpectedTotal, SumTransactionLogTaxAmountForTaxType(TaxTypeCode), TotalTaxAmtMismatchTransLogPurchaseLbl);
+ end;
+
+ [Test]
+ [HandlerFunctions('ExciseTaxReportRequestPageHandler,MessageHandler,UIConfirmHandler')]
+ procedure VerifyFAJournalLinesForAcquisitionCost()
+ var
+ SustExciseJournalBatch: Record "Sust. Excise Journal Batch";
+ DepreciationBook: Record "Depreciation Book";
+ FixedAsset: Record "Fixed Asset";
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ SustainabilityExciseJournalMgt: Codeunit "Sust. Excise Journal Mgt.";
+ ExciseTaxBasis: Enum "Excise Tax Basis";
+ TaxTypeCode: Code[20];
+ ExpectedTotal: Decimal;
+ TaxPercentage: Decimal;
+ begin
+ // [SCENARIO 453721] Calculate Excise by weight from FA Acquisition Cost and verify journal lines and transaction log.
+ Initialize();
+
+ //[GIVEN] Random tax percentage between 1 and 10.
+ TaxPercentage := LibraryRandom.RandInt(10);
+
+ // [GIVEN] Create Excise tax of By weight basis with hierarchical rate; create fixed asset with excise tax; post acquisition cost.
+ TaxTypeCode := LibraryExciseTax.SetupTaxType(ExciseTaxBasis::Weight);
+
+ LibraryExciseTax.CreateFixedAssetWithExciseTax(FixedAsset, TaxTypeCode);
+ // [GIVEN] Create hierarchical rate for fixed asset source type
+ LibraryExciseTax.CreateExciseTaxItemFARate(TaxTypeCode, Enum::"Excise Source Type"::"Fixed Asset", FixedAsset."No.", TaxPercentage, CalcDate('<-CY>', WorkDate()), LibraryRandom.RandText(10));
+
+ // [GIVEN] Setup fixed asset depreciation and post acquisition cost
+ CreateFixedAssetWithSetup(FixedAsset, DepreciationBook);
+ CreateAndPostAcqCost(FixedAsset."No.", DepreciationBook.Code);
+
+ // [GIVEN] Configure excise journal batch for excise journal line generation
+ SustExciseJournalBatch := SustainabilityExciseJournalMgt.GetASustainabilityJournalBatch();
+ SustExciseJournalBatch.Validate(Type, SustExciseJournalBatch.Type::Excises);
+ SustExciseJournalBatch.Validate("Excise Tax Type Filter", TaxTypeCode);
+ SustExciseJournalBatch.Modify(true);
+
+ // [WHEN] Generate excise journal lines from ILEs within date range; hierarchical rate applied; one journal line per ILE.
+ GenerateExciseJournalLines(SustExciseJournalBatch);
+
+ // [THEN] Verify journal line count for tax type
+ VerifyJournalLineCountForTaxType(TaxTypeCode, 1);
+
+ // [GIVEN] Sum journal amounts for tax type
+ ExpectedTotal := SumJournalTaxAmountForTaxType(TaxTypeCode);
+
+ // [GIVEN] Update Description in Excise Journal Line.
+ ExciseJournalLine.SetRange("Journal Template Name", SustExciseJournalBatch."Journal Template Name");
+ ExciseJournalLine.SetRange("Journal Batch Name", SustExciseJournalBatch.Name);
+ ExciseJournalLine.SetRange("Excise Tax Type", TaxTypeCode);
+ ExciseJournalLine.ModifyAll(Description, LibraryRandom.RandText(100));
+
+ // [WHEN] Register excise journal
+ RegisterExciseJournal(SustExciseJournalBatch."Journal Template Name", SustExciseJournalBatch.Name);
+
+ // [THEN] "Sust. Excise Jnl. Line" contains 1 line for FA acquisition cost. "Sust. Excise Taxes Trans. Log" has 1 entry mirroring the journal line.
+ VerifyTransactionLogCountForTaxType(TaxTypeCode, 1);
+ Assert.AreEqual(ExpectedTotal, SumTransactionLogTaxAmountForTaxType(TaxTypeCode), TotalTaxAmtMismatchTransLogPurchaseLbl);
+ end;
+
+ local procedure Initialize()
+ var
+ LibraryERMCountryData: Codeunit "Library - ERM Country Data";
+ begin
+ LibraryExciseTax.CleanupExciseTaxData();
+
+ if IsInitialized then
+ exit;
+
+ LibraryERMCountryData.UpdateGeneralLedgerSetup();
+ LibraryERMCountryData.CreateVATData();
+ LibraryERMCountryData.UpdateGeneralPostingSetup();
+ LibraryERMCountryData.CreateGeneralPostingSetupData();
+ LibraryERMCountryData.UpdatePurchasesPayablesSetup();
+ LibraryERMCountryData.UpdateJournalTemplMandatory(false);
+
+ IsInitialized := true;
+ end;
+
+ local procedure VerifyFAExciseDetail(FANo: Code[20]; TaxTypeCode: Code[20])
+ var
+ FixedAsset: Record "Fixed Asset";
+ begin
+ FixedAsset.Get(FANo);
+ Assert.AreEqual(TaxTypeCode, FixedAsset."Excise Tax Type", ExciseTaxBasisMismatchLbl);
+ Assert.IsTrue(FixedAsset."Quantity for Excise Tax" <> 0, QtyForExciseTaxMissingLbl);
+ Assert.IsTrue(FixedAsset."Excise Unit of Measure Code" <> '', QtyForExciseTaxMissingLbl);
+ end;
+
+ local procedure VerifyItemExciseTaxDetail(ItemNo: Code[20]; TaxTypeCode: Code[20])
+ var
+ Item: Record Item;
+ begin
+ Item.Get(ItemNo);
+ Assert.AreEqual(TaxTypeCode, Item."Excise Tax Type", ExciseTaxBasisMismatchLbl);
+ Assert.IsTrue(Item."Quantity for Excise Tax" <> 0, QtyForExciseTaxMissingLbl);
+ Assert.IsTrue(Item."Excise Unit of Measure Code" <> '', QtyForExciseTaxMissingLbl);
+ end;
+
+ local procedure VerifyTaxTypeCreated(TaxTypeCode: Code[20]; TaxBasis: Enum "Excise Tax Basis")
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ ExciseTaxType.Get(TaxTypeCode);
+ Assert.IsTrue(ExciseTaxType."Code" = TaxTypeCode, StrSubstNo(ExciseRecordNotCreatedLbl, ExciseTaxType.TableCaption()));
+ Assert.IsTrue(ExciseTaxType."Tax Basis" = TaxBasis, ExciseTaxBasisMismatchLbl);
+ end;
+
+ local procedure VerifyTaxRateCreated(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type")
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxItemFARate.SetRange("Source Type", SourceType);
+ ExciseTaxItemFARate.FindFirst();
+ Assert.IsTrue(ExciseTaxItemFARate."Excise Tax Type Code" = TaxTypeCode, StrSubstNo(ExciseRecordNotCreatedLbl, ExciseTaxItemFARate.TableCaption()));
+ end;
+
+ local procedure CreateFixedAssetWithSetup(FixedAsset: Record "Fixed Asset"; var DepreciationBook: Record "Depreciation Book")
+ begin
+ CreateFixedAssetSetup(DepreciationBook);
+ CreateFADepreciationBook(FixedAsset."No.", DepreciationBook.Code, FixedAsset."FA Posting Group");
+ UpdateIntegrationInBook(DepreciationBook, false, false, false);
+ end;
+
+ local procedure CreateFADepreciationBook(FANo: Code[20]; DepreciationBookCode: Code[10]; FAPostingGroup: Code[20])
+ var
+ FADepreciationBook: Record "FA Depreciation Book";
+ begin
+ LibraryFixedAsset.CreateFADepreciationBook(FADepreciationBook, FANo, DepreciationBookCode);
+ FADepreciationBook.Validate("Depreciation Book Code", DepreciationBookCode);
+ FADepreciationBook.Validate("Depreciation Starting Date", WorkDate());
+
+ // Random Number Generator for Ending date.
+ FADepreciationBook.Validate("Depreciation Ending Date", CalcDate('<' + Format(LibraryRandom.RandInt(5)) + 'Y>', WorkDate()));
+ FADepreciationBook.Validate("FA Posting Group", FAPostingGroup);
+ FADepreciationBook.Modify(true);
+ end;
+
+ local procedure UpdateIntegrationInBook(var DepreciationBook: Record "Depreciation Book"; Depreciation: Boolean; Disposal: Boolean; VATOnNetDisposalEntries: Boolean)
+ begin
+ DepreciationBook.Validate("G/L Integration - Acq. Cost", false);
+ DepreciationBook.Validate("G/L Integration - Depreciation", Depreciation);
+ DepreciationBook.Validate("G/L Integration - Write-Down", false);
+ DepreciationBook.Validate("G/L Integration - Appreciation", false);
+ DepreciationBook.Validate("G/L Integration - Disposal", Disposal);
+ DepreciationBook.Validate("G/L Integration - Custom 1", false);
+ DepreciationBook.Validate("G/L Integration - Custom 2", false);
+ DepreciationBook.Validate("G/L Integration - Maintenance", false);
+ DepreciationBook.Validate("VAT on Net Disposal Entries", VATOnNetDisposalEntries);
+ DepreciationBook.Modify(true);
+ end;
+
+ local procedure CreateFixedAssetSetup(var DepreciationBook: Record "Depreciation Book")
+ var
+ FAJournalSetup: Record "FA Journal Setup";
+ begin
+ LibraryFixedAsset.CreateDepreciationBook(DepreciationBook);
+ LibraryFixedAsset.CreateFAJournalSetup(FAJournalSetup, DepreciationBook.Code, '');
+ UpdateFAJournalSetup(FAJournalSetup);
+ UpdateFAPostingTypeSetup(DepreciationBook.Code);
+ end;
+
+ local procedure UpdateFAPostingTypeSetup(DepreciationBookCode: Code[10])
+ var
+ FAPostingTypeSetup: Record "FA Posting Type Setup";
+ begin
+ FAPostingTypeSetup.SetRange("Depreciation Book Code", DepreciationBookCode);
+ FAPostingTypeSetup.ModifyAll("Include in Gain/Loss Calc.", true);
+ end;
+
+ local procedure CreateAndPostAcqCost(FANo: Code[20]; DeprBookCode: Code[10])
+ var
+ FAJournalLine: Record "FA Journal Line";
+ FAJournalBatch: Record "FA Journal Batch";
+ begin
+ CreateFAJournalBatch(FAJournalBatch);
+
+ CreateFAJournalLine(
+ FAJournalLine, FAJournalBatch, FAJournalLine."FA Posting Type"::"Acquisition Cost", FANo,
+ DeprBookCode, LibraryRandom.RandDec(1000, 2));
+
+ LibraryFixedAsset.PostFAJournalLine(FAJournalLine);
+ end;
+
+ local procedure CreateFAJournalBatch(var FAJournalBatch: Record "FA Journal Batch")
+ var
+ FAJournalTemplate: Record "FA Journal Template";
+ begin
+ FAJournalTemplate.SetRange(Recurring, false);
+ LibraryFixedAsset.FindFAJournalTemplate(FAJournalTemplate);
+ LibraryFixedAsset.CreateFAJournalBatch(FAJournalBatch, FAJournalTemplate.Name);
+ FAJournalBatch.Validate("No. Series", '');
+ FAJournalBatch.Modify(true);
+ end;
+
+ local procedure UpdateFAJournalSetup(var FAJournalSetup: Record "FA Journal Setup")
+ var
+ FAJournalSetup2: Record "FA Journal Setup";
+ begin
+ FAJournalSetup2.SetRange("Depreciation Book Code", LibraryFixedAsset.GetDefaultDeprBook());
+ FAJournalSetup2.FindFirst();
+ FAJournalSetup.TransferFields(FAJournalSetup2, false);
+ FAJournalSetup.Modify(true);
+ end;
+
+ local procedure CreateFAJournalLine(var FAJournalLine: Record "FA Journal Line"; FAJournalBatch: Record "FA Journal Batch";
+ FAPostingType: Enum "FA Journal Line FA Posting Type"; FANo: Code[20]; DepreciationBookCode: Code[10]; Amount: Decimal)
+ begin
+ LibraryFixedAsset.CreateFAJournalLine(FAJournalLine, FAJournalBatch."Journal Template Name", FAJournalBatch.Name);
+ FAJournalLine.Validate("Document Type", FAJournalLine."Document Type"::" ");
+ FAJournalLine.Validate("Document No.", FAJournalLine."Journal Batch Name" + Format(FAJournalLine."Line No."));
+ FAJournalLine.Validate("Posting Date", WorkDate());
+ FAJournalLine.Validate("FA Posting Date", WorkDate());
+ FAJournalLine.Validate("FA Posting Type", FAPostingType);
+ FAJournalLine.Validate("FA No.", FANo);
+ FAJournalLine.Validate(Amount, Amount);
+ FAJournalLine.Validate("Depreciation Book Code", DepreciationBookCode);
+ FAJournalLine.Modify(true);
+ end;
+
+ local procedure CreateAndPostPurchase(ItemNo: Code[20]; Quantity: Decimal)
+ var
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ begin
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, Enum::"Purchase Document Type"::Order, LibraryPurchase.CreateVendorNo());
+ PurchaseHeader.SetHideValidationDialog(true);
+ PurchaseHeader.Validate("Posting Date", WorkDate());
+ PurchaseHeader.Modify();
+
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine,
+ PurchaseHeader,
+ Enum::"Purchase Line Type"::Item,
+ ItemNo,
+ Quantity);
+
+ PurchaseLine.Validate("Direct Unit Cost", 1);
+ PurchaseLine.Modify(true);
+
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true);
+ end;
+
+ local procedure CreateAndPostSales(ItemNo: Code[20]; Quantity: Decimal)
+ var
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ LibrarySales: Codeunit "Library - Sales";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, Enum::"Sales Document Type"::Order, LibrarySales.CreateCustomerNo());
+ SalesHeader.SetHideValidationDialog(true);
+ SalesHeader.Validate("Posting Date", WorkDate());
+ SalesHeader.Modify();
+
+ LibrarySales.CreateSalesLine(
+ SalesLine,
+ SalesHeader,
+ Enum::"Sales Line Type"::Item,
+ ItemNo,
+ Quantity);
+
+ SalesLine.Validate("Unit Price", 1);
+ SalesLine.Modify(true);
+
+ LibrarySales.PostSalesDocument(SalesHeader, true, true);
+ end;
+
+ local procedure GenerateExciseJournalLines(SustExciseJournalBatch: Record "Sust. Excise Journal Batch")
+ var
+ ExciseJournalLine: Record "Sust. Excise Jnl. Line";
+ CreateExciseTaxJnlEntries: Report "Create Excise Tax Jnl. Entries";
+ begin
+ Commit();
+
+ ExciseJournalLine."Journal Template Name" := SustExciseJournalBatch."Journal Template Name";
+ ExciseJournalLine."Journal Batch Name" := SustExciseJournalBatch.Name;
+
+ LibraryVariableStorage.Enqueue(WorkDate());
+ LibraryVariableStorage.Enqueue(CalcDate('<-1M>', WorkDate()));
+ LibraryVariableStorage.Enqueue(CalcDate('<1M>', WorkDate()));
+ LibraryVariableStorage.Enqueue('');
+ LibraryVariableStorage.Enqueue('');
+
+ CreateExciseTaxJnlEntries.SetExciseJournalLine(ExciseJournalLine);
+ CreateExciseTaxJnlEntries.RunModal();
+ end;
+
+ local procedure RegisterExciseJournal(TemplateName: Code[10]; BatchName: Code[10])
+ var
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJnlLine.SetRange("Journal Template Name", TemplateName);
+ ExciseJnlLine.SetRange("Journal Batch Name", BatchName);
+ if ExciseJnlLine.FindSet() then
+ Codeunit.Run(Codeunit::"Sust. Excise Jnl.-Post", ExciseJnlLine);
+ end;
+
+ local procedure SumJournalTaxAmountForTaxType(TaxTypeCode: Code[20]) TotalAmount: Decimal
+ var
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJnlLine.SetRange("Excise Tax Type", TaxTypeCode);
+ if ExciseJnlLine.FindSet() then
+ repeat
+ TotalAmount += ExciseJnlLine."Tax Amount";
+ until ExciseJnlLine.Next() = 0;
+ end;
+
+ local procedure VerifyJournalLineCountForTaxType(TaxTypeCode: Code[20]; ExpectedCount: Integer)
+ var
+ ExciseJnlLine: Record "Sust. Excise Jnl. Line";
+ begin
+ ExciseJnlLine.SetRange("Excise Tax Type", TaxTypeCode);
+ Assert.AreEqual(ExpectedCount, ExciseJnlLine.Count(), UnexpectedJournalLineCntLbl);
+ end;
+
+ local procedure SumTransactionLogTaxAmountForTaxType(TaxTypeCode: Code[20]) TotalAmount: Decimal
+ var
+ ExciseTaxTransLog: Record "Sust. Excise Taxes Trans. Log";
+ begin
+ ExciseTaxTransLog.SetRange("Excise Tax Type", TaxTypeCode);
+ if ExciseTaxTransLog.FindSet() then
+ repeat
+ TotalAmount += ExciseTaxTransLog."Tax Amount";
+ until ExciseTaxTransLog.Next() = 0;
+ end;
+
+ local procedure VerifyTransactionLogCountForTaxType(TaxTypeCode: Code[20]; ExpectedCount: Integer)
+ var
+ ExciseTaxTransLog: Record "Sust. Excise Taxes Trans. Log";
+ begin
+ ExciseTaxTransLog.SetRange("Excise Tax Type", TaxTypeCode);
+ Assert.AreEqual(ExpectedCount, ExciseTaxTransLog.Count(), UnexpectedTransLogCntLbl);
+ end;
+
+ [RequestPageHandler]
+ procedure ExciseTaxReportRequestPageHandler(var CreateExciseTaxJnlEntries: TestRequestPage "Create Excise Tax Jnl. Entries")
+ begin
+ CreateExciseTaxJnlEntries."Posting Date".SetValue(LibraryVariableStorage.DequeueDate());
+ CreateExciseTaxJnlEntries."Starting Date".SetValue(LibraryVariableStorage.DequeueDate());
+ CreateExciseTaxJnlEntries."Ending Date".SetValue(LibraryVariableStorage.DequeueDate());
+ CreateExciseTaxJnlEntries."Item Filter".SetValue(LibraryVariableStorage.DequeueText());
+ CreateExciseTaxJnlEntries."Fixed Asset Filter".SetValue(LibraryVariableStorage.DequeueText());
+ CreateExciseTaxJnlEntries.OK().Invoke();
+ end;
+
+ [MessageHandler]
+ procedure MessageHandler(Msg: Text[1024])
+ begin
+ end;
+
+ [ConfirmHandler]
+ procedure UIConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/ExciseTaxes/test/src/LibraryExciseTax.Codeunit.al b/Apps/W1/ExciseTaxes/test/src/LibraryExciseTax.Codeunit.al
new file mode 100644
index 0000000000..74bfd6dd7c
--- /dev/null
+++ b/Apps/W1/ExciseTaxes/test/src/LibraryExciseTax.Codeunit.al
@@ -0,0 +1,212 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.Test.ExciseTaxes;
+
+using Microsoft.ExciseTaxes;
+using Microsoft.Finance.GeneralLedger.Account;
+using Microsoft.FixedAssets.FixedAsset;
+using Microsoft.Foundation.UOM;
+using Microsoft.Inventory.Item;
+
+codeunit 148350 "Library - Excise Tax"
+{
+ var
+ LibraryRandom: Codeunit "Library - Random";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryERM: Codeunit "Library - ERM";
+ LibraryFixedAsset: Codeunit "Library - Fixed Asset";
+ SourceSpecificRateMismatchLbl: Label 'Expected source-specific rate %1, but got %2', Comment = '%1 = Expected Rate, %2 = Actual Rate';
+
+ procedure CreateExciseTaxType(TaxCode: Code[20]; TaxBasis: Enum "Excise Tax Basis"; IsEnabled: Boolean): Record "Excise Tax Type"
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ if TaxCode = '' then
+ TaxCode := GetTaxTypeCode();
+
+ ExciseTaxType.Init();
+ ExciseTaxType.Code := TaxCode;
+ ExciseTaxType.Description := CopyStr(LibraryUtility.GenerateRandomText(100), 1, 100);
+ ExciseTaxType."Tax Basis" := TaxBasis;
+ ExciseTaxType.Enabled := IsEnabled;
+ ExciseTaxType."Report Caption" := CopyStr(LibraryUtility.GenerateRandomText(50), 1, 50);
+ ExciseTaxType.Insert(true);
+ exit(ExciseTaxType);
+ end;
+
+ procedure CreateExciseTaxEntryPermission(TaxTypeCode: Code[20]; EntryType: Enum "Excise Entry Type"; IsAllowed: Boolean)
+ var
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ begin
+ if TaxTypeCode = '' then
+ TaxTypeCode := CopyStr(LibraryRandom.RandText(20), 1, 20);
+ ExciseTaxEntryPermission.Init();
+ ExciseTaxEntryPermission."Excise Tax Type Code" := TaxTypeCode;
+ ExciseTaxEntryPermission."Excise Entry Type" := EntryType;
+ ExciseTaxEntryPermission.Allowed := IsAllowed;
+ ExciseTaxEntryPermission.Insert(true);
+ end;
+
+ procedure CreateExciseTaxItemRate(TaxTypeCode: Code[20]; ItemNo: Code[20]; TaxRatePercent: Decimal; EffectiveFromDate: Date; RateDescription: Text[100]): Record "Excise Tax Item/FA Rate"
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.Init();
+ ExciseTaxItemFARate."Excise Tax Type Code" := TaxTypeCode;
+ ExciseTaxItemFARate."Source Type" := "Excise Source Type"::Item;
+ ExciseTaxItemFARate."Source No." := ItemNo;
+ ExciseTaxItemFARate."Tax Rate %" := TaxRatePercent;
+ ExciseTaxItemFARate."Effective From Date" := EffectiveFromDate;
+ ExciseTaxItemFARate.Description := RateDescription;
+ ExciseTaxItemFARate.Insert(true);
+ exit(ExciseTaxItemFARate);
+ end;
+
+ procedure CreateExciseTaxFARate(TaxTypeCode: Code[20]; FANo: Code[20]; TaxRatePercent: Decimal; EffectiveFromDate: Date; RateDescription: Text[100]): Record "Excise Tax Item/FA Rate"
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.Init();
+ ExciseTaxItemFARate."Excise Tax Type Code" := TaxTypeCode;
+ ExciseTaxItemFARate."Source Type" := "Excise Source Type"::"Fixed Asset";
+ ExciseTaxItemFARate."Source No." := FANo;
+ ExciseTaxItemFARate."Tax Rate %" := TaxRatePercent;
+ ExciseTaxItemFARate."Effective From Date" := EffectiveFromDate;
+ ExciseTaxItemFARate.Description := RateDescription;
+ ExciseTaxItemFARate.Insert(true);
+ exit(ExciseTaxItemFARate);
+ end;
+
+ procedure CreateExciseTaxItemFARate(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; TaxRatePercent: Decimal; EffectiveFromDate: Date; RateDescription: Text[100]): Record "Excise Tax Item/FA Rate"
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.Init();
+ ExciseTaxItemFARate."Excise Tax Type Code" := TaxTypeCode;
+ ExciseTaxItemFARate."Source Type" := SourceType;
+ ExciseTaxItemFARate."Source No." := SourceNo;
+ ExciseTaxItemFARate."Tax Rate %" := TaxRatePercent;
+ ExciseTaxItemFARate."Effective From Date" := EffectiveFromDate;
+ ExciseTaxItemFARate.Description := RateDescription;
+ ExciseTaxItemFARate.Insert(true);
+ exit(ExciseTaxItemFARate);
+ end;
+
+ procedure CreateItemWithExciseTax(var Item: Record Item; TaxTypeCode: Code[20])
+ var
+ UnitOfMeasure: Record "Unit of Measure";
+ begin
+ LibraryInventory.CreateItem(Item);
+ LibraryInventory.CreateUnitOfMeasureCode(UnitOfMeasure);
+ Item.Validate("Excise Tax Type", TaxTypeCode);
+ Item.Validate("Quantity for Excise Tax", LibraryRandom.RandDec(1, 3));
+ Item.Validate("Excise Unit of Measure Code", UnitOfMeasure.Code);
+ Item.Modify(true);
+ end;
+
+ procedure CreateFixedAssetWithExciseTax(var FixedAsset: Record "Fixed Asset"; TaxTypeCode: Code[20])
+ var
+ UnitOfMeasure: Record "Unit of Measure";
+ begin
+ LibraryFixedAsset.CreateFAWithPostingGroup(FixedAsset);
+ LibraryInventory.CreateUnitOfMeasureCode(UnitOfMeasure);
+ FixedAsset.Validate("Excise Tax Type", TaxTypeCode);
+ FixedAsset.Validate("Quantity for Excise Tax", LibraryRandom.RandDec(1, 3));
+ FixedAsset.Validate("Excise Unit of Measure Code", UnitOfMeasure.Code);
+ FixedAsset.Modify(true);
+ end;
+
+ procedure SetupTaxType(ExciseTaxBasis: Enum "Excise Tax Basis"): Code[20]
+ var
+ GLAccount: Record "G/L Account";
+ PurchaseRate: Decimal;
+ TaxTypeCode: Code[20];
+ begin
+ LibraryERM.CreateGLAccount(GLAccount);
+ PurchaseRate := LibraryRandom.RandDec(7, 2);
+ TaxTypeCode := GetTaxTypeCode();
+ CreateExciseTaxType(TaxTypeCode, ExciseTaxBasis, true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::Purchase, true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::Sale, true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::"Positive Adjmt.", true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::"Negative Adjmt.", true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::Output, true);
+ CreateExciseTaxEntryPermission(TaxTypeCode, "Excise Entry Type"::"Assembly Output", true);
+
+ CreateExciseTaxItemFARate(TaxTypeCode, "Excise Source Type"::Item, '', PurchaseRate, CalcDate('<-CY>', WorkDate()), '');
+ CreateExciseTaxItemFARate(TaxTypeCode, "Excise Source Type"::"Fixed Asset", '', PurchaseRate, CalcDate('<-CY>', WorkDate()), '');
+
+ exit(TaxTypeCode);
+ end;
+
+ local procedure GetTaxTypeCode(): Code[20]
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ begin
+ exit(LibraryUtility.GenerateRandomCode(ExciseTaxType.FieldNo(Code), DATABASE::"Excise Tax Type"));
+ end;
+
+ procedure CalculateExpectedTaxAmount(TaxRatePercent: Decimal; Quantity: Decimal; QtyForExciseTax: Decimal): Decimal
+ begin
+ exit((TaxRatePercent / 100) * Quantity * QtyForExciseTax);
+ end;
+
+ procedure GetSourceSpecificRate(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; EffectiveDate: Date): Decimal
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxItemFARate.SetRange("Source Type", SourceType);
+ ExciseTaxItemFARate.SetRange("Source No.", SourceNo);
+ ExciseTaxItemFARate.SetFilter("Effective From Date", '<=%1', EffectiveDate);
+ if ExciseTaxItemFARate.FindLast() then
+ exit(ExciseTaxItemFARate."Tax Rate %");
+ exit(0);
+ end;
+
+ procedure GetGeneralRate(TaxTypeCode: Code[20]): Decimal
+ var
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxItemFARate.SetRange("Excise Tax Type Code", TaxTypeCode);
+ ExciseTaxItemFARate.SetRange("Source Type", "Excise Source Type"::" ");
+ ExciseTaxItemFARate.SetRange("Source No.", '');
+ if ExciseTaxItemFARate.FindFirst() then
+ exit(ExciseTaxItemFARate."Tax Rate %");
+ exit(0);
+ end;
+
+ procedure GetHierarchicalTaxRate(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; EntryType: Enum "Excise Entry Type"; EffectiveDate: Date): Decimal
+ var
+ SourceSpecificRate: Decimal;
+ begin
+ SourceSpecificRate := GetSourceSpecificRate(TaxTypeCode, SourceType, SourceNo, EffectiveDate);
+ if SourceSpecificRate <> 0 then
+ exit(SourceSpecificRate);
+
+ exit(GetGeneralRate(TaxTypeCode));
+ end;
+
+ procedure VerifySourceSpecificRateTakesPriority(TaxTypeCode: Code[20]; SourceType: Enum "Excise Source Type"; SourceNo: Code[20]; EntryType: Enum "Excise Entry Type"; EffectiveDate: Date; ExpectedSourceRate: Decimal)
+ var
+ ActualRate: Decimal;
+ begin
+ ActualRate := GetHierarchicalTaxRate(TaxTypeCode, SourceType, SourceNo, EntryType, EffectiveDate);
+ if ActualRate <> ExpectedSourceRate then
+ Error(SourceSpecificRateMismatchLbl, ExpectedSourceRate, ActualRate);
+ end;
+
+ procedure CleanupExciseTaxData()
+ var
+ ExciseTaxType: Record "Excise Tax Type";
+ ExciseTaxEntryPermission: Record "Excise Tax Entry Permission";
+ ExciseTaxItemFARate: Record "Excise Tax Item/FA Rate";
+ begin
+ ExciseTaxType.DeleteAll();
+ ExciseTaxEntryPermission.DeleteAll();
+ ExciseTaxItemFARate.DeleteAll();
+ end;
+}
diff --git a/Apps/W1/HybridBC/app/src/codeunits/HybridBCWizard.Codeunit.al b/Apps/W1/HybridBC/app/src/codeunits/HybridBCWizard.Codeunit.al
index 5a6d17e0fb..d188a4c82a 100644
--- a/Apps/W1/HybridBC/app/src/codeunits/HybridBCWizard.Codeunit.al
+++ b/Apps/W1/HybridBC/app/src/codeunits/HybridBCWizard.Codeunit.al
@@ -1,6 +1,7 @@
namespace Microsoft.DataMigration.BC;
using Microsoft.DataMigration;
+using Microsoft.Utilities;
codeunit 4005 "Hybrid BC Wizard"
{
@@ -162,12 +163,12 @@ codeunit 4005 "Hybrid BC Wizard"
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Companies IC", 'OnBeforeCreateCompany', '', false, false)]
- local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Option "Evaluation Data","Standard Data","None","Extended Data","Full No Data")
+ local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Enum "Company Demo Data Type")
begin
if not CanHandle(ProductId) then
exit;
- CompanyDataType := CompanyDataType::None;
+ CompanyDataType := CompanyDataType::"Create New - No Data";
end;
local procedure CanHandle(ProductId: Text): Boolean
diff --git a/Apps/W1/HybridBCLast/app/src/codeunits/HybridBCLastWizard.Codeunit.al b/Apps/W1/HybridBCLast/app/src/codeunits/HybridBCLastWizard.Codeunit.al
index d144d34773..2df46a9313 100644
--- a/Apps/W1/HybridBCLast/app/src/codeunits/HybridBCLastWizard.Codeunit.al
+++ b/Apps/W1/HybridBCLast/app/src/codeunits/HybridBCLastWizard.Codeunit.al
@@ -1,6 +1,7 @@
namespace Microsoft.DataMigration.BC;
using Microsoft.DataMigration;
+using Microsoft.Utilities;
codeunit 4020 "Hybrid BC Last Wizard"
{
var
@@ -149,12 +150,12 @@ codeunit 4020 "Hybrid BC Last Wizard"
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Companies IC", 'OnBeforeCreateCompany', '', false, false)]
- local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Option "Evaluation Data","Standard Data","None","Extended Data","Full No Data")
+ local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Enum "Company Demo Data Type")
begin
if not CanHandle(ProductId) then
exit;
- CompanyDataType := CompanyDataType::None;
+ CompanyDataType := CompanyDataType::"Create New - No Data";
end;
local procedure CanHandle(productId: Text): Boolean
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDEdit.PermissionSet.al b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDEdit.PermissionSet.al
index bca5b64b7c..cc4c475f77 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDEdit.PermissionSet.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDEdit.PermissionSet.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
permissionset 4005 "HBD - Edit"
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDObjects.PermissionSet.al b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDObjects.PermissionSet.al
index 1e77694adb..a2c8e356d3 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDObjects.PermissionSet.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDObjects.PermissionSet.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
permissionset 4006 "HBD - Objects"
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDRead.PermissionSet.al b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDRead.PermissionSet.al
index dc2b02c9f1..e48891d434 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/HBDRead.PermissionSet.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/HBDRead.PermissionSet.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
permissionset 4007 "HBD - Read"
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/INTELLIGENTCLOUDHBD.PermissionSetExt.al b/Apps/W1/HybridBaseDeployment/app/Permissions/INTELLIGENTCLOUDHBD.PermissionSetExt.al
index fef39ac989..9819a433a8 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/INTELLIGENTCLOUDHBD.PermissionSetExt.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/INTELLIGENTCLOUDHBD.PermissionSetExt.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
@@ -12,6 +17,8 @@ permissionsetextension 4003 "INTELLIGENT CLOUD - HBD" extends "INTELLIGENT CLOUD
tabledata "User Mapping Source" = RIMD,
tabledata "Post Migration Checklist" = RIMD,
tabledata "Migration Table Mapping" = RIMD,
+ tabledata "Migration Setup Table Mapping" = RIMD,
+ tabledata "Replication Table Mapping" = RIMD,
tabledata "Intelligent Cloud Not Migrated" = RIMD,
tabledata "User Mapping Work" = RIMD,
tabledata "Replication Run Completed Arg" = RIMD,
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicHBD.permissionsetext.al b/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicHBD.permissionsetext.al
index 58ca3aad49..668c9cbb65 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicHBD.permissionsetext.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicHBD.permissionsetext.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
@@ -12,6 +17,8 @@ permissionsetextension 4000 "D365 BASIC - HBD" extends "D365 BASIC"
tabledata "User Mapping Source" = RIMD,
tabledata "Post Migration Checklist" = RIMD,
tabledata "Migration Table Mapping" = RIMD,
+ tabledata "Migration Setup Table Mapping" = RIMD,
+ tabledata "Replication Table Mapping" = RIMD,
tabledata "Intelligent Cloud Not Migrated" = RIMD,
tabledata "User Mapping Work" = RIMD,
tabledata "Cloud Migration Override Log" = RIMD,
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicisvHBD.permissionsetext.al b/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicisvHBD.permissionsetext.al
index da1e3cb429..ea6c575d8d 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicisvHBD.permissionsetext.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/d365basicisvHBD.permissionsetext.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
@@ -12,6 +17,8 @@ permissionsetextension 4001 "D365 BASIC ISV - HBD" extends "D365 BASIC ISV"
tabledata "User Mapping Source" = RIMD,
tabledata "Post Migration Checklist" = RIMD,
tabledata "Migration Table Mapping" = RIMD,
+ tabledata "Migration Setup Table Mapping" = RIMD,
+ tabledata "Replication Table Mapping" = RIMD,
tabledata "Intelligent Cloud Not Migrated" = RIMD,
tabledata "User Mapping Work" = RIMD,
tabledata "Replication Run Completed Arg" = RIMD,
diff --git a/Apps/W1/HybridBaseDeployment/app/Permissions/d365teammemberHBD.permissionsetext.al b/Apps/W1/HybridBaseDeployment/app/Permissions/d365teammemberHBD.permissionsetext.al
index fb4a7b0b25..8a12124adb 100644
--- a/Apps/W1/HybridBaseDeployment/app/Permissions/d365teammemberHBD.permissionsetext.al
+++ b/Apps/W1/HybridBaseDeployment/app/Permissions/d365teammemberHBD.permissionsetext.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
@@ -12,6 +17,8 @@ permissionsetextension 4002 "D365 TEAM MEMBER - HBD" extends "D365 TEAM MEMBER"
tabledata "User Mapping Source" = RIMD,
tabledata "Post Migration Checklist" = RIMD,
tabledata "Migration Table Mapping" = RIMD,
+ tabledata "Migration Setup Table Mapping" = RIMD,
+ tabledata "Replication Table Mapping" = RIMD,
tabledata "Intelligent Cloud Not Migrated" = RIMD,
tabledata "User Mapping Work" = RIMD,
tabledata "Replication Run Completed Arg" = RIMD,
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/CustomMigrationProvider.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/CustomMigrationProvider.Codeunit.al
new file mode 100644
index 0000000000..d569ed3a35
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/CustomMigrationProvider.Codeunit.al
@@ -0,0 +1,123 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+using Microsoft.Utilities;
+using System.Reflection;
+
+///
+/// Default custom cloud migration provider
+///
+codeunit 40034 "Custom Migration Provider" implements "Custom Migration Provider", "Custom Migration Table Mapping"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ procedure GetReplicationTableMappingName(): Text
+ begin
+ exit(GetTableName(Database::"Replication Table Mapping"))
+ end;
+
+ procedure GetMigrationSetupTableMappingName(): Text
+ begin
+ exit(GetTableName(Database::"Migration Setup Table Mapping"));
+ end;
+
+ procedure GetCompaniesTableName(): Text
+ begin
+ exit(CompanyTok);
+ end;
+
+ procedure ShowConfigureMigrationTablesMappingStep(): Boolean
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ if not IntelligentCloudSetup.Get() then
+ exit(false);
+
+ if IntelligentCloudSetup."Custom Migration Provider" <> IntelligentCloudSetup."Custom Migration Provider"::"Custom Migration Provider" then
+ exit(false);
+
+ exit(IntelligentCloudSetup."Custom Migration Enabled");
+ end;
+
+ local procedure GetTableName(TableID: Integer): Text
+ var
+ TableMetadata: Record "Table Metadata";
+ begin
+ TableMetadata.Get(TableID);
+ exit(TableMetadata.Name + BCTableSeparatorTok + LowerCase(Format(GetAppId()).TrimStart(OpenBraceTok).TrimEnd(CloseBraceTok)));
+ end;
+
+ procedure GetDisplayName(): Text[250]
+ begin
+ exit(CustomMigrationDisplayNameLbl);
+ end;
+
+ procedure GetDescription(): Text
+ begin
+ exit(CustomMigrationDescriptionLbl);
+ end;
+
+ procedure GetAppId(): Guid
+ var
+ CurrentAppModuleInfo: ModuleInfo;
+ begin
+ NavApp.GetCurrentModuleInfo(CurrentAppModuleInfo);
+ exit(CurrentAppModuleInfo.Id);
+ end;
+
+ procedure GetDemoDataType() DemoDataType: Enum "Company Demo Data Type"
+ begin
+ exit(DemoDataType::"Production - Setup Data Only");
+ end;
+
+ procedure SetupReplicationTableMappings()
+ begin
+ OnSetupReplicationTableMappings();
+ end;
+
+ procedure SetupMigrationSetupTableMappings()
+ begin
+ OnSetupMigrationSetupTableMappings();
+ end;
+
+ [EventSubscriber(ObjectType::Page, Page::"Intelligent Cloud Management", 'OnOpenNewUI', '', false, false)]
+ local procedure HandleOnOpenNewUI(var OpenNewUI: Boolean)
+ begin
+ if GetCustomMigrationEnabled() then
+ OpenNewUI := true;
+ end;
+
+ local procedure GetCustomMigrationEnabled(): Boolean
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ if not IntelligentCloudSetup.Get() then
+ exit(false);
+
+ exit(IntelligentCloudSetup."Custom Migration Enabled" and
+ (IntelligentCloudSetup."Custom Migration Provider" = IntelligentCloudSetup."Custom Migration Provider"::"Custom Migration Provider"));
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnSetupReplicationTableMappings()
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnSetupMigrationSetupTableMappings()
+ begin
+ end;
+
+ var
+ CompanyTok: Label 'Company', Locked = true;
+ BCTableSeparatorTok: Label '$', Locked = true;
+ OpenBraceTok: Label '{', Locked = true;
+ CloseBraceTok: Label '}', Locked = true;
+ CustomMigrationDisplayNameLbl: Label 'Custom Migration', MaxLength = 250;
+ CustomMigrationDescriptionLbl: Label 'The custom cloud migration can bring data from any SQL source. We strongly recommend reading the documentation before making changes, to avoid data loss and incorrect data replication.';
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Enum.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Enum.al
new file mode 100644
index 0000000000..7c91bebcfd
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Enum.al
@@ -0,0 +1,20 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+///
+/// Available custom cloud migration providers
+///
+enum 4010 "Custom Migration Provider" implements "Custom Migration Provider", "Custom Migration Table Mapping"
+{
+ Extensible = true;
+ DefaultImplementation = "Custom Migration Provider" = "Custom Migration Provider", "Custom Migration Table Mapping" = "Custom Migration Provider";
+
+ value(4010; "Custom Migration Provider")
+ {
+ Caption = 'Custom Migration Provider';
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Interface.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Interface.al
new file mode 100644
index 0000000000..0e4b3d61e9
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationProvider.Interface.al
@@ -0,0 +1,54 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+using Microsoft.Utilities;
+
+///
+/// Interface for Custom Migration Provider implementations.
+///
+interface "Custom Migration Provider"
+{
+ ///
+ /// Gets a display name for the migration type. This value is shown in the wizard.
+ ///
+ /// Display name of the migration type
+ procedure GetDisplayName(): Text[250];
+
+ ///
+ /// Gets a description for the migration type. This value is shown in the wizard.
+ ///
+ /// Description of the migration type
+ procedure GetDescription(): Text;
+
+ ///
+ /// Gets the ID of the app that defines the implementation.
+ ///
+ /// ID of the application that is implementing custom migration. If multiple apps are used, this should be the main app.
+ procedure GetAppId(): Guid;
+
+ ///
+ /// Sets up the replication table mappings.
+ /// These mappings are used to move the data during the replication phase. This is the default way to move the data.
+ ///
+ procedure SetupReplicationTableMappings();
+
+ ///
+ /// Sets up the migration setup table mappings.
+ /// These mappings are used to replicate the data during the setup to SaaS, so the on-premise data can be used to configure the migration.
+ /// It is recommended to move a small subset of the tables that do not contain large amounts of data, otherwise the setup will be slow.
+ ///
+ procedure SetupMigrationSetupTableMappings();
+
+ ///
+ /// Returns the demo data type that will be used to create the companies in SaaS.
+ /// Most common types are:
+ /// "Production - Setup Data Only" - setup data only - this will populate the setup.
+ /// "Create New - No Data" - empty company. In this case you need to ensure that the setup data is created. This option is mostly used if the setup data is migrated.
+ ///
+ /// Demo data type that will be used to configure the new company
+ procedure GetDemoDataType() DemoDataType: Enum "Company Demo Data Type";
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationTableMapping.Interface.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationTableMapping.Interface.al
new file mode 100644
index 0000000000..33435231aa
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/Interfaces/CustomMigrationTableMapping.Interface.al
@@ -0,0 +1,49 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+///
+/// Interface to change the default mapping tables
+///
+interface "Custom Migration Table Mapping"
+{
+ ///
+ /// Gets the name of the table that is storing mappings of the source tables to destination tables in SaaS instance. This data will be moved during replication phase.
+ /// Table name must match the name of the table in SQL database exactly and must have an exact structure as expected by the migration framework, see official documentation for details.
+ ///
+ ///
+ /// The name of the replication table mapping.
+ ///
+ procedure GetReplicationTableMappingName(): Text;
+
+ ///
+ /// Gets table name of the migration setup table mapping that is used to map the tables from source to destination during cloud migration setup phase.
+ /// Table name must match the name of the table in SQL database exactly and must have an exact structure as expected by the migration framework, see official documentation for details.
+ ///
+ ///
+ /// The name of the migration setup table mapping.
+ ///
+ procedure GetMigrationSetupTableMappingName(): Text;
+
+ ///
+ /// Returns the table name of the companies table. This table is used to get the list of the companies for the cloud migration.
+ /// Companies table exists only in the source database. It can have any name, but it must have 2 fields : [Name] [nvarchar] 30, [Display Name] [nvarchar] 250. [Name] must be primary key.
+ /// The table must match the SQL table name exactly.
+ ///
+ ///
+ /// The name of the companies table in the source database.
+ ///
+ procedure GetCompaniesTableName(): Text;
+
+ ///
+ /// Indicates whether to show the "Configure Migration Tables Mapping" step in the cloud migration wizard.
+ /// Default value should be to return false, unless there is a need to allow users to change the values provided by the interfaces above.
+ ///
+ ///
+ /// True if the "Configure Migration Tables Mapping" step should be shown; otherwise, false.
+ ///
+ procedure ShowConfigureMigrationTablesMappingStep(): Boolean;
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/OnPremMigrationHandler.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/OnPremMigrationHandler.Codeunit.al
new file mode 100644
index 0000000000..c1bbcd2a52
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/OnPremMigrationHandler.Codeunit.al
@@ -0,0 +1,273 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+using System.Environment;
+using System.Integration;
+
+codeunit 40035 "OnPrem Migration Handler"
+{
+ InherentEntitlements = X;
+ InherentPermissions = X;
+ Access = Internal;
+
+ var
+ GlobalProductId: Text;
+ CanModifyDataReplicationRules: Boolean;
+ NotSupportedInOnPremErr: Label 'This functionality is not supported in on-premises environments. It cannot be simulated in this context. Please run this test in a SaaS environment';
+ TestTrackingIdTxt: Label 'TestTrackingID', Locked = true;
+ TestRuntimeNameTxt: Label 'TestRuntimeName';
+ CompletedTok: Label 'Completed', Locked = true;
+
+ [Scope('OnPrem')]
+ internal procedure Activate()
+ var
+ HybridDeploymentSetup: Record "Hybrid Deployment Setup";
+ begin
+ if not HybridDeploymentSetup.Get() then
+ HybridDeploymentSetup.Insert();
+
+ HybridDeploymentSetup."Handler Codeunit ID" := Codeunit::"OnPrem Migration Handler";
+ HybridDeploymentSetup.Modify();
+ end;
+
+ [Scope('OnPrem')]
+ internal procedure EnableCloudMigration(var IntegrationRuntimeName: Text)
+ var
+ InstanceId: Text;
+ begin
+ EnableDisableCloudMigration(IntegrationRuntimeName, InstanceId, true);
+ end;
+
+ [Scope('OnPrem')]
+ internal procedure EnableDisableCloudMigration(var IntegrationRuntimeName: Text; var InstanceId: Text; Enable: Boolean)
+ var
+ IntelligentCloud: Record "Intelligent Cloud";
+ begin
+ if not CanHandle() then
+ exit;
+
+ IntegrationRuntimeName := TestRuntimeNameTxt;
+ InstanceId := TestTrackingIdTxt;
+ if not IntelligentCloud.Get() then
+ IntelligentCloud.Insert();
+
+ IntelligentCloud.Enabled := Enable;
+ IntelligentCloud.Modify();
+ end;
+
+ local procedure CanHandle(): Boolean
+ var
+ HybridDeploymentSetup: Record "Hybrid Deployment Setup";
+ begin
+ if HybridDeploymentSetup.Get() then
+ exit(HybridDeploymentSetup."Handler Codeunit ID" = Codeunit::"OnPrem Migration Handler");
+
+ exit(false);
+ end;
+
+ [Scope('OnPrem')]
+ internal procedure SetCanModifyDataReplicationRules(CanModify: Boolean)
+ begin
+ CanModifyDataReplicationRules := CanModify;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnCreateIntegrationRuntime', '', false, false)]
+ local procedure HandleCreateIntegrationRuntime(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnGetRequestStatus', '', false, false)]
+ local procedure HandleGetRequestStatus(InstanceId: Text; var JsonOutput: Text; var Status: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Status := CompletedTok;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnInitialize', '', false, false)]
+ local procedure HandleInitialize(SourceProductId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ GlobalProductId := SourceProductId;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnSetReplicationSchedule', '', false, false)]
+#pragma warning disable AA0245
+ local procedure HandleSetReplicationSchedule(ReplicationFrequency: Text; DaysToRun: Text; TimeToRun: Time; Activate: Boolean; var InstanceId: Text)
+#pragma warning restore AA0245
+ begin
+ if not CanHandle() then
+ exit;
+
+ InstanceId := TestTrackingIdTxt;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnEnableReplication', '', false, false)]
+ local procedure HandleEnableReplication(OnPremiseConnectionString: Text; DatabaseType: Text; IntegrationRuntimeName: Text; NotificationUrl: Text; ClientState: Text; SubscriptionId: Text; ServiceNotificationUrl: Text; ServiceClientState: Text; ServiceSubscriptionId: Text; var InstanceId: Text)
+ begin
+ EnableDisableCloudMigration(IntegrationRuntimeName, InstanceId, true);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnGetIntegrationRuntimeKeys', '', false, false)]
+ local procedure HandleGetIntegrationKey(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnRunReplication', '', false, false)]
+ local procedure HandleRunReplicationNow(var InstanceId: Text; ReplicationType: Integer)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnDisableReplication', '', false, false)]
+ local procedure HandleDisableReplication(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ InstanceId := TestTrackingIdTxt;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnAfterDisableReplication', '', false, false)]
+ local procedure HandleOnAfterDisableReplication(var InstanceId: Text)
+ var
+ RuntimeName: Text;
+ begin
+ if not CanHandle() then
+ exit;
+
+ InstanceId := TestTrackingIdTxt;
+
+ EnableDisableCloudMigration(RuntimeName, InstanceId, false);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnGetReplicationRunStatus', '', false, false)]
+ local procedure HandleGetReplicationRunStatus(var InstanceId: Text; RunId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnRegenerateIntegrationRuntimeKeys', '', false, false)]
+ local procedure HandleRegenerateIntegrationKey(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnGetVersionInformation', '', false, false)]
+ local procedure HandleOnGetVersionInformation(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, codeunit::"Hybrid Deployment", 'OnRunUpgrade', '', false, false)]
+ local procedure HandleOnRunUpgrade(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnInitiateDataLakeMigration', '', false, false)]
+ local procedure HandleOnInitiateDataLakeMigration(var InstanceId: Text; StorageAccountName: Text; StorageAccountKey: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Deployment", 'OnDisableDataLakeMigration', '', false, false)]
+ local procedure HandleOnDisableDataLakeMigration(var InstanceId: Text)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Cloud Management", 'OnAfterDataLakeMigration', '', false, false)]
+ local procedure HandleOnFinishAdlMigration(HybridReplicationSummary: Record "Hybrid Replication Summary"; var Handled: Boolean)
+ var
+ EnvInfo: Codeunit "Environment Information";
+ begin
+ if not CanHandle() then
+ exit;
+
+ if not EnvInfo.IsSaaS() then
+ Error(NotSupportedInOnPremErr);
+ end;
+
+ [EventSubscriber(ObjectType::Page, Page::"Intelligent Cloud Management", 'CanRunDiagnostic', '', false, false)]
+ local procedure CanRunDiagnostic(var CanRun: Boolean)
+ begin
+ if not CanHandle() then
+ exit;
+
+ CanRun := false;
+ end;
+
+ [EventSubscriber(ObjectType::Page, Page::"Intelligent Cloud Management", 'CanMapCustomTables', '', false, false)]
+ local procedure CanMapTables(var Enabled: Boolean)
+ begin
+ if not CanHandle() then
+ exit;
+
+ Enabled := false;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Cloud Management", 'OnCanSetupAdlMigration', '', false, false)]
+ local procedure HandleCanSetupAdlMigration(var CanSetup: Boolean)
+ begin
+ if not CanHandle() then
+ exit;
+
+ CanSetup := false;
+ end;
+
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Cloud Mig. Replicate Data Mgt.", 'OnCanIntelligentCloudSetupTableBeModified', '', false, false)]
+ local procedure HandleCanIntelligentCloudSetupTableBeModified(TableID: Integer; var CanBeModified: Boolean)
+ begin
+ if not CanHandle() then
+ exit;
+
+ CanBeModified := CanModifyDataReplicationRules;
+ end;
+
+ [EventSubscriber(ObjectType::Page, Page::"Cloud Mig - Select Tables", 'OnCanChangeSetup', '', false, false)]
+ local procedure HandleCanChangeSetup(var CanChangeSetup: Boolean)
+ begin
+ if not CanHandle() then
+ exit;
+
+ CanChangeSetup := CanModifyDataReplicationRules;
+ end;
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/AddCustomMigrationMapping.Page.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/AddCustomMigrationMapping.Page.al
new file mode 100644
index 0000000000..fdda9c7851
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/AddCustomMigrationMapping.Page.al
@@ -0,0 +1,240 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+using System.Apps;
+using System.Reflection;
+
+page 40016 "Add Custom Migration Mapping"
+{
+ ApplicationArea = All;
+ PageType = List;
+ SourceTable = "AllObj";
+ Permissions = tabledata "NAV App Installed App" = r, tabledata AllObj = r, tabledata "Published Application" = r;
+ InsertAllowed = false;
+ DeleteAllowed = false;
+ ModifyAllowed = false;
+ Caption = 'Add migration table mappings for custom migration';
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ layout
+ {
+ area(Content)
+ {
+ group(ReplicationSettings)
+ {
+ Caption = 'Replication settings';
+ field(MappingType; MappingType)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies whether the mapping should be saved to Replication Table Mapping or Migration Setup Table Mapping.';
+ Caption = 'Mapping Type';
+ }
+
+ field(DataPerCompany; DataPerCompany)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies if the table data is per company';
+ Caption = 'Data per-company';
+ trigger OnValidate()
+ begin
+ if not DataPerCompany then begin
+ GlobalPreserveCloudData := true;
+ Clear(CompanyName);
+ Clear(AllCompanies);
+ end;
+
+ CurrPage.Update(true);
+ end;
+ }
+ group(CompanySettingsGroup)
+ {
+ Visible = DataPerCompany;
+ ShowCaption = false;
+
+ field(AllCompanies; AllCompanies)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies if the table mapping applies to all companies.';
+ Caption = 'All companies';
+
+ trigger OnValidate()
+ begin
+ if AllCompanies then begin
+ CompanyName := AllCompaniesTok;
+ Message(UpdateTableNamesWithAllCompaniesTokMsg, AllCompaniesTok);
+ end else
+ Clear(CompanyName);
+ end;
+ }
+ field(CompanyName; CompanyName)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the company name associated with this table mapping. The value should be blank if the table is per-database.';
+ Caption = 'Company name';
+ }
+ }
+ field(GlobalPreserveCloudData; GlobalPreserveCloudData)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies whether to preserve existing data in the cloud during replication for all selected tables. If set to true, existing data in the destination table will not be overwritten during replication, only new records will be added.';
+ Caption = 'Preserve cloud data';
+ trigger OnValidate()
+ begin
+ if GlobalPreserveCloudData then
+ DataPerCompany := true;
+
+ CurrPage.Update(true);
+ end;
+ }
+ }
+ group(SourceTableNameGroup)
+ {
+ Caption = 'Source table';
+ field(SourceTableName; SourceTableName)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the name of the source table. Use underscores in place of special characters, similar to how table names appear in SQL Server Management Studio.';
+ Caption = 'Name';
+
+ trigger OnValidate()
+ var
+ MigrationTableMapping: Record "Migration Table Mapping";
+ begin
+ if SourceTableName = '' then
+ exit;
+
+#pragma warning disable AA0139
+ SourceTableName := MigrationTableMapping.TrimSourceTableName(SourceTableName);
+#pragma warning restore AA0139
+ CurrPage.Update(true);
+ end;
+ }
+ }
+
+ group(TargetTable)
+ {
+ Caption = 'Target table';
+ field(TargetTableName; TargetTableName)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the name of the target table.';
+ Caption = 'Table name';
+ AssistEdit = true;
+
+ trigger OnAssistEdit()
+ var
+ AllObj: Record AllObj;
+ PublishedApplication: Record "Published Application";
+ AllObjects: Page "All Objects";
+ SelectedAppID: Text;
+ begin
+ if DataPerCompany and (CompanyName = '') then
+ Error(CompanyNameMustBeSpecifiedErr);
+
+ AllObj.SetFilter("Object Type", '%1|%2', AllObj."Object Type"::Table, AllObj."Object Type"::"TableExtension");
+ AllObjects.SetTableView(AllObj);
+ AllObjects.LookupMode(true);
+ if not (AllObjects.RunModal() in [Action::OK, Action::LookupOK]) then
+ exit;
+
+ AllObjects.GetRecord(AllObj);
+ if not TableMetadata.Get(AllObj."Object ID") then
+ exit;
+
+ TargetTableName := TableMetadata.Name;
+ if PublishedApplication.Get(AllObj."App Runtime Package ID") then begin
+ SelectedAppID := LowerCase(Format(PublishedApplication.ID).TrimStart('{').TrimEnd('}'));
+#pragma warning disable AA0139
+ TargetTableName := TargetTableName + BCTableSeparatorTok + SelectedAppID;
+ if AllObj."Object Type" = AllObj."Object Type"::"TableExtension" then
+ TargetTableName := TargetTableName + TableExtensionSuffixTok;
+#pragma warning restore AA0139
+ end;
+
+ if DataPerCompany then
+#pragma warning disable AA0139
+ DestinationTableName := ConvertStr(CompanyName + BCTableSeparatorTok + TargetTableName, InvalidSqlCharactersTok, ValidSqlReplacementTok);
+#pragma warning restore AA0139
+ end;
+ }
+ field(DestinationTableName; DestinationTableName)
+ {
+ ApplicationArea = All;
+ ToolTip = 'Specifies the name of the destination table in the cloud database. Use underscores in place of special characters, similar to how table names appear in SQL Server Management Studio.';
+ Caption = 'Destination table name';
+ }
+ }
+ }
+ }
+
+ trigger OnQueryClosePage(CloseAction: Action): Boolean
+ var
+ HybridCompany: Record "Hybrid Company";
+ CustomMigrationTableBuffer: Record "Custom Migration Table Buffer";
+ NewCompanyName: Text[30];
+ NewSourceTableName: Text[128];
+ NewDestinationTableName: Text[128];
+ begin
+ if not (CloseAction in [Action::OK, Action::LookupOK]) then
+ exit(true);
+
+ if AllCompanies then begin
+ HybridCompany.SetRange(Replicate, true);
+ HybridCompany.SetFilter(Name, '<>%1', '');
+ HybridCompany.FindSet();
+ repeat
+#pragma warning disable AA0139
+ NewSourceTableName := SourceTableName.Replace(AllCompaniesTok, HybridCompany.Name);
+ NewDestinationTableName := DestinationTableName.Replace(AllCompaniesTok, HybridCompany.Name);
+ NewCompanyName := HybridCompany.Name;
+#pragma warning restore AA0139
+ CustomMigrationTableBuffer.SaveMigrationTableMapping(MappingType, NewSourceTableName, NewDestinationTableName, TargetTableName, NewCompanyName, DataPerCompany, GlobalPreserveCloudData);
+ until HybridCompany.Next() = 0;
+ end else
+ CustomMigrationTableBuffer.SaveMigrationTableMapping(MappingType, SourceTableName, DestinationTableName, TargetTableName, CompanyName, DataPerCompany, GlobalPreserveCloudData);
+ exit(true);
+ end;
+
+ trigger OnOpenPage()
+ begin
+ DataPerCompany := true;
+ end;
+
+ trigger OnAfterGetRecord()
+ var
+ NAVAppInstalledApp: Record "NAV App Installed App";
+ begin
+ NAVAppInstalledApp.SetRange("Package ID", Rec."App Package ID");
+ Clear(AppID);
+ Clear(AppName);
+ if NAVAppInstalledApp.FindFirst() then begin
+ AppID := Format(NAVAppInstalledApp."App ID", 0, 9).TrimStart('{').TrimEnd('}');
+ AppName := NAVAppInstalledApp.Name;
+ end;
+ end;
+
+ var
+ TableMetadata: Record "Table Metadata";
+ MappingType: Enum "Migration Mapping Type";
+ AppID: Text;
+ AppName: Text;
+ SourceTableName: Text[128];
+ DestinationTableName: Text[128];
+ TargetTableName: Text[128];
+ CompanyName: Text[30];
+ DataPerCompany: Boolean;
+ GlobalPreserveCloudData: Boolean;
+ BCTableSeparatorTok: Label '$', Locked = true;
+ TableExtensionSuffixTok: Label '$ext', Locked = true;
+ InvalidSqlCharactersTok: Label '.\/-', Locked = true;
+ ValidSqlReplacementTok: Label '____', Locked = true;
+ AllCompaniesTok: Label '{$CompanyName$}', Locked = true;
+ AllCompanies: Boolean;
+ UpdateTableNamesWithAllCompaniesTokMsg: Label 'The %1 token in the source table and destination table name will be replaced with the name of the company that is selected for migration. Update the source and destination table names accordingly.', Comment = '%1 is this value that is not translated {$AllCompanies$}';
+ CompanyNameMustBeSpecifiedErr: Label 'Company Name must be specified when Data Per Company is selected.', Comment = 'Error message shown when trying to select a table mapping that is per company without specifying a company name.';
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationMappingList.Page.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationMappingList.Page.al
new file mode 100644
index 0000000000..5d6965a93e
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationMappingList.Page.al
@@ -0,0 +1,194 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+page 40017 "Custom Migration Mapping List"
+{
+ ApplicationArea = All;
+ PageType = List;
+ SourceTable = "Custom Migration Table Buffer";
+ SourceTableTemporary = true;
+ SourceTableView = sorting("Mapping Type", "Table Name") order(ascending);
+ Caption = 'Custom Migration Table Mappings';
+ Editable = false;
+ InsertAllowed = false;
+ ModifyAllowed = false;
+ DeleteAllowed = false;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ layout
+ {
+ area(Content)
+ {
+ repeater(TableMappings)
+ {
+ field(MappingType; Rec."Mapping Type")
+ {
+ ApplicationArea = All;
+ }
+ field(TableName; Rec."Table Name")
+ {
+ ApplicationArea = All;
+ }
+ field(CompanyName; Rec."Company Name")
+ {
+ ApplicationArea = All;
+ }
+ field(PreserveCloudData; Rec."Preserve Cloud Data")
+ {
+ ApplicationArea = All;
+ }
+ field(SourceSqlTableName; Rec."Source Sql Table Name")
+ {
+ ApplicationArea = All;
+ }
+ field(DestinationSqlTableName; Rec."Destination Sql Table Name")
+ {
+ ApplicationArea = All;
+ }
+ }
+ }
+ }
+
+ actions
+ {
+ area(Processing)
+ {
+ action(AddTableMapping)
+ {
+ ApplicationArea = All;
+ Caption = 'Add Table Mapping';
+ ToolTip = 'Add a new table mapping for custom migration.';
+ Image = Add;
+
+ trigger OnAction()
+ begin
+ Page.RunModal(Page::"Add Custom Migration Mapping");
+ Rec.LoadData();
+ CurrPage.Update(false);
+ end;
+ }
+ action(DeleteTableMapping)
+ {
+ ApplicationArea = All;
+ Caption = 'Delete';
+ ToolTip = 'Delete the selected table mapping.';
+ Image = Delete;
+
+ trigger OnAction()
+ begin
+ DeleteSelectedMappings();
+ CurrPage.Update(false);
+ end;
+ }
+ action(ImportMappings)
+ {
+ ApplicationArea = All;
+ Caption = 'Import';
+ ToolTip = 'Import table mappings from a JSON file.';
+ Image = Import;
+
+ trigger OnAction()
+ var
+ JsonInStream: InStream;
+ FileName: Text;
+ JsonText: Text;
+ begin
+ FileName := DefaultTableMappingsFileNameLbl;
+ if not UploadIntoStream(ImportDialogTitleLbl, '', JsonFileFilterLbl, FileName, JsonInStream) then
+ exit;
+
+ JsonInStream.ReadText(JsonText);
+ Rec.ImportFromJson(JsonText);
+ Message(ImportSuccessMsg);
+ end;
+ }
+ action(ExportMappings)
+ {
+ ApplicationArea = All;
+ Caption = 'Export';
+ ToolTip = 'Export table mappings to a JSON file.';
+ Image = Export;
+
+ trigger OnAction()
+ begin
+ Rec.ExportToFile();
+ end;
+ }
+ action(ResetToDefaults)
+ {
+ ApplicationArea = All;
+ Caption = 'Reset to Defaults';
+ ToolTip = 'Delete all table mappings and restore the default mappings.';
+ Image = Restore;
+
+ trigger OnAction()
+ begin
+ if not Confirm(ResetToDefaultsQst, false) then
+ exit;
+
+ Rec.RestoreDefaultMappings();
+ CurrPage.Update(false);
+ end;
+ }
+ }
+ area(Promoted)
+ {
+ group(Category_Process)
+ {
+ actionref(AddTableMapping_Promoted; AddTableMapping)
+ {
+ }
+ actionref(DeleteTableMapping_Promoted; DeleteTableMapping)
+ {
+ }
+ actionref(ImportMappings_Promoted; ImportMappings)
+ {
+ }
+ actionref(ExportMappings_Promoted; ExportMappings)
+ {
+ }
+ actionref(ResetToDefaults_Promoted; ResetToDefaults)
+ {
+ }
+ }
+ }
+ }
+
+ trigger OnOpenPage()
+ var
+ ViewText: Text;
+ begin
+ ViewText := Rec.GetView();
+ Rec.LoadData();
+ Rec.SetView(ViewText);
+ end;
+
+ local procedure DeleteSelectedMappings()
+ var
+ BackupRec: Record "Custom Migration Table Buffer";
+ begin
+
+ if not Confirm(DeleteConfirmQst, false) then
+ exit;
+ BackupRec.Copy(Rec);
+ CurrPage.SetSelectionFilter(Rec);
+ Rec.DeleteAll(true);
+ Rec.LoadData();
+ Rec.Copy(BackupRec);
+ Rec.Next(-1);
+ CurrPage.Update(false);
+ end;
+
+ var
+ ImportDialogTitleLbl: Label 'Import Table Mappings';
+ ImportSuccessMsg: Label 'Table mappings were imported successfully.';
+ DeleteConfirmQst: Label 'Are you sure you want to delete the selected table mapping(s)?';
+ ResetToDefaultsQst: Label 'This will delete all current table mappings and restore the default mappings. Do you want to continue?';
+ DefaultTableMappingsFileNameLbl: Label 'TableMappings.json', Locked = true;
+ JsonFileFilterLbl: Label 'JSON Files (*.json)|*.json|All Files (*.*)|*.*', Locked = true;
+}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationTableBuffer.Table.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationTableBuffer.Table.al
new file mode 100644
index 0000000000..85353723c7
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/CustomMigrationTableBuffer.Table.al
@@ -0,0 +1,307 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+using System.Utilities;
+
+///
+/// Temporary table that combines data from Migration Setup Table Mapping and Replication Table Mapping tables.
+/// Used for displaying and managing all table mappings in a single view.
+///
+table 40035 "Custom Migration Table Buffer"
+{
+ DataClassification = SystemMetadata;
+ TableType = Temporary;
+ Extensible = false;
+ InherentEntitlements = X;
+ InherentPermissions = X;
+
+ fields
+ {
+ field(1; "Source Sql Table Name"; Text[128])
+ {
+ Caption = 'Source SQL Table Name';
+ ToolTip = 'Specifies the name of the source SQL table to be replicated. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(2; "Destination Sql Table Name"; Text[128])
+ {
+ Caption = 'Destination SQL Table Name';
+ ToolTip = 'Specifies the name of the destination SQL table in the cloud environment. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(3; "Company Name"; Text[30])
+ {
+ Caption = 'Company Name';
+ ToolTip = 'Specifies the company name associated with this table mapping. The value should be blank if the table is per-database.';
+ }
+
+ field(4; "Table Name"; Text[128])
+ {
+ Caption = 'Table Name';
+ ToolTip = 'Specifies the name of the table. For example, "Customer" or "Sales Header".';
+ }
+
+ field(5; "Preserve Cloud Data"; Boolean)
+ {
+ Caption = 'Preserve Cloud Data';
+ ToolTip = 'Specifies whether to preserve existing data in the cloud during replication. If set to true, existing data in the destination table will not be overwritten during replication, only new records will be added. It is recommended to set this to true for per-database table, while it should be false for per-company tables.';
+ }
+
+ field(6; "Mapping Type"; Enum "Migration Mapping Type")
+ {
+ Caption = 'Mapping Type';
+ ToolTip = 'Specifies whether this mapping is for Replication or Migration Setup.';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Source Sql Table Name", "Destination Sql Table Name")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Mapping Type", "Table Name")
+ {
+ }
+ key(Key3; "Destination Sql Table Name")
+ {
+ Unique = true;
+ }
+ }
+
+ trigger OnDelete()
+ begin
+ PropagateDelete(Rec);
+ end;
+
+ procedure LoadData()
+ var
+ MigrationSetupTableMapping: Record "Migration Setup Table Mapping";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ begin
+ Rec.Reset();
+ Rec.DeleteAll();
+
+ if MigrationSetupTableMapping.FindSet() then
+ repeat
+ Clear(Rec);
+ Rec."Mapping Type" := Rec."Mapping Type"::"Migration Setup";
+ Rec."Source Sql Table Name" := MigrationSetupTableMapping."Source Sql Table Name";
+ Rec."Destination Sql Table Name" := MigrationSetupTableMapping."Destination Sql Table Name";
+ Rec."Company Name" := MigrationSetupTableMapping."Company Name";
+ Rec."Table Name" := MigrationSetupTableMapping."Table Name";
+ Rec."Preserve Cloud Data" := MigrationSetupTableMapping."Preserve Cloud Data";
+ Rec.Insert();
+ until MigrationSetupTableMapping.Next() = 0;
+
+ if ReplicationTableMapping.FindSet() then
+ repeat
+ Clear(Rec);
+ Rec."Mapping Type" := Rec."Mapping Type"::Replication;
+ Rec."Source Sql Table Name" := ReplicationTableMapping."Source Sql Table Name";
+ Rec."Destination Sql Table Name" := ReplicationTableMapping."Destination Sql Table Name";
+ Rec."Company Name" := ReplicationTableMapping."Company Name";
+ Rec."Table Name" := ReplicationTableMapping."Table Name";
+ Rec."Preserve Cloud Data" := ReplicationTableMapping."Preserve Cloud Data";
+ Rec.Insert();
+ until ReplicationTableMapping.Next() = 0;
+ end;
+
+ procedure ExportToJson(): Text
+ var
+ TableMappingsJsonArray: JsonArray;
+ TableMappingJsonObject: JsonObject;
+ ResultText: Text;
+ CurrentLanguage: Integer;
+ begin
+ CurrentLanguage := GlobalLanguage();
+ GlobalLanguage(1033); // en-US
+
+ Rec.Reset();
+ if Rec.FindSet() then
+ repeat
+ Clear(TableMappingJsonObject);
+ TableMappingJsonObject.Add(MappingTypeTok, Format(Rec."Mapping Type"));
+ TableMappingJsonObject.Add(SourceSqlTableNameTok, Rec."Source Sql Table Name");
+ TableMappingJsonObject.Add(DestinationSqlTableNameTok, Rec."Destination Sql Table Name");
+ TableMappingJsonObject.Add(CompanyNameTok, Rec."Company Name");
+ TableMappingJsonObject.Add(TableNameTok, Rec."Table Name");
+ TableMappingJsonObject.Add(PreserveCloudDataTok, Rec."Preserve Cloud Data");
+ TableMappingsJsonArray.Add(TableMappingJsonObject);
+ until Rec.Next() = 0;
+
+ TableMappingsJsonArray.WriteTo(ResultText);
+ GlobalLanguage(CurrentLanguage);
+ exit(ResultText);
+ end;
+
+ procedure ImportFromJson(JsonText: Text)
+ var
+ MigrationSetupTableMapping: Record "Migration Setup Table Mapping";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ TableMappingsJsonArray: JsonArray;
+ TableMappingJsonToken: JsonToken;
+ TableMappingJsonObject: JsonObject;
+ MappingTypeText: Text;
+ CurrentLanguage: Integer;
+ i: Integer;
+ begin
+ CurrentLanguage := GlobalLanguage();
+ GlobalLanguage(1033); // en-US
+
+ if not TableMappingsJsonArray.ReadFrom(JsonText) then begin
+ GlobalLanguage(CurrentLanguage);
+ exit;
+ end;
+
+ for i := 0 to TableMappingsJsonArray.Count() - 1 do begin
+ TableMappingsJsonArray.Get(i, TableMappingJsonToken);
+ TableMappingJsonObject := TableMappingJsonToken.AsObject();
+
+ MappingTypeText := GetJsonValueSafe(TableMappingJsonObject, MappingTypeTok);
+
+ if MappingTypeText = Format(Rec."Mapping Type"::"Migration Setup") then begin
+ if MigrationSetupTableMapping.Get(GetJsonValueSafe(TableMappingJsonObject, SourceSqlTableNameTok), GetJsonValueSafe(TableMappingJsonObject, DestinationSqlTableNameTok)) then
+ MigrationSetupTableMapping.Delete(true);
+
+ Clear(MigrationSetupTableMapping);
+#pragma warning disable AA0139
+ MigrationSetupTableMapping."Source Sql Table Name" := GetJsonValueSafe(TableMappingJsonObject, SourceSqlTableNameTok);
+ MigrationSetupTableMapping."Destination Sql Table Name" := GetJsonValueSafe(TableMappingJsonObject, DestinationSqlTableNameTok);
+ MigrationSetupTableMapping."Company Name" := GetJsonValueSafe(TableMappingJsonObject, CompanyNameTok);
+ MigrationSetupTableMapping."Table Name" := GetJsonValueSafe(TableMappingJsonObject, TableNameTok);
+#pragma warning restore AA0139
+ Evaluate(MigrationSetupTableMapping."Preserve Cloud Data", GetJsonValueSafe(TableMappingJsonObject, PreserveCloudDataTok));
+ MigrationSetupTableMapping.Insert(true);
+ end else begin
+ if ReplicationTableMapping.Get(GetJsonValueSafe(TableMappingJsonObject, SourceSqlTableNameTok), GetJsonValueSafe(TableMappingJsonObject, DestinationSqlTableNameTok)) then
+ ReplicationTableMapping.Delete(true);
+
+ Clear(ReplicationTableMapping);
+#pragma warning disable AA0139
+ ReplicationTableMapping."Source Sql Table Name" := GetJsonValueSafe(TableMappingJsonObject, SourceSqlTableNameTok);
+ ReplicationTableMapping."Destination Sql Table Name" := GetJsonValueSafe(TableMappingJsonObject, DestinationSqlTableNameTok);
+ ReplicationTableMapping."Company Name" := GetJsonValueSafe(TableMappingJsonObject, CompanyNameTok);
+ ReplicationTableMapping."Table Name" := GetJsonValueSafe(TableMappingJsonObject, TableNameTok);
+#pragma warning restore AA0139
+ Evaluate(ReplicationTableMapping."Preserve Cloud Data", GetJsonValueSafe(TableMappingJsonObject, PreserveCloudDataTok));
+ ReplicationTableMapping.Insert(true);
+ end;
+ end;
+
+ GlobalLanguage(CurrentLanguage);
+ LoadData();
+ end;
+
+ local procedure PropagateDelete(var CustomMigrationTableBuffer: Record "Custom Migration Table Buffer")
+ var
+ MigrationSetupTableMapping: Record "Migration Setup Table Mapping";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ begin
+ case CustomMigrationTableBuffer."Mapping Type" of
+ CustomMigrationTableBuffer."Mapping Type"::"Migration Setup":
+ if MigrationSetupTableMapping.Get(CustomMigrationTableBuffer."Source Sql Table Name", CustomMigrationTableBuffer."Destination Sql Table Name") then
+ MigrationSetupTableMapping.Delete(true);
+ CustomMigrationTableBuffer."Mapping Type"::Replication:
+ if ReplicationTableMapping.Get(CustomMigrationTableBuffer."Source Sql Table Name", CustomMigrationTableBuffer."Destination Sql Table Name") then
+ ReplicationTableMapping.Delete(true);
+ end;
+ end;
+
+ local procedure GetJsonValueSafe(ParentJsonObject: JsonObject; PropertyName: Text): Text
+ var
+ ObjectJsonToken: JsonToken;
+ begin
+ ParentJsonObject.Get(PropertyName, ObjectJsonToken);
+ exit(ObjectJsonToken.AsValue().AsText());
+ end;
+
+ internal procedure GetDefaultEncoding(): TextEncoding
+ begin
+ exit(TextEncoding::UTF8);
+ end;
+
+ internal procedure ExportToFile()
+ var
+ TempBlob: Codeunit "Temp Blob";
+ JsonOutStream: OutStream;
+ JsonInStream: InStream;
+ JsonText: Text;
+ FileName: Text;
+ begin
+ JsonText := ExportToJson();
+ TempBlob.CreateOutStream(JsonOutStream, GetDefaultEncoding());
+ JsonOutStream.WriteText(JsonText);
+ TempBlob.CreateInStream(JsonInStream, GetDefaultEncoding());
+ FileName := DefaultFileNameTok;
+ DownloadFromStream(JsonInStream, ExportDialogTitleLbl, '', JsonFileFilterTok, FileName);
+ end;
+
+ internal procedure RestoreDefaultMappings()
+ var
+ MigrationSetupTableMapping: Record "Migration Setup Table Mapping";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ CustomMigrationProvider: Interface "Custom Migration Provider";
+ begin
+ MigrationSetupTableMapping.DeleteAll(true);
+ ReplicationTableMapping.DeleteAll(true);
+
+ IntelligentCloudSetup.Get();
+ CustomMigrationProvider := IntelligentCloudSetup."Custom Migration Provider";
+ CustomMigrationProvider.SetupMigrationSetupTableMappings();
+ CustomMigrationProvider.SetupReplicationTableMappings();
+
+ LoadData();
+ end;
+
+ procedure SaveMigrationTableMapping(MappingType: Enum "Migration Mapping Type"; SourceTableName: Text[128]; DestinationTableName: Text[128]; TargetTableName: Text[128]; CompanyName: Text[30]; DataPerCompany: Boolean; PreserveCloudData: Boolean)
+ var
+ MigrationSetupTableMapping: Record "Migration Setup Table Mapping";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ CompanyNameValue: Text[30];
+ begin
+ CompanyNameValue := CopyStr(DataPerCompany ? CompanyName : '', 1, MaxStrLen(CompanyNameValue));
+
+ case MappingType of
+ MappingType::"Migration Setup":
+ begin
+ if MigrationSetupTableMapping.Get(SourceTableName, DestinationTableName) then
+ MigrationSetupTableMapping.Delete(true);
+
+ MigrationSetupTableMapping."Source Sql Table Name" := SourceTableName;
+ MigrationSetupTableMapping."Destination Sql Table Name" := DestinationTableName;
+ MigrationSetupTableMapping."Table Name" := TargetTableName;
+ MigrationSetupTableMapping."Company Name" := CompanyNameValue;
+ MigrationSetupTableMapping."Preserve Cloud Data" := PreserveCloudData;
+ MigrationSetupTableMapping.Insert(true);
+ end;
+ MappingType::Replication:
+ begin
+ ReplicationTableMapping."Source Sql Table Name" := SourceTableName;
+ ReplicationTableMapping."Destination Sql Table Name" := DestinationTableName;
+ ReplicationTableMapping."Table Name" := TargetTableName;
+ ReplicationTableMapping."Company Name" := CompanyNameValue;
+ ReplicationTableMapping."Preserve Cloud Data" := PreserveCloudData;
+
+ if not ReplicationTableMapping.Insert(true) then
+ ReplicationTableMapping.Modify(true);
+ end;
+ end;
+ end;
+
+ var
+ MappingTypeTok: Label 'mappingType', Locked = true;
+ SourceSqlTableNameTok: Label 'sourceSqlTableName', Locked = true;
+ DestinationSqlTableNameTok: Label 'destinationSqlTableName', Locked = true;
+ CompanyNameTok: Label 'companyName', Locked = true;
+ TableNameTok: Label 'tableName', Locked = true;
+ PreserveCloudDataTok: Label 'preserveCloudData', Locked = true;
+ DefaultFileNameTok: Label 'TableMappings.json', Locked = true;
+ JsonFileFilterTok: Label '*.json', Locked = true;
+ ExportDialogTitleLbl: Label 'Export Table Mappings';
+}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/MigrationSetupTableMapping.Table.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/MigrationSetupTableMapping.Table.al
new file mode 100644
index 0000000000..645a165c60
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/MigrationSetupTableMapping.Table.al
@@ -0,0 +1,62 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+///
+/// is used to define which tables should be copied during the setup phase of the cloud migration process.
+/// These tables are used in the configuration wizard or other code that is used to setup the cloud migration.
+///
+table 40033 "Migration Setup Table Mapping"
+{
+ DataPerCompany = false;
+ DataClassification = SystemMetadata;
+ ReplicateData = false;
+ Extensible = false;
+
+ fields
+ {
+ field(1; "Source Sql Table Name"; Text[128])
+ {
+ Caption = 'Source SQL Table Name';
+ ToolTip = 'Specifies the name of the source SQL table to be replicated. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(2; "Destination Sql Table Name"; Text[128])
+ {
+ Caption = 'Destination SQL Table Name';
+ ToolTip = 'Specifies the name of the destination SQL table in the cloud environment. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(3; "Company Name"; Text[30])
+ {
+ Caption = 'Company Name';
+ ToolTip = 'Specifies the company name associated with this table mapping. The value should be blank if the table is per-database.';
+ }
+
+ field(4; "Table Name"; Text[128])
+ {
+ Caption = 'Table Name';
+ ToolTip = 'Specifies the name of the table. For example, "Customer" or "Sales Header".';
+ }
+
+ field(5; "Preserve Cloud Data"; Boolean)
+ {
+ Caption = 'Preserve Cloud Data';
+ ToolTip = 'Specifies whether to preserve existing data in the cloud during replication. If set to true, existing data in the destination table will not be overwritten during replication, only new records will be added. It is recommended to set this to true for per-database table, while it should be false for per-company tables.';
+ }
+ }
+ keys
+ {
+ key(Key1; "Source Sql Table Name", "Destination Sql Table Name")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Destination Sql Table Name")
+ {
+ Unique = true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/ReplicationTableMapping.Table.al b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/ReplicationTableMapping.Table.al
new file mode 100644
index 0000000000..34b169be78
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/CustomMigration/TableMappings/ReplicationTableMapping.Table.al
@@ -0,0 +1,63 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+///
+/// table is used for defining how the data is copied from source SQL table to the destination SQL table in the cloud environment.
+/// The data is copied during the replication phase of the cloud migration.
+///
+table 40034 "Replication Table Mapping"
+{
+ DataPerCompany = false;
+ DataClassification = SystemMetadata;
+ ReplicateData = false;
+ Extensible = false;
+
+ fields
+ {
+ field(1; "Source Sql Table Name"; Text[128])
+ {
+ Caption = 'Source SQL Table Name';
+ ToolTip = 'Specifies the name of the source SQL table to be replicated. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(2; "Destination Sql Table Name"; Text[128])
+ {
+ Caption = 'Destination SQL Table Name';
+ ToolTip = 'Specifies the name of the destination SQL table in the cloud environment. The name must match exactly the name of the destination table in SQL.';
+ }
+
+ field(3; "Company Name"; Text[30])
+ {
+ Caption = 'Company Name';
+ ToolTip = 'Specifies the company name associated with this table mapping. The value should be blank if the table is per-database.';
+ }
+
+ field(4; "Table Name"; Text[128])
+ {
+ Caption = 'Table Name';
+ ToolTip = 'Specifies the name of the table. For example, "Customer" or "Sales Header".';
+ }
+
+ field(5; "Preserve Cloud Data"; Boolean)
+ {
+ Caption = 'Preserve Cloud Data';
+ ToolTip = 'Specifies whether to preserve existing data in the cloud during replication. If set to true, existing data in the destination table will not be overwritten during replication, only new records will be added. It is recommended to set this to true for per-database table, while it should be false for per-company tables.';
+ }
+ }
+
+ keys
+ {
+ key(Key1; "Source Sql Table Name", "Destination Sql Table Name")
+ {
+ Clustered = true;
+ }
+ key(Key2; "Destination Sql Table Name")
+ {
+ Unique = true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CalculateAmounts.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CalculateAmounts.Codeunit.al
index e5083bfa4a..c982ab330c 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CalculateAmounts.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CalculateAmounts.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Finance.GeneralLedger.Account;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigReplicateDataMgt.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigReplicateDataMgt.Codeunit.al
index 0f0f33d62f..e72646aadd 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigReplicateDataMgt.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigReplicateDataMgt.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
@@ -15,7 +20,7 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
var
TableMetadata: Record "Table Metadata";
begin
- if ((TableID >= 2000000000) and (TableID <= 2000100000) and (not (TableID in [Database::"Tenant Media", Database::"Tenant Media Set", Database::"Tenant Media Thumbnails"]))) then
+ if ((TableID >= 2000000000) and (TableID <= 2000100000) and (not (TableID in [Database::"Tenant Feature Key", Database::"Tenant Media", Database::"Tenant Media Set", Database::"Tenant Media Thumbnails", Database::"Record Link"]))) then
exit(false);
if not TableMetadata.Get(TableID) then
@@ -25,6 +30,44 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
exit(true);
end;
+ internal procedure CheckCanChangeAllIntelligentCloudStatus()
+ var
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ IsObsoleted: Boolean;
+ TablesThatCannotBeChanged: Text;
+ TableCount: Integer;
+ MaxTablesForBatchCheck: Integer;
+ begin
+ // Only check tables that have replication enabled
+ IntelligentCloudStatus.SetRange("Replicate Data", true);
+ if not IntelligentCloudStatus.FindSet() then
+ exit;
+
+ MaxTablesForBatchCheck := 200000;
+ TableCount := IntelligentCloudStatus.Count();
+
+ // If too many tables, check one by one and throw on first error
+ if TableCount > MaxTablesForBatchCheck then begin
+ repeat
+ if not CanChangeIntelligentCloudStatus(IntelligentCloudStatus."Table Id", IsObsoleted) then
+ Error(TableReplicationPropertiesCannotBeChangedErr, IntelligentCloudStatus."Table Name");
+ until IntelligentCloudStatus.Next() = 0;
+ exit;
+ end;
+
+ // If reasonable number of tables, collect all errors
+ repeat
+ if not CanChangeIntelligentCloudStatus(IntelligentCloudStatus."Table Id", IsObsoleted) then begin
+ if TablesThatCannotBeChanged <> '' then
+ TablesThatCannotBeChanged += ', ';
+ TablesThatCannotBeChanged += IntelligentCloudStatus."Table Name";
+ end;
+ until IntelligentCloudStatus.Next() = 0;
+
+ if TablesThatCannotBeChanged <> '' then
+ Error(TablesReplicationPropertiesCannotBeChangedErr, TablesThatCannotBeChanged);
+ end;
+
internal procedure LoadRecords(var IntelligentCloudStatus: Record "Intelligent Cloud Status")
var
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
@@ -67,7 +110,12 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
internal procedure CheckRecordCanBeModified(TableID: Integer): Boolean
var
CanBeIncluded: Boolean;
+ IsObsolete: Boolean;
begin
+ // First check if the table is a system table that cannot be modified
+ if not CanChangeIntelligentCloudStatus(TableID, IsObsolete) then
+ exit(false);
+
OnCanIntelligentCloudSetupTableBeModified(TableID, CanBeIncluded);
exit(CanBeIncluded);
end;
@@ -121,7 +169,13 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
end;
local procedure UpdateReplicateDataForTable(var IntelligentCloudStatus: Record "Intelligent Cloud Status"; var TablesModified: Text; SeparatorChar: Char; NewReplicateData: Boolean)
+ var
+ IsObsolete: Boolean;
begin
+ // Security check: Validate the table can be modified
+ if not CanChangeIntelligentCloudStatus(IntelligentCloudStatus."Table Id", IsObsolete) then
+ Error(TableReplicationPropertiesCannotBeChangedErr, IntelligentCloudStatus."Table Name");
+
if IntelligentCloudStatus."Replicate Data" <> NewReplicateData then begin
InsertInitialLog(IntelligentCloudStatus);
IntelligentCloudStatus."Replicate Data" := NewReplicateData;
@@ -193,7 +247,13 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
end;
local procedure UpdatePreserveDataForTable(var IntelligentCloudStatus: Record "Intelligent Cloud Status"; var TablesModified: Text; SeparatorChar: Char; NewPreserveCloudData: Boolean)
+ var
+ IsObsolete: Boolean;
begin
+ // Security check: Validate the table can be modified
+ if not CanChangeIntelligentCloudStatus(IntelligentCloudStatus."Table Id", IsObsolete) then
+ Error(TableReplicationPropertiesCannotBeChangedErr, IntelligentCloudStatus."Table Name");
+
if IntelligentCloudStatus."Preserve Cloud Data" <> NewPreserveCloudData then begin
if (not NewPreserveCloudData) and (IntelligentCloudStatus."Table Id" = Database::"Tenant Media") then
Error(NotPossibleToReplaceTenantMediaTableErr);
@@ -450,8 +510,91 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
begin
end;
+ internal procedure ValidateAndEnableReplicationForMappedTables()
+ var
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ IncludedMappingTableNames: Dictionary of [Text[128], Boolean];
+ MissingTables: Text;
+ TablesCannotBeEnabled: Text;
+ TableName: Text[128];
+ begin
+ LoadIncludedTableNamesFromMappings(IncludedMappingTableNames);
+
+ foreach TableName in IncludedMappingTableNames.Keys() do begin
+ IntelligentCloudStatus.SetRange("Table Name", TableName);
+ if IntelligentCloudStatus.FindSet() then
+ repeat
+ if not IntelligentCloudStatus."Replicate Data" then
+ if not EnableReplicateDataForTable(IntelligentCloudStatus) then begin
+ if TablesCannotBeEnabled <> '' then
+ TablesCannotBeEnabled += ', ';
+ TablesCannotBeEnabled += TableName;
+ end;
+ until IntelligentCloudStatus.Next() = 0
+ else begin
+ if MissingTables <> '' then
+ MissingTables += ', ';
+ MissingTables += TableName;
+ end;
+ end;
+
+ if (TablesCannotBeEnabled <> '') or (MissingTables <> '') then
+ Error(TableMappingsIncorrectErr, GetTablesCannotBeEnabledErrorPart(TablesCannotBeEnabled), GetMissingTablesErrorPart(MissingTables));
+ end;
+
+ local procedure LoadIncludedTableNamesFromMappings(var IncludedMappingTableNames: Dictionary of [Text[128], Boolean])
+ var
+ ReplicationTableMap: Record "Replication Table Mapping";
+ SetupMap: Record "Migration Setup Table Mapping";
+ begin
+ Clear(IncludedMappingTableNames);
+
+ ReplicationTableMap.SetLoadFields("Destination Sql Table Name");
+ if ReplicationTableMap.FindSet() then
+ repeat
+ if not IncludedMappingTableNames.ContainsKey(ReplicationTableMap."Destination Sql Table Name") then
+ IncludedMappingTableNames.Add(ReplicationTableMap."Destination Sql Table Name", true);
+ until ReplicationTableMap.Next() = 0;
+
+ SetupMap.SetLoadFields("Destination Sql Table Name");
+ if SetupMap.FindSet() then
+ repeat
+ if not IncludedMappingTableNames.ContainsKey(SetupMap."Destination Sql Table Name") then
+ IncludedMappingTableNames.Add(SetupMap."Destination Sql Table Name", true);
+ until SetupMap.Next() = 0;
+ end;
+
+ local procedure EnableReplicateDataForTable(var IntelligentCloudStatus: Record "Intelligent Cloud Status"): Boolean
+ var
+ IsObsolete: Boolean;
+ begin
+ if not CanChangeIntelligentCloudStatus(IntelligentCloudStatus."Table Id", IsObsolete) then
+ exit(false);
+
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Modify();
+ exit(true);
+ end;
+
+ local procedure GetTablesCannotBeEnabledErrorPart(TablesCannotBeEnabled: Text): Text
+ begin
+ if TablesCannotBeEnabled = '' then
+ exit('');
+
+ exit(StrSubstNo(TablesCannotBeEnabledForReplicationErr, TablesCannotBeEnabled));
+ end;
+
+ local procedure GetMissingTablesErrorPart(MissingTables: Text): Text
+ begin
+ if MissingTables = '' then
+ exit('');
+
+ exit(StrSubstNo(TablesNotInSaaSErr, MissingTables));
+ end;
+
var
TableReplicationPropertiesCannotBeChangedErr: Label 'The replication properties of the table %1 cannot be changed because it is internal. Changing the replication of the sensitive tables is not allowed.', Comment = '%1 - Table name, e.g. CRONUS International Ltd_$Activity Step$437dbf0e-84ff-417a-965d-ed2bb9650972';
+ TablesReplicationPropertiesCannotBeChangedErr: Label 'The replication properties of the following tables cannot be changed because they are internal. Changing the replication of the sensitive tables is not allowed: %1', Comment = '%1 - Comma-separated list of table names';
OverrideReplicationSetupDocumentationURLLbl: Label 'https://go.microsoft.com/fwlink/?linkid=2248572', Locked = true;
AddMigrationTableMappingsDocumentationURLLbl: Label 'https://go.microsoft.com/fwlink/?linkid=2296587', Locked = true;
OverrideReplicationSeteupDocumentationNotificationTxt: Label 'Cloud Mig. Replication Rules';
@@ -467,4 +610,7 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
AddTableMappingsNotificationTitleTxt: Label 'Add Migration Table Mappings';
AddTableMappingsDescriptionTxt: Label 'Notification to learn more about how to configure table mappings instead of entering the data manually.';
ReplicationPropertyChangedLbl: Label 'The replication property has been changed by UserSecurityId %1.', Comment = '%1 - User Security ID';
+ TableMappingsIncorrectErr: Label 'Table mappings provided are incorrect.%1%2', Comment = '%1 - Error part about tables that cannot be enabled, %2 - Error part about missing tables';
+ TablesCannotBeEnabledForReplicationErr: Label '\\The following tables cannot be included in migration: %1.', Comment = '%1 - Comma-separated list of table names';
+ TablesNotInSaaSErr: Label '\\The following tables do not exist in SaaS: %1.', Comment = '%1 - Comma-separated list of table names';
}
\ No newline at end of file
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigUpgrade.codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigUpgrade.codeunit.al
index c59bea118b..98d4d7d00d 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigUpgrade.codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CloudMigUpgrade.codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Upgrade;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CreateCompaniesIC.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CreateCompaniesIC.Codeunit.al
index 635a2589b0..f5dbd9d689 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/CreateCompaniesIC.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/CreateCompaniesIC.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Utilities;
@@ -30,11 +35,17 @@ codeunit 4004 "Create Companies IC"
internal procedure SetDemoDataType()
var
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ CloudMigrationProviderInterface: Interface "Custom Migration Provider";
begin
- CompanyDataType := CompanyDataType::None;
+ CompanyDataType := CompanyDataType::"Create New - No Data";
if IntelligentCloudSetup.Get() then
OnBeforeCreateCompany(IntelligentCloudSetup."Product ID", CompanyDataType);
+
+ if IntelligentCloudSetup."Custom Migration Provider".AsInteger() <> 0 then begin
+ CloudMigrationProviderInterface := IntelligentCloudSetup."Custom Migration Provider";
+ CompanyDataType := CloudMigrationProviderInterface.GetDemoDataType();
+ end;
end;
internal procedure CreateCompany(var HybridCompany: Record "Hybrid Company")
@@ -70,10 +81,10 @@ codeunit 4004 "Create Companies IC"
end;
[IntegrationEvent(false, false)]
- procedure OnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Option "Evaluation Data","Standard Data","None","Extended Data","Full No Data")
+ procedure OnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Enum "Company Demo Data Type")
begin
end;
var
- CompanyDataType: Option "Evaluation Data","Standard Data","None","Extended Data","Full No Data";
+ CompanyDataType: Enum "Company Demo Data Type";
}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/DataLakeMigrationCleanup.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/DataLakeMigrationCleanup.Codeunit.al
index e491195ccb..81129946c1 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/DataLakeMigrationCleanup.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/DataLakeMigrationCleanup.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 40015 "Data Lake Migration Cleanup"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/FixDataOnRunCompleted.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/FixDataOnRunCompleted.Codeunit.al
index 935041554f..a0611d7e05 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/FixDataOnRunCompleted.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/FixDataOnRunCompleted.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 40018 "Fix Data OnRun Completed"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleCreateCompanyFailure.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleCreateCompanyFailure.Codeunit.al
index d4745ba688..e2611c95e3 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleCreateCompanyFailure.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleCreateCompanyFailure.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 4012 "Handle Create Company Failure"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleFixDataFailure.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleFixDataFailure.Codeunit.al
index 3044f56544..32f01fbc48 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleFixDataFailure.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HandleFixDataFailure.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 40019 "Handle Fix Data Failure"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudInstall.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudInstall.Codeunit.al
index 6cffaffa11..bc69161cb6 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudInstall.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudInstall.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 4000 "Hybrid Cloud Install"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudManagement.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudManagement.Codeunit.al
index f8c7848ed9..42e5aa71c8 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudManagement.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCloudManagement.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Foundation.Company;
@@ -94,6 +99,8 @@ codeunit 4001 "Hybrid Cloud Management"
DataUpgradeScheduledLbl: Label 'Cloud Migration data upgrade scheduled.', Locked = true;
UnblockedManuallyLbl: Label 'Unblocked manually';
SettingForUserPermissionsMsg: Label 'Setting for Keeping user permissions was set to: %1.', Comment = '%1 - true or false';
+ CustomMigrationSettingMsg: Label 'Setting for Custom Migration Enabled was set to: %1.', Comment = '%1 - true or false';
+ OnPremDevelopmentSettingMsg: Label 'Setting for Enable OnPrem Development was set to: %1.', Comment = '%1 - true or false';
DoNotManageCompaniesManuallyLbl: Label 'We strongly recommend that you don''t manage companies, such as renaming and deleting, while cloud migration is running.';
LearnMoreMsg: Label 'Learn more';
DontShowAgainMsg: Label 'Don''t show again';
@@ -257,6 +264,26 @@ codeunit 4001 "Hybrid Cloud Management"
exit(true);
end;
+ procedure IsCloudMigrationUISupported(): Boolean
+ var
+ EnvironmentInformation: Codeunit "Environment Information";
+ begin
+ if EnvironmentInformation.IsSaaS() then
+ exit(true);
+
+ exit(IsOnPremDevelopmentEnabled());
+ end;
+
+ procedure IsOnPremDevelopmentEnabled(): Boolean
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ if not IntelligentCloudSetup.Get() then
+ exit(false);
+
+ exit(IntelligentCloudSetup."Enable OnPrem Development");
+ end;
+
procedure IsIntelligentCloudEnabled(): Boolean
var
IntelligentCloud: Record "Intelligent Cloud";
@@ -608,18 +635,28 @@ codeunit 4001 "Hybrid Cloud Management"
end;
procedure HandleShowCompanySelectionStep(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text)
+ begin
+ HandleShowCompanySelectionStep(HybridProductType, SqlConnectionString, SqlServerType, IRName, '', '', '');
+ end;
+
+ procedure HandleShowCompanySelectionStep(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text; SourceCompaniesTableName: Text; SetupMappingsTableName: Text; ReplicationMappingsTableName: Text)
var
HandledExternally: Boolean;
begin
- OnBeforeShowCompanySelectionStep(HybridProductType, SqlConnectionString, SqlServerType, IRName, HandledExternally);
+ OnBeforeShowCompanySelectionStep(HybridProductType, SqlConnectionString, SqlServerType, IRName, HandledExternally, SourceCompaniesTableName, SetupMappingsTableName, ReplicationMappingsTableName);
if HandledExternally then
exit;
- EnableReplication(HybridProductType, SqlConnectionString, SqlServerType, IRName);
+ EnableReplication(HybridProductType, SqlConnectionString, SqlServerType, IRName, SourceCompaniesTableName, SetupMappingsTableName, ReplicationMappingsTableName);
ClearCompanyCreationStatus();
end;
internal procedure EnableReplication(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text)
+ begin
+ EnableReplication(HybridProductType, SqlConnectionString, SqlServerType, IRName, '', '', '');
+ end;
+
+ internal procedure EnableReplication(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text; SourceCompaniesTableName: Text; SetupMappingsTableName: Text; ReplicationMappingsTableName: Text)
var
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
HybridDeployment: Codeunit "Hybrid Deployment";
@@ -627,7 +664,7 @@ codeunit 4001 "Hybrid Cloud Management"
LatestVersion: Text;
begin
HybridDeployment.Initialize(HybridProductType.ID);
- HybridDeployment.EnableReplication(SqlConnectionString, SqlServerType, IRName);
+ HybridDeployment.EnableReplication(SqlConnectionString, SqlServerType, IRName, SourceCompaniesTableName, SetupMappingsTableName, ReplicationMappingsTableName);
HybridDeployment.GetVersionInformation(DeployedVersion, LatestVersion);
IntelligentCloudSetup.SetDeployedVersion(DeployedVersion);
@@ -641,6 +678,7 @@ codeunit 4001 "Hybrid Cloud Management"
HybridCompany: Record "Hybrid Company";
GuidedExperience: Codeunit "Guided Experience";
FeatureTelemetry: Codeunit "Feature Telemetry";
+ CustomMigrationProviderInterface: Interface "Custom Migration Provider";
TelemetryDimensions: Dictionary of [Text, Text];
begin
TelemetryDimensions.Add('TotalNumberOfOnPremCompanies', Format(HybridCompany.Count(), 0, 9));
@@ -648,7 +686,14 @@ codeunit 4001 "Hybrid Cloud Management"
GuidedExperience.CompleteAssistedSetup(ObjectType::Page, Page::"Hybrid Cloud Setup Wizard");
IntelligentCloudSetup.Validate("Replication User", UserId());
IntelligentCloudSetup.Modify();
- RestoreDefaultMigrationTableMappings(false);
+
+ if IntelligentCloudSetup."Custom Migration Provider".AsInteger() = 0 then
+ RestoreDefaultMigrationTableMappings(false)
+ else begin
+ CustomMigrationProviderInterface := IntelligentCloudSetup."Custom Migration Provider";
+ CustomMigrationProviderInterface.SetupReplicationTableMappings();
+ end;
+
RefreshIntelligentCloudStatusTable();
CreateCompanies();
@@ -833,8 +878,10 @@ codeunit 4001 "Hybrid Cloud Management"
MarkTablesAsReplaceData();
OnHandleRunReplication(Handled, RunId, ReplicationType);
- if not Handled then
+ if not Handled then begin
+ PrepareTablesForCustomMigration();
HybridDeployment.RunReplication(RunId, ReplicationType);
+ end;
HybridReplicationSummary.CreateInProgressRecord(RunId, ReplicationType);
if HybridReplicationSummary.FindLast() then;
@@ -861,6 +908,28 @@ codeunit 4001 "Hybrid Cloud Management"
exit('');
end;
+ internal procedure PrepareTablesForCustomMigration()
+ var
+ CloudMigReplicateDataMgt: Codeunit "Cloud Mig. Replicate Data Mgt.";
+ begin
+ CloudMigReplicateDataMgt.CheckCanChangeAllIntelligentCloudStatus();
+
+ if not IsCustomMigrationEnabled() then
+ exit;
+
+ CloudMigReplicateDataMgt.ValidateAndEnableReplicationForMappedTables();
+ end;
+
+ local procedure IsCustomMigrationEnabled(): Boolean
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ if not IntelligentCloudSetup.Get() then
+ exit(false);
+
+ exit(IntelligentCloudSetup."Custom Migration Enabled");
+ end;
+
internal procedure GetFeatureTelemetryName(): Text
begin
exit('Cloud Migration');
@@ -1196,12 +1265,40 @@ codeunit 4001 "Hybrid Cloud Management"
var
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
begin
- IntelligentCloudSetup.Get();
+ GetIntelligentCloudSetupSafe(IntelligentCloudSetup);
IntelligentCloudSetup."Keep User Permissions" := not IntelligentCloudSetup."Keep User Permissions";
IntelligentCloudSetup.Modify();
Message(SettingForUserPermissionsMsg, IntelligentCloudSetup."Keep User Permissions");
end;
+ internal procedure EnableDisableCustomMigration()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ GetIntelligentCloudSetupSafe(IntelligentCloudSetup);
+ IntelligentCloudSetup."Custom Migration Enabled" := not IntelligentCloudSetup."Custom Migration Enabled";
+ IntelligentCloudSetup.Modify();
+ Message(CustomMigrationSettingMsg, IntelligentCloudSetup."Custom Migration Enabled");
+ end;
+
+ internal procedure EnableDisableOnPremDevelopment()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ OnPremMigrationHandler: Codeunit "OnPrem Migration Handler";
+ begin
+ GetIntelligentCloudSetupSafe(IntelligentCloudSetup);
+ IntelligentCloudSetup."Enable OnPrem Development" := not IntelligentCloudSetup."Enable OnPrem Development";
+ IntelligentCloudSetup.Modify();
+ OnPremMigrationHandler.Activate();
+ Message(OnPremDevelopmentSettingMsg, IntelligentCloudSetup."Enable OnPrem Development");
+ end;
+
+ local procedure GetIntelligentCloudSetupSafe(var IntelligentCloudSetup: Record "Intelligent Cloud Setup")
+ begin
+ if not IntelligentCloudSetup.Get() then
+ IntelligentCloudSetup.Insert();
+ end;
+
internal procedure VerifyCanCompleteCloudMigration()
var
LastHybridReplicationSummary: Record "Hybrid Replication Summary";
@@ -1344,7 +1441,7 @@ codeunit 4001 "Hybrid Cloud Management"
end;
[IntegrationEvent(false, false)]
- local procedure OnBeforeShowCompanySelectionStep(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text; var Handled: Boolean)
+ local procedure OnBeforeShowCompanySelectionStep(var HybridProductType: Record "Hybrid Product Type"; SqlConnectionString: Text; SqlServerType: Text; IRName: Text; var Handled: Boolean; SourceCompaniesTableName: Text; SetupMappingsTableName: Text; ReplicationMappingsTableName: Text)
begin
end;
@@ -1378,6 +1475,11 @@ codeunit 4001 "Hybrid Cloud Management"
begin
end;
+ [IntegrationEvent(false, false)]
+ procedure OnShowCustomMigrationStep(var HybridProductType: Record "Hybrid Product Type")
+ begin
+ end;
+
[IntegrationEvent(false, false)]
procedure OnShowSQLServerTypeStep(var HybridProductType: Record "Hybrid Product Type")
begin
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCompanyInitialize.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCompanyInitialize.Codeunit.al
index a8adc363bb..8f57826994 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCompanyInitialize.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCompanyInitialize.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Foundation.Company;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCueSetupManagement.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCueSetupManagement.Codeunit.al
index 31db683514..10d2df6f07 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCueSetupManagement.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridCueSetupManagement.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.RoleCenters;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridFilterCompanies.Page.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridFilterCompanies.Page.al
index 1827ea1270..d366750686 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridFilterCompanies.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridFilterCompanies.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Utilities;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridHandleCompInitError.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridHandleCompInitError.Codeunit.al
index e026bbb6f7..42d4e3585b 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridHandleCompInitError.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridHandleCompInitError.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 40017 "Hybrid Handle Comp Init Error"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridMessageManagement.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridMessageManagement.Codeunit.al
index 2e3092d919..1d4212c748 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridMessageManagement.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridMessageManagement.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridReplicationStatistics.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridReplicationStatistics.Codeunit.al
index 7dcc91ab13..c54bae5239 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridReplicationStatistics.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridReplicationStatistics.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Integration;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridScheduledTaskMgr.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridScheduledTaskMgr.Codeunit.al
index c0625d7634..e601675324 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridScheduledTaskMgr.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/HybridScheduledTaskMgr.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Threading;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/IntelligentCloudNotifier.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/IntelligentCloudNotifier.Codeunit.al
index 41c8492184..71265db5d3 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/IntelligentCloudNotifier.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/IntelligentCloudNotifier.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment.Configuration;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/NotificationHandler.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/NotificationHandler.Codeunit.al
index 34e0cf1e84..e8b6a24f7e 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/NotificationHandler.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/NotificationHandler.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.CRM.Outlook;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/PostMigrationNotificaton.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/PostMigrationNotificaton.Codeunit.al
index 1e0a527b07..192026da74 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/PostMigrationNotificaton.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/PostMigrationNotificaton.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.RoleCenters;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/RecordLinkMigrationWarning.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/RecordLinkMigrationWarning.Codeunit.al
index b1728fcc32..bcccda8e3d 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/RecordLinkMigrationWarning.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/RecordLinkMigrationWarning.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
codeunit 40023 "Record Link Migration Warning" implements "Cloud Migration Warning"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/TelemetrySubscriber.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/TelemetrySubscriber.Codeunit.al
index c947e6a912..39edd94380 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/TelemetrySubscriber.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/TelemetrySubscriber.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Telemetry;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/codeunits/TenantMediaWarning.Codeunit.al b/Apps/W1/HybridBaseDeployment/app/src/codeunits/TenantMediaWarning.Codeunit.al
index b950d78677..d32380e9f7 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/codeunits/TenantMediaWarning.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/codeunits/TenantMediaWarning.Codeunit.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/dotnet.al b/Apps/W1/HybridBaseDeployment/app/src/dotnet.al
index 0bdd601706..98bcb82c3e 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/dotnet.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/dotnet.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
dotnet
diff --git a/Apps/W1/HybridBaseDeployment/app/src/enums/CloudMigrationWarningType.Enum.al b/Apps/W1/HybridBaseDeployment/app/src/enums/CloudMigrationWarningType.Enum.al
index 19f6651f19..a89fe0bba2 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/enums/CloudMigrationWarningType.Enum.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/enums/CloudMigrationWarningType.Enum.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
enum 40010 "Cloud Migration Warning Type" implements "Cloud Migration Warning"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/enums/MigrationMappingType.Enum.al b/Apps/W1/HybridBaseDeployment/app/src/enums/MigrationMappingType.Enum.al
new file mode 100644
index 0000000000..16521355b0
--- /dev/null
+++ b/Apps/W1/HybridBaseDeployment/app/src/enums/MigrationMappingType.Enum.al
@@ -0,0 +1,20 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
+
+enum 40020 "Migration Mapping Type"
+{
+ Extensible = false;
+
+ value(0; "Replication")
+ {
+ Caption = 'Replication';
+ }
+ value(1; "Migration Setup")
+ {
+ Caption = 'Migration Setup';
+ }
+}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/interfaces/CloudMigrationWarning.Interface.al b/Apps/W1/HybridBaseDeployment/app/src/interfaces/CloudMigrationWarning.Interface.al
index 7f491843b8..5e914fe14a 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/interfaces/CloudMigrationWarning.Interface.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/interfaces/CloudMigrationWarning.Interface.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
interface "Cloud Migration Warning"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/AddMigrationTableMappings.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/AddMigrationTableMappings.Page.al
index 370dbaff40..241543c039 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/AddMigrationTableMappings.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/AddMigrationTableMappings.Page.al
@@ -1,12 +1,13 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Apps;
using System.Reflection;
-// ------------------------------------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// ------------------------------------------------------------------------------------------------
page 40010 "Add Migration Table Mappings"
{
ApplicationArea = All;
@@ -193,23 +194,11 @@ page 40010 "Add Migration Table Mappings"
local procedure UpdateObjectsFilter(var PublishedApplication: Record "Published Application")
var
- ExtensionManagement: Codeunit "Extension Management";
+ MigrationTableMapping: Record "Migration Table Mapping";
begin
- PublishedApplication.SetRange(Installed, true);
- if not PublishedApplication.FindSet() then begin
+ MigrationTableMapping.UpdateObjectsFilter(PublishedApplication, AppFilter, ExtensionsFilter);
+ if (AppFilter = '') and (ExtensionsFilter = '') then
ClearExtensionsFilter();
- exit;
- end;
-
- repeat
- if ExtensionManagement.IsInstalledByPackageId(PublishedApplication."Package ID") then begin
- AppFilter += '|' + Format(PublishedApplication."Package ID");
- ExtensionsFilter += ', ' + PublishedApplication.Name;
- end;
- until PublishedApplication.Next() = 0;
-
- AppFilter := AppFilter.TrimStart('|');
- ExtensionsFilter := ExtensionsFilter.TrimStart(', ');
end;
local procedure SaveNewTableMappings(): Boolean
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigChangeDataLog.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigChangeDataLog.Page.al
index 5d61dbc97d..bb680ecf83 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigChangeDataLog.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigChangeDataLog.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40042 "Cloud Mig Change Data Log"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigSelectTables.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigSelectTables.Page.al
index cfb7679c0e..825fbbfb65 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigSelectTables.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigSelectTables.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Integration;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationADLSetup.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationADLSetup.Page.al
index b2795e70d3..c85c27a692 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationADLSetup.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationADLSetup.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationManagement.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationManagement.Page.al
index 32ad377960..954e0533c4 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationManagement.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationManagement.Page.al
@@ -1,4 +1,9 @@
-namespace Microsoft.DataMigration;
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
using Microsoft.API.Upgrade;
using System.Environment;
@@ -340,7 +345,7 @@ page 40063 "Cloud Migration Management"
action(PrepareTables)
{
Enabled = IsSuper and IsSetupComplete;
- Visible = IsOnPrem;
+ Visible = false;
ApplicationArea = All;
Caption = 'Prepare tables for replication';
ToolTip = 'Gets the candidate tables ready for replication';
@@ -523,10 +528,10 @@ page 40063 "Cloud Migration Management"
action(ManageCustomTables)
{
Enabled = IsSuper;
- Visible = not IsOnPrem;
+ Visible = not IsOnPrem and (not HideManageCustomTables);
ApplicationArea = All;
- Caption = 'Manage custom tables';
- ToolTip = 'Manage custom table mappings for the migration. This functionality can be used to rename the table during replication or to split OnPrem table with customizations to main table and table extensions.';
+ Caption = 'Manage table mappings';
+ ToolTip = 'Manage table mappings for the migration. This functionality can be used to rename the table during replication or to split OnPrem table with customizations to main table and table extensions.';
RunObject = page "Migration Table Mapping";
RunPageMode = Edit;
Image = TransferToGeneralJournal;
@@ -600,11 +605,39 @@ page 40063 "Cloud Migration Management"
HybridCloudManagement.ChangeRemovePermissionsFromUsers();
end;
}
- action(ChangeTheWayDataIsReplicated)
+ action(EnableDisableCustomMigration)
{
Enabled = IsSuper;
Visible = not IsOnPrem;
ApplicationArea = Basic, Suite;
+ Caption = 'Enable/Disable Custom Migration';
+ ToolTip = 'Enable or disable custom migration functionality. This is the ability to use mappings defined out of the box. Custom migration apps are not affected.';
+ Image = GetEntries;
+
+ trigger OnAction()
+ var
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ HybridCloudManagement.EnableDisableCustomMigration();
+ end;
+ }
+ action(ManageTableMappings)
+ {
+ Enabled = IsSuper;
+ Visible = not IsOnPrem and CustomMigrationTablesEnabled;
+ ApplicationArea = Basic, Suite;
+ Caption = 'Manage table mappings';
+ ToolTip = 'Manage table mappings for custom migration.';
+ RunObject = page "Custom Migration Mapping List";
+ RunPageMode = Edit;
+ Image = TransferToLines;
+ }
+
+ action(ChangeTheWayDataIsReplicated)
+ {
+ Enabled = IsSuper;
+ Visible = not IsOnPrem and (not HideChangeTheWayDataIsReplicated);
+ ApplicationArea = Basic, Suite;
Caption = 'Change how the data is replicated';
ToolTip = 'Allows defining which data is replicated and how. You can include or exclude the tables from the cloud migration and define if a table keeps existing data (delta sync) or replaces the entire table.';
Image = ChangeLog;
@@ -629,6 +662,21 @@ page 40063 "Cloud Migration Management"
Image = ChangeLog;
RunObject = page "API Data Upgrade Companies";
}
+ action(EnableDisableOnPremDevelopment)
+ {
+ Visible = IsSuper and (IsOnPrem or IsOnPremDevelopmentEnabled);
+ ApplicationArea = Basic, Suite;
+ Caption = 'Enable/Disable OnPrem Development';
+ ToolTip = 'Enable or disable OnPrem development functionality.';
+ Image = Debug;
+
+ trigger OnAction()
+ var
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ HybridCloudManagement.EnableDisableOnPremDevelopment();
+ end;
+ }
}
area(Promoted)
@@ -665,6 +713,9 @@ page 40063 "Cloud Migration Management"
actionref(ManageCustomTables_Promoted; ManageCustomTables)
{
}
+ actionref(ManageTableMappings_Promoted; ManageTableMappings)
+ {
+ }
actionref(MapUsers_Promoted; MapUsers)
{
}
@@ -683,7 +734,6 @@ page 40063 "Cloud Migration Management"
trigger OnOpenPage()
var
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
- EnvironmentInformation: Codeunit "Environment Information";
FeatureTelemetry: Codeunit "Feature Telemetry";
IntelligentCloudNotifier: Codeunit "Intelligent Cloud Notifier";
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
@@ -697,26 +747,28 @@ page 40063 "Cloud Migration Management"
SendUserIsNotSuperNotification();
SendRepairDataNotification();
- IsOnPrem := not EnvironmentInformation.IsSaaS();
+ IsOnPrem := not HybridCloudManagement.IsCloudMigrationUISupported();
+ IsOnPremDevelopmentEnabled := HybridCloudManagement.IsOnPremDevelopmentEnabled();
if (not PermissionManager.IsIntelligentCloud()) and (not IsOnPrem) then
SendSetupIntelligentCloudNotification();
UpdateTablesStatistics();
UpdateControlProperties();
+
CanRunDiagnostic(DiagnosticRunsEnabled);
CanShowSetupChecklist(SetupChecklistEnabled);
CanShowMapUsers(MapUsersEnabled);
UpdateReplicationCompaniesEnabled := true;
CanShowUpdateReplicationCompanies(UpdateReplicationCompaniesEnabled);
CanMapCustomTables(CustomTablesEnabled);
-
if IntelligentCloudSetup.Get() then
HybridDeployment.Initialize(IntelligentCloudSetup."Product ID");
IntelligentCloudNotifier.ShowICUpdateNotification();
WarnAboutNonInitializedCompanies();
UpdateWarningCounts();
+ UpdatePropertiesCustomMigration();
end;
trigger OnAfterGetCurrRecord()
@@ -727,6 +779,7 @@ page 40063 "Cloud Migration Management"
HybridCloudManagement.GetLastReplicationSummary(LastHybridReplicationSummary);
HybridCloudManagement.GetCloudMigrationStatusText(StatusTxt, StatusTxtStyle, MoreInformationTxt);
UpdateControlProperties();
+ UpdatePropertiesCustomMigration();
end;
local procedure UpdateTablesStatistics()
@@ -779,6 +832,23 @@ page 40063 "Cloud Migration Management"
RecordLinkBufferNotEmpty := not ReplicationRecordLinkBuffer.IsEmpty();
end;
+ local procedure UpdatePropertiesCustomMigration()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ begin
+ if not IntelligentCloudSetup.Get() then
+ exit;
+
+ if IntelligentCloudSetup."Custom Migration Provider".AsInteger() = 0 then
+ exit;
+
+ DiagnosticRunsEnabled := false;
+ SetupChecklistEnabled := false;
+ HideManageCustomTables := true;
+ HideChangeTheWayDataIsReplicated := true;
+ CustomMigrationTablesEnabled := true;
+ end;
+
procedure SendRepairDataNotification()
var
ReplicationRunCompletedArg: Record "Replication Run Completed Arg";
@@ -978,6 +1048,7 @@ page 40063 "Cloud Migration Management"
IsSetupComplete: Boolean;
IsSuper: Boolean;
IsOnPrem: Boolean;
+ IsOnPremDevelopmentEnabled: Boolean;
IsMigratedCompany: Boolean;
DiagnosticRunsEnabled: Boolean;
SetupChecklistEnabled: Boolean;
@@ -985,6 +1056,9 @@ page 40063 "Cloud Migration Management"
AdlSetupEnabled: Boolean;
UpdateReplicationCompaniesEnabled: Boolean;
CustomTablesEnabled: Boolean;
+ CustomMigrationTablesEnabled: Boolean;
LastRefresh: DateTime;
RecordLinkBufferNotEmpty: Boolean;
-}
\ No newline at end of file
+ HideManageCustomTables: Boolean;
+ HideChangeTheWayDataIsReplicated: Boolean;
+}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationSanitizeTable.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationSanitizeTable.Page.al
index ffa53d911c..438fc7f9ef 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationSanitizeTable.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationSanitizeTable.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationWarnings.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationWarnings.Page.al
index 32218f2082..1aeda3e56a 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationWarnings.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/CloudMigrationWarnings.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40035 "Cloud Migration Warnings"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/DatabaseSizeTooLargeDialog.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/DatabaseSizeTooLargeDialog.Page.al
index 9cd77975b6..39f158246d 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/DatabaseSizeTooLargeDialog.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/DatabaseSizeTooLargeDialog.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 4023 "Database Size Too Large Dialog"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridAccountantActivities.PageExt.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridAccountantActivities.PageExt.al
index f7c2cc5026..525a094745 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridAccountantActivities.PageExt.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridAccountantActivities.PageExt.al
@@ -1,9 +1,13 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Finance.RoleCenters;
using System.Security.AccessControl;
-
pageextension 4011 "Hybrid Accountant Activities" extends "Accountant Activities"
{
layout
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCloudSetupWizard.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCloudSetupWizard.Page.al
index 525d9c6180..b17c492cc0 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCloudSetupWizard.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCloudSetupWizard.Page.al
@@ -1,7 +1,13 @@
-namespace Microsoft.DataMigration;
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
using System.Environment;
using System.Environment.Configuration;
+using System.Integration;
using System.Security.User;
using System.Telemetry;
using System.Utilities;
@@ -116,7 +122,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group(Step2)
{
- Caption = '';
+ ShowCaption = false;
Visible = ProductTypeVisible;
group("Para2.1")
{
@@ -124,7 +130,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
InstructionalText = 'Select the product that you want to migrate data from';
group("Para2.1.1")
{
- Caption = '';
+ ShowCaption = false;
#pragma warning disable AA0218
field("Product Name"; TempHybridProductType."Display Name")
{
@@ -136,6 +142,8 @@ page 4000 "Hybrid Cloud Setup Wizard"
trigger OnAssistEdit()
var
HybridProduct: Page "Hybrid Product Types";
+ CustomMigrationProviderInterface: Interface "Custom Migration Provider";
+ CustomMigrationTableMappingInterface: Interface "Custom Migration Table Mapping";
begin
HybridProduct.SetTableView(TempHybridProductType);
HybridProduct.SetRecord(TempHybridProductType);
@@ -152,6 +160,17 @@ page 4000 "Hybrid Cloud Setup Wizard"
HybridCloudManagement.OnGetHybridProductDescription(TempHybridProductType.ID, SelectedProductDescription);
OnSelectedProduct(TempHybridProductType.ID);
+ if TempHybridProductType."Custom Migration Provider".AsInteger() <> 0 then begin
+ CustomMigrationProviderInterface := TempHybridProductType."Custom Migration Provider";
+ SelectedProductDescription := CustomMigrationProviderInterface.GetDescription();
+ Rec."Custom Migration Provider" := TempHybridProductType."Custom Migration Provider";
+ CustomMigrationTableMappingInterface := TempHybridProductType."Custom Migration Provider";
+ ReplicationMappingsTableNameTxt := CustomMigrationTableMappingInterface.GetReplicationTableMappingName();
+ SetupMappingsTableNameTxt := CustomMigrationTableMappingInterface.GetMigrationSetupTableMappingName();
+ SourceCompaniesTableNameTxt := CustomMigrationTableMappingInterface.GetCompaniesTableName();
+ end else
+ Clear(Rec."Custom Migration Provider");
+
SelectedProductDescriptionVisible := SelectedProductDescription <> '';
Rec."Product ID" := TempHybridProductType.ID;
@@ -164,7 +183,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
group("Para2.1.2")
{
- Caption = '';
+ ShowCaption = false;
Visible = SelectedProductDescriptionVisible;
field(SelectedProductDescription; SelectedProductDescription)
@@ -177,10 +196,50 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
}
}
+ group(Step201)
+ {
+ ShowCaption = false;
+ Visible = CustomMigrationVisible;
+ group("Para201.1")
+ {
+ Caption = 'Configure custom cloud migration';
+ InstructionalText = 'Enter the parameters needed for custom cloud migration. It may not be necessary to change these values, consult the official documentation for more information.';
+ group("Para201.1.1")
+ {
+ ShowCaption = false;
+ field(ReplicationMappingsTableName; ReplicationMappingsTableNameTxt)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Replication Mappings SQL Table Name';
+ ToolTip = 'Specifies the SQL table name of the table containing mappings for the tables to be replicated.';
+ }
+ }
+ group("Para201.1.2")
+ {
+ ShowCaption = false;
+ field(SetupMappingsTableName; SetupMappingsTableNameTxt)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Setup Mappings SQL Table Name';
+ ToolTip = 'Specifies the SQL name of the table containing mappings for the tables to be copied during Setup.';
+ }
+ }
+ group("Para201.1.3")
+ {
+ ShowCaption = false;
+ field(SourceCompaniesTableName; SourceCompaniesTableNameTxt)
+ {
+ ApplicationArea = Basic, Suite;
+ Caption = 'Companies SQL Table Name';
+ ToolTip = 'Specifies the SQL name of the table in the source database containing company names.';
+ }
+ }
+ }
+ }
group(Step21)
{
- Caption = '';
+ ShowCaption = false;
Visible = DelegatedAdminStepVisible;
group("Para21.1")
{
@@ -202,7 +261,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
group(Step3)
{
- Caption = '';
+ ShowCaption = false;
Visible = SQLServerTypeVisible;
group("Para3.1")
{
@@ -223,7 +282,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group("Para3.2")
{
- Caption = '';
+ ShowCaption = false;
InstructionalText = 'Enter the connection string to your SQL database';
field(SqlConnectionString; SqlConnectionStringTxt)
{
@@ -240,7 +299,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group("Para3.3")
{
- Caption = '';
+ ShowCaption = false;
InstructionalText = 'If you already have an integration runtime service instance installed and want to reuse it, specify the Integration Runtime; otherwise leave the field empty to create a new Integration Runtime.';
Enabled = (Rec."Sql Server Type" = Rec."Sql Server Type"::SQLServer);
field(RuntimeName; RuntimeNameTxt)
@@ -260,21 +319,21 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group(Step4)
{
- Caption = '';
+ ShowCaption = false;
Visible = IRInstructionsVisible;
group("Para4.1")
{
Caption = 'Instructions';
group("Para4.1.1")
{
- Caption = '';
+ ShowCaption = false;
InstructionalText = 'The data migration requires an integration runtime service. The runtime service provides a connection between your on-premises solution and your Business Central cloud tenant.';
#pragma warning disable AA0218, AA0225
field(DownloadShir; DownloadShirLinkTxt)
{
ApplicationArea = Basic, Suite;
- Caption = '';
+ ShowCaption = false;
trigger OnDrillDown()
begin
Hyperlink(DownloadShirURLTxt);
@@ -301,7 +360,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group("4.2")
{
- Caption = '';
+ ShowCaption = false;
#pragma warning disable AA0218
field(RuntimeKey; RuntimeKeyTxt)
{
@@ -409,7 +468,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
}
group(StepFinish)
{
- Caption = '';
+ ShowCaption = false;
Visible = DoneVisible;
group(AllDone)
{
@@ -452,7 +511,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
HybridCompany: Record "Hybrid Company";
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
begin
- if (Step = Step::Intro) and (not IsSaas) then begin
+ if (Step = Step::Intro) and (not IsCloudMigrationSupported) then begin
NavigateToBusinessCentral();
CurrPage.Close();
end;
@@ -527,7 +586,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
SkipShowLiveCompaniesWarning: Boolean;
begin
FeatureTelemetry.LogUptake('0000JMS', HybridCloudManagement.GetFeatureTelemetryName(), Enum::"Feature Uptake Status"::Discovered);
- IsSaas := EnvironmentInformation.IsSaaS();
+ IsCloudMigrationSupported := HybridCloudManagement.IsCloudMigrationUISupported();
if Rec.GetFilter("Product ID") = 'TM' then begin
IsIntelligentCloud := true;
@@ -550,23 +609,36 @@ page 4000 "Hybrid Cloud Setup Wizard"
trigger OnQueryClosePage(CloseAction: Action): Boolean
var
- GuidedExperience: Codeunit "Guided Experience";
- IntelligentCloudManagement: Page "Intelligent Cloud Management";
Handled: Boolean;
CloseWizard: Boolean;
begin
if not (CloseAction = Action::OK) then
exit(true);
- if not IsSaas then
+ if not IsCloudMigrationSupported then
exit(true);
OnHandleCloseWizard(Handled, CloseWizard);
if Handled then
exit(CloseWizard);
+ exit(ShowConfirmationDialogAfterSetup());
+ end;
+
+ local procedure ShowConfirmationDialogAfterSetup(): Boolean
+ var
+ IntelligentCloud: Record "Intelligent Cloud";
+ GuidedExperience: Codeunit "Guided Experience";
+ IntelligentCloudManagement: Page "Intelligent Cloud Management";
+ begin
if not GuidedExperience.Exists("Guided Experience Type"::"Assisted Setup", ObjectType::Page, Page::"Hybrid Cloud Setup Wizard") then
- exit;
+ exit(true);
+
+ if not IntelligentCloud.Get() then
+ exit(true);
+
+ if not IntelligentCloud.Enabled then
+ exit(true);
if GuidedExperience.IsAssistedSetupComplete(ObjectType::Page, PAGE::"Hybrid Cloud Setup Wizard") then begin
if not Confirm(OpenCloudMigrationPageQst, true) then
@@ -581,6 +653,8 @@ page 4000 "Hybrid Cloud Setup Wizard"
end else
if not Confirm(HybridNotSetupQst, false) then
exit(false);
+
+ exit(true);
end;
[IntegrationEvent(false, false)]
@@ -599,11 +673,11 @@ page 4000 "Hybrid Cloud Setup Wizard"
MediaResources_Done: Record "Media Resources";
ClientTypeManagement: Codeunit "Client Type Management";
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
- EnvironmentInformation: Codeunit "Environment Information";
IsChanged: Boolean;
TopBannerVisible: Boolean;
IntroVisible: Boolean;
ProductTypeVisible: Boolean;
+ CustomMigrationVisible: Boolean;
SQLServerTypeVisible: Boolean;
IRInstructionsVisible: Boolean;
CompanySelectionVisible: Boolean;
@@ -614,11 +688,11 @@ page 4000 "Hybrid Cloud Setup Wizard"
NextEnabled: Boolean;
FinishEnabled: Boolean;
IsRunTimeNameCleared: Boolean;
- IsSaas: Boolean;
+ IsCloudMigrationSupported: Boolean;
ChooseAll: Boolean;
InAgreementWithPolicy: Boolean;
IsIntelligentCloud: Boolean;
- Step: Option Intro,DelegatedAdminStep,ProductType,SQLServerType,IRInstructions,CompanySelection,ProductSpecificSettings,Schedule,Done;
+ Step: Option Intro,DelegatedAdminStep,ProductType,CustomMigration,SQLServerType,IRInstructions,CompanySelection,ProductSpecificSettings,Schedule,Done;
SqlConnectionStringTxt: Text;
RuntimeNameTxt: Text;
RuntimeKeyTxt: Text;
@@ -649,6 +723,9 @@ page 4000 "Hybrid Cloud Setup Wizard"
LearnMoreDatabaseSizeUrlTxt: Label 'https://go.microsoft.com/fwlink/?linkid=2301442', Locked = true;
CloudMigrationLiveTenantsUrlTxt: Label 'https://go.microsoft.com/fwlink/?linkid=2262423', Locked = true;
LearnMoreTxt: Label 'Learn more';
+ ReplicationMappingsTableNameTxt: Text;
+ SetupMappingsTableNameTxt: Text;
+ SourceCompaniesTableNameTxt: Text;
local procedure NextStep(Backwards: Boolean)
var
@@ -675,8 +752,27 @@ page 4000 "Hybrid Cloud Setup Wizard"
end;
Step::ProductType:
ShowProductTypeStep(Backwards);
+ Step::CustomMigration:
+ begin
+ if not ShouldShowCustomMigrationStep() then begin
+ IncrementStep(Backwards, Step);
+ NextStep(Backwards);
+ exit;
+ end;
+
+ ShowCustomMigrationStep(Backwards);
+ end;
Step::SQLServerType:
- ShowSQLServerTypeStep(Backwards);
+ begin
+ if HybridCloudManagement.IsOnPremDevelopmentEnabled() then
+ if (not Backwards) then begin
+ Step := Step::IRInstructions;
+ NextStep(Backwards);
+ exit;
+ end;
+
+ ShowSQLServerTypeStep(Backwards);
+ end;
Step::IRInstructions:
if (HybridCloudManagement.CanSkipIRSetup(Rec."Sql Server Type", RuntimeNameTxt)) then begin
IncrementStep(Backwards, Step);
@@ -744,6 +840,7 @@ page 4000 "Hybrid Cloud Setup Wizard"
SQLServerTypeVisible := false;
IRInstructionsVisible := false;
CompanySelectionVisible := false;
+ CustomMigrationVisible := false;
#pragma warning disable AA0206
ProductSpecificSettingsVisible := false;
#pragma warning restore
@@ -751,6 +848,17 @@ page 4000 "Hybrid Cloud Setup Wizard"
DoneVisible := false;
end;
+ local procedure ShouldShowCustomMigrationStep(): Boolean
+ var
+ CustomMigrationTableMappingInterface: Interface "Custom Migration Table Mapping";
+ begin
+ if Rec."Custom Migration Provider".AsInteger() = 0 then
+ exit(false);
+
+ CustomMigrationTableMappingInterface := Rec."Custom Migration Provider";
+ exit(CustomMigrationTableMappingInterface.ShowConfigureMigrationTablesMappingStep());
+ end;
+
local procedure ShowIntroStep()
begin
ResetWizardControls();
@@ -768,6 +876,14 @@ page 4000 "Hybrid Cloud Setup Wizard"
ProductTypeVisible := true;
end;
+ local procedure ShowCustomMigrationStep(Backwards: Boolean)
+ begin
+ if not Backwards then
+ HybridCloudManagement.OnShowCustomMigrationStep(TempHybridProductType);
+ ResetWizardControls();
+ CustomMigrationVisible := true;
+ end;
+
local procedure ShowSQLServerTypeStep(Backwards: Boolean)
begin
if not Backwards then
@@ -788,11 +904,23 @@ page 4000 "Hybrid Cloud Setup Wizard"
local procedure ShowCompanySelectionStep(Backwards: Boolean)
var
HybridCompany: Record "Hybrid Company";
+ OnPremMigrationHandler: Codeunit "OnPrem Migration Handler";
+ CustomMigrationProviderInterface: Interface "Custom Migration Provider";
begin
+ if TempHybridProductType."Custom Migration Provider".AsInteger() <> 0 then begin
+ CustomMigrationProviderInterface := TempHybridProductType."Custom Migration Provider";
+ CustomMigrationProviderInterface.SetupMigrationSetupTableMappings();
+ end;
+
if not Backwards and IsChanged then begin
- HybridCloudManagement.HandleShowCompanySelectionStep(TempHybridProductType, SqlConnectionStringTxt, Rec.ConvertSqlServerTypeToText(), RuntimeNameTxt);
+ if TempHybridProductType."Custom Migration Provider".AsInteger() <> 0 then
+ HybridCloudManagement.HandleShowCompanySelectionStep(TempHybridProductType, SqlConnectionStringTxt, Rec.ConvertSqlServerTypeToText(), RuntimeNameTxt, SourceCompaniesTableNameTxt, SetupMappingsTableNameTxt, ReplicationMappingsTableNameTxt)
+ else
+ HybridCloudManagement.HandleShowCompanySelectionStep(TempHybridProductType, SqlConnectionStringTxt, Rec.ConvertSqlServerTypeToText(), RuntimeNameTxt);
IsChanged := false;
- end;
+ end else
+ if HybridCloudManagement.IsOnPremDevelopmentEnabled() then
+ OnPremMigrationHandler.EnableCloudMigration(RuntimeNameTxt);
ResetWizardControls();
CompanySelectionVisible := true;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompanies.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompanies.Page.al
index 95514a3884..fbb322682a 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompanies.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompanies.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 4005 "Hybrid Companies"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesList.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesList.Page.al
index d04e083303..1e841bc75e 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesList.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesList.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40015 "Hybrid Companies List"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesManagement.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesManagement.Page.al
index e680a0b62d..4d6f48a0d1 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesManagement.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridCompaniesManagement.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 4018 "Hybrid Companies Management"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridDAApproval.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridDAApproval.Page.al
index c303d619f5..fd6ec70281 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridDAApproval.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridDAApproval.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40027 "Hybrid DA Approval"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridMigrationLog.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridMigrationLog.Page.al
index bdd50b6c40..9e270cf93b 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridMigrationLog.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridMigrationLog.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40033 "Hybrid Migration Log"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridO365Activities.PageExt.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridO365Activities.PageExt.al
index 55a1f7e6b2..d77df4a4bf 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridO365Activities.PageExt.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridO365Activities.PageExt.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridProductTypes.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridProductTypes.Page.al
index c341d929e4..e0099f52d1 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/HybridProductTypes.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/HybridProductTypes.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 4002 "Hybrid Product Types"
@@ -28,8 +33,44 @@ page 4002 "Hybrid Product Types"
trigger OnOpenPage()
var
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ CustomMigrationProvider: Enum "Custom Migration Provider";
+ CurrentOrdinal: Integer;
begin
HybridCloudManagement.OnGetHybridProductType(Rec);
+ foreach CurrentOrdinal in Enum::"Custom Migration Provider".Ordinals() do begin
+ CustomMigrationProvider := Enum::"Custom Migration Provider".FromInteger(CurrentOrdinal);
+ InsertCustomMigrationProvider(CustomMigrationProvider);
+ end;
+ end;
+
+ local procedure InsertCustomMigrationProvider(CustomMigrationProvider: Enum "Custom Migration Provider")
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ CustomMigrationProviderInterface: Interface "Custom Migration Provider";
+ CurrentLanguage: Integer;
+ begin
+ if CustomMigrationProvider = Enum::"Custom Migration Provider"::"Custom Migration Provider" then begin
+ if not IntelligentCloudSetup.Get() then
+ exit;
+
+ if not IntelligentCloudSetup."Custom Migration Enabled" then
+ exit;
+ end;
+
+ Clear(Rec);
+
+ CurrentLanguage := GlobalLanguage();
+ GlobalLanguage(1033); // ENU
+ Rec.ID := Format(CustomMigrationProvider.AsInteger(), 0, 9) + '-' + Format(CustomMigrationProvider);
+#pragma warning disable AA0139
+ Rec.ID := Rec.ID.Replace(' ', '');
+#pragma warning restore AA0139
+ GlobalLanguage(CurrentLanguage);
+ CustomMigrationProviderInterface := CustomMigrationProvider;
+ Rec."Display Name" := CustomMigrationProviderInterface.GetDisplayName();
+ Rec."App ID" := CustomMigrationProviderInterface.GetAppId();
+ Rec."Custom Migration Provider" := CustomMigrationProvider;
+ Rec.Insert();
end;
}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudDetails.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudDetails.Page.al
index b331798799..084f0c2e0f 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudDetails.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudDetails.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Integration;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudManagement.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudManagement.Page.al
index a28a3dc264..5493cdd415 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudManagement.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudManagement.Page.al
@@ -1,4 +1,9 @@
-namespace Microsoft.DataMigration;
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
using System.Environment;
using System.Integration;
@@ -212,7 +217,7 @@ page 4003 "Intelligent Cloud Management"
action(PrepareTables)
{
Enabled = IsSuper and IsSetupComplete;
- Visible = IsOnPrem;
+ Visible = false;
ApplicationArea = Basic, Suite;
Caption = 'Prepare tables for migration';
ToolTip = 'Gets the candidate tables ready for migration';
@@ -416,6 +421,37 @@ page 4003 "Intelligent Cloud Management"
HybridCloudManagement.ChangeRemovePermissionsFromUsers();
end;
}
+ action(EnableDisableCustomMigration)
+ {
+ Enabled = IsSuper;
+ Visible = not IsOnPrem;
+ ApplicationArea = Basic, Suite;
+ Caption = 'Enable/Disable Custom Migration';
+ ToolTip = 'Enable or disable custom migration functionality. This is the ability to use mappings defined out of the box. Custom migration apps are not affected.';
+ Image = GetEntries;
+
+ trigger OnAction()
+ var
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ HybridCloudManagement.EnableDisableCustomMigration();
+ end;
+ }
+ action(EnableDisableOnPremDevelopment)
+ {
+ Visible = IsSuper and IsOnPrem;
+ ApplicationArea = Basic, Suite;
+ Caption = 'Enable/Disable OnPrem Development';
+ ToolTip = 'Enable or disable OnPrem development functionality.';
+ Image = Debug;
+
+ trigger OnAction()
+ var
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ HybridCloudManagement.EnableDisableOnPremDevelopment();
+ end;
+ }
}
}
@@ -429,7 +465,6 @@ page 4003 "Intelligent Cloud Management"
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
PermissionManager: Codeunit "Permission Manager";
UserPermissions: Codeunit "User Permissions";
- EnvironmentInformation: Codeunit "Environment Information";
IntelligentCloudNotifier: Codeunit "Intelligent Cloud Notifier";
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
FeatureTelemetry: Codeunit "Feature Telemetry";
@@ -445,7 +480,7 @@ page 4003 "Intelligent Cloud Management"
SendUserIsNotSuperNotification();
SendRepairDataNotification();
- IsOnPrem := not EnvironmentInformation.IsSaaS();
+ IsOnPrem := not HybridCloudManagement.IsCloudMigrationUISupported();
if (not PermissionManager.IsIntelligentCloud()) and (not IsOnPrem) then
SendSetupIntelligentCloudNotification();
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudNotMigrated.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudNotMigrated.Page.al
index 6ec0706388..8cd31c92d9 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudNotMigrated.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudNotMigrated.Page.al
@@ -1,5 +1,9 @@
-namespace Microsoft.DataMigration;
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+namespace Microsoft.DataMigration;
page 4019 "Intelligent Cloud Not Migrated"
{
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudReady.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudReady.Page.al
index aa3eebae29..627887b6f8 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudReady.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudReady.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
@@ -25,7 +30,6 @@ page 4007 "Intelligent Cloud Ready"
field(Spacer1; '')
{
ApplicationArea = All;
- Caption = '';
ShowCaption = false;
Editable = false;
}
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudStatFactbox.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudStatFactbox.Page.al
index f9bc242922..afab8147fe 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudStatFactbox.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudStatFactbox.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Reflection;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudUpdate.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudUpdate.Page.al
index 1d622b0ba7..627950cdc2 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudUpdate.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentCloudUpdate.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
@@ -42,14 +47,14 @@ page 4017 "Intelligent Cloud Update"
group("Para1.1.1")
{
- Caption = '';
+ ShowCaption = false;
InstructionalText = 'This process will update your Cloud Migration environment to the latest version.';
#pragma warning disable AA0218, AA0225
field(UpdateICInfo; StrSubstNo(VersionTxt, DeployedVersion, LatestVersion))
{
ApplicationArea = Basic, Suite;
- Caption = '';
+ ShowCaption = false;
}
#pragma warning restore
field(ProcessUpdateTxt; PleaseWaitTxt)
@@ -106,12 +111,11 @@ page 4017 "Intelligent Cloud Update"
var
PermissionManager: Codeunit "Permission Manager";
UserPermissions: Codeunit "User Permissions";
- EnvironmentInformation: Codeunit "Environment Information";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
begin
UpdateVisible := true;
IsSuperAndSetupComplete := PermissionManager.IsIntelligentCloud() and UserPermissions.IsSuper(UserSecurityId());
- IsOnPrem := not EnvironmentInformation.IsSaaS();
-
+ IsOnPrem := not HybridCloudManagement.IsCloudMigrationUISupported();
if not IsSuperAndSetupComplete then
Error(RunUpdatePermissionErr);
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeInsights.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeInsights.Page.al
index 25a19f3031..64ed681fa3 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeInsights.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeInsights.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 4012 "Intelligent Edge Insights"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeKPIs.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeKPIs.Page.al
index 3fde124c0c..70aa38d716 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeKPIs.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/IntelligentEdgeKPIs.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Finance.GeneralLedger.Account;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableMapping.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableMapping.Page.al
index 3ef0c548d9..242a379141 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableMapping.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableMapping.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Apps;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableOverview.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableOverview.Page.al
index d1957fcbc8..f8a44e19e3 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableOverview.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationTableOverview.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Reflection;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationUserMapping.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationUserMapping.Page.al
index 679946e946..3434dc8ccd 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationUserMapping.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/MigrationUserMapping.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment.Configuration;
@@ -5,7 +10,6 @@ using System.Security.AccessControl;
using System.Security.User;
using System.Telemetry;
-
page 4022 "Migration User Mapping"
{
PageType = NavigatePage;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/PauseCloudMigration.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/PauseCloudMigration.Page.al
index b829a23965..8ead43f561 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/PauseCloudMigration.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/PauseCloudMigration.Page.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
page 40038 "Pause Cloud Migration"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/pages/PostMigrationChecklist.Page.al b/Apps/W1/HybridBaseDeployment/app/src/pages/PostMigrationChecklist.Page.al
index 59980815cf..106f166776 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/pages/PostMigrationChecklist.Page.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/pages/PostMigrationChecklist.Page.al
@@ -1,10 +1,14 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Integration.D365Sales;
using System.Environment;
using System.Security.User;
-
page 4020 "Post Migration Checklist"
{
Caption = 'Post Migration Checklist';
diff --git a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridEnabledCoRepDetails.Query.al b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridEnabledCoRepDetails.Query.al
index 91b412712e..940bb0a001 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridEnabledCoRepDetails.Query.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridEnabledCoRepDetails.Query.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
query 4001 "Hybrid Enabled Co Rep. Details"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridTablesForReplication.Query.al b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridTablesForReplication.Query.al
index ac40e6427e..0e4bfd41f0 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridTablesForReplication.Query.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridTablesForReplication.Query.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
query 4000 "Hybrid Tables For Replication"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridUniqueTableStatus.Query.al b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridUniqueTableStatus.Query.al
index 3114131bdb..5d31b3f7c3 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/queries/HybridUniqueTableStatus.Query.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/queries/HybridUniqueTableStatus.Query.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
query 4002 "Hybrid Unique Table Status"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationADLSetup.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationADLSetup.Table.al
index c84bfdf298..74fd4d8d5a 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationADLSetup.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationADLSetup.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40025 "Cloud Migration ADL Setup"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationOverrideLog.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationOverrideLog.Table.al
index cf3873323e..983a945d10 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationOverrideLog.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationOverrideLog.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40041 "Cloud Migration Override Log"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationWarning.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationWarning.Table.al
index d70471653f..8f66c2b792 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationWarning.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/CloudMigrationWarning.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40031 "Cloud Migration Warning"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridActivitesCue.TableExt.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridActivitesCue.TableExt.al
index 7a92ac8f6c..c5ddbd65ea 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridActivitesCue.TableExt.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridActivitesCue.TableExt.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.RoleCenters;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompany.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompany.Table.al
index 02088bca13..841e69fb0b 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompany.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompany.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 4005 "Hybrid Company"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompanyStatus.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompanyStatus.Table.al
index 1f726f0b1b..512ce05a6b 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompanyStatus.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridCompanyStatus.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40027 "Hybrid Company Status"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridDAApproval.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridDAApproval.Table.al
index aaca1e3d48..0106d2117c 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridDAApproval.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridDAApproval.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridFinanceCue.TableExt.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridFinanceCue.TableExt.al
index df77ed5c7a..e22fe75c4f 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridFinanceCue.TableExt.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridFinanceCue.TableExt.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.Finance.RoleCenters;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridProductType.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridProductType.Table.al
index 6d9616e89f..7c32392eb2 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridProductType.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridProductType.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 4000 "Hybrid Product Type"
@@ -23,6 +28,12 @@ table 4000 "Hybrid Product Type"
Description = 'The product extension app id';
DataClassification = SystemMetadata;
}
+ field(4; "Custom Migration Provider"; Enum "Custom Migration Provider")
+ {
+ Caption = 'Custom Migration Provider';
+ Description = 'Specifies the custom migration provider associated with this product type.';
+ DataClassification = SystemMetadata;
+ }
}
keys
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationDetail.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationDetail.Table.al
index 15a4dd96e6..865d2834ef 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationDetail.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationDetail.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Environment;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationSummary.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationSummary.Table.al
index 1d8ec33430..1b6f33936c 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationSummary.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridReplicationSummary.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Integration;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridTableStatus.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridTableStatus.Table.al
index a6ee2525f8..7800edd2bb 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/HybridTableStatus.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/HybridTableStatus.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40032 "Hybrid Table Status"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudNotMigrated.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudNotMigrated.Table.al
index f70525253f..939a88b98c 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudNotMigrated.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudNotMigrated.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 4019 "Intelligent Cloud Not Migrated"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudSetup.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudSetup.Table.al
index a94e1af50e..8e21e31f7e 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudSetup.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/IntelligentCloudSetup.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using Microsoft.CRM.Outlook;
@@ -8,8 +13,6 @@ table 4003 "Intelligent Cloud Setup"
{
DataPerCompany = false;
ReplicateData = false;
- // Do not extend this table
- // Extensible = false;
fields
{
@@ -156,6 +159,21 @@ table 4003 "Intelligent Cloud Setup"
Description = 'Specifies if the permissions should be removed from users.';
DataClassification = SystemMetadata;
}
+ field(27; "Custom Migration Enabled"; Boolean)
+ {
+ Description = 'Specifies if custom migration is enabled.';
+ DataClassification = SystemMetadata;
+ }
+ field(28; "Custom Migration Provider"; Enum "Custom Migration Provider")
+ {
+ Description = 'Specifies the custom migration provider to use.';
+ DataClassification = SystemMetadata;
+ }
+ field(100; "Enable OnPrem Development"; Boolean)
+ {
+ Description = 'Specifies whether OnPrem development is enabled.';
+ DataClassification = SystemMetadata;
+ }
}
keys
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableMapping.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableMapping.Table.al
index 485db91c2f..300daf7595 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableMapping.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableMapping.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Apps;
@@ -158,11 +163,9 @@ table 4009 "Migration Table Mapping"
EndsWithGuid: Boolean;
TestGuid: Guid;
begin
- TrimmedSourceTableName := SourceTableName.Replace(OpeningSquareBracketLbl, '').Replace(ClosingSquareBracketLbl, '');
- if TrimmedSourceTableName.StartsWith(DboTok) then
- TrimmedSourceTableName := CopyStr(TrimmedSourceTableName, StrLen(DboTok) + 1, StrLen(TrimmedSourceTableName) - StrLen(DboTok));
+ TrimmedSourceTableName := TrimSourceTableName(SourceTableName);
- TableDefinition := TrimmedSourceTableName.Split(TableSepartorCharacterTok);
+ TableDefinition := TrimmedSourceTableName.Split(BCTableSeparatorTok);
if TableDefinition.Count() = 0 then
exit;
@@ -188,14 +191,14 @@ table 4009 "Migration Table Mapping"
MigrationTableMapping."Source Table Name" := CopyStr(TableDefinition.Get(2), 1, MaxStrLen(MigrationTableMapping."Source Table Name"));
if EndsWithGuid then
- MigrationTableMapping."Source Table Name" := CopyStr(MigrationTableMapping."Source Table Name" + TableSepartorCharacterTok + TableDefinition.Get(TableDefinition.Count()), 1, MaxStrLen(MigrationTableMapping."Source Table Name"));
+ MigrationTableMapping."Source Table Name" := CopyStr(MigrationTableMapping."Source Table Name" + BCTableSeparatorTok + TableDefinition.Get(TableDefinition.Count()), 1, MaxStrLen(MigrationTableMapping."Source Table Name"));
end;
local procedure IsTableNamePerCompany(TableName: Text; EndsWithGuid: Boolean): Boolean
var
TableDefinition: List of [Text];
begin
- TableDefinition := TableName.Split(TableSepartorCharacterTok);
+ TableDefinition := TableName.Split(BCTableSeparatorTok);
if TableDefinition.Count() < 2 then
exit(true);
@@ -439,6 +442,37 @@ table 4009 "Migration Table Mapping"
exit(TableMappingsJsonObject);
end;
+ internal procedure TrimSourceTableName(SourceTableName: Text) TrimmedSourceTableName: Text
+ begin
+ TrimmedSourceTableName := SourceTableName.Replace(OpeningSquareBracketLbl, '').Replace(ClosingSquareBracketLbl, '');
+ if TrimmedSourceTableName.StartsWith(DboTok) then
+ TrimmedSourceTableName := CopyStr(TrimmedSourceTableName, StrLen(DboTok) + 1, StrLen(TrimmedSourceTableName) - StrLen(DboTok));
+
+ exit(TrimmedSourceTableName);
+ end;
+
+ internal procedure UpdateObjectsFilter(var PublishedApplication: Record "Published Application"; var AppFilter: Text; var ExtensionsFilter: Text)
+ var
+ ExtensionManagement: Codeunit "Extension Management";
+ begin
+ PublishedApplication.SetRange(Installed, true);
+ if not PublishedApplication.FindSet() then begin
+ Clear(ExtensionsFilter);
+ Clear(AppFilter);
+ exit;
+ end;
+
+ repeat
+ if ExtensionManagement.IsInstalledByPackageId(PublishedApplication."Package ID") then begin
+ AppFilter += '|' + Format(PublishedApplication."Package ID");
+ ExtensionsFilter += ', ' + PublishedApplication.Name;
+ end;
+ until PublishedApplication.Next() = 0;
+
+ AppFilter := AppFilter.TrimStart('|');
+ ExtensionsFilter := ExtensionsFilter.TrimStart(', ');
+ end;
+
var
InvalidExtensionPublisherErr: Label 'Extensions from the specified Publisher are not enabled for custom table mapping.';
InvalidTableNameErr: Label 'This table does not exist in the specified extension.';
@@ -454,7 +488,7 @@ table 4009 "Migration Table Mapping"
TableMappingDefinitionJsonFileNameTxt: Label 'TableMappingDefinition.json', Locked = true;
ExportTableMappingsDialogLbl: Label 'Export';
ImportTableMappingsDialogLbl: Label 'Import';
- TableSepartorCharacterTok: Label '$', Locked = true;
+ BCTableSeparatorTok: Label '$', Locked = true;
OpeningSquareBracketLbl: Label '[', Locked = true;
ClosingSquareBracketLbl: Label ']', Locked = true;
DboTok: Label 'dbo.', Locked = true;
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableType.Enum.al b/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableType.Enum.al
index af242e5ed1..e101a1d550 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableType.Enum.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/MigrationTableType.Enum.al
@@ -1,9 +1,9 @@
-namespace Microsoft.DataMigration;
-
// ------------------------------------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
+
+namespace Microsoft.DataMigration;
enum 4009 "Migration Table Type"
{
value(0; Table)
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/PostMigrationChecklist.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/PostMigrationChecklist.Table.al
index 4f947230b2..393cc55700 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/PostMigrationChecklist.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/PostMigrationChecklist.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 4008 "Post Migration Checklist"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/RecordLinkMapping.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/RecordLinkMapping.Table.al
index 0c0c4193fa..d5dba470a1 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/RecordLinkMapping.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/RecordLinkMapping.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40030 "Record Link Mapping"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRecordLinkBuffer.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRecordLinkBuffer.Table.al
index 0e4c1841aa..5b0482553b 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRecordLinkBuffer.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRecordLinkBuffer.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40029 "Replication Record Link Buffer"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRunCompletedArg.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRunCompletedArg.Table.al
index 1284e71f0f..245ae92ffe 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRunCompletedArg.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/ReplicationRunCompletedArg.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 40026 "Replication Run Completed Arg"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingSource.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingSource.Table.al
index 2f8ddc524f..18d3a8ce7d 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingSource.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingSource.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
table 4007 "User Mapping Source"
diff --git a/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingWork.Table.al b/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingWork.Table.al
index dd8c86dd75..6c296b2e00 100644
--- a/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingWork.Table.al
+++ b/Apps/W1/HybridBaseDeployment/app/src/tables/UserMappingWork.Table.al
@@ -1,3 +1,8 @@
+// ------------------------------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// ------------------------------------------------------------------------------------------------
+
namespace Microsoft.DataMigration;
using System.Security.AccessControl;
diff --git a/Apps/W1/HybridBaseDeployment/test/src/ADLMigrationTests.Codeunit.al b/Apps/W1/HybridBaseDeployment/test/src/ADLMigrationTests.Codeunit.al
index bff2f24f66..603b0bfe9d 100644
--- a/Apps/W1/HybridBaseDeployment/test/src/ADLMigrationTests.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/test/src/ADLMigrationTests.Codeunit.al
@@ -286,6 +286,7 @@ codeunit 139657 "ADL Migration Tests"
var
HybridReplicationSummary: Record "Hybrid Replication Summary";
NotificationHandler: Codeunit "Notification Handler";
+ EnvironmentInfoTestLibrary: Codeunit "Environment Info Test Library";
NotificationText: Text;
RunId: Text;
TriggerType: Text;
@@ -294,6 +295,7 @@ codeunit 139657 "ADL Migration Tests"
begin
// [SCENARIO 345772] Correct events are called after finishing ADL migration
Initialize();
+ EnvironmentInfoTestLibrary.SetTestabilitySoftwareAsAService(true);
LibraryHybridManagement.SetExpectedProduct(Product);
LibraryHybridManagement.SetExpectedRunId(RunId);
LibraryHybridManagement.SetAdlCleanedUp(false);
diff --git a/Apps/W1/HybridBaseDeployment/test/src/HybridCloudManagementTests.Codeunit.al b/Apps/W1/HybridBaseDeployment/test/src/HybridCloudManagementTests.Codeunit.al
index 8d94c25712..2f57af6fa5 100644
--- a/Apps/W1/HybridBaseDeployment/test/src/HybridCloudManagementTests.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/test/src/HybridCloudManagementTests.Codeunit.al
@@ -2,6 +2,7 @@ codeunit 139656 "Hybrid Cloud Management Tests"
{
Subtype = Test;
TestPermissions = Disabled;
+ TestType = UnitTest;
var
Assert: Codeunit Assert;
@@ -9,6 +10,9 @@ codeunit 139656 "Hybrid Cloud Management Tests"
Initialized: Boolean;
ExtensionRefreshFailureErr: Label 'Some extensions could not be updated and may need to be reinstalled to refresh their data.';
ExtensionRefreshUnexpectedFailureErr: Label 'Failed to update extensions. You may need to verify and reinstall any missing extensions if needed.';
+ TableNotMarkedForDeltaSyncErr: Label 'Table %1 was not correctly marked for delta sync';
+ IntelligentCloudStatusRecordNotFoundErr: Label 'Intelligent cloud status record for table %1 not found';
+ TableNotMarkedForReplicationErr: Label 'Table %1 was not correctly marked for replication';
local procedure Initialize()
var
@@ -16,6 +20,7 @@ codeunit 139656 "Hybrid Cloud Management Tests"
HybridDeploymentSetup: Record "Hybrid Deployment Setup";
HybridReplicationSummary: Record "Hybrid Replication Summary";
HybridReplicationDetail: Record "Hybrid Replication Detail";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
begin
if not Initialized then begin
HybridDeploymentSetup.DeleteAll();
@@ -23,6 +28,11 @@ codeunit 139656 "Hybrid Cloud Management Tests"
HybridDeploymentSetup.Insert();
BindSubscription(LibraryHybridManagement);
HybridDeploymentSetup.Get();
+
+ // Mark system tables as not replicated to avoid permission issues in tests
+ IntelligentCloudStatus.SetRange("Table Id", 2000000000, 2000100000);
+ if IntelligentCloudStatus.FindSet() then
+ IntelligentCloudStatus.DeleteAll();
end;
HybridReplicationDetail.DeleteAll();
@@ -468,6 +478,8 @@ codeunit 139656 "Hybrid Cloud Management Tests"
#pragma warning disable AA0210
IntelligentCloudStatus.SetRange("Replicate Data", false);
#pragma warning restore AA0210
+ // Exclude system tables (2000000000-2000100000) except for allowed Tenant Media tables
+ IntelligentCloudStatus.SetFilter("Table Id", '<%1|>%2', 2000000000, 2000100000);
IntelligentCloudStatus.FindFirst();
CloudMigSelectTables.Filter.SetFilter("Table Id", Format(IntelligentCloudStatus."Table Id"));
CloudMigSelectTables.IncludeTablesInMigration.Invoke();
@@ -532,6 +544,7 @@ codeunit 139656 "Hybrid Cloud Management Tests"
#pragma warning disable AA0210
IntelligentCloudStatus.SetRange("Company Name", '');
IntelligentCloudStatus.SetRange("Preserve Cloud Data", false);
+ IntelligentCloudStatus.SetFilter("Table Id", '<%1|>%2', 2000000000, 2000100000);
#pragma warning restore AA0210
if not IntelligentCloudStatus.FindFirst() then begin
IntelligentCloudStatus.SetRange("Preserve Cloud Data");
@@ -565,8 +578,12 @@ codeunit 139656 "Hybrid Cloud Management Tests"
OpenCloudMigSelectTablesPage(CloudMigSelectTables);
#pragma warning disable AA0210
IntelligentCloudStatus.SetRange("Preserve Cloud Data", true);
+ IntelligentCloudStatus.SetRange("Replicate Data", true);
#pragma warning restore AA0210
+ // Exclude system tables (2000000000-2000100000) except for allowed Tenant Media tables
+ IntelligentCloudStatus.SetFilter("Table Id", '<%1|>%2', 2000000000, 2000100000);
IntelligentCloudStatus.FindFirst();
+
CloudMigSelectTables.Filter.SetFilter("Table Id", Format(IntelligentCloudStatus."Table Id"));
CloudMigSelectTables.ReplaceSyncTables.Invoke();
@@ -722,7 +739,7 @@ codeunit 139656 "Hybrid Cloud Management Tests"
IntelligentCloudStatus: Record "Intelligent Cloud Status";
begin
// [THEN] The table is marked as included in replication
- Assert.AreEqual(ExpectedReplicateProperty, CloudMigSelectTables."Replicate Data".AsBoolean(), 'Table was not correctly marked for replication');
+ Assert.AreEqual(ExpectedReplicateProperty, CloudMigSelectTables."Replicate Data".AsBoolean(), StrSubstNo(TableNotMarkedForReplicationErr, SelectedTableId));
// [THEN] The log table is created and main intelligent cloud status table is updated
Assert.IsTrue(IntelligentCloudStatus.Get(CloudMigSelectTables."Table Name".Value, CloudMigSelectTables."Company Name".Value), 'Intelligent cloud status record not found');
@@ -738,10 +755,10 @@ codeunit 139656 "Hybrid Cloud Management Tests"
IntelligentCloudStatus: Record "Intelligent Cloud Status";
begin
// [THEN] The table is marked as included in replication
- Assert.AreEqual(ExpectedDeltaSyncProperty, CloudMigSelectTables."Preserve Cloud Data".AsBoolean(), 'Table was not correctly marked for delta sync');
+ Assert.AreEqual(ExpectedDeltaSyncProperty, CloudMigSelectTables."Preserve Cloud Data".AsBoolean(), StrSubstNo(TableNotMarkedForDeltaSyncErr, SelectedTableId));
// [THEN] The log table is created and main intelligent cloud status table is updated
- Assert.IsTrue(IntelligentCloudStatus.Get(CloudMigSelectTables."Table Name".Value, CloudMigSelectTables."Company Name".Value), 'Intelligent cloud status record not found');
+ Assert.IsTrue(IntelligentCloudStatus.Get(CloudMigSelectTables."Table Name".Value, CloudMigSelectTables."Company Name".Value), StrSubstNo(IntelligentCloudStatusRecordNotFoundErr, CloudMigSelectTables."Table Name".Value));
Assert.AreEqual(ExpectedDeltaSyncProperty, IntelligentCloudStatus."Preserve Cloud Data", 'Intelligent cloud status record not updated correctly');
Assert.IsTrue(CloudMigOverrideLog.FindLast(), 'Cloud migration override log record not found');
Assert.AreEqual(SelectedTableId, CloudMigOverrideLog."Table Id", 'Cloud migration override log record not updated correctly');
diff --git a/Apps/W1/HybridBaseDeployment/test/src/HybridWizardTests.Codeunit.al b/Apps/W1/HybridBaseDeployment/test/src/HybridWizardTests.Codeunit.al
index 430db83128..f57e107e3d 100644
--- a/Apps/W1/HybridBaseDeployment/test/src/HybridWizardTests.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/test/src/HybridWizardTests.Codeunit.al
@@ -39,7 +39,6 @@ codeunit 139650 "Hybrid Wizard Tests"
end;
[Test]
- [HandlerFunctions('ConfirmYesHandler')]
procedure TestWelcomePrivacyAgree()
var
HybridCloudSetupWizard: TestPage "Hybrid Cloud Setup Wizard";
@@ -61,7 +60,7 @@ codeunit 139650 "Hybrid Wizard Tests"
end;
[Test]
- [HandlerFunctions('ProductsPageHandler,ConfirmYesHandler')]
+ [HandlerFunctions('ProductsPageHandler')]
procedure TestStatusNotCompletedWhenNotFinished()
var
GuidedExperience: Codeunit "Guided Experience";
@@ -319,12 +318,6 @@ codeunit 139650 "Hybrid Wizard Tests"
Assert.IsFalse(HybridCloudSetupWizard.ActionFinish.Enabled(), 'Dynamics Product window ActionFinish should be disabled.');
end;
- [ConfirmHandler]
- procedure ConfirmYesHandler(Question: Text[1024]; var Reply: Boolean)
- begin
- Reply := true;
- end;
-
[ModalPageHandler]
procedure ConfirmDatabaseSizeLimitExceeded(var databaseSizeTooLargeDialog: TestPage "Database Size Too Large Dialog")
begin
diff --git a/Apps/W1/HybridBaseDeployment/test/src/ReplicationMgtPageTests.Codeunit.al b/Apps/W1/HybridBaseDeployment/test/src/ReplicationMgtPageTests.Codeunit.al
index d8fa0dc756..3c17dea12c 100644
--- a/Apps/W1/HybridBaseDeployment/test/src/ReplicationMgtPageTests.Codeunit.al
+++ b/Apps/W1/HybridBaseDeployment/test/src/ReplicationMgtPageTests.Codeunit.al
@@ -3,6 +3,7 @@ codeunit 139653 "Replication Mgt Page Tests"
// [FEATURE] [Intelligent Edge Hybrid Management Page]
Subtype = Test;
TestPermissions = Disabled;
+ TestType = UnitTest;
local procedure Initialize(IsSaas: Boolean)
var
@@ -10,6 +11,9 @@ codeunit 139653 "Replication Mgt Page Tests"
IntelligentCloudSetup: Record "Intelligent Cloud Setup";
HybridReplicationSummary: Record "Hybrid Replication Summary";
HybridReplicationDetail: Record "Hybrid Replication Detail";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ SettingupTableMapping: Record "Migration Setup Table Mapping";
GuidedExperience: Codeunit "Guided Experience";
AssistedSetupTestLibrary: Codeunit "Assisted Setup Test Library";
PermissionManager: Codeunit "Permission Manager";
@@ -30,9 +34,13 @@ codeunit 139653 "Replication Mgt Page Tests"
IntelligentCloudSetup."Company Creation Task Status" := IntelligentCloudSetup."Company Creation Task Status"::Completed;
IntelligentCloudSetup."Deployed Version" := 'V1.0';
IntelligentCloudSetup."Latest Version" := 'V2.0';
+ IntelligentCloudSetup."Custom Migration Enabled" := false;
IntelligentCloudSetup.Insert();
LibraryVariableStorage.AssertEmpty();
+ ReplicationTableMapping.DeleteAll();
+ SettingupTableMapping.DeleteAll();
+
if Initialized then
exit;
@@ -42,11 +50,341 @@ codeunit 139653 "Replication Mgt Page Tests"
BindSubscription(LibraryHybridManagement);
HybridDeploymentSetup.Get();
HybridCloudManagement.RefreshIntelligentCloudStatusTable();
+
+ // Mark system tables as not replicated to avoid permission issues in tests
+ IntelligentCloudStatus.SetRange("Table Id", 2000000000, 2000100000);
+ if IntelligentCloudStatus.FindSet() then
+ IntelligentCloudStatus.DeleteAll();
+
Commit();
Initialized := true;
end;
+ [Test]
+ procedure TestValidateTablesForReplicationTableMappingTable()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation succeeds when Replication Table Mapping contains a supported table with Replicate Data already enabled
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A table mapping exists for the Customer table
+ ReplicationTableMapping.Init();
+ ReplicationTableMapping."Source Sql Table Name" := 'Customer';
+ ReplicationTableMapping."Destination Sql Table Name" := 'Customer';
+ ReplicationTableMapping.Insert();
+
+ // [GIVEN] The Customer table exists in Intelligent Cloud Status with Replicate Data = true
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if not IntelligentCloudStatus.IsEmpty() then
+ IntelligentCloudStatus.ModifyAll("Replicate Data", true)
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::Customer;
+ IntelligentCloudStatus."Table Name" := 'Customer';
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Validate the tables for migration
+ HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] Validate successfully without any error.
+ end;
+
+ [Test]
+ procedure TestValidateTablesForReplicationTableMappingTableWithFalseReplicateData()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation succeeds and automatically enables Replicate Data for tables in Replication Table Mapping
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A table mapping exists for the Customer table
+ ReplicationTableMapping.Init();
+ ReplicationTableMapping."Source Sql Table Name" := 'Customer';
+ ReplicationTableMapping."Destination Sql Table Name" := 'Customer';
+ ReplicationTableMapping.Insert();
+
+ // [GIVEN] The Customer table exists in Intelligent Cloud Status with Replicate Data = false
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if not IntelligentCloudStatus.IsEmpty() then
+ IntelligentCloudStatus.ModifyAll("Replicate Data", false)
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::Customer;
+ IntelligentCloudStatus."Table Name" := 'Customer';
+ IntelligentCloudStatus."Replicate Data" := false;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Prepare tables for custom migration
+ HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] Validation succeeds and Replicate Data is automatically set to true for the Customer table
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if IntelligentCloudStatus.FindSet() then
+ repeat
+ Assert.AreEqual(true, IntelligentCloudStatus."Replicate Data", 'Replicate Data should be set to true for Customer table');
+ until IntelligentCloudStatus.Next() = 0;
+ end;
+
+ [Test]
+ procedure TestValidateTablesForReplicationTableMappingPlatformTableNotSupported()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation fails when Replication Table Mapping includes an internal/sensitive platform table
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A table mapping exists for the Access Control platform table
+ ReplicationTableMapping.Init();
+ ReplicationTableMapping."Source Sql Table Name" := 'Access Control';
+ ReplicationTableMapping."Destination Sql Table Name" := 'Access Control';
+ ReplicationTableMapping.Insert();
+
+ // [GIVEN] The Access Control table is marked for replication in Intelligent Cloud Status
+ IntelligentCloudStatus.SetRange("Table Name", 'Access Control');
+ if not IntelligentCloudStatus.IsEmpty() then
+ IntelligentCloudStatus.ModifyAll("Replicate Data", true)
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::"Access Control";
+ IntelligentCloudStatus."Table Name" := 'Access Control';
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Validate the tables for migration
+ asserterror HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] An error is thrown indicating the internal table cannot be replicated
+ Assert.ExpectedError('The replication properties of the following tables cannot be changed because they are internal. Changing the replication of the sensitive tables is not allowed: Access Control');
+ end;
+
+ [Test]
+ procedure TestValidateTablesForReplicationTableMappingNonExistingTable()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ ReplicationTableMapping: Record "Replication Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation fails when Replication Table Mapping includes a table not configured for replication
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A table mapping exists for a non-existing table named 'NonExistingTable'
+ ReplicationTableMapping.Init();
+ ReplicationTableMapping."Source Sql Table Name" := 'NonExistingTable';
+ ReplicationTableMapping."Destination Sql Table Name" := 'NonExistingTable';
+ ReplicationTableMapping.Insert();
+
+ // [WHEN] Validate the tables for migration
+ asserterror HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] An error is thrown because the table does not exist and its replication properties cannot be changed
+ Assert.ExpectedError('The following tables do not exist in SaaS: NonExistingTable');
+ end;
+
+ [Test]
+ procedure TestValidateTablesForSetupTableMapping()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ MigrationSetupMapping: Record "Migration Setup Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation succeeds when Migration Setup Table Mapping contains a supported table with Replicate Data already enabled
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ IntelligentCloudStatus.Init();
+
+ // [GIVEN] A Migration Setup Table Mapping exists for the Customer table
+ MigrationSetupMapping.DeleteAll();
+ MigrationSetupMapping.Init();
+ MigrationSetupMapping."Destination Sql Table Name" := 'Customer';
+ MigrationSetupMapping."Source Sql Table Name" := 'Customer';
+ MigrationSetupMapping.Insert();
+
+ // [GIVEN] The Customer table exists in Intelligent Cloud Status with Replicate Data = true
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if not IntelligentCloudStatus.IsEmpty() then
+ IntelligentCloudStatus.ModifyAll("Replicate Data", true)
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::Customer;
+ IntelligentCloudStatus."Table Name" := 'Customer';
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Prepare tables for custom migration
+ HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] Validation succeeds without any error
+ end;
+
+ [Test]
+ procedure TestValidateTablesForSetupTableMappingWithFalseReplicateData()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ MigrationSetupMapping: Record "Migration Setup Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation succeeds and automatically enables Replicate Data for tables in Migration Setup Table Mapping
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ IntelligentCloudStatus.Init();
+
+ // [GIVEN] A Migration Setup Table Mapping exists for the Customer table
+ MigrationSetupMapping.DeleteAll();
+ MigrationSetupMapping.Init();
+ MigrationSetupMapping."Destination Sql Table Name" := 'Customer';
+ MigrationSetupMapping."Source Sql Table Name" := 'Customer';
+ MigrationSetupMapping.Insert();
+
+ // [GIVEN] The Customer table exists in Intelligent Cloud Status with Replicate Data = false
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if not IntelligentCloudStatus.IsEmpty() then
+ IntelligentCloudStatus.ModifyAll("Replicate Data", false)
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::Customer;
+ IntelligentCloudStatus."Table Name" := 'Customer';
+ IntelligentCloudStatus."Replicate Data" := false;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Prepare tables for custom migration
+ HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] Validation succeeds and Replicate Data is automatically set to true for the Customer table
+ IntelligentCloudStatus.SetRange("Table Name", 'Customer');
+ if IntelligentCloudStatus.FindSet() then
+ repeat
+ Assert.AreEqual(true, IntelligentCloudStatus."Replicate Data", 'Replicate Data should be set to true for Customer table');
+ until IntelligentCloudStatus.Next() = 0;
+ end;
+
+ [Test]
+ procedure TestValidateTablesForSetupTableMappingPlatformTableNotSupported()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ IntelligentCloudStatus: Record "Intelligent Cloud Status";
+ MigrationSetupMapping: Record "Migration Setup Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation fails when Migration Setup Table Mapping includes an internal/sensitive platform table
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A migration table mapping exists for the Access Control platform table
+ MigrationSetupMapping.Init();
+ MigrationSetupMapping."Destination Sql Table Name" := 'Access Control';
+ MigrationSetupMapping."Source Sql Table Name" := 'Access Control';
+ MigrationSetupMapping.Insert();
+
+ // [GIVEN] The Access Control table is marked for replication in Intelligent Cloud Status
+ IntelligentCloudStatus.SetRange("Table Name", 'Access Control');
+ if not IntelligentCloudStatus.IsEmpty() then begin
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Modify();
+ end
+ else begin
+ IntelligentCloudStatus.Init();
+ IntelligentCloudStatus."Table Id" := Database::"Access Control";
+ IntelligentCloudStatus."Table Name" := 'Access Control';
+ IntelligentCloudStatus."Replicate Data" := true;
+ IntelligentCloudStatus.Insert();
+ end;
+
+ // [WHEN] Validate the tables for migration
+ asserterror HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] An error is thrown indicating the internal table cannot be replicated
+ Assert.ExpectedError('The replication properties of the following tables cannot be changed because they are internal. Changing the replication of the sensitive tables is not allowed: Access Control');
+ end;
+
+ [Test]
+ procedure TestValidateTablesForSetupTableMappingNonExistingTable()
+ var
+ IntelligentCloudSetup: Record "Intelligent Cloud Setup";
+ MigrationSetupMapping: Record "Migration Setup Table Mapping";
+ HybridCloudManagement: Codeunit "Hybrid Cloud Management";
+ begin
+ // [SCENARIO] Custom migration validation fails when Migration Setup Table Mapping includes a table not configured for replication
+ Initialize(true);
+
+ // [GIVEN] Custom migration is enabled in the Intelligent Cloud Setup
+ if IntelligentCloudSetup.Get() then begin
+ IntelligentCloudSetup."Custom Migration Enabled" := true;
+ IntelligentCloudSetup.Modify();
+ end;
+
+ // [GIVEN] A migration table mapping exists for a non-existing table named 'NonExistingTable'
+ MigrationSetupMapping.Init();
+ MigrationSetupMapping."Destination Sql Table Name" := 'NonExistingTable';
+ MigrationSetupMapping."Source Sql Table Name" := 'NonExistingTable';
+ MigrationSetupMapping.Insert();
+
+ // [WHEN] Validate the tables for migration
+ asserterror HybridCloudManagement.PrepareTablesForCustomMigration();
+
+ // [THEN] An error is thrown because the table does not exist and its replication properties cannot be changed
+ Assert.ExpectedError('The following tables do not exist in SaaS: NonExistingTable');
+ end;
+
[Test]
[HandlerFunctions('ConfirmYesHandler,GeneralMessageHandler')]
procedure TestRunReplicationNow()
@@ -55,7 +393,6 @@ codeunit 139653 "Replication Mgt Page Tests"
CloudMigrationManagement: TestPage "Cloud Migration Management";
begin
// [SCENARIO] User Opens up the Hybrid Replication Management Page and clicks 'Run Replication Now' button on the ribbon.
-
// Remove Inprogress and Failed run records for past 24 hrs
HybridReplicationSummary.SetFilter("Start Time", '>%1', (CurrentDateTime() - 86400000));
if not HybridReplicationSummary.IsEmpty() then begin
diff --git a/Apps/W1/HybridGP/app/src/codeunits/HybridGPWizard.codeunit.al b/Apps/W1/HybridGP/app/src/codeunits/HybridGPWizard.codeunit.al
index c8e4926357..e958977747 100644
--- a/Apps/W1/HybridGP/app/src/codeunits/HybridGPWizard.codeunit.al
+++ b/Apps/W1/HybridGP/app/src/codeunits/HybridGPWizard.codeunit.al
@@ -1,6 +1,7 @@
namespace Microsoft.DataMigration.GP;
using Microsoft.DataMigration;
+using Microsoft.Utilities;
using System.Environment;
codeunit 4015 "Hybrid GP Wizard"
@@ -50,12 +51,12 @@ codeunit 4015 "Hybrid GP Wizard"
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Companies IC", 'OnBeforeCreateCompany', '', false, false)]
- local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Option "Evaluation Data","Standard Data","None","Extended Data","Full No Data")
+ local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Enum "Company Demo Data Type")
begin
if not CanHandle(ProductId) then
exit;
- CompanyDataType := CompanyDataType::"Standard Data";
+ CompanyDataType := CompanyDataType::"Production - Setup Data Only";
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Hybrid Cloud Management", 'OnGetHybridProductDescription', '', false, false)]
diff --git a/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAccountMigrator.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAccountMigrator.Codeunit.al
index 54b04640be..c1bae27536 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAccountMigrator.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAccountMigrator.Codeunit.al
@@ -183,7 +183,7 @@ codeunit 47000 "SL Account Migrator"
NbrOfSegments := SLPopulateAccountHistory.GetNumberOfSegments();
PostingGroupCode := PostingGroupCodeTxt + Format(InitialYear) + BeginningBalancePeriodTxt;
- SLAcctHist.SetRange(CpnyID, CompanyName());
+ SLAcctHist.SetRange(CpnyID, GetCpnyID());
SLAcctHist.SetRange(Acct, SLAcccountStaging.AcctNum);
SLAcctHist.SetRange(LedgerID, SLGLSetup.LedgerID);
SLAcctHist.SetRange(FiscYr, Format(InitialYear));
@@ -524,4 +524,9 @@ codeunit 47000 "SL Account Migrator"
CodeText := CopyStr(CodeText.Trim(), 1, MaxStrLen(CodeText));
exit(CodeText = '');
end;
+
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAcctHist.Table.al b/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAcctHist.Table.al
index d8e81b8843..675b8ec7be 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAcctHist.Table.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Accounts/SLAcctHist.Table.al
@@ -37,7 +37,7 @@ table 47007 "SL AcctHist"
{
Caption = 'BegBal';
}
- field(7; CpnyID; Text[30])
+ field(7; CpnyID; Text[10])
{
Caption = 'CpnyID';
}
diff --git a/Apps/W1/HybridSL/app/src/Migration/Customers/SLCustomerMigrator.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/Customers/SLCustomerMigrator.Codeunit.al
index 892de78279..e25b9dcb22 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Customers/SLCustomerMigrator.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Customers/SLCustomerMigrator.Codeunit.al
@@ -250,7 +250,7 @@ codeunit 47018 "SL Customer Migrator"
exit;
Sender.CreateGeneralJournalBatchIfNeeded(CopyStr(CustomerBatchNameTxt, 1, MaxStrLen(CustomerBatchNameTxt)), '', '');
- SLARDoc.SetRange(CpnyID, CompanyName);
+ SLARDoc.SetRange(CpnyID, GetCpnyID());
SLARDoc.SetRange(CustId, SLCustomer.CustId);
SLARDoc.SetFilter(DocType, '%1|%2|%3|%4|%5', ARDocTypeInvoiceTxt, ARDocTypeCashSaleTxt, ARDocTypeDebitMemoTxt, ARDocTypeSmallCreditTxt, ARDocTypeNSFCheckChargeTxt); //Invoices
SLARDoc.SetFilter(DocBal, '<>%1', 0);
@@ -295,7 +295,7 @@ codeunit 47018 "SL Customer Migrator"
until SLARDoc.Next() = 0;
SLARDoc.Reset();
- SLARDoc.SetRange(CpnyID, CompanyName);
+ SLARDoc.SetRange(CpnyID, GetCpnyID());
SLARDoc.SetRange(CustId, SLCustomer.CustId);
SLARDoc.SetFilter(DocType, '%1|%2', ARDocTypePaymentTxt, ARDocTypePaymentPrepaymentTxt); //Payments
SLARDoc.SetFilter(DocBal, '<>%1', 0);
@@ -331,7 +331,7 @@ codeunit 47018 "SL Customer Migrator"
until SLARDoc.Next() = 0;
SLARDoc.Reset();
- SLARDoc.SetRange(CpnyID, CompanyName);
+ SLARDoc.SetRange(CpnyID, GetCpnyID());
SLARDoc.SetRange(CustId, SLCustomer.CustId);
SLARDoc.SetFilter(DocType, '%1|%2|%3', ARDocTypeCreditMemoTxt, ARDocTypeSmallBalanceTxt, ARDocTypeNSFReversalTxt); //Credit Memos
SLARDoc.SetFilter(DocBal, '<>%1', 0);
@@ -390,7 +390,7 @@ codeunit 47018 "SL Customer Migrator"
until SLARDoc.Next() = 0;
SLARDoc.Reset();
- SLARDoc.SetRange(CpnyID, CompanyName);
+ SLARDoc.SetRange(CpnyID, GetCpnyID());
SLARDoc.SetRange(CustId, SLCustomer.CustId);
SLARDoc.SetRange(DocType, ARDocTypeFinanceChargeTxt); // Finance Charge
SLARDoc.SetFilter(DocBal, '<>%1', 0);
@@ -433,4 +433,9 @@ codeunit 47018 "SL Customer Migrator"
end;
until SLARDoc.Next() = 0;
end;
+
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/HybridSL/app/src/Migration/History/SLAPDocBuffer.Table.al b/Apps/W1/HybridSL/app/src/Migration/History/SLAPDocBuffer.Table.al
index 01f04ce00b..6fd1a3ae33 100644
--- a/Apps/W1/HybridSL/app/src/Migration/History/SLAPDocBuffer.Table.al
+++ b/Apps/W1/HybridSL/app/src/Migration/History/SLAPDocBuffer.Table.al
@@ -65,7 +65,7 @@ table 47073 "SL APDoc Buffer"
{
Caption = 'CodeType';
}
- field(14; CpnyID; Text[30])
+ field(14; CpnyID; Text[10])
{
Caption = 'CpnyID';
}
diff --git a/Apps/W1/HybridSL/app/src/Migration/History/SLARDocBuffer.Table.al b/Apps/W1/HybridSL/app/src/Migration/History/SLARDocBuffer.Table.al
index a5fd812873..2a6ec09824 100644
--- a/Apps/W1/HybridSL/app/src/Migration/History/SLARDocBuffer.Table.al
+++ b/Apps/W1/HybridSL/app/src/Migration/History/SLARDocBuffer.Table.al
@@ -73,7 +73,7 @@ table 47074 "SL ARDoc Buffer"
{
Caption = 'ContractID';
}
- field(16; CpnyID; Text[30])
+ field(16; CpnyID; Text[10])
{
Caption = 'CpnyID';
}
diff --git a/Apps/W1/HybridSL/app/src/Migration/History/SLBatch.Table.al b/Apps/W1/HybridSL/app/src/Migration/History/SLBatch.Table.al
index 49862ff407..e99460b433 100644
--- a/Apps/W1/HybridSL/app/src/Migration/History/SLBatch.Table.al
+++ b/Apps/W1/HybridSL/app/src/Migration/History/SLBatch.Table.al
@@ -57,7 +57,7 @@ table 47027 "SL Batch"
{
Caption = 'Cleared';
}
- field(12; CpnyID; Text[30])
+ field(12; CpnyID; Text[10])
{
Caption = 'CpnyID';
}
diff --git a/Apps/W1/HybridSL/app/src/Migration/History/SLPopulateHistTables.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/History/SLPopulateHistTables.Codeunit.al
index a07feb4383..1ada298a5a 100644
--- a/Apps/W1/HybridSL/app/src/Migration/History/SLPopulateHistTables.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/History/SLPopulateHistTables.Codeunit.al
@@ -104,7 +104,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId: Integer;
begin
SourceTableId := Database::"SL GLSetup";
- SLGLSetup.SetFilter(CpnyId, '= %1', CompanyName);
+ SLGLSetup.SetFilter(CpnyId, '= %1', GetCpnyID());
if not SLGLSetup.FindSet() then
exit;
@@ -129,7 +129,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId := Database::"SL GLTran Buffer";
if InitialHistYear > 0 then
SLGLTran.SetFilter(PerPost, '>= %1', Format(InitialHistYear));
- SLGLTran.SetFilter(CpnyID, '= %1', CompanyName);
+ SLGLTran.SetFilter(CpnyID, '= %1', GetCpnyID());
SLGLTran.SetFilter(Posted, '= %1', PostedTxt);
if not SLGLTran.FindSet() then
exit;
@@ -157,7 +157,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId := Database::"SL Batch";
if InitialHistYear > 0 then
SLBatch.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLBatch.SetFilter(CpnyID, '= %1', CompanyName);
+ SLBatch.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLBatch.FindSet() then
exit;
@@ -198,7 +198,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId := Database::"SL APDoc Buffer";
if InitialHistYear > 0 then
SLAPDoc.SetFilter(PerPost, '>= %1', Format(InitialHistYear));
- SLAPDoc.SetFilter(CpnyID, '= %1', CompanyName);
+ SLAPDoc.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLAPDoc.FindSet() then
exit;
@@ -225,7 +225,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId := Database::"SL APTran Buffer";
if InitialHistYear > 0 then
SLAPTran.SetFilter(PerPost, '>= %1', Format(InitialHistYear));
- SLAPTran.SetFilter(CpnyID, '= %1', CompanyName);
+ SLAPTran.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLAPTran.FindSet() then
exit;
@@ -295,7 +295,7 @@ codeunit 47025 "SL Populate Hist. Tables"
SourceTableId := Database::"SL ARDoc Buffer";
if InitialHistYear > 0 then
SLARDoc.SetFilter(PerPost, '>= %1', Format(InitialHistYear));
- SLARDoc.SetFilter(CpnyID, '= %1', CompanyName);
+ SLARDoc.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLARDoc.FindSet() then
exit;
@@ -325,7 +325,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLARTran.SetFilter(TranDate, '>= %1', InitialYearDate);
- SLARTran.SetFilter(CpnyID, '= %1', CompanyName);
+ SLARTran.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLARTran.FindSet() then
exit;
@@ -382,7 +382,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLSOHeader.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLSOHeader.SetFilter(CpnyID, '= %1', CompanyName);
+ SLSOHeader.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLSOHeader.FindSet() then
exit;
@@ -413,7 +413,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLSOLine.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLSOLine.SetFilter(CpnyID, '= %1', CompanyName);
+ SLSOLine.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLSOLine.FindSet() then
exit;
@@ -444,7 +444,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLSOShipHeader.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLSOShipHeader.SetFilter(CpnyID, '= %1', CompanyName);
+ SLSOShipHeader.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLSOShipHeader.FindSet() then
exit;
@@ -508,7 +508,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLSOType.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLSOType.SetFilter(CpnyID, '= %1', CompanyName);
+ SLSOType.SetFilter(CpnyID, '= %1', GetCpnyID());
SLSOType.SetFilter(Active, '<> %1', Inactive);
if not SLSOType.FindSet() then
@@ -551,7 +551,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLINTran.SetFilter(TranDate, '>= %1', InitialDateTime);
- SLINTran.SetFilter(CpnyID, '= %1', CompanyName);
+ SLINTran.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLINTran.FindSet() then
exit;
@@ -582,7 +582,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLLotSerT.SetFilter(TranDate, '>= %1', InitialDateTime);
- SLLotSerT.SetFilter(CpnyID, '= %1', CompanyName);
+ SLLotSerT.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLLotSerT.FindSet() then
exit;
@@ -626,7 +626,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLPOTran.SetFilter(TranDate, '>= %1', InitialDateTime);
- SLPOTran.SetFilter(CpnyID, '= %1', CompanyName);
+ SLPOTran.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLPOTran.FindSet() then
exit;
@@ -657,7 +657,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLPOReceipt.SetFilter(RcptDate, '>= %1', InitialDateTime);
- SLPOReceipt.SetFilter(CpnyID, '= %1', CompanyName);
+ SLPOReceipt.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLPOReceipt.FindSet() then
exit;
@@ -688,7 +688,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLPurOrdDet.SetFilter(Crtd_DateTime, '>= %1', InitialDateTime);
- SLPurOrdDet.SetFilter(CpnyID, '= %1', CompanyName);
+ SLPurOrdDet.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLPurOrdDet.FindSet() then
exit;
@@ -719,7 +719,7 @@ codeunit 47025 "SL Populate Hist. Tables"
if InitialHistYear > 0 then
SLPurchOrd.SetFilter(PODate, '>= %1', InitialDateTime);
- SLPurchOrd.SetFilter(CpnyID, '= %1', CompanyName);
+ SLPurchOrd.SetFilter(CpnyID, '= %1', GetCpnyID());
if not SLPurchOrd.FindSet() then
exit;
@@ -792,6 +792,11 @@ codeunit 47025 "SL Populate Hist. Tables"
SLHistSourceError.Delete();
end;
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
+
[IntegrationEvent(false, false)]
local procedure OnBeforeRunSLPopulateHistTables(var IsHandled: Boolean; var OverrideCommitAfterXRecordCount: Integer)
begin
diff --git a/Apps/W1/HybridSL/app/src/Migration/Projects/SLProjectMigrator.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/Projects/SLProjectMigrator.Codeunit.al
index 48ef073dfa..3d78d56411 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Projects/SLProjectMigrator.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Projects/SLProjectMigrator.Codeunit.al
@@ -70,7 +70,7 @@ codeunit 47006 "SL Project Migrator"
else
SLPJEmploy.SetRange(emp_status, StatusActiveTxt);
- SLPJEmploy.SetRange(CpnyId, CompanyName);
+ SLPJEmploy.SetRange(CpnyId, GetCpnyID());
if not SLPJEmploy.FindSet() then
exit;
repeat
@@ -80,7 +80,7 @@ codeunit 47006 "SL Project Migrator"
// Active SL PJEquip records only
SLPJEquip.SetRange(status, StatusActiveTxt);
- SLPJEquip.SetRange(CpnyId, CompanyName);
+ SLPJEquip.SetRange(CpnyId, GetCpnyID());
if not SLPJEquip.FindSet() then
exit;
repeat
@@ -188,7 +188,7 @@ codeunit 47006 "SL Project Migrator"
else
ProjectStatusFilter := StatusActiveTxt;
SLPJProj.SetFilter(status_pa, ProjectStatusFilter);
- SLPJProj.SetRange(CpnyId, CompanyName);
+ SLPJProj.SetRange(CpnyId, GetCpnyID());
if not SLPJProj.FindSet() then
exit;
repeat
@@ -315,4 +315,9 @@ codeunit 47006 "SL Project Migrator"
ProjectTask.Insert(true);
until SLPJPent.Next() = 0;
end;
+
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/HybridSL/app/src/Migration/SLTables/SLPopulateAccountHistory.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/SLTables/SLPopulateAccountHistory.Codeunit.al
index 469b774096..aa34571c1a 100644
--- a/Apps/W1/HybridSL/app/src/Migration/SLTables/SLPopulateAccountHistory.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/SLTables/SLPopulateAccountHistory.Codeunit.al
@@ -32,7 +32,7 @@ codeunit 47002 "SL Populate Account History"
if SLGLAcctBalByPeriod.FindFirst() then
SLGLAcctBalByPeriod.DeleteAll();
- AccountQuery.SetRange(CpnyID, CompanyName().Trim());
+ AccountQuery.SetRange(CpnyID, GetCpnyID());
AccountQuery.SetRange(LedgerID, SLLedgerID);
AccountQuery.SetFilter(Active, '=%1', 1);
AccountQuery.SetFilter(Acct, '<> %1', SLYtdNetIncAcct);
@@ -227,6 +227,11 @@ codeunit 47002 "SL Populate Account History"
end;
end;
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
+
var
SegLen1: Integer;
SegLen2: Integer;
diff --git a/Apps/W1/HybridSL/app/src/Migration/Support/SLHelperFunctions.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/Support/SLHelperFunctions.Codeunit.al
index f781c228de..74903c0f74 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Support/SLHelperFunctions.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Support/SLHelperFunctions.Codeunit.al
@@ -591,8 +591,8 @@ codeunit 47023 "SL Helper Functions"
var
GeneralLedgerSetup: Record "General Ledger Setup";
SLSegments: Record "SL Segments";
- GlobalDimension1Code: Text[20];
- GlobalDimension2Code: Text[20];
+ GlobalDimension1Code: Code[20];
+ GlobalDimension2Code: Code[20];
Modified: Boolean;
i: Integer;
begin
diff --git a/Apps/W1/HybridSL/app/src/Migration/Vendors/SLAPBalances.Table.al b/Apps/W1/HybridSL/app/src/Migration/Vendors/SLAPBalances.Table.al
index 55cbd97e27..96ca564305 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Vendors/SLAPBalances.Table.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Vendors/SLAPBalances.Table.al
@@ -12,7 +12,7 @@ table 47046 "SL AP_Balances"
fields
{
- field(1; CpnyID; Text[30])
+ field(1; CpnyID; Text[10])
{
Caption = 'CpnyID';
}
diff --git a/Apps/W1/HybridSL/app/src/Migration/Vendors/SLVendorMigrator.Codeunit.al b/Apps/W1/HybridSL/app/src/Migration/Vendors/SLVendorMigrator.Codeunit.al
index 10bca00e94..a0fda6a132 100644
--- a/Apps/W1/HybridSL/app/src/Migration/Vendors/SLVendorMigrator.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/Migration/Vendors/SLVendorMigrator.Codeunit.al
@@ -190,7 +190,7 @@ codeunit 47021 "SL Vendor Migrator"
exit;
Sender.CreateGeneralJournalBatchIfNeeded(CopyStr(VendorBatchNameTxt, 1, MaxStrLen(VendorBatchNameTxt)), '', '');
- SLAPDoc.SetRange(CpnyID, CompanyName);
+ SLAPDoc.SetRange(CpnyID, GetCpnyID());
SLAPDoc.SetRange(VendId, SLVendor.VendId);
SLAPDoc.SetRange(DocType, APDocTypePrePaymentTxt); // Payment
SLAPDoc.SetFilter(DocBal, '<>%1', 0);
@@ -227,7 +227,7 @@ codeunit 47021 "SL Vendor Migrator"
until SLAPDoc.Next() = 0;
SLAPDoc.Reset();
- SLAPDoc.SetRange(CpnyID, CompanyName);
+ SLAPDoc.SetRange(CpnyID, GetCpnyID());
SLAPDoc.SetRange(VendId, SLVendor.VendId);
SLAPDoc.SetFilter(DocType, '%1|%2', APDocTypeVoucherTxt, APDocTypeAdjustmentCreditTxt); // Invoice
SLAPDoc.SetFilter(DocBal, '<>%1', 0);
@@ -272,7 +272,7 @@ codeunit 47021 "SL Vendor Migrator"
until SLAPDoc.Next() = 0;
SLAPDoc.Reset();
- SLAPDoc.SetRange(CpnyID, CompanyName);
+ SLAPDoc.SetRange(CpnyID, GetCpnyID());
SLAPDoc.SetRange(VendId, SLVendor.VendId);
SLAPDoc.SetFilter(DocType, APDocTypeAdjustmentDebitTxt); // Credit Memo
SLAPDoc.SetFilter(DocBal, '<>%1', 0);
@@ -386,4 +386,9 @@ codeunit 47021 "SL Vendor Migrator"
Sender.SetVendorPostingGroup(SLVendClass.ClassID);
Sender.ModifyVendor(true);
end;
+
+ internal procedure GetCpnyID(): Text[10]
+ begin
+ exit(CopyStr(CompanyName(), 1, 10));
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al b/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al
index d3fd9546b5..0bea7a71cc 100644
--- a/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al
+++ b/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al
@@ -6,6 +6,7 @@
namespace Microsoft.DataMigration.SL;
using Microsoft.DataMigration;
+using Microsoft.Utilities;
using System.Environment;
codeunit 47012 "SL Hybrid Wizard"
@@ -63,13 +64,12 @@ codeunit 47012 "SL Hybrid Wizard"
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Create Companies IC", OnBeforeCreateCompany, '', false, false)]
- local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Option "Evaluation Data","Standard Data",None,"Extended Data","Full No Data")
+ local procedure HandleOnBeforeCreateCompany(ProductId: Text; var CompanyDataType: Enum "Company Demo Data Type")
begin
-
if not CanHandle(ProductId) then
exit;
- CompanyDataType := CompanyDataType::"Standard Data";
+ CompanyDataType := CompanyDataType::"Production - Setup Data Only";
end;
internal procedure CanHandle(productId: Text): Boolean
diff --git a/Apps/W1/HybridSL/test/app.json b/Apps/W1/HybridSL/test/app.json
index 775daa4a96..f664f47645 100644
--- a/Apps/W1/HybridSL/test/app.json
+++ b/Apps/W1/HybridSL/test/app.json
@@ -41,7 +41,7 @@
"idRanges": [
{
"from": 147600,
- "to": 147620
+ "to": 147640
}
],
"resourceExposurePolicy": {
diff --git a/Apps/W1/HybridSL/test/src/SLAPDocBufferData.XmlPort.al b/Apps/W1/HybridSL/test/src/SLAPDocBufferData.XmlPort.al
index ff38a3a3d8..ba5ba12ba9 100644
--- a/Apps/W1/HybridSL/test/src/SLAPDocBufferData.XmlPort.al
+++ b/Apps/W1/HybridSL/test/src/SLAPDocBufferData.XmlPort.al
@@ -102,7 +102,7 @@ xmlport 147633 "SL APDoc Buffer Data"
SLAPDocBuffer.RefNbr := RefNbr;
Evaluate(SLAPDocBuffer.RecordID, RecordID);
SLAPDocBuffer.BatNbr := BatchNbr;
- SLAPDocBuffer.CpnyID := CpnyID;
+ SLAPDocBuffer.CpnyID := CopyStr(CpnyID, 1, MaxStrLen(SLAPDocBuffer.CpnyID));
Evaluate(SLAPDocBuffer.DocBal, DocBal);
Evaluate(SLAPDocBuffer.DocDate, DocDate);
SLAPDocBuffer.DocDesc := DocDesc;
diff --git a/Apps/W1/HybridSL/test/src/SLARDocBufferData.XmlPort.al b/Apps/W1/HybridSL/test/src/SLARDocBufferData.XmlPort.al
index 4f6c99178f..a23b037181 100644
--- a/Apps/W1/HybridSL/test/src/SLARDocBufferData.XmlPort.al
+++ b/Apps/W1/HybridSL/test/src/SLARDocBufferData.XmlPort.al
@@ -92,7 +92,7 @@ xmlport 147631 "SL ARDoc Buffer Data"
SLARDocBuffer.RefNbr := RefNbr;
SLARDocBuffer.BatNbr := BatNbr;
Evaluate(SLARDocBuffer.BatSeq, BatSeq);
- SLARDocBuffer.CpnyID := CpnyID;
+ SLARDocBuffer.CpnyID := CopyStr(CpnyID, 1, MaxStrLen(SLARDocBuffer.CpnyID));
Evaluate(SLARDocBuffer.DocBal, DocBal);
Evaluate(SLARDocBuffer.DocDate, DocDate);
SLARDocBuffer.DocDesc := DocDesc;
diff --git a/Apps/W1/HybridSL/test/src/SLAcctHistData.XmlPort.al b/Apps/W1/HybridSL/test/src/SLAcctHistData.XmlPort.al
index 1c0a920e7e..b90eebcd08 100644
--- a/Apps/W1/HybridSL/test/src/SLAcctHistData.XmlPort.al
+++ b/Apps/W1/HybridSL/test/src/SLAcctHistData.XmlPort.al
@@ -93,7 +93,7 @@ xmlport 147608 "SL AcctHist Data"
currXMLport.Skip();
end;
- SLAcctHist.CpnyID := CpnyID;
+ SLAcctHist.CpnyID := CopyStr(CpnyID, 1, MaxStrLen(SLAcctHist.CpnyID));
SLAcctHist.Acct := Acct;
SLAcctHist.Sub := Sub;
SLAcctHist.LedgerID := LedgerID;
diff --git a/Apps/W1/HybridSL/test/src/SLBatchData.XmlPort.al b/Apps/W1/HybridSL/test/src/SLBatchData.XmlPort.al
index d219a2e4d6..26777e6a69 100644
--- a/Apps/W1/HybridSL/test/src/SLBatchData.XmlPort.al
+++ b/Apps/W1/HybridSL/test/src/SLBatchData.XmlPort.al
@@ -66,7 +66,7 @@ xmlport 147632 "SL Batch Data"
SLBatch.Module := Module;
SLBatch.BatNbr := BatNbr;
SLBatch.Acct := Acct;
- SLBatch.CpnyID := CpnyID;
+ SLBatch.CpnyID := CopyStr(CpnyID, 1, MaxStrLen(SLBatch.CpnyID));
SLBatch.JrnlType := JrnlType;
SLBatch.LedgerID := LedgerID;
Evaluate(SLBatch.Rlsed, Rlsed);
diff --git a/Apps/W1/HybridSL/test/src/SLCustomerMigratorTests.CodeUnit.al b/Apps/W1/HybridSL/test/src/SLCustomerMigratorTests.CodeUnit.al
index 44fc293b10..934c301236 100644
--- a/Apps/W1/HybridSL/test/src/SLCustomerMigratorTests.CodeUnit.al
+++ b/Apps/W1/HybridSL/test/src/SLCustomerMigratorTests.CodeUnit.al
@@ -9,7 +9,6 @@ using Microsoft.Foundation.Address;
using Microsoft.Foundation.Shipping;
using Microsoft.Sales.Customer;
using System.Integration;
-using System.Integration;
using System.TestLibraries.Utilities;
codeunit 147600 "SL Customer Migrator Tests"
diff --git a/Apps/W1/HybridSL/test/src/SLGLSetupData.XmlPort.al b/Apps/W1/HybridSL/test/src/SLGLSetupData.XmlPort.al
index 538d86c80f..76310819b6 100644
--- a/Apps/W1/HybridSL/test/src/SLGLSetupData.XmlPort.al
+++ b/Apps/W1/HybridSL/test/src/SLGLSetupData.XmlPort.al
@@ -101,7 +101,7 @@ xmlport 147609 "SL GLSetup Data"
SLGLSetup.SetupId := SetupId;
Evaluate(SLGLSetup.BegFiscalYr, BegFiscalYr);
- SLGLSetup.CpnyId := CpnyId;
+ SLGLSetup.CpnyId := CopyStr(CpnyId, 1, MaxStrLen(SLGLSetup.CpnyId));
SLGLSetup.CpnyName := CpnyName;
SLGLSetup.FiscalPerEnd00 := FiscalPerEnd00;
SLGLSetup.FiscalPerEnd01 := FiscalPerEnd01;
diff --git a/Apps/W1/HybridSL/test/src/SLTestHelperFunctions.CodeUnit.al b/Apps/W1/HybridSL/test/src/SLTestHelperFunctions.CodeUnit.al
index 153b183f6b..7ba767294b 100644
--- a/Apps/W1/HybridSL/test/src/SLTestHelperFunctions.CodeUnit.al
+++ b/Apps/W1/HybridSL/test/src/SLTestHelperFunctions.CodeUnit.al
@@ -8,7 +8,6 @@ using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Inventory.Item;
using Microsoft.Purchases.Vendor;
using Microsoft.Sales.Customer;
-using Microsoft.Sales.Customer;
codeunit 147601 "SL Test Helper Functions"
{
diff --git a/Apps/W1/HybridSL/test/src/SLVendorMigratorTests.CodeUnit.al b/Apps/W1/HybridSL/test/src/SLVendorMigratorTests.CodeUnit.al
index b9c38f68b3..1ff915062c 100644
--- a/Apps/W1/HybridSL/test/src/SLVendorMigratorTests.CodeUnit.al
+++ b/Apps/W1/HybridSL/test/src/SLVendorMigratorTests.CodeUnit.al
@@ -8,8 +8,6 @@ using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Foundation.Address;
using Microsoft.Purchases.Vendor;
using System.Integration;
-using Microsoft.Purchases.Vendor;
-using System.Integration;
using System.TestLibraries.Utilities;
codeunit 147603 "SL Vendor Migrator Tests"
diff --git a/Apps/W1/Intrastat/app/AppResources/DataExchDefMap.xml b/Apps/W1/Intrastat/app/AppResources/DataExchDefMap.xml
index fe3998761b..9e9ee0c9d4 100644
--- a/Apps/W1/Intrastat/app/AppResources/DataExchDefMap.xml
+++ b/Apps/W1/Intrastat/app/AppResources/DataExchDefMap.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/Apps/W1/Intrastat/app/src/IntrastatReport/IntrastatReportLine.Table.al b/Apps/W1/Intrastat/app/src/IntrastatReport/IntrastatReportLine.Table.al
index 2b03960f5b..99f1b5b426 100644
--- a/Apps/W1/Intrastat/app/src/IntrastatReport/IntrastatReportLine.Table.al
+++ b/Apps/W1/Intrastat/app/src/IntrastatReport/IntrastatReportLine.Table.al
@@ -498,6 +498,10 @@ table 4812 "Intrastat Report Line"
{
Editable = false;
}
+ field(101; "Intrastat Country/Region Code"; Code[10])
+ {
+ Caption = 'Intrastat Country/Region Code';
+ }
}
keys
diff --git a/Apps/W1/Intrastat/app/src/Processing/IntrastatReportGetLines.Report.al b/Apps/W1/Intrastat/app/src/Processing/IntrastatReportGetLines.Report.al
index dbfa74c628..67a017af46 100644
--- a/Apps/W1/Intrastat/app/src/Processing/IntrastatReportGetLines.Report.al
+++ b/Apps/W1/Intrastat/app/src/Processing/IntrastatReportGetLines.Report.al
@@ -412,6 +412,7 @@ report 4810 "Intrastat Report Get Lines"
IntrastatReportLine."Line No." += 10000;
IntrastatReportLine.Date := "Item Ledger Entry"."Posting Date";
IntrastatReportLine."Country/Region Code" := IntrastatReportMgt.GetIntrastatBaseCountryCode("Item Ledger Entry");
+ IntrastatReportLine."Intrastat Country/Region Code" := IntrastatReportMgt.GetIntrastatCodeFromCountryRegion(IntrastatReportLine."Country/Region Code");
IntrastatReportLine."Transaction Type" := "Item Ledger Entry"."Transaction Type";
IntrastatReportLine."Transport Method" := "Item Ledger Entry"."Transport Method";
IntrastatReportLine."Source Entry No." := "Item Ledger Entry"."Entry No.";
@@ -506,6 +507,7 @@ report 4810 "Intrastat Report Get Lines"
IntrastatReportLine."Line No." += 10000;
IntrastatReportLine.Date := "Job Ledger Entry"."Posting Date";
IntrastatReportLine."Country/Region Code" := IntrastatReportMgt.GetIntrastatBaseCountryCode("Job Ledger Entry");
+ IntrastatReportLine."Intrastat Country/Region Code" := IntrastatReportMgt.GetIntrastatCodeFromCountryRegion(IntrastatReportLine."Country/Region Code");
IntrastatReportLine."Transaction Type" := "Job Ledger Entry"."Transaction Type";
IntrastatReportLine."Transport Method" := "Job Ledger Entry"."Transport Method";
IntrastatReportLine."Shpt. Method Code" := "Job Ledger Entry"."Shpt. Method Code";
@@ -643,6 +645,7 @@ report 4810 "Intrastat Report Get Lines"
end;
IntrastatReportLine."Country/Region Code" := IntrastatReportMgt.GetIntrastatBaseCountryCode("FA Ledger Entry");
+ IntrastatReportLine."Intrastat Country/Region Code" := IntrastatReportMgt.GetIntrastatCodeFromCountryRegion(IntrastatReportLine."Country/Region Code");
if IntrastatReportHeader."Amounts in Add. Currency" then
IntrastatReportLine.Amount :=
Round(
diff --git a/Apps/W1/Intrastat/app/src/Processing/IntrastatReportManagement.Codeunit.al b/Apps/W1/Intrastat/app/src/Processing/IntrastatReportManagement.Codeunit.al
index b329a5b0d7..51f542e512 100644
--- a/Apps/W1/Intrastat/app/src/Processing/IntrastatReportManagement.Codeunit.al
+++ b/Apps/W1/Intrastat/app/src/Processing/IntrastatReportManagement.Codeunit.al
@@ -28,7 +28,7 @@ codeunit 4810 IntrastatReportManagement
LearnMoreLinkTok: Label 'https://go.microsoft.com/fwlink/?linkid=2283605', Locked = true;
RangeCrossingErr: Label 'There is a conflict in checklist rules for ''%1'' in ''%2'' (field must be both blank and not blank). Please review filters in %3.', Comment = '%1=caption of a field, %2=key of record, %3=caption of report checklist page';
MaximumLinesErr: Label 'Split files functionality can only be used when the source record is using default sorting and fields are not grouped. Please contact the %1 administrator to adjust the settings in the related %2.', Comment = '%1=Data Exchange caption, %2=Data Exch Mapping Card caption';
- DataExchangeXMLTxt: Label 'TRIMALLRemoves all spaces5 0000000.00ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDTOINTRound to integer14 00ALPHANUMERIC_ONLY00001.00=ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDUPTOINTRound up to integer14 00ALPHANUMERIC_ONLY00001.00>ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDTOINTRound to integer14 00ALPHANUMERIC_ONLY00001.00=EUCOUNTRYCODELOOKUPEU Country Lookup13 0091710.00',
+ DataExchangeXMLTxt: Label 'TRIMALLRemoves all spaces5 0000000.00ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDTOINTRound to integer14 00ALPHANUMERIC_ONLY00001.00=ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDUPTOINTRound up to integer14 00ALPHANUMERIC_ONLY00001.00>ALPHANUMERIC_ONLYAlphanumeric Text Only70000000.00ROUNDTOINTRound to integer14 00ALPHANUMERIC_ONLY00001.00=EUCOUNTRYCODELOOKUPEU Country Lookup13 0091710.00',
Locked = true; // will be replaced with file import when available
procedure GetIntrastatBaseCountryCode(ItemLedgEntry: Record "Item Ledger Entry") CountryCode: Code[10]
@@ -1050,6 +1050,18 @@ codeunit 4810 IntrastatReportManagement
exit(Vendor."Partner Type" = "Partner Type"::Person);
end;
+ procedure GetIntrastatCodeFromCountryRegion(CountryRegionCode: Code[10]): Code[10]
+ var
+ CountryRegion: Record "Country/Region";
+ begin
+ CountryRegion.SetLoadFields("Intrastat Code");
+ if CountryRegion.Get(CountryRegionCode) then
+ if CountryRegion."Intrastat Code" <> '' then
+ exit(CountryRegion."Intrastat Code");
+
+ exit(CountryRegionCode);
+ end;
+
local procedure GetSupplementaryUnitUpdateNotificationId(): Guid;
begin
exit(SupplementaryUnitUpdateNotificationIdTok);
diff --git a/Apps/W1/Intrastat/test/src/IntrastatReportTest.Codeunit.al b/Apps/W1/Intrastat/test/src/IntrastatReportTest.Codeunit.al
index db0f09ef42..acfe07949a 100644
--- a/Apps/W1/Intrastat/test/src/IntrastatReportTest.Codeunit.al
+++ b/Apps/W1/Intrastat/test/src/IntrastatReportTest.Codeunit.al
@@ -4741,6 +4741,61 @@ codeunit 139550 "Intrastat Report Test"
Assert.ExpectedError(PurchaseHeader.FieldName("Transport Method"));
end;
+ [Test]
+ [HandlerFunctions('IntrastatReportGetLinesPageHandler')]
+ procedure IntrastatReportLineUsesIntrastatCode()
+ var
+ CountryRegion: array[2] of Record "Country/Region";
+ Item: Record Item;
+ Location: Record Location;
+ SalesHeader: Record "Sales Header";
+ SalesLine: Record "Sales Line";
+ IntrastatReportLine: Record "Intrastat Report Line";
+ Customer: Record Customer;
+ DocumentNo: Code[20];
+ IntrastatReportNo: Code[20];
+ begin
+ // [SCENARIO 610009] Intrastat Code should be used instead of Country/Region Code in Intrastat Report Lines
+ Initialize();
+
+ // [GIVEN] Create Country/Region with different Intrastat Code.
+ LibraryIntrastat.CreateCountryRegion(CountryRegion[1], true);
+ LibraryIntrastat.CreateCountryRegion(CountryRegion[2], true);
+ CountryRegion[1].Validate(CountryRegion[1]."Intrastat Code", CountryRegion[2].Code);
+ CountryRegion[1].Modify(true);
+
+ // [GIVEN] A customer with Country/Region Code = 'NI'
+ LibrarySales.CreateCustomer(Customer);
+ Customer.Validate("Country/Region Code", CountryRegion[1].Code);
+ Customer.Modify(true);
+
+ // [GIVEN] Create an Item with Unit Price.
+ LibraryInventory.CreateItem(Item);
+ Item.Validate("Unit Price", LibraryRandom.RandDecInRange(100, 200, 2));
+ Item.Modify(true);
+
+ // [GIVEN] Posted Sales Order for the customer.
+ LibrarySales.CreateSalesHeader(SalesHeader, SalesHeader."Document Type"::Order, Customer."No.");
+ InsertIntrastatInfoInSalesHeader(SalesHeader);
+ LibrarySales.CreateSalesLine(SalesLine, SalesHeader, SalesLine.Type::Item, Item."No.", LibraryRandom.RandDec(10, 2));
+ SalesLine.Validate("Unit Price", LibraryRandom.RandDec(100, 2));
+ SalesLine.Modify(true);
+
+ // [GIVEN] Location with Inventory Posting Setup.
+ LibraryInventory.UpdateInventoryPostingSetup(Location, Item."Inventory Posting Group");
+ DocumentNo := LibrarySales.PostSalesDocument(SalesHeader, true, false);
+
+ // [WHEN] Suggest lines for Intrastat Report
+ CreateIntrastatReportAndSuggestLines(WorkDate(), IntrastatReportNo);
+
+ // [THEN] The Intrastat Report Line should have Intrastat Country Code populated.
+ IntrastatReportLine.SetRange("Intrastat No.", IntrastatReportNo);
+ IntrastatReportLine.SetRange("Document No.", DocumentNo);
+ IntrastatReportLine.SetRange("Intrastat Country/Region Code", CountryRegion[2].Code);
+ IntrastatReportLine.FindFirst();
+ Assert.RecordIsNotEmpty(IntrastatReportLine);
+ end;
+
local procedure Initialize()
var
LibraryERMCountryData: Codeunit "Library - ERM Country Data";
diff --git a/Apps/W1/LibraryNoTransactions/app/NoTransactionsSubscriber.Codeunit.al b/Apps/W1/LibraryNoTransactions/app/NoTransactionsSubscriber.Codeunit.al
index 4e245ca45c..69e0714358 100644
--- a/Apps/W1/LibraryNoTransactions/app/NoTransactionsSubscriber.Codeunit.al
+++ b/Apps/W1/LibraryNoTransactions/app/NoTransactionsSubscriber.Codeunit.al
@@ -105,6 +105,8 @@ codeunit 130630 "No Transactions Subscriber"
exit(true);
'Field Monitoring Setup':
exit(true);
+ 'Payables Agent Setup':
+ exit(true);
end;
exit(false);
diff --git a/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml b/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml
index 231eda042f..b6e808e88e 100644
Binary files a/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml and b/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml differ
diff --git a/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AttachmentAccuracyTests.xml b/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AttachmentAccuracyTests.xml
index 6e12cdbf2b..56ae308053 100644
Binary files a/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AttachmentAccuracyTests.xml and b/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AttachmentAccuracyTests.xml differ
diff --git a/Apps/W1/SalesOrderAgent/app/app.json b/Apps/W1/SalesOrderAgent/app/app.json
index fe771a01a2..fb2fc7d51c 100644
--- a/Apps/W1/SalesOrderAgent/app/app.json
+++ b/Apps/W1/SalesOrderAgent/app/app.json
@@ -17,8 +17,28 @@
"target": "OnPrem",
"idRanges": [
{
- "from": 3000,
- "to": 5000
+ "from": 4002,
+ "to": 4002
+ },
+ {
+ "from": 4302,
+ "to": 4302
+ },
+ {
+ "from": 4304,
+ "to": 4309
+ },
+ {
+ "from": 4323,
+ "to": 4325
+ },
+ {
+ "from": 4395,
+ "to": 4420
+ },
+ {
+ "from": 4580,
+ "to": 4600
}
],
"internalsVisibleTo": [
diff --git a/Apps/W1/SalesOrderAgent/app/src/Integration/SOAAnnotation.Codeunit.al b/Apps/W1/SalesOrderAgent/app/src/Integration/SOAAnnotation.Codeunit.al
index 3bad2c253d..3b92a119d7 100644
--- a/Apps/W1/SalesOrderAgent/app/src/Integration/SOAAnnotation.Codeunit.al
+++ b/Apps/W1/SalesOrderAgent/app/src/Integration/SOAAnnotation.Codeunit.al
@@ -196,15 +196,15 @@ codeunit 4399 "SOA Annotation"
exit; // Message is relevant, no annotation needed
TelemetryDimensions.Add('TaskId', Format(AgentTaskMessage."Task ID"));
+ TelemetryDimensions.Add('MessageId', Format(AgentTaskMessage.ID));
Clear(Annotations);
Annotations.Code := AnnotationIrrelevantCodeLbl;
Annotations.Message := CopyStr(StrSubstNo(AnnotationIrrelevantLbl, Agent.GetDisplayName(AgentTaskMessage."Agent User Security ID")), 1, MaxStrLen(Annotations.Message));
Annotations.Details := CopyStr(IrrelevanceReason, 1, MaxStrLen(Annotations.Details));
Annotations.Severity := Annotations.Severity::Warning;
- if Annotations.Insert() then
- FeatureTelemetry.LogUsage('0000PPH', SOASetupCU.GetFeatureName(), 'Irrelevant message detected for agent.', TelemetryDimensions)
- else
+ FeatureTelemetry.LogUsage('0000PPH', SOASetupCU.GetFeatureName(), 'Irrelevant message detected for agent.', TelemetryDimensions);
+ if not Annotations.Insert() then
FeatureTelemetry.LogError('0000PQC', SOASetupCU.GetFeatureName(), 'Irrelevant message detected for agent.', 'Failed to insert annotation for irrelevant message.', GetLastErrorCallStack(), TelemetryDimensions);
end;
diff --git a/Apps/W1/SalesOrderAgent/app/src/Integration/SOAEmailMessage.Page.al b/Apps/W1/SalesOrderAgent/app/src/Integration/SOAEmailMessage.Page.al
index 1a5f978d5e..3530cb9e5a 100644
--- a/Apps/W1/SalesOrderAgent/app/src/Integration/SOAEmailMessage.Page.al
+++ b/Apps/W1/SalesOrderAgent/app/src/Integration/SOAEmailMessage.Page.al
@@ -313,32 +313,40 @@ page 4404 "SOA Email Message"
local procedure UpdateContactInformation(EmailAddress: Text)
var
SOAFiltersImpl: Codeunit "SOA Filters Impl.";
+ ContactCount: Integer;
begin
ContactVisible := false;
CustomerVisible := false;
Clear(GlobalContact);
Clear(GlobalCustomer);
- ContactVisible := FindContact(GlobalContact, EmailAddress);
+ ContactVisible := FindContact(GlobalContact, EmailAddress, ContactCount);
if ContactVisible then begin
CustomerVisible := GlobalContact.FindCustomer(GlobalCustomer);
BlockedStatusVisible := GlobalCustomer.Blocked <> GlobalCustomer.Blocked::" ";
end;
- if GlobalContact.Name = GlobalCustomer.Name then
- ContactVisible := false;
+ if CustomerVisible then
+ if GlobalContact.Name = GlobalCustomer.Name then
+ ContactVisible := false;
if (not ContactVisible) and (not CustomerVisible) then
SOAFiltersImpl.ShowMissingContactNotification(EmailAddress, SOAEmail."Sender Name")
else
SOAFiltersImpl.RecallMissingContactNotification();
+
+ if ContactCount >= 2 then
+ SOAFiltersImpl.ShowDuplicateContactNotification(EmailAddress, ContactCount)
+ else
+ SOAFiltersImpl.RecallDuplicateContactNotification();
end;
- local procedure FindContact(var Contact: Record Contact; EmailAddress: Text): Boolean
+ local procedure FindContact(var Contact: Record Contact; EmailAddress: Text; var ContactCount: Integer): Boolean
var
SOAFiltersImpl: Codeunit "SOA Filters Impl.";
begin
Contact.SetFilter("E-Mail", SOAFiltersImpl.GetSafeFromEmailFilter(EmailAddress));
+ ContactCount := Contact.Count();
if not Contact.FindFirst() then
exit(false);
diff --git a/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al b/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al
index 9f91f27c80..bf7c6d4840 100644
--- a/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al
+++ b/Apps/W1/SalesOrderAgent/app/src/Validation/SOAFiltersImpl.Codeunit.al
@@ -131,6 +131,28 @@ codeunit 4305 "SOA Filters Impl."
if MissingContactNotification.Recall() then;
end;
+ internal procedure ShowDuplicateContactNotification(FromEmail: Text; ContactCount: Integer)
+ var
+ DuplicateContactNotification: Notification;
+ begin
+ RecallDuplicateContactNotification(DuplicateContactNotification);
+ DuplicateContactNotification.Message := StrSubstNo(DuplicateContactNotificationLbl, ContactCount, FromEmail);
+ DuplicateContactNotification.Send();
+ end;
+
+ procedure RecallDuplicateContactNotification()
+ var
+ DuplicateContactNotification: Notification;
+ begin
+ RecallDuplicateContactNotification(DuplicateContactNotification);
+ end;
+
+ local procedure RecallDuplicateContactNotification(DuplicateContactNotification: Notification)
+ begin
+ DuplicateContactNotification.Id := '2b66d895-4c76-55c8-c1e9-544b6d1d7b80';
+ if DuplicateContactNotification.Recall() then;
+ end;
+
procedure CreateContactFromEmail(MissingContactNotification: Notification)
var
FromEmail: Text;
@@ -184,4 +206,5 @@ codeunit 4305 "SOA Filters Impl."
SecurityFilteringDocumentationURLTxt: Label 'https://go.microsoft.com/fwlink/?linkid=2298901', Locked = true;
MissingContactNotificationLbl: Label 'A contact with email <%1> is not found. Without it, document access and creation are not possible.', Comment = '%1 - email address';
ContactAlreadyExistQst: Label 'A contact with the same email already exists. Contact number is %1. Do you want to open it?', Comment = '%1 = Contact number';
+ DuplicateContactNotificationLbl: Label 'There are %1 contacts with the same email address <%2>. The first matching contact will be used.', Comment = '%1 - number of contacts, %2 - email address';
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/Assembly/SustAssemblySubscriber.Codeunit.al b/Apps/W1/Sustainability/app/src/Assembly/SustAssemblySubscriber.Codeunit.al
index 3bce4610aa..b094ba1a3b 100644
--- a/Apps/W1/Sustainability/app/src/Assembly/SustAssemblySubscriber.Codeunit.al
+++ b/Apps/W1/Sustainability/app/src/Assembly/SustAssemblySubscriber.Codeunit.al
@@ -5,8 +5,10 @@ using Microsoft.Assembly.History;
using Microsoft.Assembly.Posting;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Journal;
+using Microsoft.Inventory.Ledger;
using Microsoft.Projects.Resources.Resource;
using Microsoft.Sustainability.Account;
+using Microsoft.Sustainability.Posting;
using Microsoft.Sustainability.Setup;
codeunit 6255 "Sust. Assembly Subscriber"
@@ -127,14 +129,41 @@ codeunit 6255 "Sust. Assembly Subscriber"
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Assembly-Post", 'OnAfterPostedAssemblyHeaderModify', '', false, false)]
local procedure OnAfterPostedAssemblyHeaderModify(var PostedAssemblyHeader: Record "Posted Assembly Header"; AssemblyHeader: Record "Assembly Header")
begin
- UpdatePostedSustainabilityEmission(AssemblyHeader."CO2e per Unit", AssemblyHeader."Qty. per Unit of Measure", PostedAssemblyHeader.Quantity, 1, PostedAssemblyHeader."Total CO2e");
- PostedAssemblyHeader.Modify();
+ UpdateTotalCO2eOnPostedAssemblyHeader(PostedAssemblyHeader);
end;
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Assembly-Post", 'OnBeforePostedAssemblyLineInsert', '', false, false)]
local procedure OnAfterPostedAssemblyLineInsert(AssemblyLine: Record "Assembly Line"; var PostedAssemblyLine: Record "Posted Assembly Line")
+ var
+ SustainabilityPostMgt: Codeunit "Sustainability Post Mgt";
+ ItemLedgerEntryDocumentType: Enum "Item Ledger Document Type";
+ TotalCO2eAmount: Decimal;
+ TotalCO2eQuantity: Decimal;
+ begin
+ if not SustainabilityPostMgt.IsCarbonTrackingSpecificItem(PostedAssemblyLine."No.") then begin
+ UpdatePostedSustainabilityEmission(AssemblyLine."CO2e per Unit", AssemblyLine."Qty. per Unit of Measure", PostedAssemblyLine.Quantity, 1, PostedAssemblyLine."Total CO2e");
+ exit;
+ end;
+
+ SustainabilityPostMgt.GetTotalCO2eAmountFromValueEntry(ItemLedgerEntryDocumentType::"Posted Assembly", PostedAssemblyLine."Document No.",
+ PostedAssemblyLine."Line No.", PostedAssemblyLine."No.", TotalCO2eAmount, TotalCO2eQuantity);
+
+ UpdatePostedSustainabilityEmission(Abs(TotalCO2eAmount / TotalCO2eQuantity), AssemblyLine."Qty. per Unit of Measure", PostedAssemblyLine.Quantity, 1, PostedAssemblyLine."Total CO2e");
+ UpdatePostedCO2eOnAssemblyLine(AssemblyLine, PostedAssemblyLine."Total CO2e");
+ end;
+
+ local procedure UpdatePostedCO2eOnAssemblyLine(var AssemblyLine: Record "Assembly Line"; TotalCO2eAmount: Decimal)
+ var
+ GHGCredit: Boolean;
+ Sign: Integer;
begin
- UpdatePostedSustainabilityEmission(AssemblyLine."CO2e per Unit", AssemblyLine."Qty. per Unit of Measure", PostedAssemblyLine.Quantity, 1, PostedAssemblyLine."Total CO2e");
+ if AssemblyLine.Type <> AssemblyLine.Type::Item then
+ exit;
+
+ GHGCredit := IsGHGCreditLine(AssemblyLine."No.");
+ Sign := GetPostingSign(0, AssemblyLine.Quantity, GHGCredit);
+ AssemblyLine."Posted Total CO2e" += Sign * TotalCO2eAmount;
+ AssemblyLine.Modify();
end;
local procedure UpdateDefaultSustAccOnAssemblyHeader(var AssemblyHeader: Record "Assembly Header")
@@ -202,22 +231,20 @@ codeunit 6255 "Sust. Assembly Subscriber"
local procedure UpdatePostedSustainabilityTotalCO2eOnAssemblyHeader(var AssemblyHeader: Record "Assembly Header"; QtyToOutputBase: Decimal)
var
GHGCredit: Boolean;
- CO2eToPost: Decimal;
Sign: Integer;
begin
if (QtyToOutputBase = 0) then
exit;
GHGCredit := IsGHGCreditLine(AssemblyHeader."Item No.");
-
Sign := GetPostingSign(QtyToOutputBase, 0, GHGCredit);
- CO2eToPost := AssemblyHeader."CO2e per Unit" * QtyToOutputBase * AssemblyHeader."Qty. per Unit of Measure" * Sign;
- AssemblyHeader."Posted Total CO2e" += CO2eToPost;
+ CalculatePostedTotalCO2eFromLines(AssemblyHeader, Sign);
end;
local procedure UpdatePostedSustainabilityTotalCO2eOnAssemblyLine(var AssemblyLine: Record "Assembly Line"; QtyToConsumeBase: Decimal)
var
+ SustainabilityPostMgt: Codeunit "Sustainability Post Mgt";
GHGCredit: Boolean;
CO2eToPost: Decimal;
Sign: Integer;
@@ -225,6 +252,9 @@ codeunit 6255 "Sust. Assembly Subscriber"
if (QtyToConsumeBase = 0) then
exit;
+ if SustainabilityPostMgt.IsCarbonTrackingSpecificItem(AssemblyLine."No.") then
+ exit;
+
if AssemblyLine.Type = AssemblyLine.Type::Item then
GHGCredit := IsGHGCreditLine(AssemblyLine."No.");
@@ -233,6 +263,34 @@ codeunit 6255 "Sust. Assembly Subscriber"
AssemblyLine."Posted Total CO2e" += CO2eToPost;
end;
+ local procedure UpdateTotalCO2eOnPostedAssemblyHeader(var PostedAssemblyHeader: Record "Posted Assembly Header")
+ var
+ PostedAssemblyLine: Record "Posted Assembly Line";
+ begin
+ PostedAssemblyLine.SetRange("Document No.", PostedAssemblyHeader."No.");
+ PostedAssemblyLine.SetRange(Type, PostedAssemblyLine.Type::Item);
+ PostedAssemblyLine.CalcSums("Total CO2e", Quantity);
+ PostedAssemblyHeader."Total CO2e" := PostedAssemblyLine."Total CO2e";
+ if PostedAssemblyLine.Quantity <> 0 then
+ PostedAssemblyHeader."CO2e per Unit" := Abs(PostedAssemblyHeader."Total CO2e" / PostedAssemblyHeader.Quantity)
+ else
+ PostedAssemblyHeader."CO2e per Unit" := 0;
+
+ PostedAssemblyHeader.Modify();
+ end;
+
+ local procedure CalculatePostedTotalCO2eFromLines(var AssemblyHeader: Record "Assembly Header"; Sign: Integer)
+ var
+ AssemblyLine: Record "Assembly Line";
+ begin
+ AssemblyLine.SetLoadFields("Posted Total CO2e", Type);
+ AssemblyLine.SetRange("Document No.", AssemblyHeader."No.");
+ AssemblyLine.SetRange(Type, AssemblyLine.Type::Item);
+ AssemblyLine.SetFilter("Posted Total CO2e", '<>0');
+ AssemblyLine.CalcSums("Posted Total CO2e");
+ AssemblyHeader."Posted Total CO2e" := Sign * Abs(AssemblyLine."Posted Total CO2e");
+ end;
+
local procedure GetPostingSign(QtyToOutPut: Decimal; QtyToConsume: Decimal; GHGCredit: Boolean): Integer
var
Sign: Integer;
diff --git a/Apps/W1/Sustainability/app/src/Certificate/SustCarbonTrackingMethod.Enum.al b/Apps/W1/Sustainability/app/src/Certificate/SustCarbonTrackingMethod.Enum.al
new file mode 100644
index 0000000000..c9f8eeca9b
--- /dev/null
+++ b/Apps/W1/Sustainability/app/src/Certificate/SustCarbonTrackingMethod.Enum.al
@@ -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.Sustainability.Certificate;
+
+enum 6220 "Sust. Carbon Tracking Method"
+{
+ Extensible = true;
+
+ value(0; "Average")
+ {
+ Caption = 'Average';
+ }
+ value(1; "Specific")
+ {
+ Caption = 'Specific';
+ }
+}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al b/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al
index 194c1cd723..46aff9f4c1 100644
--- a/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al
+++ b/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al
@@ -263,6 +263,12 @@ tableextension 6220 "Sust. Item" extends Item
"Type" = field("Product Classification Type")));
}
#pragma warning restore PTE0002
+ field(6250; "Carbon Tracking Method"; Enum "Sust. Carbon Tracking Method")
+ {
+ Caption = 'Carbon Tracking Method';
+ ToolTip = 'Specifies the Carbon Tracking Method for this item.';
+ DataClassification = CustomerContent;
+ }
}
var
diff --git a/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al b/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al
index b7c771adf3..607cf348b1 100644
--- a/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al
+++ b/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al
@@ -123,6 +123,10 @@ pageextension 6222 "Sust. Item Card" extends "Item Card"
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies the value of the End-of-Life Disposal Requirements field.';
}
+ field("Carbon Tracking Method"; Rec."Carbon Tracking Method")
+ {
+ ApplicationArea = Basic, Suite;
+ }
group("Product Classification")
{
Caption = 'Product Classification';
diff --git a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlCheck.Codeunit.al b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlCheck.Codeunit.al
index ba3fff0147..2931abc61e 100644
--- a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlCheck.Codeunit.al
+++ b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlCheck.Codeunit.al
@@ -49,6 +49,7 @@ codeunit 6273 "Sust. Excise Jnl.-Check"
procedure CheckSustainabilityExciseJournalLine(SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line")
var
SustainabilityExciseJnlBatch: Record "Sust. Excise Journal Batch";
+ IsHandled: Boolean;
begin
SustainabilityExciseJnlBatch.Get(SustainabilityExciseJnlLine."Journal Template Name", SustainabilityExciseJnlLine."Journal Batch Name");
SustainabilityExciseJnlLine.TestField("Posting Date", ErrorInfo.Create());
@@ -75,7 +76,9 @@ codeunit 6273 "Sust. Excise Jnl.-Check"
SustainabilityExciseJnlLine.TestField("Certificate Amount", 0);
end;
- TestEmissionAmount(SustainabilityExciseJnlLine);
+ OnBeforeTestEmissionAmount(SustainabilityExciseJnlLine, IsHandled);
+ if not IsHandled then
+ TestEmissionAmount(SustainabilityExciseJnlLine);
TestDimensionsForJnlLine(SustainabilityExciseJnlLine);
@@ -150,4 +153,9 @@ codeunit 6273 "Sust. Excise Jnl.-Check"
local procedure OnAfterCheckSustainabilityExciseJournalLine(SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line")
begin
end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnBeforeTestEmissionAmount(SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line"; var IsHandled: Boolean)
+ begin
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlLine.Table.al b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlLine.Table.al
index e31ec8b08e..b653257063 100644
--- a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlLine.Table.al
+++ b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseJnlLine.Table.al
@@ -234,6 +234,7 @@ table 6240 "Sust. Excise Jnl. Line"
Resource: Record Resource;
SustainabilityCertificate: Record "Sustainability Certificate";
SustainabilityExciseJnlBatch: Record "Sust. Excise Journal Batch";
+ IsHandled: Boolean;
begin
Rec.Validate("Source Description", '');
if Rec."Source No." = '' then begin
@@ -241,7 +242,10 @@ table 6240 "Sust. Excise Jnl. Line"
exit;
end;
- Rec.TestField("Partner No.");
+ OnValidateSourceNoBeforeTestFieldPartnerNo(Rec, IsHandled);
+ if not IsHandled then
+ Rec.TestField("Partner No.");
+
case "Source Type" of
Rec."Source Type"::Item:
begin
@@ -253,6 +257,8 @@ table 6240 "Sust. Excise Jnl. Line"
SustainabilityExciseJnlBatch.Get("Journal Template Name", "Journal Batch Name");
if SustainabilityExciseJnlBatch.Type = SustainabilityExciseJnlBatch.Type::EPR then
Rec.Validate("Material Breakdown No.", Item."Material Composition No.");
+
+ OnAfterCopyFromItem(Rec, Item);
end;
Rec."Source Type"::"G/L Account":
begin
@@ -265,6 +271,8 @@ table 6240 "Sust. Excise Jnl. Line"
FixedAsset.Get(Rec."Source No.");
Rec.Validate("Source Description", FixedAsset.Description);
+
+ OnAfterCopyFromFixedAsset(Rec, FixedAsset);
end;
Rec."Source Type"::"Charge (Item)":
begin
@@ -919,4 +927,19 @@ table 6240 "Sust. Excise Jnl. Line"
local procedure OnAfterSetupNewLine(var SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line"; SustainabilityExciseJnlBatch: Record "Sust. Excise Journal Batch"; PreviousSustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line")
begin
end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnValidateSourceNoBeforeTestFieldPartnerNo(var SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line"; var IsHandled: Boolean)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterCopyFromItem(var ExciseJournalLine: Record "Sust. Excise Jnl. Line"; Item: Record Item)
+ begin
+ end;
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterCopyFromFixedAsset(var ExciseJournalLine: Record "Sust. Excise Jnl. Line"; FixedAsset: Record "Fixed Asset")
+ begin
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseTaxesTransLog.Table.al b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseTaxesTransLog.Table.al
index 002faead45..445ac9dab1 100644
--- a/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseTaxesTransLog.Table.al
+++ b/Apps/W1/Sustainability/app/src/ExciseTax/SustExciseTaxesTransLog.Table.al
@@ -399,6 +399,8 @@ table 6241 "Sust. Excise Taxes Trans. Log"
Rec."Dimension Set ID" := SustainabilityExciseJnlLine."Dimension Set ID";
Rec."Calculated Date" := SustainabilityExciseJnlLine."Calculated Date";
Rec."Calculated By" := SustainabilityExciseJnlLine."Calculated By";
+
+ OnAfterCopyFromSustainabilityExciseJnlLine(Rec, SustainabilityExciseJnlLine);
end;
local procedure ShowDimensions()
@@ -407,4 +409,10 @@ table 6241 "Sust. Excise Taxes Trans. Log"
begin
DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo(EntryRecIDLbl, TableCaption(), "Entry No."));
end;
+
+
+ [IntegrationEvent(false, false)]
+ local procedure OnAfterCopyFromSustainabilityExciseJnlLine(var SustExciseTaxesTransactionLog: Record "Sust. Excise Taxes Trans. Log"; SustainabilityExciseJnlLine: Record "Sust. Excise Jnl. Line")
+ begin
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/ExciseTax/SustainabilityExciseJournal.Page.al b/Apps/W1/Sustainability/app/src/ExciseTax/SustainabilityExciseJournal.Page.al
index bd411bdb45..01095a5031 100644
--- a/Apps/W1/Sustainability/app/src/ExciseTax/SustainabilityExciseJournal.Page.al
+++ b/Apps/W1/Sustainability/app/src/ExciseTax/SustainabilityExciseJournal.Page.al
@@ -56,6 +56,7 @@ page 6287 "Sustainability Excise Journal"
if Page.RunModal(Page::"Sust. Excise Jnl. Batches", SustainabilityExciseJnlBatch) = Action::LookupOK then begin
ResetFilterOnLinesWithNewBatch(SustainabilityExciseJnlBatch);
+ InitializeAndSetControlAppearance();
CurrPage.Update(false);
end;
end;
@@ -67,6 +68,7 @@ page 6287 "Sustainability Excise Journal"
CurrPage.SaveRecord();
SustainabilityExciseJnlBatch.Get(Rec.GetRangeMax("Journal Template Name"), CurrentJournalBatchName);
ResetFilterOnLinesWithNewBatch(SustainabilityExciseJnlBatch);
+ InitializeAndSetControlAppearance();
CurrPage.Update(false);
end;
}
@@ -484,6 +486,7 @@ page 6287 "Sustainability Excise Journal"
SustainabilityExciseJnlBatch := SustainabilityExciseJournalMgt.SelectBatch(SustainabilityExciseJnlTemplate, CurrentJournalBatchName);
ResetFilterOnLinesWithNewBatch(SustainabilityExciseJnlBatch);
+ InitializeAndSetControlAppearance();
end;
trigger OnNewRecord(BelowxRec: Boolean)
@@ -507,13 +510,16 @@ page 6287 "Sustainability Excise Journal"
end;
var
- CurrentJournalBatchName: Code[10];
ShortcutDimCode: array[8] of Code[20];
DimVisible1, DimVisible2, DimVisible3, DimVisible4, DimVisible5, DimVisible6, DimVisible7, DimVisible8 : Boolean;
EnableEPR: Boolean;
EnableCBAM: Boolean;
CalculateExciseJournalQst: Label 'Do you want to calculate the journal line?';
+ protected var
+ CurrentJournalBatchName: Code[10];
+ EnableExciseTax: Boolean;
+
local procedure ResetFilterOnLinesWithNewBatch(SustainabilityExciseJnlBatch: Record "Sust. Excise Journal Batch")
begin
CurrentJournalBatchName := SustainabilityExciseJnlBatch.Name;
@@ -536,14 +542,18 @@ page 6287 "Sustainability Excise Journal"
SustainabilityExciseJnlBatch: Record "Sust. Excise Journal Batch";
begin
InitializeControlAppearance();
- SustainabilityExciseJnlBatch.Get(Rec."Journal Template Name", Rec."Journal Batch Name");
+ if not SustainabilityExciseJnlBatch.Get(Rec.GetRangeMax("Journal Template Name"), CurrentJournalBatchName) then
+ exit;
+
EnableEPR := SustainabilityExciseJnlBatch.Type = SustainabilityExciseJnlBatch.Type::EPR;
EnableCBAM := SustainabilityExciseJnlBatch.Type = SustainabilityExciseJnlBatch.Type::CBAM;
+ EnableExciseTax := SustainabilityExciseJnlBatch.Type = SustainabilityExciseJnlBatch.Type::Excises;
end;
local procedure InitializeControlAppearance()
begin
EnableEPR := false;
EnableCBAM := false;
+ EnableExciseTax := false;
end;
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al b/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al
index fd5845ec8a..32ae7a390b 100644
--- a/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al
+++ b/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al
@@ -3,6 +3,8 @@ namespace Microsoft.Sustainability.Posting;
using Microsoft.Inventory.Journal;
using Microsoft.Inventory.Ledger;
using Microsoft.Inventory.Posting;
+using Microsoft.Manufacturing.Capacity;
+using Microsoft.Manufacturing.Document;
using Microsoft.Sustainability.Account;
using Microsoft.Sustainability.Journal;
@@ -45,6 +47,34 @@ codeunit 6256 "Sust. Item Post Subscriber"
ItemLedgerEntry."Total EPR Fee" := ItemJournalLine."Total EPR Fee";
end;
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnSetupSplitJnlLineOnAfterSetupTempSplitItemJnlLine', '', false, false)]
+ local procedure OnSetupSplitJnlLineOnAfterSetupTempSplitItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var TempSplitItemJournalLine: Record "Item Journal Line" temporary)
+ var
+ SustainabilityPostMgt: Codeunit "Sustainability Post Mgt";
+ CO2eAmount: Decimal;
+ CO2eQuantity: Decimal;
+ begin
+ if ItemJournalLine."Sust. Account No." = '' then
+ exit;
+
+ if not SustainabilityPostMgt.IsCarbonTrackingSpecificItem(ItemJournalLine."Item No.") then
+ exit;
+
+ TempSplitItemJournalLine."Emission CO2" := Abs(ItemJournalLine."Emission CO2" / ItemJournalLine.Quantity) * TempSplitItemJournalLine.Quantity;
+ TempSplitItemJournalLine."Emission CH4" := Abs(ItemJournalLine."Emission CH4" / ItemJournalLine.Quantity) * TempSplitItemJournalLine.Quantity;
+ TempSplitItemJournalLine."Emission N2O" := Abs(ItemJournalLine."Emission N2O" / ItemJournalLine.Quantity) * TempSplitItemJournalLine.Quantity;
+
+ if TempSplitItemJournalLine."Applies-from Entry" <> 0 then begin
+ SustainabilityPostMgt.GetCO2eAmountAndQuantity(TempSplitItemJournalLine."Applies-from Entry", CO2eAmount, CO2eQuantity);
+ if CO2eQuantity <> 0 then begin
+ TempSplitItemJournalLine."Total CO2e" := Abs(CO2eAmount / CO2eQuantity) * TempSplitItemJournalLine.Quantity;
+ TempSplitItemJournalLine."CO2e per Unit" := Abs(CO2eAmount / CO2eQuantity);
+ end;
+ end;
+
+ TempSplitItemJournalLine.Modify();
+ end;
+
local procedure CanCreateSustValueEntry(ItemJournalLine: Record "Item Journal Line"; var ValueEntry: Record "Value Entry"): Boolean
begin
if (ValueEntry."Item Ledger Entry Type" = ValueEntry."Item Ledger Entry Type"::Transfer) then
@@ -76,7 +106,9 @@ codeunit 6256 "Sust. Item Post Subscriber"
SustainabilityJnlLine."Dimension Set ID" := ItemJournalLine."Dimension Set ID";
SustainabilityJnlLine."Shortcut Dimension 1 Code" := ItemJournalLine."Shortcut Dimension 1 Code";
SustainabilityJnlLine."Shortcut Dimension 2 Code" := ItemJournalLine."Shortcut Dimension 2 Code";
-
+ if ItemLedgerEntry."Entry No." <> 0 then
+ GetTotalCO2eFromProdOrder(ItemJournalLine, ValueEntry.Type);
+ SustainabilityPostMgt.GetTotalCO2eAmount(ItemLedgerEntry, ValueEntry.Type, ItemJournalLine."Total CO2e", ItemJournalLine."CO2e per Unit");
if ItemJournalLine.ShouldUpdateJournalLineWithPostingSign() then
SustainabilityJnlLine.Validate("CO2e Emission", Sign * ItemJournalLine."Total CO2e")
else
@@ -90,6 +122,28 @@ codeunit 6256 "Sust. Item Post Subscriber"
SustainabilityPostMgt.InsertValueEntry(SustainabilityJnlLine, ValueEntry, ItemLedgerEntry);
end;
+ local procedure GetTotalCO2eFromProdOrder(var ItemJournalLine: Record "Item Journal Line"; ValueEntryType: Enum "Capacity Type Journal")
+ var
+ ProdOrderLine: Record "Prod. Order Line";
+ Sustainability: Codeunit "Sustainability Post Mgt";
+ begin
+ if not (ValueEntryType in [ValueEntryType::"Machine Center", ValueEntryType::"Work Center"]) or
+ (ItemJournalLine."Entry Type" <> ItemJournalLine."Entry Type"::Output) then
+ exit;
+
+ if not Sustainability.IsCarbonTrackingSpecificItem(ItemJournalLine."Item No.") then
+ exit;
+
+ if not ProdOrderLine.Get(ProdOrderLine.Status::Released, ItemJournalLine."Order No.", ItemJournalLine."Order Line No.") then
+ exit;
+
+ ProdOrderLine.CalcFields("Expected Operation Total CO2e");
+ if ProdOrderLine.Quantity = 0 then
+ exit;
+
+ ItemJournalLine."Total CO2e" := (ProdOrderLine."Expected Operation Total CO2e" / ProdOrderLine.Quantity) * ItemJournalLine.Quantity;
+ end;
+
local procedure CheckSustainabilityItemJnlLine(AccountNo: Code[20]; AccountCategory: Code[20]; AccountSubCategory: Code[20]; CO2eToPost: Decimal)
var
SustAccountCategory: Record "Sustain. Account Category";
diff --git a/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al b/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al
index d2708561b2..88e07e9c31 100644
--- a/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al
+++ b/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al
@@ -3,6 +3,7 @@ namespace Microsoft.Sustainability.Posting;
using Microsoft.FixedAssets.Ledger;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Ledger;
+using Microsoft.Manufacturing.Capacity;
using Microsoft.Projects.Project.Ledger;
using Microsoft.Projects.Resources.Ledger;
using Microsoft.Sustainability.Account;
@@ -266,6 +267,140 @@ codeunit 6212 "Sustainability Post Mgt"
CarbonFee := CO2eEmission * EmissionCarbonFee;
end;
+ procedure GetTotalCO2eAmount(ItemLedgerEntry: Record "Item Ledger Entry"; ValueEntryType: Enum "Capacity Type Journal"; var TotalCO2e: Decimal; CO2ePerUnit: Decimal)
+ var
+ TempItemLedgerEntry: Record "Item Ledger Entry" temporary;
+ ShowAppliedEntries: Codeunit "Show Applied Entries";
+ AppliedAmount: Decimal;
+ AppliedQuantity: Decimal;
+ IsNegativeEntry: Boolean;
+ begin
+ if not IsCarbonTrackingSpecificItem(ItemLedgerEntry."Item No.") then
+ exit;
+
+ if TotalCO2e < 0 then
+ IsNegativeEntry := true;
+
+ if ItemLedgerEntry."Entry Type" = ItemLedgerEntry."Entry Type"::Transfer then begin
+ TotalCO2e := Abs(CO2ePerUnit * ItemLedgerEntry.Quantity);
+ CorrectSign(TotalCO2e, IsNegativeEntry);
+ exit;
+ end;
+
+ ShowAppliedEntries.FindAppliedEntries(ItemLedgerEntry, TempItemLedgerEntry);
+ if TempItemLedgerEntry.IsEmpty() then
+ GetILEForAssemblyOutputs(ItemLedgerEntry, TempItemLedgerEntry);
+
+ if TempItemLedgerEntry.FindSet() then
+ repeat
+ GetCO2eAmountAndQuantity(TempItemLedgerEntry."Entry No.", AppliedAmount, AppliedQuantity);
+ until TempItemLedgerEntry.Next() = 0;
+
+ if AppliedAmount = 0 then
+ exit;
+
+ if ItemLedgerEntry."Entry Type" in [ItemLedgerEntry."Entry Type"::"Assembly Output", ItemLedgerEntry."Entry Type"::"Output"] then begin
+ CalculateForProductionOutput(TotalCO2e, AppliedAmount, ValueEntryType);
+ CorrectSign(TotalCO2e, IsNegativeEntry);
+ exit;
+ end;
+
+ if AppliedQuantity <> 0 then begin
+ TotalCO2e := Abs((AppliedAmount / AppliedQuantity) * ItemLedgerEntry.Quantity);
+ CorrectSign(TotalCO2e, IsNegativeEntry);
+ end;
+ end;
+
+ local procedure CalculateForProductionOutput(var TotalCO2e: Decimal; AppliedAmount: Decimal; ValueEntryType: Enum "Capacity Type Journal")
+ begin
+ if ValueEntryType in [ValueEntryType::"Machine Center", ValueEntryType::"Work Center"] then begin
+ TotalCO2e += Abs(AppliedAmount);
+ exit;
+ end;
+
+ TotalCO2e := Abs(AppliedAmount);
+ end;
+
+ procedure GetCO2eAmountAndQuantity(ItemLedgerEntryNo: Integer; var CO2eAmount: Decimal; var CO2eQuantity: Decimal)
+ var
+ SustainabilityValueEntry: Record "Sustainability Value Entry";
+ begin
+ SustainabilityValueEntry.SetLoadFields("Item Ledger Entry No.", "CO2e Amount (Actual)", "Item Ledger Entry Quantity");
+ SustainabilityValueEntry.SetRange("Item Ledger Entry No.", ItemLedgerEntryNo);
+ SustainabilityValueEntry.CalcSums("CO2e Amount (Actual)", "Item Ledger Entry Quantity");
+ CO2eAmount += SustainabilityValueEntry."CO2e Amount (Actual)";
+ CO2eQuantity += SustainabilityValueEntry."Item Ledger Entry Quantity";
+ end;
+
+ procedure GetTotalCO2eAmountFromValueEntry(
+ ItemLedgerEntryDocumentType: Enum "Item Ledger Document Type";
+ DocumentNo: Code[20];
+ DocumentLineNo: Integer;
+ ItemNo: Code[20];
+ var TotalCO2eAmount: Decimal;
+ var TotalCO2eQuantity: Decimal)
+ var
+ ValueEntry: Record "Value Entry";
+ begin
+ ValueEntry.SetLoadFields("Document Type", "Document No.", "Document Line No.", "Item No.", "Item Ledger Entry No.");
+ ValueEntry.SetRange("Document Type", ItemLedgerEntryDocumentType);
+ ValueEntry.SetRange("Document No.", DocumentNo);
+ ValueEntry.SetRange("Document Line No.", DocumentLineNo);
+ ValueEntry.SetRange("Item No.", ItemNo);
+ if ValueEntry.FindSet() then
+ repeat
+ GetCO2eAmountAndQuantity(ValueEntry."Item Ledger Entry No.", TotalCO2eAmount, TotalCO2eQuantity);
+ until ValueEntry.Next() = 0;
+ end;
+
+ procedure IsCarbonTrackingSpecificItem(ItemNo: Code[20]): Boolean
+ var
+ Item: Record Item;
+ begin
+ Item.SetLoadFields("Carbon Tracking Method");
+ if not Item.Get(ItemNo) then
+ exit;
+ if Item."Carbon Tracking Method" <> Item."Carbon Tracking Method"::Specific then
+ exit;
+
+ exit(true);
+ end;
+
+ local procedure CorrectSign(var Value: Decimal; IsNegativeEntry: Boolean)
+ begin
+ if IsNegativeEntry then
+ Value := -Value;
+ end;
+
+ local procedure GetILEForAssemblyOutputs(ItemLedgerEntry: Record "Item Ledger Entry"; var TempItemLedgerEntry: Record "Item Ledger Entry" temporary)
+ var
+ ItemLedgerEntry2: Record "Item Ledger Entry";
+ begin
+ if ItemLedgerEntry."Item Register No." = 0 then
+ exit;
+
+ if not (ItemLedgerEntry."Entry Type" in [ItemLedgerEntry."Entry Type"::"Assembly Output", ItemLedgerEntry."Entry Type"::"Output"]) then
+ exit;
+
+ ItemLedgerEntry2.SetRange("Item Register No.", ItemLedgerEntry."Item Register No.");
+ ItemLedgerEntry2.SetRange("Entry Type", GetConsumptionEntryType(ItemLedgerEntry."Entry Type"));
+ if ItemLedgerEntry2.FindSet() then
+ repeat
+ TempItemLedgerEntry := ItemLedgerEntry2;
+ TempItemLedgerEntry.Insert();
+ until ItemLedgerEntry2.Next() = 0;
+ end;
+
+ local procedure GetConsumptionEntryType(ItemLedgerEntryType: Enum "Item Ledger Entry Type"): Enum "Item Ledger Entry Type"
+ begin
+ case ItemLedgerEntryType of
+ ItemLedgerEntryType::"Assembly Output":
+ exit(ItemLedgerEntryType::"Assembly Consumption");
+ ItemLedgerEntryType::Output:
+ exit(ItemLedgerEntryType::Consumption);
+ end;
+ end;
+
local procedure FindEmissionFeeForEmissionType(var EmissionFee: Record "Emission Fee"; EmissionType: Enum "Emission Type"): Boolean
begin
EmissionFee.SetRange("Emission Type", EmissionType);
diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al
index ecd0046955..e7dc42ef02 100644
--- a/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al
+++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al
@@ -1,7 +1,10 @@
namespace Microsoft.Sustainability.Sales;
+using Microsoft.Inventory.Ledger;
+using Microsoft.Manufacturing.Capacity;
using Microsoft.Sales.Document;
using Microsoft.Sales.History;
+using Microsoft.Sustainability.Posting;
using Microsoft.Utilities;
codeunit 6252 "Sust. Sales Copy Document"
@@ -12,6 +15,20 @@ codeunit 6252 "Sust. Sales Copy Document"
CopyFromSalesLine(ToSalesLine, FromSalesLine);
end;
+ [EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Document Mgt.", 'OnCopySalesInvLinesToDocOnBeforeCopySalesLine', '', false, false)]
+ local procedure OnCopySalesInvLinesToDocOnBeforeCopySalesLine(var FromSalesLine: Record "Sales Line"; var ToSalesLine: Record "Sales Line"; FromSalesInvLine: Record "Sales Invoice Line")
+ begin
+ if FromSalesInvLine.Type <> FromSalesInvLine.Type::Item then
+ exit;
+ if FromSalesLine.Quantity = 0 then
+ exit;
+
+ GetTotalCO2eFromSalesInvLine(FromSalesInvLine, FromSalesLine."Total CO2e");
+ ToSalesLine."Total CO2e" := FromSalesLine."Total CO2e";
+ ToSalesLine."CO2e per Unit" := FromSalesLine."Total CO2e" / Abs(FromSalesLine.Quantity);
+ FromSalesLine."CO2e per Unit" := FromSalesLine."Total CO2e" / Abs(FromSalesLine.Quantity);
+ end;
+
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Document Mgt.", 'OnCopySalesShptLinesToDocOnAfterCopySalesShptLineToSalesLine', '', false, false)]
local procedure OnAfterCopyPurchRcptLine(ToSalesLine: Record "Sales Line"; FromSalesShptLine: Record "Sales Shipment Line")
begin
@@ -36,6 +53,27 @@ codeunit 6252 "Sust. Sales Copy Document"
ToSalesLine.Validate("EPR Fee Per Unit", FromSalesLine."EPR Fee Per Unit");
end;
+ local procedure GetTotalCO2eFromSalesInvLine(var FromSalesInvLine: Record "Sales Invoice Line"; var TotalCO2e: Decimal)
+ var
+ TempItemLedgerEntry: Record "Item Ledger Entry" temporary;
+ SustainabilityPostMgt: Codeunit "Sustainability Post Mgt";
+ PerILECO2e: Decimal;
+ CapacityTypeJournal: Enum "Capacity Type Journal";
+ begin
+ if not SustainabilityPostMgt.IsCarbonTrackingSpecificItem(FromSalesInvLine."No.") then
+ exit;
+
+ TotalCO2e := 0;
+ FromSalesInvLine.GetItemLedgEntries(TempItemLedgerEntry, false);
+ if not TempItemLedgerEntry.FindSet() then
+ exit;
+
+ repeat
+ SustainabilityPostMgt.GetTotalCO2eAmount(TempItemLedgerEntry, CapacityTypeJournal::" ", PerILECO2e, 0);
+ TotalCO2e += PerILECO2e;
+ until TempItemLedgerEntry.Next() = 0;
+ end;
+
local procedure CopyFromSalesShipmentLine(var ToSalesLine: Record "Sales Line"; FromSalesShptLine: Record "Sales Shipment Line")
begin
ToSalesLine."Posted Total CO2e" := 0;
diff --git a/Apps/W1/Sustainability/app/src/Setup/SustainabilitySetup.Table.al b/Apps/W1/Sustainability/app/src/Setup/SustainabilitySetup.Table.al
index f86354fd91..8285f39859 100644
--- a/Apps/W1/Sustainability/app/src/Setup/SustainabilitySetup.Table.al
+++ b/Apps/W1/Sustainability/app/src/Setup/SustainabilitySetup.Table.al
@@ -12,7 +12,6 @@ using Microsoft.Sustainability.Ledger;
using Microsoft.Utilities;
using System.Telemetry;
using System.Threading;
-using System.Utilities;
table 6217 "Sustainability Setup"
{
@@ -172,10 +171,6 @@ table 6217 "Sustainability Setup"
trigger OnValidate()
begin
- if Rec."Enable Value Chain Tracking" then
- if not ConfirmManagement.GetResponseOrDefault(ConfirmEnableValueChainTrackingQst, false) then
- Error('');
-
EnableEmissionsWhenValueChainTrackingIsEnabled();
end;
}
@@ -267,11 +262,9 @@ table 6217 "Sustainability Setup"
var
GLSetup: Record "General Ledger Setup";
SustainabilitySetup: Record "Sustainability Setup";
- ConfirmManagement: Codeunit "Confirm Management";
SustainabilitySetupRetrieved: Boolean;
RecordHasBeenRead: Boolean;
AutoFormatExprLbl: Label '', Locked = true;
- ConfirmEnableValueChainTrackingQst: Label 'Value Chain Tracking feature is currently in preview. We strongly recommend that you first enable and test this feature on a sandbox environment that has a copy of production data before doing this on a production environment.\\Are you sure you want to enable this feature?';
EmissionUOMCannotBeChangedErr: Label 'The value for %1 cannot be modified because there are existing sustainability ledger entries that use the unit of measure %2.', Comment = '%1 = Field Caption, %2 = Unit of Measure Code', Locked = true;
procedure GetRecordOnce()
diff --git a/Apps/W1/Sustainability/test/src/LibrarySustainability.Codeunit.al b/Apps/W1/Sustainability/test/src/LibrarySustainability.Codeunit.al
index b674b590d9..84ababe6c9 100644
--- a/Apps/W1/Sustainability/test/src/LibrarySustainability.Codeunit.al
+++ b/Apps/W1/Sustainability/test/src/LibrarySustainability.Codeunit.al
@@ -2,7 +2,10 @@ namespace Microsoft.Test.Sustainability;
using Microsoft.Integration.D365Sales;
using Microsoft.Integration.Dataverse;
+using Microsoft.Inventory.Item;
+using Microsoft.Inventory.Journal;
using Microsoft.Inventory.Location;
+using Microsoft.Inventory.Tracking;
using Microsoft.Sustainability.Account;
using Microsoft.Sustainability.CBAM;
using Microsoft.Sustainability.Certificate;
@@ -20,6 +23,8 @@ codeunit 148182 "Library - Sustainability"
{
var
LibraryUtility: Codeunit "Library - Utility";
+ LibraryInventory: Codeunit "Library - Inventory";
+ LibraryItemTracking: Codeunit "Library - Item Tracking";
LibraryERM: Codeunit "Library - ERM";
procedure InsertAccountCategory(Code: Code[20]; Description: Text[100]; Scope: Enum "Emission Scope"; CalcFoundation: Enum "Calculation Foundation"; CO2: Boolean; CH4: Boolean; N2O: Boolean; CustomValue: Text[100]; CalcFromGL: Boolean): Record "Sustain. Account Category"
@@ -496,4 +501,38 @@ codeunit 148182 "Library - Sustainability"
SustExciseTransactionLog.DeleteAll();
SustainabilityDisclaimer.DeleteAll();
end;
+
+ procedure CreateItemWithSpecificCarbonTrackingMethod(var Item: Record Item)
+ begin
+ LibraryInventory.CreateItem(Item);
+ Item.Validate("Carbon Tracking Method", Item."Carbon Tracking Method"::Specific);
+ Item.Modify();
+ end;
+
+ procedure UpdateCarbonTrackingMethod(var Item: Record Item; CarbonTrackingMethod: Enum "Sust. Carbon Tracking Method")
+ begin
+ if Item."No." = '' then
+ LibraryInventory.CreateItem(Item);
+
+ Item.Validate("Carbon Tracking Method", CarbonTrackingMethod);
+ Item.Modify();
+ end;
+
+ procedure PostPositiveAdjustmentWithItemTracking(Item: Record Item; LocationCode: Code[10]; AccountCode: Code[20]; VariantCode: Code[10];
+ Qty: Decimal; PostingDate: Date; SerialNo: Code[50]; LotNo: Code[50]; TotalCo2e: Decimal)
+ var
+ ReservationEntry: Record "Reservation Entry";
+ ItemJournalTemplate: Record "Item Journal Template";
+ ItemJournalLine: Record "Item Journal Line";
+ ItemJournalBatch: Record "Item Journal Batch";
+ begin
+ LibraryInventory.CreateItemJournalBatchByType(ItemJournalBatch, ItemJournalTemplate.Type::Item);
+ LibraryInventory.CreateItemJournalLine(ItemJournalLine, ItemJournalBatch, Item, LocationCode, VariantCode, PostingDate,
+ ItemJournalLine."Entry Type"::"Positive Adjmt.", Qty, 0);
+ ItemJournalLine.Validate("Sust. Account No.", AccountCode);
+ ItemJournalLine.Validate("Total CO2e", TotalCo2e);
+ ItemJournalLine.Modify();
+ LibraryItemTracking.CreateItemJournalLineItemTracking(ReservationEntry, ItemJournalLine, SerialNo, LotNo, Qty);
+ LibraryInventory.PostItemJournalBatch(ItemJournalBatch);
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/Sustainability/test/src/SustCertificateTest.Codeunit.al b/Apps/W1/Sustainability/test/src/SustCertificateTest.Codeunit.al
index 65183a6e87..cc0806facf 100644
--- a/Apps/W1/Sustainability/test/src/SustCertificateTest.Codeunit.al
+++ b/Apps/W1/Sustainability/test/src/SustCertificateTest.Codeunit.al
@@ -5172,7 +5172,6 @@ codeunit 148187 "Sust. Certificate Test"
end;
[Test]
- [HandlerFunctions('ConfirmHandlerYes')]
procedure VerifyEmissionFieldsMustBeEnabledWhenEnableValueChainTrackingIsEnabled()
var
SustainabilitySetup: Record "Sustainability Setup";
diff --git a/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al b/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al
index 52e11a93c4..9e2558b515 100644
--- a/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al
+++ b/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al
@@ -7,6 +7,7 @@ using Microsoft.Foundation.Navigate;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Journal;
using Microsoft.Inventory.Location;
+using Microsoft.Inventory.Tracking;
using Microsoft.Manufacturing.Capacity;
using Microsoft.Manufacturing.Document;
using Microsoft.Manufacturing.Journal;
@@ -22,6 +23,7 @@ using Microsoft.Sustainability.Account;
using Microsoft.Sustainability.Emission;
using Microsoft.Sustainability.Ledger;
using Microsoft.Sustainability.Setup;
+using System.Environment.Configuration;
using System.TestLibraries.Utilities;
codeunit 148190 "Sust. Value Entry Test"
@@ -42,6 +44,8 @@ codeunit 148190 "Sust. Value Entry Test"
LibraryManufacturing: Codeunit "Library - Manufacturing";
LibraryVariableStorage: Codeunit "Library - Variable Storage";
LibraryWarehouse: Codeunit "Library - Warehouse";
+ NotificationLifecycleMgt: Codeunit "Notification Lifecycle Mgt.";
+ LibraryItemTracking: Codeunit "Library - Item Tracking";
ValueMustBeEqualErr: Label '%1 must be equal to %2 in the %3.', Comment = '%1 = Field Caption , %2 = Expected Value, %3 = Table Caption';
AccountCodeLbl: Label 'AccountCode%1', Locked = true, Comment = '%1 = Number';
CategoryCodeLbl: Label 'CategoryCode%1', Locked = true, Comment = '%1 = Number';
@@ -3718,6 +3722,8 @@ codeunit 148190 "Sust. Value Entry Test"
// [THEN] Verify system must throw an error If "Total CO2e" is zero in Item Journal Line.
Assert.ExpectedError(CO2eMustNotBeZeroErr);
+
+ NotificationLifecycleMgt.RecallAllNotifications();
end;
[Test]
@@ -4000,6 +4006,310 @@ codeunit 148190 "Sust. Value Entry Test"
Assert.ExpectedError(CO2eMustNotBeZeroErr);
end;
+ [Test]
+ procedure VerifySpecificCarbonTrackingCalculatesCO2eFromPurchaseLine()
+ var
+ CountryRegion: Record "Country/Region";
+ Item: Record Item;
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ SustainabilityAccount: Record "Sustainability Account";
+ EmissionFee: array[3] of Record "Emission Fee";
+ EmissionCO2: array[2] of Decimal;
+ EmissionCH4: array[2] of Decimal;
+ EmissionN2O: array[2] of Decimal;
+ ExpectedCO2eEmission: array[2] of Decimal;
+ PostedInvoiceNo: Code[20];
+ Index: Integer;
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ AccountCode: Code[20];
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value entry Co2e Amount (Actual) is calculated from particular entry in Purchase Line.
+ LibrarySustainability.CleanUpBeforeTesting();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account.
+ CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10));
+ SustainabilityAccount.Get(AccountCode);
+
+ // [GIVEN] Create Country/Region.
+ LibraryERM.CreateCountryRegion(CountryRegion);
+
+ // [GIVEN] Generate Emission.
+ DefineEmissionArrays(EmissionCO2, EmissionCH4, EmissionN2O);
+
+ // [GIVEN] Create a Purchase Header.
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, "Purchase Document Type"::Order, LibraryPurchase.CreateVendorNo());
+ PurchaseHeader."Buy-from Country/Region Code" := CountryRegion.Code;
+ PurchaseHeader.Modify();
+
+ // [GIVEN] Create a Purchase Line of Item with Specific Carbon Tracking Method
+ LibrarySustainability.CreateItemWithSpecificCarbonTrackingMethod(Item);
+ CreatePurchaseLineWithEmissionValue(PurchaseLine, PurchaseHeader, Item."No.", '', '', LibraryRandom.RandIntInRange(10, 10), EmissionCO2[1], EmissionCH4[1], EmissionN2O[1], AccountCode);
+
+ // [GIVEN] Save Expected CO2e
+ for Index := 1 to ArrayLen(ExpectedCO2eEmission) do
+ ExpectedCO2eEmission[Index] := EmissionCH4[Index] * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2[Index] * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O[Index] * EmissionFee[3]."Carbon Equivalent Factor";
+
+ // [WHEN] Post a Purchase Document.
+ PostedInvoiceNo := LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true);
+
+ // [THEN] Verify Sustainability Value entry should be created when the purchase document is posted and correct values are populated in "CO2e Amount (Actual)" field.
+ VerifySustainabilityValueEntryDocumentCO2e(PostedInvoiceNo, ExpectedCO2eEmission[1]);
+ end;
+
+ [Test]
+ procedure VerifySustValueEntryCO2eForSpecificItemWithLotTracking()
+ var
+ Item: Record Item;
+ CountryRegion: Record "Country/Region";
+ EmissionFee: array[3] of Record "Emission Fee";
+ SustainabilityAccount: Record "Sustainability Account";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ EmissionCO2: array[2] of Decimal;
+ EmissionCH4: array[2] of Decimal;
+ EmissionN2O: array[2] of Decimal;
+ ExpectedCO2eEmission: array[2] of Decimal;
+ PostedInvoiceNo: Code[20];
+ Index: Integer;
+ LotNo: array[2] of Code[50];
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ AccountCode: Code[20];
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value entry Co2e Amount (Actual) is calculated from particular entry in
+ // Purchase Line for Specific Carbon Tracking Method with Lot Tracking.
+ LibrarySustainability.CleanUpBeforeTesting();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account.
+ CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10));
+ SustainabilityAccount.Get(AccountCode);
+
+ // [GIVEN] Create Emission Fee With Emission Scope.
+ CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", '');
+
+ // [GIVEN] Generate Emission.
+ for Index := 1 to ArrayLen(LotNo) do
+ LotNo[Index] := LibraryUtility.GenerateGUID();
+
+ DefineEmissionArrays(EmissionCO2, EmissionCH4, EmissionN2O);
+
+ // [GIVEN] Create a Purchase Header.
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, "Purchase Document Type"::Order, LibraryPurchase.CreateVendorNo());
+ PurchaseHeader."Buy-from Country/Region Code" := CountryRegion.Code;
+ PurchaseHeader.Modify();
+
+ // [GIVEN] Create a Purchase Line of Item with Specific Carbon Tracking Method
+ LibraryItemTracking.CreateLotItem(Item);
+ LibrarySustainability.UpdateCarbonTrackingMethod(Item, Item."Carbon Tracking Method"::Specific);
+
+ CreatePurchaseLinesWithMultipleEmissionValues(PurchaseLine, PurchaseHeader, Item."No.", Item."Item Tracking Code", LotNo, EmissionCO2, EmissionCH4, EmissionN2O, AccountCode);
+
+ // [GIVEN] Save Expected CO2e
+ for Index := 1 to ArrayLen(ExpectedCO2eEmission) do
+ ExpectedCO2eEmission[Index] := EmissionCH4[Index] * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2[Index] * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O[Index] * EmissionFee[3]."Carbon Equivalent Factor";
+
+ // [WHEN] Post a Purchase Document.
+ PostedInvoiceNo := LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true);
+
+ // [VERIFY] Verify Sustainability Value entry should be created when the purchase document is posted and correct values are populated in "CO2e Amount (Actual)" field.
+ VerifySustainabilityValueEntryDocumentCO2e(PostedInvoiceNo, ExpectedCO2eEmission[1]);
+ end;
+
+ [Test]
+ procedure VerifySpecificCarbonTrackingWithLotSelectionAppliesCO2eToSales()
+ var
+ CountryRegion: Record "Country/Region";
+ Item: Record Item;
+ EmissionFee: array[3] of Record "Emission Fee";
+ PurchaseHeader: Record "Purchase Header";
+ PurchaseLine: Record "Purchase Line";
+ SalesHeader: Record "Sales Header";
+ SustainabilityAccount: Record "Sustainability Account";
+ EmissionCO2: array[2] of Decimal;
+ EmissionCH4: array[2] of Decimal;
+ EmissionN2O: array[2] of Decimal;
+ ExpectedCO2eEmission: array[2] of Decimal;
+ PostedSalesInvoiceNo: Code[20];
+ Index: Integer;
+ LotNo: array[2] of Code[50];
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ AccountCode: Code[20];
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value entry Co2e Amount (Actual) is calculated from particular entry in
+ // Purchase Line for Specific Carbon Tracking Method with Lot Tracking when Sales is posted with Lot Selection
+ LibrarySustainability.CleanUpBeforeTesting();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account
+ CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10));
+ SustainabilityAccount.Get(AccountCode);
+
+ // [GIVEN] Create Emission Fee With Emission Scope.
+ CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", '');
+
+ // [GIVEN] Create Country/Region.
+ LibraryERM.CreateCountryRegion(CountryRegion);
+
+ // [GIVEN] Generate LotNo
+ for Index := 1 to ArrayLen(LotNo) do
+ LotNo[Index] := LibraryUtility.GenerateGUID();
+
+ DefineEmissionArrays(EmissionCO2, EmissionCH4, EmissionN2O);
+
+ // [GIVEN] Create a Purchase Header.
+ LibraryPurchase.CreatePurchHeader(PurchaseHeader, "Purchase Document Type"::Order, LibraryPurchase.CreateVendorNo());
+ PurchaseHeader."Buy-from Country/Region Code" := CountryRegion.Code;
+ PurchaseHeader.Modify();
+
+ // [GIVEN] Create a Purchase Line of Item with Specific Carbon Tracking Method
+ LibraryItemTracking.CreateLotItem(Item);
+ LibrarySustainability.UpdateCarbonTrackingMethod(Item, Item."Carbon Tracking Method"::Specific);
+
+ CreatePurchaseLinesWithMultipleEmissionValues(PurchaseLine, PurchaseHeader, Item."No.", Item."Item Tracking Code", LotNo, EmissionCO2, EmissionCH4, EmissionN2O, AccountCode);
+
+ // [GIVEN] Save Expected CO2e
+ for Index := 1 to ArrayLen(ExpectedCO2eEmission) do
+ ExpectedCO2eEmission[Index] := EmissionCH4[Index] * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2[Index] * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O[Index] * EmissionFee[3]."Carbon Equivalent Factor";
+
+ // [WHEN] Post a Purchase Document.
+ LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true);
+
+ PostedSalesInvoiceNo := CreateAndPostSalesWithCO2eAndItemTracking(SalesHeader, CountryRegion.Code, AccountCode, Item."No.", 1, 999, '', LotNo[2]);
+
+ // [VERIFY] Verify Sustainability Value entry should be created when the purchase document is posted and correct values are populated in "CO2e Amount (Actual)" field.
+ VerifySustainabilityValueEntryDocumentCO2e(PostedSalesInvoiceNo, -(ExpectedCO2eEmission[2] / PurchaseLine.Quantity));
+ end;
+
+ [Test]
+ [HandlerFunctions('ProductionJournalModalPageHandler,ConfirmHandler,MessageHandler')]
+ procedure VerifySustValueEntryForProductionJournalWithLotTrackedItemAndSpecificCarbon()
+ var
+ ProdItem: Record Item;
+ CompItem: Record Item;
+ RoutingHeader: Record "Routing Header";
+ WorkCenter: Record "Work Center";
+ ProductionOrder: Record "Production Order";
+ ProdOrderLine: Record "Prod. Order Line";
+ ProductionBOMHeader: Record "Production BOM Header";
+ ProdOrderComponent: Record "Prod. Order Component";
+ ProductionOrderRoutingLine: Record "Prod. Order Routing Line";
+ SustainabilityLedgerEntry: Record "Sustainability Ledger Entry";
+ SustainabilityValueEntry: Record "Sustainability Value Entry";
+ ExpectedCO2ePerUnit: array[2] of Decimal;
+ ExpectedCO2eOnLot: array[2] of Decimal;
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ AccountCode: array[3] of Code[20];
+ Index: Integer;
+ LotNo: array[2] of Code[50];
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value entry Co2e Amount (Actual) is calculated from particular entry in
+ // Production Journal for Specific Carbon Tracking Method with Lot Tracking.
+ LibrarySustainability.CleanUpBeforeTesting();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account for Work Center.
+ CreateSustainabilityAccount(AccountCode[1], CategoryCode, SubcategoryCode, LibraryRandom.RandIntInRange(1, 1));
+
+ // [GIVEN] Create a Work Center.
+ LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter);
+ WorkCenter.Validate("Default Sust. Account", AccountCode[1]);
+ WorkCenter.Validate("CO2e per Unit", LibraryRandom.RandInt(10));
+ WorkCenter.Modify();
+
+ // [GIVEN] Save Expected "CO2e per Unit" for Routing.
+ ExpectedCO2ePerUnit[1] := LibraryRandom.RandInt(100);
+
+ // [GIVEN] Create Routing Header.
+ RoutingHeader.Get(CreateRoutingWithWorkCenter(WorkCenter, ExpectedCO2ePerUnit[1]));
+
+ // [GIVEN] Create Production and Component Item.
+ LibraryItemTracking.CreateLotItem(CompItem);
+ LibrarySustainability.UpdateCarbonTrackingMethod(CompItem, CompItem."Carbon Tracking Method"::Specific);
+
+ // [GIVEN] Create a Sustainability Account for Comp Item.
+ CreateSustainabilityAccount(AccountCode[2], CategoryCode, SubcategoryCode, LibraryRandom.RandIntInRange(2, 2));
+
+ // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Component Item.
+ CompItem.Validate("Default Sust. Account", AccountCode[2]);
+ CompItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100));
+ CompItem.Modify();
+
+ // [GIVEN] Post Inventory for Component Item.
+ for Index := 1 to ArrayLen(LotNo) do
+ LotNo[Index] := LibraryUtility.GenerateGUID();
+
+ for Index := 1 to ArrayLen(ExpectedCO2eOnLot) do
+ ExpectedCO2eOnLot[Index] := LibraryRandom.RandDecInRange(200, 600, 2);
+
+ // [GIVEN] Create Inventory for Component Item with Lot Tracking and Specific Carbon Tracking Method.
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(CompItem, '', AccountCode[2], '', LibraryRandom.RandIntInRange(10, 10), WorkDate(), '', LotNo[1], ExpectedCO2eOnLot[1]);
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(CompItem, '', AccountCode[2], '', LibraryRandom.RandIntInRange(10, 10), WorkDate(), '', LotNo[2], ExpectedCO2eOnLot[2]);
+
+ // [GIVEN] Create a Sustainability Account for Production Item.
+ CreateSustainabilityAccount(AccountCode[3], CategoryCode, SubcategoryCode, LibraryRandom.RandIntInRange(3, 3));
+
+ // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Production Item.
+ LibraryInventory.CreateItem(ProdItem);
+ LibrarySustainability.UpdateCarbonTrackingMethod(ProdItem, ProdItem."Carbon Tracking Method"::Specific);
+ ProdItem.Validate("Default Sust. Account", AccountCode[3]);
+ ProdItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100));
+ ProdItem.Modify();
+
+ // [GIVEN] Save Expected "CO2e per Unit" for Production BOM.
+ ExpectedCO2ePerUnit[2] := LibraryRandom.RandInt(100);
+
+ // [GIVEN] Create Production BOM.
+ CreateProductionBOM(ProductionBOMHeader, CompItem, ExpectedCO2ePerUnit[2]);
+
+ // [GIVEN] Update "Production BOM No.","Routing No." in Production Item.
+ ProdItem.Validate("Production BOM No.", ProductionBOMHeader."No.");
+ ProdItem.Validate("Routing No.", RoutingHeader."No.");
+ ProdItem.Modify();
+
+ // [GIVEN] Create and Refresh Production Order.
+ CreateAndRefreshProductionOrder(ProductionOrder, ProductionOrder.Status::Released, ProdItem."No.", LibraryRandom.RandIntInRange(10, 10));
+ SetTrackingForProdOrderComponents(ProductionOrder, CompItem, LotNo[2]);
+
+ // [GIVEN] Find Prod Order Routing Line.
+ ProductionOrderRoutingLine.SetRange(Status, ProductionOrder.Status);
+ ProductionOrderRoutingLine.SetRange("Prod. Order No.", ProductionOrder."No.");
+ ProductionOrderRoutingLine.FindFirst();
+
+ // [WHEN] Post Production Journal.
+ FindProdOrderLine(ProdOrderLine, ProductionOrder, ProdItem."No.");
+ LibraryManufacturing.OpenProductionJournal(ProductionOrder, ProdOrderLine."Line No.");
+
+ // [THEN] Verify Sustainability Ledger Entry should not be created When Production Journal is posted.
+ SustainabilityLedgerEntry.SetRange("Document No.", ProductionOrder."No.");
+ Assert.RecordCount(SustainabilityLedgerEntry, 0);
+
+ SustainabilityValueEntry.SetRange("Document No.", ProductionOrder."No.");
+ Assert.RecordCount(SustainabilityValueEntry, 2);
+
+ // [THEN] Verify Sustainability Value Entry should be created for Production Order Line.
+ VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderLine."Sust. Account No.");
+ VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderLine."Item No.", ProductionOrderRoutingLine."Total CO2e" + ExpectedCO2eOnLot[2]);
+
+ // [THEN] Verify Sustainability Value Entry should be created for Production Order Component.
+ FindProdOrderComponent(ProdOrderComponent, ProductionOrder, CompItem."No.");
+ VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Sust. Account No.");
+ VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Item No.", -ExpectedCO2eOnLot[2]);
+ end;
+
local procedure CreateSustainabilityAccount(var AccountCode: Code[20]; var CategoryCode: Code[20]; var SubcategoryCode: Code[20]; i: Integer): Record "Sustainability Account"
begin
CreateSustainabilitySubcategory(CategoryCode, SubcategoryCode, i);
@@ -4433,6 +4743,125 @@ codeunit 148190 "Sust. Value Entry Test"
(ProdOrderRoutingLine."Wait Time" * CalendarMgt.QtyperTimeUnitofMeasure(ProdOrderRoutingLine."Work Center No.", ProdOrderRoutingLine."Wait Time Unit of Meas. Code")));
end;
+ local procedure VerifySustainabilityValueEntryDocumentCO2e(DocumentNo: Code[20]; ExpectedCO2e: Decimal)
+ var
+ SustainabilityValueEntry: Record "Sustainability Value Entry";
+ begin
+ SustainabilityValueEntry.SetRange("Document No.", DocumentNo);
+ SustainabilityValueEntry.FindFirst();
+ Assert.AreEqual(
+ ExpectedCO2e,
+ SustainabilityValueEntry."CO2e Amount (Actual)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), ExpectedCO2e, SustainabilityValueEntry.TableCaption()));
+ Assert.AreEqual(
+ 0,
+ SustainabilityValueEntry."CO2e Amount (Expected)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption()));
+ end;
+
+ local procedure CreateAndPostSalesWithCO2eAndItemTracking(var SalesHeader: Record "Sales Header"; CountryRegion: Code[10]; SustAccountNo: Code[20]; ItemNo: Code[20]; Quantity: Decimal; TotalCO2e: Decimal; SerialNo: Code[50]; LotNo: Code[50]): Code[20]
+ var
+ SalesLine: Record "Sales Line";
+ ReservationEntry: Record "Reservation Entry";
+ begin
+ LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo());
+ SalesHeader."Bill-to Country/Region Code" := CountryRegion;
+ SalesHeader.Modify();
+
+ LibrarySales.CreateSalesLine(SalesLine, SalesHeader, "Sales Line Type"::Item, ItemNo, Quantity);
+ SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200));
+ SalesLine.Validate("Sust. Account No.", SustAccountNo);
+ SalesLine.Validate("Total CO2e", TotalCO2e);
+ SalesLine.Modify();
+
+ LibraryItemTracking.CreateSalesOrderItemTracking(ReservationEntry, SalesLine, SerialNo, LotNo, Quantity);
+
+ exit(LibrarySales.PostSalesDocument(SalesHeader, true, true));
+ end;
+
+ local procedure SetTrackingForProdOrderComponents(var ProductionOrder: Record "Production Order"; CompItem: Record Item; LotNo: Code[50])
+ var
+ ProdOrderComponent: Record "Prod. Order Component";
+ ReservationEntry: Record "Reservation Entry";
+ begin
+ ProdOrderComponent.SetRange("Prod. Order No.", ProductionOrder."No.");
+ ProdOrderComponent.SetRange("Item No.", CompItem."No.");
+ if ProdOrderComponent.FindFirst() then
+ LibraryManufacturing.CreateProdOrderCompItemTracking(ReservationEntry, ProdOrderComponent, '', LotNo, ProdOrderComponent."Expected Qty. (Base)");
+ end;
+
+ local procedure DefineEmissionArrays(var EmissionCO2: array[2] of Decimal; var EmissionCH4: array[2] of Decimal; var EmissionN2O: array[2] of Decimal)
+ var
+ Index: Integer;
+ begin
+ for Index := 1 to ArrayLen(EmissionCO2) do begin
+ EmissionCO2[Index] := LibraryRandom.RandIntInRange(100 * Index, 100 * Index);
+ EmissionCH4[Index] := LibraryRandom.RandIntInRange(200 * Index, 200 * Index);
+ EmissionN2O[Index] := LibraryRandom.RandIntInRange(300 * Index, 300 * Index);
+ end;
+ end;
+
+ local procedure CreatePurchaseLinesWithMultipleEmissionValues(
+ var PurchaseLine: Record "Purchase Line";
+ PurchaseHeader: Record "Purchase Header";
+ ItemNo: Code[20];
+ ItemTrackingCode: Code[20];
+ LotNo: array[2] of Code[50];
+ EmissionCO2: array[2] of Decimal;
+ EmissionCH4: array[2] of Decimal;
+ EmissionN2O: array[2] of Decimal;
+ SustAccountNo: Code[20])
+ var
+
+ Index: Integer;
+ begin
+ for Index := 1 to ArrayLen(EmissionCO2) do
+ CreatePurchaseLineWithEmissionValue(
+ PurchaseLine,
+ PurchaseHeader,
+ ItemNo,
+ ItemTrackingCode,
+ LotNo[Index],
+ LibraryRandom.RandIntInRange(10, 10),
+ EmissionCO2[Index],
+ EmissionCH4[Index],
+ EmissionN2O[Index],
+ SustAccountNo);
+ end;
+
+ local procedure CreatePurchaseLineWithEmissionValue(
+ var PurchaseLine: Record "Purchase Line";
+ PurchaseHeader: Record "Purchase Header";
+ ItemNo: Code[20];
+ ItemTrackingCode: Code[20];
+ LotNo: Code[50];
+ Quantity: Decimal;
+ EmissionCO2: Decimal;
+ EmissionCH4: Decimal;
+ EmissionN2O: Decimal;
+ SustAccountNo: Code[20])
+ var
+ ReservationEntry: Record "Reservation Entry";
+ begin
+ LibraryPurchase.CreatePurchaseLine(
+ PurchaseLine,
+ PurchaseHeader,
+ "Purchase Line Type"::Item,
+ ItemNo,
+ Quantity);
+
+ PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandIntInRange(10, 100));
+ PurchaseLine.Validate("Sust. Account No.", SustAccountNo);
+ PurchaseLine.Validate("Emission CO2", EmissionCO2);
+ PurchaseLine.Validate("Emission CH4", EmissionCH4);
+ PurchaseLine.Validate("Emission N2O", EmissionN2O);
+
+ if ItemTrackingCode <> '' then
+ LibraryItemTracking.CreatePurchOrderItemTracking(
+ ReservationEntry, PurchaseLine, '', LotNo, PurchaseLine.Quantity);
+ PurchaseLine.Modify();
+ end;
+
#if not CLEAN26
[Obsolete('The statistics action will be replaced with the PurchaseOrderStatistics action. The new action uses RunObject and does not run the action trigger. Use a page extension to modify the behaviour.', '26.0')]
[ModalPageHandler]
diff --git a/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al b/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al
index ee9a5d1c2e..0787693f40 100644
--- a/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al
+++ b/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al
@@ -15,6 +15,7 @@ using Microsoft.Inventory.BOM;
using Microsoft.Inventory.Item;
using Microsoft.Inventory.Journal;
using Microsoft.Inventory.Location;
+using Microsoft.Inventory.Tracking;
using Microsoft.Inventory.Transfer;
using Microsoft.Projects.Resources.Resource;
using Microsoft.Purchases.Document;
@@ -52,6 +53,7 @@ codeunit 148184 "Sustainability Posting Test"
LibraryResource: Codeunit "Library - Resource";
LibraryWarehouse: Codeunit "Library - Warehouse";
LibraryVariableStorage: Codeunit "Library - Variable Storage";
+ LibraryItemTracking: Codeunit "Library - Item Tracking";
NotificationLifecycleMgt: Codeunit "Notification Lifecycle Mgt.";
InformationTakenToLedgerEntryLbl: Label '%1 on the Ledger Entry should be taken from %2', Locked = true;
ValueMustBeEqualErr: Label '%1 must be equal to %2 in the %3.', Comment = '%1 = Field Caption , %2 = Expected Value, %3 = Table Caption';
@@ -5982,6 +5984,65 @@ codeunit 148184 "Sustainability Posting Test"
Assert.ExpectedError(ItemOrCategoryFilterErr);
end;
+ [Test]
+ procedure VerifySustValueEntryForAssemblyWithLotAndSpecificCarbonTracking()
+ var
+ CompItem: Record Item;
+ ParentItem: Record Item;
+ AssemblyHeader: Record "Assembly Header";
+ PostedAssemblyHeader: Record "Posted Assembly Header";
+ SustainabilityAccount: Record "Sustainability Account";
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ Quantity: Decimal;
+ AccountCode: array[2] of Code[20];
+ CO2ePerUnit: array[2] of Decimal;
+ LotNo: array[2] of Code[50];
+ ExpectedCO2eOnLot: array[2] of Decimal;
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value Entry is created for Component Item when Assembly is posted with Lot tracking and Specific Carbon Tracking Method.
+ LibrarySustainability.CleanUpBeforeTesting();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account.
+ CreateSustainabilityAccount(AccountCode[1], CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10));
+ SustainabilityAccount.Get(AccountCode[1]);
+
+ // [GIVEN] Generate Random "CO2e Per Unit" and Quantity.
+ CO2ePerUnit[1] := LibraryRandom.RandIntInRange(10, 10);
+ CO2ePerUnit[2] := LibraryRandom.RandIntInRange(20, 20);
+ Quantity := LibraryRandom.RandIntInRange(10, 10);
+
+ // [GIVEN] Create a Assembly Item.
+ CreateAssembledItem(ParentItem, "Assembly Policy"::"Assemble-to-Order", 1, 1);
+ ParentItem.Validate("Default Sust. Account", AccountCode[1]);
+ ParentItem.Validate("CO2e per Unit", CO2ePerUnit[1]);
+ ParentItem.Modify();
+
+ // [GIVEN] Create Sustainability Account and update Sustainability Account No., "CO2e per unit" in Component item.
+ CreateAndUpdateSustAccOnCompItem(ParentItem, CompItem, AccountCode[2], CO2ePerUnit[2]);
+
+ // [GIVEN] Create Lot No. and calculate Expected CO2e on Lot.
+ LibraryItemTracking.AddLotNoTrackingInfo(CompItem);
+
+ // [GIVEN] Update Carbon Tracking Method and Calculate Expected CO2e on Lot.
+ LibrarySustainability.UpdateCarbonTrackingMethod(CompItem, CompItem."Carbon Tracking Method"::Specific);
+ AddInventoryForLotTrackedItem(CompItem, LotNo, ExpectedCO2eOnLot, AccountCode[2], Quantity);
+
+ // [GIVEN] Create Assembly Document.
+ LibraryAssembly.CreateAssemblyHeader(AssemblyHeader, WorkDate() + 1, ParentItem."No.", '', Quantity, '');
+ UpdateLotTrackingInAssemblyLine(AssemblyHeader, CompItem, LotNo[2]);
+
+ // [WHEN] Post Assembly Document.
+ LibraryAssembly.PostAssemblyHeader(AssemblyHeader, '');
+
+ // [THEN] Verify Sustainability Value Entry should be shown when navigating Posted Sales Invoice through NavigateFindEntriesHandler handler.
+ GetPostedAssemblyHeader(PostedAssemblyHeader, ParentItem."No.");
+ VerifySustValueEntry(PostedAssemblyHeader."No.", CompItem."No.", -ExpectedCO2eOnLot[2]);
+ end;
+
local procedure CreateUserSetup(var UserSetup: Record "User Setup"; UserID: Code[50])
begin
UserSetup.Init();
@@ -6704,6 +6765,48 @@ codeunit 148184 "Sustainability Posting Test"
LibraryInventory.ClearItemJournal(ItemJournalTemplate, ItemJournalBatch);
end;
+ local procedure VerifySustValueEntry(DocumentNo: Code[20]; ItemNo: Code[20]; ExpectedCO2eEmission: Decimal)
+ var
+ SustainabilityValueEntry: Record "Sustainability Value Entry";
+ begin
+ SustainabilityValueEntry.SetRange("Document No.", DocumentNo);
+ SustainabilityValueEntry.SetRange("Item No.", ItemNo);
+ SustainabilityValueEntry.FindFirst();
+ Assert.AreEqual(
+ ExpectedCO2eEmission,
+ SustainabilityValueEntry."CO2e Amount (Actual)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), ExpectedCO2eEmission, SustainabilityValueEntry.TableCaption()));
+ Assert.AreEqual(
+ 0,
+ SustainabilityValueEntry."CO2e Amount (Expected)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption()));
+ end;
+
+ local procedure UpdateLotTrackingInAssemblyLine(AssemblyHeader: Record "Assembly Header"; CompItem: Record Item; LotNo: Code[50])
+ var
+ AssemblyLine: Record "Assembly Line";
+ ReservationEntry: Record "Reservation Entry";
+ begin
+ AssemblyLine.SetRange("Document No.", AssemblyHeader."No.");
+ AssemblyLine.SetRange(Type, AssemblyLine.Type::Item);
+ AssemblyLine.SetRange("No.", CompItem."No.");
+ AssemblyLine.FindFirst();
+ LibraryItemTracking.CreateAssemblyLineItemTracking(ReservationEntry, AssemblyLine, '', LotNo, AssemblyLine."Quantity (Base)");
+ end;
+
+ local procedure AddInventoryForLotTrackedItem(var Item: Record Item; var LotNo: array[2] of Code[50]; var ExpectedCO2eOnLot: array[2] of Decimal; AccountCode: Code[20]; Quantity: Decimal)
+ var
+ Index: Integer;
+ begin
+ for Index := 1 to ArrayLen(LotNo) do
+ LotNo[Index] := LibraryUtility.GenerateGUID();
+
+ for Index := 1 to ArrayLen(ExpectedCO2eOnLot) do
+ ExpectedCO2eOnLot[Index] := LibraryRandom.RandDecInRange(200, 600, 2);
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(Item, '', AccountCode, '', Quantity, WorkDate(), '', LotNo[1], ExpectedCO2eOnLot[1]);
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(Item, '', AccountCode, '', Quantity, WorkDate(), '', LotNo[2], ExpectedCO2eOnLot[2]);
+ end;
+
#if not CLEAN26
[Obsolete('The statistics action will be replaced with the PurchaseOrderStatistics action. The new action uses RunObject and does not run the action trigger. Use a page extension to modify the behaviour.', '26.0')]
[ModalPageHandler]
diff --git a/Apps/W1/Sustainability/test/src/SustainabilityServiceTests.Codeunit.al b/Apps/W1/Sustainability/test/src/SustainabilityServiceTests.Codeunit.al
index d67e41a3ca..6247dbb9c7 100644
--- a/Apps/W1/Sustainability/test/src/SustainabilityServiceTests.Codeunit.al
+++ b/Apps/W1/Sustainability/test/src/SustainabilityServiceTests.Codeunit.al
@@ -6,6 +6,7 @@ namespace Microsoft.Sustainability.Tests;
using Microsoft.Foundation.Address;
using Microsoft.Inventory.Item;
+using Microsoft.Inventory.Tracking;
using Microsoft.Projects.Project.Job;
using Microsoft.Projects.Resources.Resource;
using Microsoft.Purchases.Document;
@@ -36,6 +37,8 @@ codeunit 148218 "Sustainability Service Tests"
LibraryInventory: Codeunit "Library - Inventory";
LibrarySustainability: Codeunit "Library - Sustainability";
LibraryTestInitialize: Codeunit "Library - Test Initialize";
+ LibraryUtility: Codeunit "Library - Utility";
+ LibraryItemTracking: Codeunit "Library - Item Tracking";
IsInitialized: Boolean;
AccountCodeLbl: Label 'AccountCode%1', Comment = '%1 = Number';
CategoryCodeLbl: Label 'CategoryCode%1', Comment = '%1 = Number';
@@ -2359,6 +2362,71 @@ codeunit 148218 "Sustainability Service Tests"
Assert.ExpectedError(CO2eMustNotBeZeroErr);
end;
+ [Test]
+ procedure VerifySustValueEntryForServiceOrderWithLotTrackedItemAndSpecificCarbon()
+ var
+ SustainabilityLedgerEntry: Record "Sustainability Ledger Entry";
+ SustainabilityValueEntry: Record "Sustainability Value Entry";
+ SustainabilityAccount: Record "Sustainability Account";
+ ServiceHeader: Record "Service Header";
+ ServiceLine: Record "Service Line";
+ Item: Record Item;
+ CO2ePerUnit: Decimal;
+ CategoryCode: Code[20];
+ SubcategoryCode: Code[20];
+ AccountCode: Code[20];
+ LotNo: array[2] of Code[50];
+ ExpectedCO2eOnLot: array[2] of Decimal;
+ Quantity: Decimal;
+ begin
+ // [SCENARIO 546875] Verify Sustainability Value entry should be created when the Service document is posted with Ship and Invoice for Lot Tracked Item.
+ Initialize();
+
+ // [GIVEN] Update "Enable Value Chain Tracking" in Sustainability Setup.
+ LibrarySustainability.UpdateValueChainTrackingInSustainabilitySetup(true);
+
+ // [GIVEN] Create a Sustainability Account.
+ CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10));
+ SustainabilityAccount.Get(AccountCode);
+
+ // [GIVEN] Generate "CO2e Per Unit" and Quantity.
+ CO2ePerUnit := LibraryRandom.RandIntInRange(100, 200);
+ Quantity := LibraryRandom.RandIntInRange(10, 20);
+
+ // [GIVEN] Create an Item.
+ LibraryItemTracking.CreateLotItem(Item);
+ LibrarySustainability.CreateItemWithSpecificCarbonTrackingMethod(Item);
+ AddInventoryForLotTrackedItem(Item, LotNo, ExpectedCO2eOnLot, AccountCode, Quantity);
+
+ // [GIVEN] Create a Service Header.
+ CreateServiceOrderWithItem(ServiceHeader, ServiceLine, LibrarySales.CreateCustomerNo(), '', Item."No.", Quantity);
+ ServiceLine.Validate("Sust. Account No.", AccountCode);
+ ServiceLine.Validate("CO2e Per Unit", CO2ePerUnit);
+ ServiceLine.Modify();
+
+ // [GIVEN] Create Item Tracking for Service Line.
+ CreateServiceLineItemTracking(ServiceLine, '', LotNo[2], ServiceLine.Quantity);
+
+ // [WHEN] Post the Service Order with Ship and Invoice.
+ LibraryService.PostServiceOrder(ServiceHeader, true, false, true);
+
+ // [THEN] Verify Sustainability Value entry must be created.
+ SustainabilityValueEntry.SetRange("Document No.", FindServiceInvoiceHeader(ServiceHeader."No."));
+ SustainabilityValueEntry.FindFirst();
+ Assert.RecordCount(SustainabilityValueEntry, 1);
+ Assert.AreEqual(
+ -ExpectedCO2eOnLot[1],
+ SustainabilityValueEntry."CO2e Amount (Actual)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), -ExpectedCO2eOnLot[1], SustainabilityValueEntry.TableCaption()));
+ Assert.AreEqual(
+ 0,
+ SustainabilityValueEntry."CO2e Amount (Expected)",
+ StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption()));
+
+ SustainabilityLedgerEntry.SetRange("Document No.", FindServiceInvoiceHeader(ServiceHeader."No."));
+ Assert.RecordCount(SustainabilityLedgerEntry, 0);
+ end;
+
local procedure Initialize()
var
LibraryERMCountryData: Codeunit "Library - ERM Country Data";
@@ -2682,6 +2750,38 @@ codeunit 148218 "Sustainability Service Tests"
StrSubstNo(ValueMustBeEqualErr, ServiceCreditMemoLine.FieldCaption("Total CO2e"), TotalCO2e, ServiceCreditMemoLine.TableCaption()));
end;
+ local procedure AddInventoryForLotTrackedItem(var Item: Record Item; var LotNo: array[2] of Code[50]; var ExpectedCO2eOnLot: array[2] of Decimal; AccountCode: Code[20]; Quantity: Decimal)
+ var
+ Index: Integer;
+ begin
+ for Index := 1 to ArrayLen(LotNo) do
+ LotNo[Index] := LibraryUtility.GenerateGUID();
+
+ for Index := 1 to ArrayLen(ExpectedCO2eOnLot) do
+ ExpectedCO2eOnLot[Index] := LibraryRandom.RandDecInRange(200, 600, 2);
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(Item, '', AccountCode, '', Quantity, WorkDate(), '', LotNo[1], ExpectedCO2eOnLot[1]);
+ LibrarySustainability.PostPositiveAdjustmentWithItemTracking(Item, '', AccountCode, '', Quantity, WorkDate(), '', LotNo[2], ExpectedCO2eOnLot[2]);
+ end;
+
+ local procedure CreateServiceLineItemTracking(ServiceLine: Record "Service Line"; SerialNo: Code[50]; LotNo: Code[50]; QtyBase: Decimal)
+ var
+ ReservEntry: Record "Reservation Entry";
+ ItemTrackingSetup: Record "Item Tracking Setup";
+ begin
+ ItemTrackingSetup."Serial No." := SerialNo;
+ ItemTrackingSetup."Lot No." := LotNo;
+ CreateAssemblyHeaderItemTracking(ReservEntry, ServiceLine, ItemTrackingSetup, QtyBase);
+ end;
+
+ local procedure CreateAssemblyHeaderItemTracking(var ReservEntry: Record "Reservation Entry"; ServiceLine: Record "Service Line"; ItemTrackingSetup: Record "Item Tracking Setup"; QtyBase: Decimal)
+ var
+ RecRef: RecordRef;
+ begin
+ RecRef.GetTable(ServiceLine);
+ LibraryItemTracking.ItemTracking(ReservEntry, RecRef, ItemTrackingSetup, QtyBase);
+ end;
+
+
[ConfirmHandler]
procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
begin
diff --git a/Apps/W1/SustainabilityCopilotSuggestion/test/.resources/datasets/Testsuite.xml b/Apps/W1/SustainabilityCopilotSuggestion/test/.resources/datasets/Testsuite.xml
index 35154b4d0a..f6bb991f3b 100644
--- a/Apps/W1/SustainabilityCopilotSuggestion/test/.resources/datasets/Testsuite.xml
+++ b/Apps/W1/SustainabilityCopilotSuggestion/test/.resources/datasets/Testsuite.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/Apps/W1/WithholdingTax/Test/src/ERMWHTGLAccount.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/ERMWHTGLAccount.Codeunit.al
index 57d01dd62c..c3d023c821 100644
--- a/Apps/W1/WithholdingTax/Test/src/ERMWHTGLAccount.Codeunit.al
+++ b/Apps/W1/WithholdingTax/Test/src/ERMWHTGLAccount.Codeunit.al
@@ -32,7 +32,7 @@ codeunit 148325 "ERM WHT G/L Account"
InvalidLineValueErr: Label 'Invalid Line value.';
[Test]
- [HandlerFunctions('WhereUsedHandler')]
+ [HandlerFunctions('WhereUsedHandler,ConfirmHandler')]
[Scope('OnPrem')]
procedure CheckWHTPostingSetup()
var
@@ -67,7 +67,7 @@ codeunit 148325 "ERM WHT G/L Account"
end;
[Test]
- [HandlerFunctions('WhereUsedShowDetailsHandler')]
+ [HandlerFunctions('WhereUsedShowDetailsHandler,ConfirmHandler')]
[Scope('OnPrem')]
procedure ShowDetailsWhereUsedWHTPostingSetup()
var
@@ -140,5 +140,12 @@ codeunit 148325 "ERM WHT G/L Account"
GLAccountWhereUsedList.First();
GLAccountWhereUsedList.ShowDetails.Invoke();
end;
+
+ [ConfirmHandler]
+ [Scope('OnPrem')]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
}
diff --git a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al
index 2e08d385f2..61dcf37f22 100644
--- a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al
+++ b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsI.Codeunit.al
@@ -47,6 +47,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
IsInitialized: Boolean;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTPaymentJournalWithoutAppliedIdPostingErr()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -79,6 +80,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryOnPostedPurchaseInvoiceWithWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -90,6 +92,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryOnPostedPurchaseCreditMemoWithWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -125,6 +128,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryOnPostedPurchasePaymentJournalWithWHT()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -161,6 +165,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PaymentJournalAppliedWithCurrencyAndWHT()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -202,6 +207,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PostedPurchaseUnrealizedAmountAndBaseOnWHTEntry()
var
PurchaseHeader: Record "Purchase Header";
@@ -234,6 +240,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PostedPaymentJournalAmountOnGLEntry()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -311,6 +318,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure MultipleGenJournalWithDiffAccountTypeAmountOnGLEntry()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -353,6 +361,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PaymentJournalWithCurrency()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -387,6 +396,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntriesPartialPurchAppliesToID()
var
WHTPostingSetup: Record "Withholding Tax Posting Setup";
@@ -433,6 +443,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntriesPartialPurchAppliesToDocNo()
var
WHTPostingSetup: Record "Withholding Tax Posting Setup";
@@ -478,6 +489,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PurchaseCrMemoMultiplePartialAppln()
var
WHTPostingSetup: Record "Withholding Tax Posting Setup";
@@ -528,6 +540,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure TFS376116_Inconsistent()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -582,6 +595,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure TFS376796_Inconsistent()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -630,6 +644,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure ApplyPaymentToExceedingInvoices()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -675,6 +690,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure TFS377165_Inconsistent()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -710,6 +726,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchDocEmptyTypeNegativeAmtAndPurchInvoice()
var
PurchaseHeader: Record "Purchase Header";
@@ -761,6 +778,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchDocEmptyTypePositiveAmtAndPurchInvoice()
var
PurchaseHeader: Record "Purchase Header";
@@ -812,6 +830,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchInvoiceWHTWithAppliedPurchCrMemoWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -866,6 +885,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchInvoiceWHTAndPurchCrMemoWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -921,6 +941,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchInvoiceWHTWithAppliedPurchCrMemoNonWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -976,6 +997,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentApplToPurchInvoiceWHTAndPurchCrMemoNonWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -1029,6 +1051,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentWithLessAmountApplToMultipleInvoiceAndCrMemo()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -1075,6 +1098,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentWithEqualAmountApplToMultipleInvoiceAndCrMemo()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -1119,6 +1143,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPaymentWithGreaterAmountApplToMultipleInvoiceAndCrMemo()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -1165,6 +1190,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchDocEmptyTypeNegativeAmtAndPurchInvoice()
var
PurchaseHeader: Record "Purchase Header";
@@ -1217,6 +1243,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchDocEmptyTypePositiveAmtAndPurchInvoice()
var
PurchaseHeader: Record "Purchase Header";
@@ -1269,6 +1296,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchInvoiceWHTWithAppliedPurchCrMemoWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -1323,6 +1351,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchInvoiceWHTAndPurchCrMemoWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -1379,6 +1408,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchInvoiceWHTWithAppliedPurchCrMemoNonWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -1433,6 +1463,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentApplToPurchInvoiceWHTAndPurchCrMemoNonWHT()
var
PurchaseHeader: Record "Purchase Header";
@@ -1487,6 +1518,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentWithLessAmountApplToMultipleInvoiceAndCrMemo()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -1536,6 +1568,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTAmtPostPaymentWithEqualAmountApplToMultipleInvoiceAndCrMemo()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -1649,6 +1682,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PostMultipleWHTInvoiceWithPayment()
var
GenJournalLine: array[3] of Record "Gen. Journal Line";
@@ -1703,6 +1737,7 @@ codeunit 148321 "ERM Withholding Tax Tests I"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryOnPostedPurchaseInvoiceJournalWithWHT()
var
GenJournalLine: Record "Gen. Journal Line";
diff --git a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsII.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsII.Codeunit.al
index 8643156139..64819910b5 100644
--- a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsII.Codeunit.al
+++ b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingTaxTestsII.Codeunit.al
@@ -46,6 +46,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryOfPostedInvoiceJnlAndPaymentJnl()
var
BankAccount: Record "Bank Account";
@@ -87,6 +88,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryForPaymentWithManualApplication()
var
GenJournalLine: Record "Gen. Journal Line";
@@ -130,6 +132,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTEntryForPartialPaymentsWithDiffAccounts()
var
PurchaseLine: Record "Purchase Line";
@@ -172,6 +175,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PostApplyPaymentsToWHTAndNormalInvoices()
var
VATPostingSetup: Record "VAT Posting Setup";
@@ -233,6 +237,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure ConfirmErrorOnBlankWHTSetupPurchase()
var
PurchLine: Record "Purchase Line";
@@ -261,6 +266,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTPostingSetupGetPrepaidWHTAccountUT()
var
WHTPostingSetup: Record "Withholding Tax Posting Setup";
@@ -269,6 +275,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
// [SCENARIO 285194] WHT Posting Setup's functions GetPrepaidWithholdingAccount returns PrepaidWHTAccount or throws an error when empty
Initialize();
+ UpdateLocalFunctionalitiesOnGeneralLedgerSetup(true);
WHTPostingSetup.Init();
asserterror WHTPostingSetup.GetPrepaidWithholdingTaxAccount();
Assert.ExpectedErrorCode('TestField');
@@ -284,6 +291,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure WHTPostingSetupGetPayableWHTAccountUT()
var
WHTPostingSetup: Record "Withholding Tax Posting Setup";
@@ -292,6 +300,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
// [SCENARIO 285194] WHT Posting Setup's functions GetPayableWithholdingAccount returns PayableWHTAccount or throws an error when empty
Initialize();
+ UpdateLocalFunctionalitiesOnGeneralLedgerSetup(true);
WHTPostingSetup.Init();
asserterror WHTPostingSetup.GetPayableWithholdingTaxAccount();
Assert.ExpectedErrorCode('TestField');
@@ -306,6 +315,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesLessThanNoSeriesOnePmtOneInv()
var
InvoiceGenJournalLine: Record "Gen. Journal Line";
@@ -337,6 +347,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesMoreThanNoSeriesOnePmtOneInv()
var
InvoiceGenJournalLine: Record "Gen. Journal Line";
@@ -368,6 +379,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesLessThanNoSeriesOnePmtTwoInv()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -402,6 +414,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesMoreThanNoSeriesOnePmtTwoInv()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -436,6 +449,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesLessThanNoSeriesTwoPmtTwoInvDiffDocNos()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -469,6 +483,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesMoreThanNoSeriesTwoPmtTwoInvDiffDocNos()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -502,6 +517,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesLessThanNoSeriesTwoPmtTwoInvSameDocNos()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -535,6 +551,7 @@ codeunit 148322 "ERM Withholding Tax Tests II"
end;
[Test]
+ [HandlerFunctions('ConfirmHandler')]
procedure JournalPostingNoSeriesMoreThanNoSeriesTwoPmtTwoInvSameDocNos()
var
InvoiceGenJournalLine: array[2] of Record "Gen. Journal Line";
@@ -1035,4 +1052,11 @@ codeunit 148322 "ERM Withholding Tax Tests II"
procedure MessageHandler(Message: Text[1024])
begin
end;
+
+ [ConfirmHandler]
+ [Scope('OnPrem')]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingVATForSEA.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingVATForSEA.Codeunit.al
index 3dfb520122..ea67f1d888 100644
--- a/Apps/W1/WithholdingTax/Test/src/ERMWithholdingVATForSEA.Codeunit.al
+++ b/Apps/W1/WithholdingTax/Test/src/ERMWithholdingVATForSEA.Codeunit.al
@@ -68,6 +68,7 @@ codeunit 148326 "ERM Withholding VAT For SEA"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure ApplyPaymentAfterPostPurchaseInvoice()
var
GeneralPostingSetup: Record "General Posting Setup";
@@ -93,6 +94,7 @@ codeunit 148326 "ERM Withholding VAT For SEA"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure ApplyRefundAfterPostPurchaseCreditMemo()
var
GeneralPostingSetup: Record "General Posting Setup";
@@ -148,6 +150,7 @@ codeunit 148326 "ERM Withholding VAT For SEA"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure PostWHTEntryWithoutAnyError()
var
GeneralPostingSetup: Record "General Posting Setup";
@@ -179,6 +182,7 @@ codeunit 148326 "ERM Withholding VAT For SEA"
[Test]
[Scope('OnPrem')]
+ [HandlerFunctions('ConfirmHandler')]
procedure VerifyErrorOnWHTCertificateNoSeries()
var
GeneralPostingSetup: Record "General Posting Setup";
diff --git a/Apps/W1/WithholdingTax/Test/src/WithholdingTaxJournals.Codeunit.al b/Apps/W1/WithholdingTax/Test/src/WithholdingTaxJournals.Codeunit.al
index 37afa45169..32fe8e8235 100644
--- a/Apps/W1/WithholdingTax/Test/src/WithholdingTaxJournals.Codeunit.al
+++ b/Apps/W1/WithholdingTax/Test/src/WithholdingTaxJournals.Codeunit.al
@@ -61,7 +61,7 @@ codeunit 148327 "Withholding Tax Journals"
end;
[Test]
- [HandlerFunctions('ApplyVendorEntriesModalPageHandler')]
+ [HandlerFunctions('ApplyVendorEntriesModalPageHandler,ConfirmHandler')]
[Scope('OnPrem')]
procedure PostPaymentJournalWithAppliedEntryTwoVendors()
var
@@ -213,4 +213,11 @@ codeunit 148327 "Withholding Tax Journals"
ApplyVendorEntries.ActionSetAppliesToID.Invoke();
ApplyVendorEntries.OK().Invoke();
end;
+
+ [ConfirmHandler]
+ [Scope('OnPrem')]
+ procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean)
+ begin
+ Reply := true;
+ end;
}
\ No newline at end of file
diff --git a/Apps/W1/WithholdingTax/app/src/Purchase/Setup/WithholdingGLSetupExt.TableExt.al b/Apps/W1/WithholdingTax/app/src/Purchase/Setup/WithholdingGLSetupExt.TableExt.al
index 259591595e..a49356391e 100644
--- a/Apps/W1/WithholdingTax/app/src/Purchase/Setup/WithholdingGLSetupExt.TableExt.al
+++ b/Apps/W1/WithholdingTax/app/src/Purchase/Setup/WithholdingGLSetupExt.TableExt.al
@@ -5,6 +5,7 @@
namespace Microsoft.WithholdingTax;
using Microsoft.Finance.GeneralLedger.Setup;
+using System.Utilities;
tableextension 6790 "Withholding GL Setup Ext" extends "General Ledger Setup"
{
@@ -14,6 +15,12 @@ tableextension 6790 "Withholding GL Setup Ext" extends "General Ledger Setup"
{
Caption = 'Enable Withholding Tax';
DataClassification = CustomerContent;
+ trigger OnValidate()
+ begin
+ if Rec."Enable Withholding Tax" then
+ if not ConfirmManagement.GetResponseOrDefault(ConfirmEnableWithholdingTaxQst, false) then
+ Error('');
+ end;
}
field(6785; "Manual Sales Wthldg. Tax Calc."; Boolean)
{
@@ -41,4 +48,8 @@ tableextension 6790 "Withholding GL Setup Ext" extends "General Ledger Setup"
DataClassification = CustomerContent;
}
}
+
+ var
+ ConfirmManagement: Codeunit "Confirm Management";
+ ConfirmEnableWithholdingTaxQst: Label 'Withholding Tax feature is currently in preview. We strongly recommend that you first enable and test this feature on a sandbox environment that has a copy of production data before doing this on a production environment.\\Are you sure you want to enable this feature?';
}
\ No newline at end of file
diff --git a/Build/Packages.json b/Build/Packages.json
index 10e8ad7100..906720893a 100644
--- a/Build/Packages.json
+++ b/Build/Packages.json
@@ -4,7 +4,7 @@
"Source": "NuGet.org"
},
"AppBaselines-BCArtifacts": {
- "Version": "27.3.44069",
+ "Version": "27.4.45057",
"Source": "BCArtifacts",
"_comment": "Used to fetch app baselines from BC artifacts"
}
diff --git a/Build/rulesets/app.ruleset.json b/Build/rulesets/app.ruleset.json
index 709f7e78ca..5eee8228c2 100644
--- a/Build/rulesets/app.ruleset.json
+++ b/Build/rulesets/app.ruleset.json
@@ -22,11 +22,6 @@
"id": "AL0424",
"action": "Warning"
},
- {
- "id": "AL0897",
- "action": "Error",
- "justification": "Marking it as error temporarily to ensure subsequent PRs have using statements in sorted order to unblock the merging of BCApps PR (to remove the exception for AL0897). Will be reverted once the exception for AL0897 is removed from BCApps."
- },
{
"id": "AL0432",
"action": "Warning",
diff --git a/Build/rulesets/base.ruleset.json b/Build/rulesets/base.ruleset.json
index 3b18079dec..f5753d05f1 100644
--- a/Build/rulesets/base.ruleset.json
+++ b/Build/rulesets/base.ruleset.json
@@ -23,11 +23,6 @@
"action": "Warning",
"justification": "Bug 472148. The multilanguage syntax is being deprecated. Please update to the new syntax."
},
- {
- "id": "AL0897",
- "action": "Error",
- "justification": "Marking it as error temporarily to ensure subsequent PRs have using statements in sorted order to unblock the merging of BCApps PR (to remove the exception for AL0897). Will be reverted once the exception for AL0897 is removed from BCApps."
- },
{
"id": "AL0432",
"action": "None",
@@ -387,22 +382,22 @@
},
{
"id": "AA0471",
- "action": "None",
+ "action": "Error",
"justification": "AutoformatType should be defined for decimal fields in Page objects to ensure proper formatting behavior."
},
{
"id": "AA0472",
- "action": "None",
+ "action": "Error",
"justification": "AutoformatExpression should be defined when AutoformatType is not default to ensure proper formatting behavior."
},
{
"id": "AA0473",
- "action": "None",
+ "action": "Error",
"justification": "AutoformatType should be defined for decimal fields in Table objects to ensure proper formatting behavior."
},
{
"id": "AA0474",
- "action": "None",
+ "action": "Error",
"justification": "AutoformatExpression should be defined when AutoformatType is not default to ensure proper formatting behavior."
},
{
diff --git a/Build/rulesets/ruleset.json b/Build/rulesets/ruleset.json
index 56f0ad3f9c..51cc2bebc6 100644
--- a/Build/rulesets/ruleset.json
+++ b/Build/rulesets/ruleset.json
@@ -39,11 +39,6 @@
"action": "None",
"justification": "TODO(#572306) - (see PTE0026) This will require a multi-release effort."
},
- {
- "id": "AL0897",
- "action": "None",
- "justification": "TODO(#616973)"
- },
{
"id": "AS0139",
"action": "None",