From bdc85fc2ef2ffc773c32cd0135ae691ac60c8759 Mon Sep 17 00:00:00 2001 From: magnushar Date: Fri, 29 Nov 2024 13:12:01 +0100 Subject: [PATCH] Syncing with version 26.0.27417.0 --- .github/AL-Go-Settings.json | 2 +- .../CreateBankAccRecoAT.Codeunit.al | 68 - .../CreateATGLAccount.Codeunit.al | 11 +- .../CreateAccScheduleLineAT.Codeunit.al | 17 +- .../CreatePostingGroupsAT.Codeunit.al | 9 - .../CreateVatStatementLineAT.Codeunit.al | 84 +- .../CreateCompanyInformationAT.Codeunit.al | 9 +- .../CreateNoSeriesAT.Codeunit.al | 101 - .../CreateVendorTemplateAT.Codeunit.al | 26 - .../ContosoATLocalization.Codeunit.al | 27 +- .../CreateAUVATStatement.Codeunit.al | 5 +- .../CreateVATSetupPostGrpAU.Codeunit.al | 4 +- .../CreateVATStatementBE.Codeunit.al | 589 +++--- .../app/src/tables/StgDataExchDefCA.Table.al | 30 - .../core/SwissQRBillUmlautEncoding.Enum.al | 4 +- .../app/src/setup/SwissQRBillSetup.Table.al | 14 +- .../Codeunits/CopyDocumentMgtCZZ.Codeunit.al | 49 +- .../DocAttachmentHandlerCZZ.Codeunit.al | 13 +- .../InstallApplicationCZZ.Codeunit.al | 11 - .../PurchAdvLetterManagementCZZ.Codeunit.al | 41 +- .../PurchAdvLetterPostCZZ.Codeunit.al | 4 +- .../SalesAdvLetterManagementCZZ.Codeunit.al | 46 + .../SalesAdvLetterPostCZZ.Codeunit.al | 4 +- .../UpgradeApplicationCZZ.Codeunit.al | 36 - .../Tables/AdvanceLetterTemplateCZZ.Table.al | 47 +- .../Tables/PurchAdvLetterEntryCZZ.Table.al | 8 + .../Tables/PurchAdvLetterHeaderCZZ.Table.al | 3 +- .../Tables/SalesAdvLetterEntryCZZ.Table.al | 8 + .../Tables/SalesAdvLetterHeaderCZZ.Table.al | 3 +- .../Src/PurchAdvPaymentsFCYCZZ.Codeunit.al | 113 +- .../Src/SalesAdvPaymentsFCYCZZ.Codeunit.al | 104 +- .../DefaultDimensionHandlerCZA.Codeunit.al | 28 + .../InstallApplicationCZA.Codeunit.al | 53 - .../UpgradeApplicationCZA.Codeunit.al | 72 - .../DocAttachmentHandlerCZB.Codeunit.al | 25 +- .../CashDeskManagementCZP.Codeunit.al | 6 + .../DocAttachmentHandlerCZP.Codeunit.al | 13 +- .../Codeunits/ServiceHandlerCZP.Codeunit.al | 8 +- .../Src/Tables/CashDocumentHeaderCZP.Table.al | 3 +- .../Codeunits/CompensationPostCZC.Codeunit.al | 6 + .../DocAttachmentHandlerCZC.Codeunit.al | 19 +- .../DocAttachmentHandlerCZL.Codeunit.al | 13 +- .../InstallApplicationCZL.Codeunit.al | 63 - .../UpgradeApplicationCZL.Codeunit.al | 18 - .../PurchasesPayablesSetupCZL.TableExt.al | 14 +- .../SalesReceivablesSetupCZL.TableExt.al | 14 +- .../ServiceMgtSetupCZL.TableExt.al | 12 +- .../Tables/AccScheduleExtensionCZL.Table.al | 16 +- .../src/tables/StgIntrastatJnlLine.Table.al | 322 --- .../src/tables/StgItemJournalLine.Table.al | 1009 --------- .../src/tables/StgItemLedgerEntry.Table.al | 658 ------ .../tables/StgVATControlReportLine.Table.al | 41 - .../src/tables/StgVATPostingSetup.Table.al | 42 - .../CreateDEVATStatement.Codeunit.al | 131 +- .../Install/ElsterDataMigration.Codeunit.al | 74 +- .../src/Tables/SalesVATAdvanceNotif.Table.al | 17 - .../CreateVATStatementLineDK.Codeunit.al | 83 +- .../CreateESBankAccReco.Codeunit.al | 68 - .../CreateESAccScheduleName.Codeunit.al | 55 - .../CreateESFinancialReport.Codeunit.al | 27 +- .../CreateESVatStatementLine.Codeunit.al | 460 ++-- .../CreateESVatStatementName.Codeunit.al | 21 +- .../CreateESFAPostingGroup.Codeunit.al | 12 - .../CreateESSalesDimValue.Codeunit.al | 6 - .../ESContosoLocalization.Codeunit.al | 8 - .../src/tables/StgReportSelections.Table.al | 30 - .../app/src/tables/StgSIISetup.Table.al | 33 - .../CreateVATStatementFI.Codeunit.al | 3 +- .../CreateVATStatementFR.Codeunit.al | 61 +- .../2. Master Data/CreateItemFR.Codeunit.al | 2 +- .../CreateVendorPostingGrpFR.Codeunit.al | 2 +- .../Demo Tool/CreateFRGLAccounts.Codeunit.al | 4 +- .../CreateGBVATReportSetup.Codeunit.al | 2 +- .../CreateGBVATStatement.Codeunit.al | 153 +- .../app/src/page/FixedAssetShifts.Page.al | 2 + .../app/src/table/FixedAssetShift.Table.al | 10 +- .../app/src/tables/StgDataExchDefMX.Table.al | 29 - .../CreateVatStatementLineNL.Codeunit.al | 99 +- .../Export Engine/SAFTExportHeader.Table.al | 14 +- .../src/Install and Setup/SAFTSetup.Table.al | 14 +- .../Install and Setup/SAFTUpgrade.Codeunit.al | 28 - .../CreateNZVATStatement.Codeunit.al | 5 +- .../CreateGenJournalLineSE.Codeunit.al | 35 - .../CreateMarketingSetupSE.Codeunit.al | 20 - .../CreateAccScheduleSE.Codeunit.al | 76 +- .../SEContosoLocalization.Codeunit.al | 21 - .../app/src/tables/StgDataExchDefUS.Table.al | 29 - .../Document/IRS1099FormDocHeader.Table.al | 17 + .../pages/APIV2SalespersonPurchaser.Page.al | 73 + .../src/APIV2SalespersonPurchE2E.Codeunit.al | 171 ++ .../codeunits/UpgradeBankDeposits.Codeunit.al | 254 +-- .../app/src/pages/BankDepositSubform.Page.al | 3 +- .../app/src/Setup/CompanyHub.Profile.al | 1 - .../PostBankPaymentEntry.Codeunit.al | 3 + .../1.Setup data/CreateCurrency.Codeunit.al | 96 +- .../CreateVATStatement.Codeunit.al | 161 +- .../CreateContosoTenantData.Codeunit.al | 182 ++ .../CreateMediaRepositry.Codeunit.al | 83 + .../CreateWebServices.Codeunit.al | 894 ++++++++ .../Foundation/FoundationModule.Codeunit.al | 2 - .../app/DemoTool/ContosoDemoTool.Codeunit.al | 17 + Apps/W1/DataSearch/App/DataSearch.page.al | 2 + Apps/W1/EDocument/app/README.md | 771 +++---- .../EDocIntegrationManagement.Codeunit.al | 7 + .../Interfaces/IDocumentSender.Interface.al | 5 +- .../EDocumentProcessing.Codeunit.al | 2 - .../Copilot/EDocPOCopilotMatching.Codeunit.al | 4 +- .../Copilot/EDocPOCopilotProp.Page.al | 8 +- .../EDocLineMatching.Codeunit.al | 22 +- .../EDocOrderLineMatching.Page.al | 28 +- .../OrderMatching/EDocOrderMatch.Page.al | 2 +- .../OrderMatching/EDocOrderMatch.Table.al | 18 +- .../EDocPurchaseOrderSub.Page.al | 6 +- .../app/src/Service/EdocumentService.Page.al | 23 +- .../CreateEDocumentSetup.Codeunit.al | 2 +- .../CreateEDocumentMasterData.Codeunit.al | 14 +- .../CreateEDocumentTransactions.Codeunit.al | 7 +- .../EDocumentContosoModule.Codeunit.al | 12 +- .../EDocumentContosoModule.EnumExt.al | 1 + .../demo data/EDocumentModuleSetup.Table.al | 29 +- .../test/src/LibraryEDocument.Codeunit.al | 2 +- .../Matching/EDocLineMatchingTest.Codeunit.al | 76 +- .../app/src/IntegrationImpl.Codeunit.al | 11 +- .../Pagero/PageroIntegrationImpl.Codeunit.al | 11 +- .../src/Pagero/PageroProcessing.Codeunit.al | 2 +- .../app/src/SMTPAccount.table.al | 9 - .../app/src/SMTPConnectorInstall.Codeunit.al | 1 - .../app/src/SMTPConnectorUpgrade.Codeunit.al | 22 - .../FSIntTableSubscriber.Codeunit.al | 6 +- .../app/src/Tables/FSWorkOrder.Table.al | 2 +- .../.resources/LatePaymentStandardModel.txt | 1 + Apps/W1/LatePaymentPredictor/app/app.json | 7 +- .../app/src/LPMachineLearningSetup.Table.al | 8 +- .../test/src/LPPredictionTest.Codeunit.al | 39 - .../app/src/tables/MSWalletCharge.Table.al | 56 - .../tables/MSWalletMerchantAccount.Table.al | 166 -- .../tables/MSWalletMerchantTemplate.Table.al | 97 - .../app/src/tables/MSWalletPayment.Table.al | 61 - .../pages/MasterDataManagementSetup.Page.al | 2 +- .../app/src/UniversalPrinterSettings.Table.al | 13 - Apps/W1/PowerBIReports/app/app.json | 4 +- .../app/assets/ExtensionLogo.png | Bin 5446 -> 6351 bytes .../AgedPayablesBackDating.Page.al | 4 +- .../AgedReceivablesBackDating.Page.al | 4 +- .../src/Autogenerated/AllocatedHours.Page.al | 4 +- .../AverageCollectionPeriod.Page.al | 4 +- .../AverageProductionsTimes.Page.al | 4 +- .../Autogenerated/BalanceSheetbyMonth.Page.al | 4 +- .../app/src/Autogenerated/BinContents.Page.al | 4 +- .../BinContentsbyItemTracking.Page.al | 4 +- .../Autogenerated/BudgetComparison.Page.al | 4 +- .../Autogenerated/CapacityVariance.Page.al | 4 +- .../Autogenerated/ConsumptionVariance.Page.al | 4 +- .../Autogenerated/CurrentUtilization.Page.al | 4 +- .../src/Autogenerated/DailyPurchases.Page.al | 4 +- .../app/src/Autogenerated/DailySales.Page.al | 4 +- .../DetailedCustLedgerEntries.Page.al | 4 +- .../DetailedVendorLedgerEntries.Page.al | 4 +- .../app/src/Autogenerated/EBITDA.Page.al | 4 +- .../ExpectedCapacityNeed.Page.al | 4 +- .../src/Autogenerated/FinanceReport.Page.al | 6 +- .../Autogenerated/FinancialOverview.Page.al | 4 +- .../FinishedProdOrderBreakdown.Page.al | 4 +- .../GeneralLedgerEntries.Page.al | 4 +- .../Autogenerated/GrossRequirement.Page.al | 4 +- .../HistoricalUtilization.Page.al | 4 +- .../IncomeStatementbyMonth.Page.al | 4 +- .../Autogenerated/InventoryOverview.Page.al | 4 +- .../src/Autogenerated/InventoryReport.Page.al | 6 +- .../InventoryValuationOverview.Page.al | 4 +- .../InventoryValuationReport.Page.al | 6 +- .../InventoryValuationbyItem.Page.al | 4 +- .../InventoryValuationbyLoc.Page.al | 4 +- .../src/Autogenerated/InventorybyItem.Page.al | 4 +- .../Autogenerated/InventorybyLocation.Page.al | 4 +- .../src/Autogenerated/InventorybyLot.Page.al | 4 +- .../Autogenerated/InventorybySerialNo.Page.al | 4 +- .../Autogenerated/ItemAvailability.Page.al | 4 +- .../app/src/Autogenerated/Liabilities.Page.al | 4 +- .../src/Autogenerated/LiquidityKPIs.Page.al | 4 +- .../Autogenerated/ManufacturingReport.Page.al | 6 +- .../OrderProcessorRoleCenter.PageExt.al | 8 + .../PowerBIEmbeddedObjects.PermissionSet.al | 3 +- .../src/Autogenerated/ProductionScrap.Page.al | 4 +- .../src/Autogenerated/Profitability.Page.al | 4 +- .../ProjectInvdSalesbyCust.Page.al | 4 +- .../ProjectInvoicedSalesbyType.Page.al | 4 +- .../ProjectPerformancetoBudget.Page.al | 4 +- .../ProjectProfitability.Page.al | 4 +- .../Autogenerated/ProjectRealization.Page.al | 4 +- .../src/Autogenerated/ProjectTasks.Page.al | 4 +- .../Autogenerated/ProjectsOverview.Page.al | 4 +- .../src/Autogenerated/ProjectsReport.Page.al | 6 +- .../PurchActualvsBudgetAmt.Page.al | 4 +- .../PurchActualvsBudgetQty.Page.al | 4 +- .../PurchaseandSalesQuantity.Page.al | 4 +- .../PurchasesDecomposition.Page.al | 4 +- .../PurchasesMovingAnnualTotal.Page.al | 4 +- .../PurchasesMovingAverages.Page.al | 4 +- .../Autogenerated/PurchasesOverview.Page.al | 4 +- .../PurchasesPeriodOverPeriod.Page.al | 4 +- .../src/Autogenerated/PurchasesReport.Page.al | 6 +- .../PurchasesYearOverYear.Page.al | 4 +- .../src/Autogenerated/PurchasesbyItem.Page.al | 4 +- .../Autogenerated/PurchasesbyLocation.Page.al | 4 +- .../PurchasesbyPurchaser.Page.al | 4 +- .../Autogenerated/PurchasesbyVendor.Page.al | 4 +- .../ReleasedProductionOrders.Page.al | 4 +- .../SalesActualvsBudgetAmt.Page.al | 4 +- .../SalesActualvsBudgetQty.Page.al | 4 +- .../Autogenerated/SalesMonthToDate.Page.al | 4 +- .../SalesMovingAnnualTotal.Page.al | 4 +- .../Autogenerated/SalesMovingAverage.Page.al | 4 +- .../src/Autogenerated/SalesOverview.Page.al | 4 +- .../SalesPeriodOverPeriod.Page.al | 4 +- .../app/src/Autogenerated/SalesReport.Page.al | 6 +- .../src/Autogenerated/SalesbyCustomer.Page.al | 4 +- .../app/src/Autogenerated/SalesbyItem.Page.al | 4 +- .../src/Autogenerated/SalesbyLocation.Page.al | 71 + .../Autogenerated/SalesbySalesperson.Page.al | 4 +- .../Autogenerated/ScheduledReceipt.Page.al | 4 +- .../src/Autogenerated/WorkCenterLoad.Page.al | 4 +- .../app/src/Core/Pages/AssistedSetup.Page.al | 10 +- .../PowerBiReportBasic.PermissionSet.al | 4 + .../Core/Tables/PowerBIReportsSetup.Table.al | 3 +- .../Codeunits/FinanceFilterHelper.Codeunit.al | 3 - .../FinanceInstallationHandler.Codeunit.al | 24 +- .../Finance/Pages/AccountCategories.Page.al | 35 +- .../Queries/JobPlanningLinesItem.Query.al | 2 +- .../Codeunits/ManufFilterHelper.Codeunit.al | 2 - .../Codeunits/ProjectFilterHelper.Codeunit.al | 1 - .../Queries/JobLedgerEntries.Query.al | 2 +- .../Queries/JobPlanningLines.Query.al | 2 +- .../src/Projects/Queries/JobTasks.Query.al | 2 +- .../app/src/Projects/Queries/Jobs.Query.al | 2 +- .../TableExtensions/SetupProjects.TableExt.al | 4 +- .../PurchasesFilterHelper.Codeunit.al | 1 - .../Pages/PurchasingScorecard.Page.al | 50 +- .../Codeunits/SalesFilterHelper.Codeunit.al | 1 - .../powerbi-reports.code-workspace | 16 + Apps/W1/PowerBIReports/test-library/app.json | 46 + .../test-library/assets/ExtensionLogo.png | Bin 0 -> 5446 bytes .../src/PowerBIAPIEndpoints.Enum.al | 161 ++ .../src/PowerBIAPIRequests.Codeunit.al | 153 ++ .../src/PowerBIFilterScenarios.Enum.al | 29 + Apps/W1/PowerBIReports/test/app.json | 6 + .../src/Codeunits/PowerBICoreTest.Codeunit.al | 49 +- .../Codeunits/PowerBIFinanceTest.Codeunit.al | 32 +- .../PowerBIInventoryTest.Codeunit.al | 64 +- .../PowerBIManufacturingTest.Codeunit.al | 44 +- .../Codeunits/PowerBIProjectTest.Codeunit.al | 18 +- .../PowerBIPurchasesTest.Codeunit.al | 30 +- .../Codeunits/PowerBISalesTest.Codeunit.al | 24 +- .../TestSuites/SLS-AccuracyTests.xml | Bin 2306 -> 2312 bytes .../SLS-AttachmentAccuracyTests.xml | Bin 1216 -> 1216 bytes .../AI Tests/ItemEntitySearch.Codeunit.al | 2 +- .../MagicFunctionPromptTest.Codeunit.al | 2 +- .../test/AI Tests/SLSPromptTest.Codeunit.al | 2 +- .../AttachmentDataSizeTest.Codeunit.al | 2 +- .../ExtractInfoAccuracy.Codeunit.al | 2 +- .../ExtractInfoFromCsvPrompt.Codeunit.al | 2 +- .../LoadMappingsFromCsv.Codeunit.al | 2 +- .../LoadSuggestionsFromCsv.Codeunit.al | 2 +- .../MagicFunctionAttmtPrompt.Codeunit.al | 2 +- .../RedTXPIATests.Codeunit.al | 2 +- .../RedTeamingTests.Codeunit.al | 2 +- .../SaveFileMappingTest.Codeunit.al | 2 +- .../test/DocumentLookupTest.Codeunit.al | 2 +- .../test/ItemSrchInDocLookupTest.Codeunit.al | 2 +- .../test/SearchItemTest.Codeunit.al | 2 +- .../SearchItemsWithFiltersTest.Codeunit.al | 2 +- Apps/W1/SalesLinesSuggestions/test/app.json | 12 +- .../app/src/Base/Tables/ShpfyShop.Table.al | 42 - .../Tables/ShpfyCustomerAddress.Table.al | 13 +- .../Tables/ShpfyRegisteredStore.Table.al | 58 - .../ShpfyMtfldTypeCompanyRef.Codeunit.al | 29 + .../ShpfyMtfldTypeCustomerRef.Codeunit.al | 29 + .../Enums/ShpfyMetafieldType.Enum.al | 11 + .../ShpfyObjects.PermissionSet.al | 2 + .../SubBillingInstallation.Codeunit.al | 57 +- .../App/Billing/Tables/BillingLine.Table.al | 4 +- .../Tables/BillingLineArchive.Table.al | 4 +- .../Tables/CustomerContractDeferral.Table.al | 4 +- .../Tables/VendorContractDeferral.Table.al | 4 +- .../Tables/ImportedCustomerContract.Table.al | 3 +- .../Tables/ImportedServiceCommitment.Table.al | 4 +- .../Tables/ImportedServiceObject.Table.al | 4 +- .../RecurringBillingDocsTest.Codeunit.al | 8 +- .../SustCostManagement.Codeunit.al | 113 + .../app/src/Certificate/SustItem.TableExt.al | 8 + .../src/Certificate/SustItemCard.PageExt.al | 6 + .../Journal/SustItemJournalLine.TableExt.al | 138 +- .../Journal/SustainabilityJnlLine.Table.al | 6 + .../src/Journal/SustainabilityJournal.Page.al | 8 - .../Manufacturing/SustCalculateCO2e.Report.al | 211 ++ .../SustCapacityLedgerEntries.PageExt.al | 32 + .../SustCapacityLedgerEntry.TableExt.al | 54 + .../SustConsumptionJournal.PageExt.al | 27 + .../SustFinishedProdOrder.PageExt.al | 33 + .../SustFinishedProdOrders.PageExt.al | 33 + .../SustMachineCenter.TableExt.al | 15 + .../SustMachineCenterCard.PageExt.al | 37 + .../SustMachineCenterList.PageExt.al | 30 + .../SustManufacturingSubscriber.Codeunit.al | 354 ++++ .../SustOutputJournal.PageExt.al | 28 + .../SustProdBOMVersionLines.PageExt.al | 18 + .../SustProdOrderComponent.TableExt.al | 183 ++ .../SustProdOrderComponents.PageExt.al | 23 + .../SustProdOrderLine.TableExt.al | 205 ++ .../SustProdOrderRouting.PageExt.al | 23 + .../SustProdOrderRoutingLine.TableExt.al | 188 ++ .../SustProductionBOMLine.TableExt.al | 27 + .../SustProductionBOMLines.PageExt.al | 18 + .../SustProductionJournal.PageExt.al | 29 + .../SustRelProdOrderLines.PageExt.al | 23 + .../SustReleasedProdOrder.PageExt.al | 33 + .../SustReleasedProdOrders.PageExt.al | 33 + .../Manufacturing/SustRoutingLine.TableExt.al | 21 + .../Manufacturing/SustRoutingLines.PageExt.al | 18 + .../SustRoutingVersionLines.PageExt.al | 18 + .../Manufacturing/SustWorkCenter.TableExt.al | 15 + .../SustWorkCenterCard.PageExt.al | 36 + .../SustWorkCenterList.PageExt.al | 29 + .../SustItemPostSubscriber.Codeunit.al | 13 + .../Posting/SustainabilityPostMgt.Codeunit.al | 67 +- .../Sales/SustPstdSalesCrMemoSub.PageExt.al | 26 + .../Sales/SustPstdSalesInvSubform.PageExt.al | 26 + .../Sales/SustSalesCopyDocument.Codeunit.al | 52 + .../Sales/SustSalesCrMemoHeader.TableExt.al | 31 + .../src/Sales/SustSalesCrMemoLine.TableExt.al | 54 + .../src/Sales/SustSalesCrMemoStats.PageExt.al | 47 + .../Sales/SustSalesCrMemoSubform.PageExt.al | 26 + .../Sales/SustSalesInvoiceHeader.TableExt.al | 31 + .../Sales/SustSalesInvoiceLine.TableExt.al | 54 + .../Sales/SustSalesInvoiceStats.PageExt.al | 47 + .../Sales/SustSalesInvoiceSubform.PageExt.al | 26 + .../src/Sales/SustSalesOrderStats.PageExt.al | 55 + .../Sales/SustSalesOrderSubform.PageExt.al | 26 + .../Sales/SustSalesRetOrdSubform.PageExt.al | 26 + .../Sales/SustSalesRetRcptLine.TableExt.al | 54 + .../Sales/SustSalesShipmentLine.TableExt.al | 54 + .../src/Sales/SustSalesStatistics.PageExt.al | 52 + .../src/Sales/SustSalesSubscriber.Codeunit.al | 249 +++ .../SustainabilitySalesHeader.TableExt.al | 43 + .../Sales/SustainabilitySalesLine.TableExt.al | 188 ++ .../test/src/SustValueEntryTest.Codeunit.al | 1855 +++++++++++++++++ .../src/SustainabilityPostingTest.Codeunit.al | 909 ++++++++ 347 files changed, 10481 insertions(+), 6242 deletions(-) delete mode 100644 Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Bank/4. Historical Data/CreateBankAccRecoAT.Codeunit.al delete mode 100644 Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Purchase/2. Master Data/CreateVendorTemplateAT.Codeunit.al delete mode 100644 Apps/CA/HybridBCLast_CA/app/src/tables/StgDataExchDefCA.Table.al delete mode 100644 Apps/CZ/HybridBCLast_CZ/app/src/tables/StgIntrastatJnlLine.Table.al delete mode 100644 Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemJournalLine.Table.al delete mode 100644 Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemLedgerEntry.Table.al delete mode 100644 Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATControlReportLine.Table.al delete mode 100644 Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATPostingSetup.Table.al delete mode 100644 Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Bank/4.Historical Data/CreateESBankAccReco.Codeunit.al delete mode 100644 Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESAccScheduleName.Codeunit.al delete mode 100644 Apps/ES/HybridBCLast_ES/app/src/tables/StgReportSelections.Table.al delete mode 100644 Apps/ES/HybridBCLast_ES/app/src/tables/StgSIISetup.Table.al delete mode 100644 Apps/MX/HybridBCLast_MX/app/src/tables/StgDataExchDefMX.Table.al delete mode 100644 Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/CRM/1.Setup Data/CreateMarketingSetupSE.Codeunit.al delete mode 100644 Apps/US/HybridBCLast_US/app/src/tables/StgDataExchDefUS.Table.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2SalespersonPurchaser.Page.al create mode 100644 Apps/W1/APIV2/test/src/APIV2SalespersonPurchE2E.Codeunit.al create mode 100644 Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateContosoTenantData.Codeunit.al create mode 100644 Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateMediaRepositry.Codeunit.al create mode 100644 Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateWebServices.Codeunit.al create mode 100644 Apps/W1/LatePaymentPredictor/app/.resources/LatePaymentStandardModel.txt delete mode 100644 Apps/W1/MSWalletPayments/app/src/tables/MSWalletCharge.Table.al delete mode 100644 Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantAccount.Table.al delete mode 100644 Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantTemplate.Table.al delete mode 100644 Apps/W1/MSWalletPayments/app/src/tables/MSWalletPayment.Table.al create mode 100644 Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyLocation.Page.al create mode 100644 Apps/W1/PowerBIReports/powerbi-reports.code-workspace create mode 100644 Apps/W1/PowerBIReports/test-library/app.json create mode 100644 Apps/W1/PowerBIReports/test-library/assets/ExtensionLogo.png create mode 100644 Apps/W1/PowerBIReports/test-library/src/PowerBIAPIEndpoints.Enum.al create mode 100644 Apps/W1/PowerBIReports/test-library/src/PowerBIAPIRequests.Codeunit.al create mode 100644 Apps/W1/PowerBIReports/test-library/src/PowerBIFilterScenarios.Enum.al delete mode 100644 Apps/W1/Shopify/app/src/Integration/Tables/ShpfyRegisteredStore.Table.al create mode 100644 Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCompanyRef.Codeunit.al create mode 100644 Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCustomerRef.Codeunit.al create mode 100644 Apps/W1/Sustainability/app/src/Calculation/SustCostManagement.Codeunit.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustCalculateCO2e.Report.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntries.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntry.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustConsumptionJournal.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrder.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrders.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterList.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustManufacturingSubscriber.Codeunit.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustOutputJournal.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdBOMVersionLines.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponent.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponents.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRouting.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRoutingLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLines.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustProductionJournal.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustRelProdOrderLines.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrder.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrders.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLines.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingVersionLines.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterList.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustPstdSalesCrMemoSub.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustPstdSalesInvSubform.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoHeader.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoStats.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoSubform.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceHeader.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceStats.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceSubform.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesOrderStats.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesOrderSubform.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesRetOrdSubform.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesRetRcptLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesShipmentLine.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesStatistics.PageExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustSalesSubscriber.Codeunit.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesHeader.TableExt.al create mode 100644 Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesLine.TableExt.al diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index c56412ba21..018588fdd5 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -5,7 +5,7 @@ "runs-on": "windows-latest", "cacheImageName": "", "UsePsSession": false, - "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.27052.0/base", + "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.27417.0/base", "country": "base", "useProjectDependencies": true, "repoVersion": "26.0", diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Bank/4. Historical Data/CreateBankAccRecoAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Bank/4. Historical Data/CreateBankAccRecoAT.Codeunit.al deleted file mode 100644 index e4303854bd..0000000000 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Bank/4. Historical Data/CreateBankAccRecoAT.Codeunit.al +++ /dev/null @@ -1,68 +0,0 @@ -codeunit 11161 "Create Bank Acc. Reco. AT" -{ - SingleInstance = true; - EventSubscriberInstance = Manual; - InherentEntitlements = X; - InherentPermissions = X; - - trigger OnRun() - begin - UpdateBankAccReconciliation(); - end; - - local procedure UpdateBankAccReconciliation() - var - BankAccReconciliation: Record "Bank Acc. Reconciliation"; - CreateBankAccount: Codeunit "Create Bank Account"; - begin - if not BankAccReconciliation.Get(Enum::"Bank Acc. Rec. Stmt. Type"::"Bank Reconciliation", CreateBankAccount.Checking(), '24') then - exit; - - BankAccReconciliation.Validate("Statement Ending Balance", 17924.53); - BankAccReconciliation.Modify(); - end; - - [EventSubscriber(ObjectType::Table, Database::"Bank Acc. Reconciliation Line", 'OnBeforeInsertEvent', '', false, false)] - local procedure OnInsertRecord(var Rec: Record "Bank Acc. Reconciliation Line"; RunTrigger: Boolean) - var - CreateBankAccount: Codeunit "Create Bank Account"; - begin - if (Rec."Statement Type" = Rec."Statement Type"::"Bank Reconciliation") then begin - if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = '24') then - case Rec."Statement Line No." of - 10000: - ValidateRecordFields(Rec, Rec.Description, 2757.62); - 20000: - ValidateRecordFields(Rec, Rec.Description, 4136.43); - 30000: - ValidateRecordFields(Rec, DepositToAccountLbl, 11030.48); - end; - end else - if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = 'PREC000') then - case Rec."Statement Line No." of - 10000: - ValidateRecordFields(Rec, Rec.Description, -2520); - 20000: - ValidateRecordFields(Rec, Rec.Description, -1828); - 30000: - ValidateRecordFields(Rec, Rec.Description, -1340.1); - 40000: - ValidateRecordFields(Rec, Rec.Description, 929.76); - 50000: - ValidateRecordFields(Rec, Rec.Description, 10743.39); - 60000: - ValidateRecordFields(Rec, Rec.Description, 3273.72); - end; - end; - - local procedure ValidateRecordFields(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; Description: Text[100]; Amount: Decimal) - begin - BankAccReconciliationLine.Validate(Description, Description); - BankAccReconciliationLine.Validate("Transaction Text", Description); - BankAccReconciliationLine.Validate("Statement Amount", Amount); - BankAccReconciliationLine.Validate("Applied Amount", Amount); - end; - - var - DepositToAccountLbl: Label 'Deposit to Account 18.01.24', MaxLength = 100; -} \ No newline at end of file diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateATGLAccount.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateATGLAccount.Codeunit.al index 249b859c44..fd52c062b0 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateATGLAccount.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateATGLAccount.Codeunit.al @@ -5,12 +5,11 @@ codeunit 11148 "Create AT GL Account" trigger OnRun() begin - AddGLAccountforAT(); + UpdateGLAccountCatagory(); end; - local procedure AddGLAccountforAT() + local procedure AddGLAccountForAT() var - GLAccountIndent: Codeunit "G/L Account-Indent"; CreareVATPostingGrpAT: Codeunit "Create VAT Posting Group AT"; CreatePostingGroup: Codeunit "Create Posting Groups"; CreatePostingGroupAT: Codeunit "Create Posting Groups AT"; @@ -526,12 +525,10 @@ codeunit 11148 "Create AT GL Account" ContosoGLAccount.InsertGLAccount(SBK(), SBKName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Equity, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false); ContosoGLAccount.InsertGLAccount(ProfitAndLossStatement(), ProfitAndLossStatementName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Equity, Enum::"G/L Account Type"::Posting, '', '', 0, '', Enum::"General Posting Type"::" ", '', '', true, false, false); ContosoGLAccount.InsertGLAccount(TOTALEQUITYRESERVES(), TOTALEQUITYRESERVESName(), Enum::"G/L Account Income/Balance"::"Balance Sheet", Enum::"G/L Account Category"::Equity, Enum::"G/L Account Type"::"End-Total", '', '', 0, '', Enum::"General Posting Type"::" ", '', '', false, false, false); - GLAccountIndent.Indent(); - UpdateGLAccountCatagory(); end; [EventSubscriber(ObjectType::Codeunit, Codeunit::"Create G/L Account", 'OnAfterAddGLAccountsForLocalization', '', false, false)] - local procedure ModifyGLAccountforDE() + local procedure ModifyGLAccountForAT() var CreateGLAccount: Codeunit "Create G/L Account"; begin @@ -1043,6 +1040,8 @@ codeunit 11148 "Create AT GL Account" ContosoGLAccount.AddAccountForLocalization(SBKName(), '9850'); ContosoGLAccount.AddAccountForLocalization(ProfitAndLossStatementName(), '9890'); ContosoGLAccount.AddAccountForLocalization(TOTALEQUITYRESERVESName(), '9999'); + + AddGLAccountForAT(); end; local procedure ModifyGLAccountForW1() diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateAccScheduleLineAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateAccScheduleLineAT.Codeunit.al index 1e13cae46d..61bceae8e5 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateAccScheduleLineAT.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreateAccScheduleLineAT.Codeunit.al @@ -5,8 +5,6 @@ codeunit 11151 "Create Acc. Schedule Line AT" InherentEntitlements = X; InherentPermissions = X; - //ToDo: Need to Check with MS Team why standard Schedule Name are commented in W1 - [EventSubscriber(ObjectType::Table, Database::"Acc. Schedule Line", 'OnBeforeInsertEvent', '', false, false)] local procedure OnBeforeInsertAccScheduleLine(var Rec: Record "Acc. Schedule Line") var @@ -87,10 +85,7 @@ codeunit 11151 "Create Acc. Schedule Line AT" if Rec."Schedule Name" = CreateAccountScheduleName.ReducedTrialBalance() then case Rec."Line No." of 10000: - begin - ValidateRecordFields(Rec, CreateATGLAccount.TOTALOPERATINGINCOME(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts"); - Rec.Validate(Description, TotalRevenueLbl); - end; + ValidateRecordFields(Rec, CreateATGLAccount.TOTALOPERATINGINCOME(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts"); 20000: ValidateRecordFields(Rec, CreateATGLAccount.TOTALCOSTOFMATERIALS(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts"); 50000: @@ -126,12 +121,7 @@ codeunit 11151 "Create Acc. Schedule Line AT" end; end; - local procedure ValidateRecordFields(var AccScheduleLine: - Record "Acc. Schedule Line"; - Totaling: - Text; - TotalingType: - Enum "Acc. Schedule Line Totaling Type") + local procedure ValidateRecordFields(var AccScheduleLine: Record "Acc. Schedule Line"; Totaling: Text; TotalingType: Enum "Acc. Schedule Line Totaling Type") begin AccScheduleLine.Validate(Totaling, Totaling); AccScheduleLine.Validate("Totaling Type", TotalingType); @@ -143,7 +133,4 @@ codeunit 11151 "Create Acc. Schedule Line AT" AccScheduleLine.Validate(Totaling, Totaling); AccScheduleLine.Validate("Totaling Type", TotalingType); end; - - var - TotalRevenueLbl: Label 'Total Revenue', MaxLength = 100; } \ No newline at end of file diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreatePostingGroupsAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreatePostingGroupsAT.Codeunit.al index fbbb4592f4..4886a034b7 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreatePostingGroupsAT.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/1. Setup Data/CreatePostingGroupsAT.Codeunit.al @@ -4,7 +4,6 @@ codeunit 11149 "Create Posting Groups AT" InherentPermissions = X; trigger OnRun() - var begin InsertGenProdPostingGroup(); end; @@ -16,7 +15,6 @@ codeunit 11149 "Create Posting Groups AT" CreatePostingGroup: Codeunit "Create Posting Groups"; begin ContosoPostingGroup.SetOverwriteData(true); - ContosoPostingGroup.InsertGenProductPostingGroup(ManufactPostingGroup(), CapacitiesLbl, ''); ContosoPostingGroup.InsertGenProductPostingGroup(NoVATPostingGroup(), MiscDescriptionLbl, CreateVATPostingGroupAT.NOVAT()); UpdateGenProdPostingGrp(CreatePostingGroup.FreightPostingGroup(), CreateVATPostingGroupAT.VAT20()); UpdateGenProdPostingGrp(CreatePostingGroup.RawMatPostingGroup(), CreateVATPostingGroupAT.VAT20()); @@ -63,14 +61,7 @@ codeunit 11149 "Create Posting Groups AT" exit(NoVATTok); end; - procedure ManufactPostingGroup(): Code[20] - begin - exit(ManufactTok); - end; - var - CapacitiesLbl: Label 'Capacities', MaxLength = 100; MiscDescriptionLbl: Label 'Miscellaneous without VAT', MaxLength = 100; NoVATTok: Label 'NO VAT', MaxLength = 20; - ManufactTok: Label 'MANUFACT', MaxLength = 20; } \ No newline at end of file diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/2. Master Data/CreateVatStatementLineAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/2. Master Data/CreateVatStatementLineAT.Codeunit.al index 220f097c4e..cb64ef8115 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/2. Master Data/CreateVatStatementLineAT.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Finance/2. Master Data/CreateVatStatementLineAT.Codeunit.al @@ -23,56 +23,50 @@ codeunit 11156 "Create VAT Statement Line AT" begin ContosoVatStatement.SetOverwriteData(true); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT20outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 20000, '1019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesVAT20outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 30000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT10outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 40000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT20onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 50000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT10onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 60000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 70000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 90000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT20DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 100000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT10DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 110000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT20EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 120000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT10EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 130000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 140000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 150000, '1180', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, FuelTaxLbl, '7110'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 160000, '1181', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ElectricityTaxLbl, '7120'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 170000, '1182', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NaturalGasTaxLbl, '7130'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 180000, '1183', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CoalTaxLbl, '7140'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 190000, '1184', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CO2TaxLbl, '7150'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 200000, '1185', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, WaterTaxLbl, '7160'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 210000, '1189', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1180..1188', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalTaxesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 230000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 240000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 250000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 260000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 270000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 280000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 290000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases20Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 300000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases10Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 320000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales20Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 330000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales10Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 340000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 350000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 360000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATLiableSalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 380000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesDomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Default(), 390000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATLiableSalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT20outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '1019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesVAT20outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT10outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT20onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT10onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT20DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT10DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT20EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT10EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '1180', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, FuelTaxLbl, '7110'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '1181', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ElectricityTaxLbl, '7120'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '1182', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NaturalGasTaxLbl, '7130'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '1183', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CoalTaxLbl, '7140'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '1184', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CO2TaxLbl, '7150'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '1185', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, WaterTaxLbl, '7160'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '1189', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1180..1188', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalTaxesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases20Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases10Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales20Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales10Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroupAT.VAT20(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroupAT.VAT10(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATLiableSalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 380000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroupAT.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATLiableSalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 390000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATLiableSalesDomesticLbl, ''); ContosoVatStatement.SetOverwriteData(false); end; - procedure Default(): Code[10] - begin - exit(DefaultTok); - end; - var ContosoVatStatement: Codeunit "Contoso VAT Statement"; - DefaultTok: Label 'DEFAULT', MaxLength = 10; SalesVAT20outgoingLbl: Label 'Sales VAT 20 % (outgoing)', MaxLength = 100; SalesVAT10outgoingLbl: Label 'Sales VAT 10 % (outgoing)', MaxLength = 100; VAT20onEUPurchasesetcLbl: Label 'VAT 20 % % on EU Purchases etc.', MaxLength = 100; diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateCompanyInformationAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateCompanyInformationAT.Codeunit.al index b097d090c2..75f29bd12f 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateCompanyInformationAT.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateCompanyInformationAT.Codeunit.al @@ -3,8 +3,6 @@ codeunit 11143 "Create Company Information AT" InherentEntitlements = X; InherentPermissions = X; - // TODO: Picture Name to Be Inserted - trigger OnRun() var ContosoCoffeeDemoDataSetup: Record "Contoso Coffee Demo Data Setup"; @@ -32,8 +30,8 @@ codeunit 11143 "Create Company Information AT" CompanyInformation.Validate("Sales Authorized No.", SalesAuthorizeNo); CompanyInformation.Validate("Purch. Authorized No.", PurchAuthorizedNo); CompanyInformation.Validate("Tax Office Address", TaxOfficeAddress); - CompanyInformation.Validate("Tax Office City", CityLbl);//City := CreatePostCode.FindCity(CompanyInformation."Post Code"); - CompanyInformation.Validate("Tax Office Post Code", TaxOfficePostCode);// "Post Code" := CreatePostCode.FindPostCode(CreatePostCode.Convert('GB-W2 8HG')); + CompanyInformation.Validate("Tax Office City", CityLbl); + CompanyInformation.Validate("Tax Office Post Code", TaxOfficePostCode); CompanyInformation.Validate("Tax Office Name", TaxOfficeName); CompanyInformation.Validate("Tax Office Number", TaxOfficeNumber); CompanyInformation.Validate("Tax Office Country/Region Code", ''); @@ -42,9 +40,6 @@ codeunit 11143 "Create Company Information AT" CompanyInformation.Validate("Ship-to City", CityLbl); CompanyInformation.Validate("Ship-to Post Code", PostcodeLbl); - // todo add picture from attached files - // CompanyInformation.Picture.Import(); - CompanyInformation.Modify(true); end; diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateNoSeriesAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateNoSeriesAT.Codeunit.al index fbac29ac6f..92985b6484 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateNoSeriesAT.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Foundation/1. Setup Data/CreateNoSeriesAT.Codeunit.al @@ -11,100 +11,6 @@ codeunit 11144 "Create No. Series AT" begin ContosoNoSeries.InsertNoSeries(PurchaseDeliveryReminder(), DeliveryReminderLbl, '1001', '2999', '2995', '', 1, Enum::"No. Series Implementation"::Normal, false); ContosoNoSeries.InsertNoSeries(PurchaseIssueDeliveryReminder(), IssueDeliveryReminderLbl, '104001', '105999', '105995', '', 1, Enum::"No. Series Implementation"::Normal, false); - ContosoNoSeries.InsertNoSeries(Job(), JobLbl, 'J00010', 'J99990', '', '', 10, Enum::"No. Series Implementation"::Sequence, true); - end; - - [EventSubscriber(ObjectType::Table, Database::"No. Series", 'OnBeforeInsertEvent', '', false, false)] - local procedure OnInsertRecordNoSeries(var Rec: Record "No. Series") - var - CreateNoSeries: Codeunit "Create No. Series"; - begin - case Rec.Code of - CreateNoSeries.Contact(): - ValidateRecordFieldsNoSeries(Rec, true); - CreateNoSeries.CashFlow(): - ValidateRecordFieldsNoSeries(Rec, true); - CreateNoSeries.BlanketPurchaseOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseCreditMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedPurchaseCreditMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseInvoice(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedPurchaseInvoice(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseQuote(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseReceipt(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PurchaseReturnOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedPurchaseShipment(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.BlanketSalesOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesCreditMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedSalesCreditMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.FinanceChargeMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.IssuedFinanceChargeMemo(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesInvoice(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedSalesInvoice(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesQuote(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.PostedSalesReceipt(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.Reminder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.IssuedReminder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesReturnOrder(): - ValidateRecordFieldsNoSeries(Rec, false); - CreateNoSeries.SalesShipment(): - ValidateRecordFieldsNoSeries(Rec, false); - end; - end; - - [EventSubscriber(ObjectType::Table, Database::"No. Series Line", 'OnBeforeInsertEvent', '', false, false)] - local procedure OnInsertRecord(var Rec: Record "No. Series Line") - var - CreateNoSeries: Codeunit "Create No. Series"; - begin - case Rec."Series Code" of - CreateNoSeries.CashFlow(): - ValidateRecordFieldsWithStartingNo(Rec, 'CF100001', 'CF200000'); - CreateNoSeries.PurchasePriceList(): - ValidateRecordFieldsWithStartingNo(Rec, 'P00001', 'P99999'); - CreateNoSeries.PaymentReconciliationJournals(): - ValidateRecordFieldsWithStartingNo(Rec, 'PREC000', 'PREC999'); - CreateNoSeries.TransferReceipt(): - ValidateRecordFieldsWithStartingNo(Rec, '109001', '1010999'); - CreateNoSeries.VATReturnPeriods(): - ValidateRecordFieldsWithStartingNo(Rec, 'VATPER-0001', 'VATPER-9999'); - CreateNoSeries.VATReturnsReports(): - ValidateRecordFieldsWithStartingNo(Rec, 'VATRET-0001', 'VATRET-9999'); - end; - end; - - procedure ValidateRecordFieldsNoSeries(var NoSeries: Record "No. Series"; ManualNos: Boolean) - begin - NoSeries.Validate("Manual Nos.", ManualNos); - end; - - procedure ValidateRecordFieldsWithStartingNo(var NoSeriesLine: Record "No. Series Line"; StartingNo: Code[20]; EndingNo: Code[20]) - begin - NoSeriesLine.Validate("Starting No.", StartingNo); - NoSeriesLine.Validate("Ending No.", EndingNo); end; procedure PurchaseDeliveryReminder(): Code[20] @@ -117,14 +23,7 @@ codeunit 11144 "Create No. Series AT" exit('P-DELREM+'); end; - procedure Job(): Code[20] - begin - exit(JobTok); - end; - var - JobTok: Label 'JOB', MaxLength = 20; - JobLbl: Label 'JOB', MaxLength = 100; DeliveryReminderLbl: Label 'Purchase Delivery Reminder', MaxLength = 100; IssueDeliveryReminderLbl: Label 'Issued Purch. Deliv. Reminder', MaxLength = 100; } \ No newline at end of file diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Purchase/2. Master Data/CreateVendorTemplateAT.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Purchase/2. Master Data/CreateVendorTemplateAT.Codeunit.al deleted file mode 100644 index 1f85d88e2a..0000000000 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Data/Purchase/2. Master Data/CreateVendorTemplateAT.Codeunit.al +++ /dev/null @@ -1,26 +0,0 @@ -codeunit 11172 "Create Vendor Template AT" -{ - SingleInstance = true; - EventSubscriberInstance = Manual; - InherentEntitlements = X; - InherentPermissions = X; - - [EventSubscriber(ObjectType::Table, Database::"Vendor Templ.", 'OnBeforeInsertEvent', '', false, false)] - local procedure OnBeforeInsertVendorTemplate(var Rec: Record "Vendor Templ.") - var - ContosoCoffeeDemoDataSetup: Record "Contoso Coffee Demo Data Setup"; - CreateVendorTemplate: Codeunit "Create Vendor Template"; - begin - ContosoCoffeeDemoDataSetup.Get(); - case Rec.Code of - CreateVendorTemplate.VendorCompany(), - CreateVendorTemplate.VendorPerson(): - ValidateRecordFields(Rec, ContosoCoffeeDemoDataSetup."Country/Region Code"); - end; - end; - - local procedure ValidateRecordFields(var VendorTempl: Record "Vendor Templ."; CountryRegionCode: Code[10]) - begin - VendorTempl.Validate("Country/Region Code", CountryRegionCode); - end; -} \ No newline at end of file diff --git a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Tool/ContosoATLocalization.Codeunit.al b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Tool/ContosoATLocalization.Codeunit.al index dc8f40f55a..e7fa18936d 100644 --- a/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Tool/ContosoATLocalization.Codeunit.al +++ b/Apps/AT/ContosoCoffeeDemoDatasetAT/app/Demo Tool/ContosoATLocalization.Codeunit.al @@ -55,8 +55,6 @@ codeunit 11157 "Contoso AT Localization" case ContosoDemoDataLevel of Enum::"Contoso Demo Data Level"::"Setup Data": begin - Codeunit.Run(Codeunit::"Create VAT Posting Group AT"); - Codeunit.Run(Codeunit::"Create Posting Groups AT"); Codeunit.Run(Codeunit::"Create AT GL Account"); CreateVatPostingGroupAT.CreateVATPostingSetup(); CreatePostingGroupsAT.UpdateGenPostingSetup(); @@ -82,8 +80,6 @@ codeunit 11157 "Contoso AT Localization" case ContosoDemoDataLevel of Enum::"Contoso Demo Data Level"::"Setup Data": Codeunit.Run(Codeunit::"Create Bank ExpImport Setup AT"); - Enum::"Contoso Demo Data Level"::"Historical Data": - Codeunit.Run(Codeunit::"Create Bank Acc. Reco. AT"); end; end; @@ -114,7 +110,6 @@ codeunit 11157 "Contoso AT Localization" CreateAccScheduleLineAT: Codeunit "Create Acc. Schedule Line AT"; CreateBankAccPostingGrpAT: Codeunit "Create Bank Acc Posting Grp AT"; CreateBankAccountAT: Codeunit "Create Bank Account AT"; - CreateBankAccRecoAT: Codeunit "Create Bank Acc. Reco. AT"; CreateFAPostingGrpAT: Codeunit "Create FA Posting Grp. AT"; CreateInvPostingSetupAT: Codeunit "Create Inv. Posting Setup AT"; CreateItemAT: Codeunit "Create Item AT"; @@ -123,7 +118,6 @@ codeunit 11157 "Contoso AT Localization" CreateVendorPostingGrpAT: Codeunit "Create Vendor Posting Grp AT"; CreatePurchDimValueAT: Codeunit "Create Purch. Dim. Value AT"; CreateVendorAT: Codeunit "Create Vendor AT"; - CreateVendorTemplateAT: Codeunit "Create Vendor Template AT"; CreateCustPostingGrpAT: Codeunit "Create Cust. Posting Grp AT"; CreateReminderLevelAT: Codeunit "Create Reminder Level AT"; CreateCustomerAT: Codeunit "Create Customer AT"; @@ -132,19 +126,16 @@ codeunit 11157 "Contoso AT Localization" CreateShiptoAddressAT: Codeunit "Create Ship-to Address AT"; CreatePaymentTermAT: Codeunit "Create Payment Term AT"; CreateEmployeeAT: Codeunit "Create Employee AT"; - CreateNoSeriesAT: Codeunit "Create No. Series AT"; CreateVATTemplateAT: Codeunit "Create VAT Template AT"; CreateEmployeeTemplateAT: Codeunit "CreateEmployee Template AT"; begin case Module of Enum::"Contoso Demo Data Module"::Foundation: - begin - BindSubscription(CreatePaymentTermAT); - BindSubscription(CreateNoSeriesAT); - end; - + BindSubscription(CreatePaymentTermAT); Enum::"Contoso Demo Data Module"::Finance: begin + Codeunit.Run(Codeunit::"Create VAT Posting Group AT"); + Codeunit.Run(Codeunit::"Create Posting Groups AT"); BindSubscription(CreateResourceAT); BindSubscription(CreateCurrencyExcRate); BindSubscription(CreateAccScheduleLineAT); @@ -154,7 +145,6 @@ codeunit 11157 "Contoso AT Localization" begin BindSubscription(CreateBankAccPostingGrpAT); BindSubscription(CreateBankAccountAT); - BindSubscription(CreateBankAccRecoAT); end; Enum::"Contoso Demo Data Module"::"Fixed Asset Module": BindSubscription(CreateFAPostingGrpAT); @@ -170,7 +160,6 @@ codeunit 11157 "Contoso AT Localization" BindSubscription(CreateVendorPostingGrpAT); BindSubscription(CreatePurchDimValueAT); BindSubscription(CreateVendorAT); - BindSubscription(CreateVendorTemplateAT); end; Enum::"Contoso Demo Data Module"::Sales: begin @@ -197,7 +186,6 @@ codeunit 11157 "Contoso AT Localization" CreateAccScheduleLineAT: Codeunit "Create Acc. Schedule Line AT"; CreateBankAccPostingGrpAT: Codeunit "Create Bank Acc Posting Grp AT"; CreateBankAccountAT: Codeunit "Create Bank Account AT"; - CreateBankAccRecoAT: Codeunit "Create Bank Acc. Reco. AT"; CreateFAPostingGrpAT: Codeunit "Create FA Posting Grp. AT"; CreateInvPostingSetupAT: Codeunit "Create Inv. Posting Setup AT"; CreateItemAT: Codeunit "Create Item AT"; @@ -206,7 +194,6 @@ codeunit 11157 "Contoso AT Localization" CreateVendorPostingGrpAT: Codeunit "Create Vendor Posting Grp AT"; CreatePurchDimValueAT: Codeunit "Create Purch. Dim. Value AT"; CreateVendorAT: Codeunit "Create Vendor AT"; - CreateVendorTemplateAT: Codeunit "Create Vendor Template AT"; CreateCustPostingGrpAT: Codeunit "Create Cust. Posting Grp AT"; CreateReminderLevelAT: Codeunit "Create Reminder Level AT"; CreateCustomerAT: Codeunit "Create Customer AT"; @@ -215,16 +202,12 @@ codeunit 11157 "Contoso AT Localization" CreateShiptoAddressAT: Codeunit "Create Ship-to Address AT"; CreatePaymentTermAT: Codeunit "Create Payment Term AT"; CreateEmployeeAT: Codeunit "Create Employee AT"; - CreateNoSeriesAT: Codeunit "Create No. Series AT"; CreateVATTemplateAT: Codeunit "Create VAT Template AT"; CreateEmployeeTemplateAT: Codeunit "CreateEmployee Template AT"; begin case Module of Enum::"Contoso Demo Data Module"::Foundation: - begin - UnbindSubscription(CreatePaymentTermAT); - UnbindSubscription(CreateNoSeriesAT); - end; + UnbindSubscription(CreatePaymentTermAT); Enum::"Contoso Demo Data Module"::Finance: begin UnbindSubscription(CreateResourceAT); @@ -236,7 +219,6 @@ codeunit 11157 "Contoso AT Localization" begin UnbindSubscription(CreateBankAccPostingGrpAT); UnbindSubscription(CreateBankAccountAT); - UnbindSubscription(CreateBankAccRecoAT); end; Enum::"Contoso Demo Data Module"::"Fixed Asset Module": UnbindSubscription(CreateFAPostingGrpAT); @@ -252,7 +234,6 @@ codeunit 11157 "Contoso AT Localization" UnbindSubscription(CreateVendorPostingGrpAT); UnbindSubscription(CreatePurchDimValueAT); UnbindSubscription(CreateVendorAT); - UnbindSubscription(CreateVendorTemplateAT); end; Enum::"Contoso Demo Data Module"::Sales: begin diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAUVATStatement.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAUVATStatement.Codeunit.al index 6ee83b5b31..2a17769402 100644 --- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAUVATStatement.Codeunit.al +++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateAUVATStatement.Codeunit.al @@ -4,10 +4,12 @@ codeunit 17162 "Create AU VAT Statement" InherentPermissions = X; trigger OnRun() + var + CreateVATStatement: Codeunit "Create VAT Statement"; begin ContosoVatStatement.InsertVATStatementTemplate(BASTemplateName(), BASStatementDescLbl, Page::"VAT Statement", Report::"VAT Statement"); - ContosoVatStatement.InsertVATStatementName(BASTemplateName(), StatementNameLbl, StatementNameDescLbl); + ContosoVatStatement.InsertVATStatementName(BASTemplateName(), CreateVATStatement.VATStatementName(), StatementNameDescLbl); end; procedure BASTemplateName(): Code[10] @@ -18,7 +20,6 @@ codeunit 17162 "Create AU VAT Statement" var ContosoVatStatement: Codeunit "Contoso VAT Statement"; BASTemplateNameTok: Label 'BAS', Locked = true; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; StatementNameDescLbl: Label 'Default Statement', MaxLength = 100; BASStatementDescLbl: Label 'Business Activity Statement', MaxLength = 80; } \ No newline at end of file diff --git a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateVATSetupPostGrpAU.Codeunit.al b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateVATSetupPostGrpAU.Codeunit.al index ec8c0cf53e..5157aa0cea 100644 --- a/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateVATSetupPostGrpAU.Codeunit.al +++ b/Apps/AU/ContosoCoffeeDemoDatasetAU/app/DemoData/Finance/2.Master Data/CreateVATSetupPostGrpAU.Codeunit.al @@ -69,11 +69,12 @@ codeunit 17168 "Create VAT Setup Post.Grp. AU" VATReportConfiguration: Record "VAT Reports Configuration"; CreateVATReportSetup: Codeunit "Create VAT Report Setup"; CreateAUVATStatement: Codeunit "Create AU VAT Statement"; + CreateVATStatement: Codeunit "Create VAT Statement"; begin VATReportConfiguration.Get(VATReportConfiguration."VAT Report Type"::"BAS Report", CreateVATReportSetup.CurrentVersion()); VATReportConfiguration.Validate("Submission Codeunit ID", Codeunit::"BAS Export"); VATReportConfiguration.Validate("VAT Statement Template", CreateAUVATStatement.BASTemplateName()); - VATReportConfiguration.Validate("VAT Statement Name", StatementNameLbl); + VATReportConfiguration.Validate("VAT Statement Name", CreateVATStatement.VATStatementName()); VATReportConfiguration.Modify(true); end; @@ -85,5 +86,4 @@ codeunit 17168 "Create VAT Setup Post.Grp. AU" Vat15DescriptionLbl: Label 'Miscellaneous 15 VAT', MaxLength = 100; MiscPostingGroupDescriptionLbl: Label 'Customers and vendors in MISC', MaxLength = 100; ExportPostingGroupDescriptionLbl: Label 'Other customers and vendors (not MISC)', MaxLength = 100; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; } \ No newline at end of file diff --git a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/Demo Data/Finance/1. Setup Data/CreateVATStatementBE.Codeunit.al b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/Demo Data/Finance/1. Setup Data/CreateVATStatementBE.Codeunit.al index 200ab54531..e9d307933d 100644 --- a/Apps/BE/ContosoCoffeeDemoDatasetBE/app/Demo Data/Finance/1. Setup Data/CreateVATStatementBE.Codeunit.al +++ b/Apps/BE/ContosoCoffeeDemoDatasetBE/app/Demo Data/Finance/1. Setup Data/CreateVATStatementBE.Codeunit.al @@ -17,299 +17,299 @@ codeunit 11425 "Create VAT Statement BE" CreateVatSetupPostingGrp(); ContosoVATStatementBE.SetOverwriteData(true); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '0', OUTGOINGACTIVITIESLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '00', Submittedto0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '00.1..00.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '00.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '00.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '00.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '01', Submittedto6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '01.1..01.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '01.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '01.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '02', Submittedto12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '03', Submittedto21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '03.1..03.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '03.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '03.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '03.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '45', AmountVATexclLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '45.1..45.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '45.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '45.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '45.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '45.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '45.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '45.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '45.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '45.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '45.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '46', IntraCommunityICDeliveriesLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '46.1..46.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '46.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '46.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '46.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '46.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '46.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 310000, '46.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 320000, '47', ExporttocountriesnotmemberEULbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '47.1..47.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 330000, '47.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 340000, '47.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 350000, '47.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 360000, '47.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 370000, '47.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 380000, '47.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 390000, '47.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 400000, '47.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 410000, '47.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 420000, '47.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 430000, '47.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 440000, '47.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 450000, '48', CreditmemosconcRow46Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '48.1..48.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 460000, '48.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 470000, '48.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 480000, '48.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 490000, '48.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 500000, '48.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 510000, '48.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 520000, '49', CMconcRow000102034547Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '49.1..49.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 530000, '49.1', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 540000, '49.1', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 550000, '49.1', CreditmemosconcRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 560000, '49.1', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 570000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 580000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 590000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 600000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 610000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 620000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 630000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 640000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 650000, '49.2', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 660000, '49.2', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 670000, '49.2', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 680000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 690000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 700000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 710000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 720000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 730000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 740000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 750000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 760000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 770000, '49.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 780000, '49.3', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 790000, '49.3', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 800000, '49.3', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 810000, '49.3', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 820000, '49.3', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 830000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 840000, '50', PAYABLEANDDEDUCTIBLETAXESLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 850000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 860000, '54', TaxespayableforRow00010203Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '54.1..54.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 870000, '54.1', TaxespayableforRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 880000, '54.1', TaxespayableforRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 890000, '54.1', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 900000, '54.2', TaxespayableforRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 910000, '54.2', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 920000, '54.3', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 930000, '54.4', TaxespayableVATOnlyLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 940000, '55', TaxespayableforICAcquisitionsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '55.1..55.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 950000, '55.1', RevChrgVATICAcqGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 960000, '55.1', RevChrgVATICAcqGoods6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 970000, '55.1', RevChrgVATICAcqGoods12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 980000, '55.1', RevChrgVATICAcqGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 990000, '55.3', RevChrgVATICAcqInvst0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1000000, '55.3', RevChrgVATICAcqInvst21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1010000, '56', RevChrgVATActinvCocontractorsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '56.1..56.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1020000, '56.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1030000, '56.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1040000, '56.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1050000, '56.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1060000, '56.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1070000, '56.2', Services6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1080000, '56.2', Services21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1090000, '56.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1100000, '56.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1110000, '56.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1120000, '56.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1130000, '56.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1140000, '57', RevChargeVATforImportLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '57.1..57.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1150000, '57.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1160000, '57.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1170000, '57.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1180000, '57.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1190000, '57.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1200000, '57.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1210000, '57.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1220000, '57.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1230000, '57.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1240000, '59', DeductibleVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '59.1..59.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1250000, '59.1', IncomingGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1260000, '59.1', IncomingGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1270000, '59.1', IncomingGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1280000, '59.1', IncomingGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1290000, '59.1', ICAcquisofGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1300000, '59.1', ICAcquisofGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1310000, '59.1', ICAcquisofGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1320000, '59.1', ICAcquisofGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1330000, '59.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1340000, '59.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1350000, '59.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1360000, '59.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1370000, '59.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1380000, '59.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1390000, '59.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1400000, '59.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1410000, '59.1', ImpExpGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1420000, '59.1', ImpExpGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1430000, '59.1', ImpExpGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1440000, '59.1', ImpExpGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1450000, '59.2', IncomingServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1460000, '59.2', IncomingServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1470000, '59.2', IncomingServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1480000, '59.2', IncomingServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1490000, '59.2', IncomingServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1500000, '59.2', IncomingServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1510000, '59.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1520000, '59.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1530000, '59.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1540000, '59.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1550000, '59.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1560000, '59.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1570000, '59.2', ImpExpServices0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1580000, '59.2', ImpExpServices6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1590000, '59.2', ImpExpServices21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1600000, '59.3', IncomingInvestment0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1610000, '59.3', IncomingInvestment21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1620000, '59.3', ICAcqofInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1630000, '59.3', ICAcqofInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1640000, '59.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1650000, '59.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1660000, '59.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1670000, '59.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1680000, '59.3', ImpExpInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1690000, '59.3', ImpExpInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1700000, '59.4', InvoicesOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1710000, '61', RevisionsforTotVATPayableLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 1, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1720000, '62', RevisionsforTotVATDeductibleLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1730000, '63', ReimbVATReceivedCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '63.1..63.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1740000, '63.1', ReimbVATRecCMGoods6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1750000, '63.1', ReimbVATRecCMGoods12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1760000, '63.1', ReimbVATRecCMGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1770000, '63.2', ReimbVATRecCMServ6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1780000, '63.2', ReimbVATRecCMServ21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1790000, '63.3', ReimbVATRecCMInvestm21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1800000, '63.4', CreditMemosOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1810000, '64', ReimbVATShippedCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '64.1..64.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1820000, '64.1', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1830000, '64.1', CreditmemosconcRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1840000, '64.1', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1850000, '64.2', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1860000, '64.2', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1870000, '64.3', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1880000, '64.4', CreditMemosOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1890000, '65', ReservedforVATPayableLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1900000, '66', ReservedforVATDeductibleLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1910000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1920000, '71/72', StatementTotalsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', 'XX|YY', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1930000, 'XX', Left54555657616365Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '54|55|56|57|61|63|65', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1940000, 'YY', Right59626466Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '59|62|64|66', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1950000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1960000, '81', GoodsinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '81.1..81.4|84.1|85.01|85.11|85.21|85.41|86.1|87.1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1970000, '81.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1980000, '81.1', Goods6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 1990000, '81.1', Goods12PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2000000, '81.1', Goods21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2010000, '81.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2020000, '81.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2030000, '81.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2040000, '81.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2050000, '82', ServinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '82.2..82.9|85.02|85.12|85.22|85.32|85.42|87.2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2060000, '82.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2070000, '82.2', Services6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2080000, '82.2', Services21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2090000, '82.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2100000, '82.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2110000, '82.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2120000, '83', InvestGoodsinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '83.3|84.3|85.03|85.13|85.23|85.43|86.3|87.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2130000, '83.3', Investment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2140000, '83.3', Investment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2150000, '83.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2160000, '83.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2170000, '84', CreditMemosconcICAcquisitionsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '84.1..84.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2180000, '84.1', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2190000, '84.1', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2200000, '84.1', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2210000, '84.1', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2220000, '84.3', CreditMemosInvGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2230000, '84.3', CreditMemosInvGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2240000, '85', CreditMemosconcRow818283Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '85.01..85.43', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2250000, '85.01', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2260000, '85.01', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2270000, '85.01', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2280000, '85.01', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2290000, '85.02', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2300000, '85.02', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2310000, '85.02', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2320000, '85.03', CMInvestment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2330000, '85.03', CMInvestment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2340000, '85.11', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2350000, '85.11', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2360000, '85.11', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2370000, '85.11', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2380000, '85.12', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2390000, '85.12', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2400000, '85.12', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2410000, '85.13', CMInvestment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2420000, '85.13', CMInvestment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2430000, '85.21', CMImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2440000, '85.21', CMImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2450000, '85.21', CMImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2460000, '85.21', CMImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2470000, '85.22', CMImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2480000, '85.22', CMImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2490000, '85.22', CMImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2500000, '85.23', CMImportInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2510000, '85.23', CMImportInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2520000, '85.32', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2530000, '85.32', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2540000, '85.32', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2550000, '85.41', CMImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2560000, '85.41', CMImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2570000, '85.41', CMImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2580000, '85.41', CMImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2590000, '85.42', CMImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2600000, '85.42', CMImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2610000, '85.42', CMImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2620000, '85.43', CMImportInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2630000, '85.43', CMImportInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2640000, '86', AmntIntraCommAcquisitionsICALbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '86.1..86.3|84.1|84.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2650000, '86.1', ICAGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2660000, '86.1', ICAGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2670000, '86.1', ICAGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2680000, '86.1', ICAGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2690000, '86.3', ICAInvestmentGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2700000, '86.3', ICAInvestmentGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2710000, '87', OtherOperatingActivitiesLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '87.1..87.3|85.11..85.13|85.31..85.43', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2720000, '87.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2730000, '87.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2740000, '87.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2750000, '87.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2760000, '87.1', ImportGoodsRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2770000, '87.1', ImportGoodsRevCharge6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2780000, '87.1', ImportGoodsRevCharge12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2790000, '87.1', ImportGoodsRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2800000, '87.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2810000, '87.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2820000, '87.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2830000, '87.2', ImportEUServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2840000, '87.2', ImportEUServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2850000, '87.2', ImportEUServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2860000, '87.2', ImportServRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2870000, '87.2', ImportServRevCharge6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2880000, '87.2', ImportServRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2890000, '87.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2900000, '87.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2910000, '87.3', ImportInvstRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2920000, '87.3', ImportInvstRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); - ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 2930000, '91', PrepaymentLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '0', OUTGOINGACTIVITIESLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '00', Submittedto0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '00.1..00.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '00.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '00.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '00.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '01', Submittedto6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '01.1..01.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '01.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '01.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '02', Submittedto12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '03', Submittedto21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '03.1..03.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '03.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '03.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '03.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '45', AmountVATexclLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '45.1..45.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '45.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '45.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '45.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '45.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '45.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '45.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '45.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '45.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '45.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '46', IntraCommunityICDeliveriesLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '46.1..46.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '46.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '46.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '46.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '46.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '46.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '46.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '47', ExporttocountriesnotmemberEULbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '47.1..47.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '47.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '47.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '47.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '47.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '47.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 380000, '47.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 390000, '47.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 400000, '47.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 410000, '47.2', Services6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 420000, '47.2', Services21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 430000, '47.3', Investments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 440000, '47.3', Investments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 450000, '48', CreditmemosconcRow46Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '48.1..48.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 460000, '48.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 470000, '48.1', Goods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 480000, '48.1', Goods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 490000, '48.1', Goods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 500000, '48.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 510000, '48.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 520000, '49', CMconcRow000102034547Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '49.1..49.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 530000, '49.1', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 540000, '49.1', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 550000, '49.1', CreditmemosconcRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 560000, '49.1', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 570000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 580000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 590000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 600000, '49.1', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 610000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 620000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 630000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 640000, '49.1', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 650000, '49.2', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 660000, '49.2', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 670000, '49.2', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 680000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 690000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 700000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 710000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 720000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 730000, '49.2', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 740000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 750000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 760000, '49.2', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 770000, '49.3', CreditmemosconcRow00Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 780000, '49.3', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 790000, '49.3', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 800000, '49.3', CreditmemosconcRow45Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 810000, '49.3', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 820000, '49.3', CreditmemosconcRow47Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 830000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 840000, '50', PAYABLEANDDEDUCTIBLETAXESLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 850000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 860000, '54', TaxespayableforRow00010203Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '54.1..54.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 870000, '54.1', TaxespayableforRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 880000, '54.1', TaxespayableforRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 890000, '54.1', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 900000, '54.2', TaxespayableforRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 910000, '54.2', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 920000, '54.3', TaxespayableforRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 930000, '54.4', TaxespayableVATOnlyLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 940000, '55', TaxespayableforICAcquisitionsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '55.1..55.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 950000, '55.1', RevChrgVATICAcqGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 960000, '55.1', RevChrgVATICAcqGoods6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 970000, '55.1', RevChrgVATICAcqGoods12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 980000, '55.1', RevChrgVATICAcqGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 990000, '55.3', RevChrgVATICAcqInvst0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1000000, '55.3', RevChrgVATICAcqInvst21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1010000, '56', RevChrgVATActinvCocontractorsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '56.1..56.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1020000, '56.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1030000, '56.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1040000, '56.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1050000, '56.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1060000, '56.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1070000, '56.2', Services6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1080000, '56.2', Services21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1090000, '56.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1100000, '56.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1110000, '56.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1120000, '56.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1130000, '56.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1140000, '57', RevChargeVATforImportLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '57.1..57.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1150000, '57.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1160000, '57.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1170000, '57.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1180000, '57.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1190000, '57.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1200000, '57.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1210000, '57.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1220000, '57.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1230000, '57.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1240000, '59', DeductibleVATLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '59.1..59.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1250000, '59.1', IncomingGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1260000, '59.1', IncomingGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1270000, '59.1', IncomingGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1280000, '59.1', IncomingGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1290000, '59.1', ICAcquisofGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1300000, '59.1', ICAcquisofGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1310000, '59.1', ICAcquisofGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1320000, '59.1', ICAcquisofGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1330000, '59.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1340000, '59.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1350000, '59.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1360000, '59.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1370000, '59.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1380000, '59.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1390000, '59.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1400000, '59.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1410000, '59.1', ImpExpGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1420000, '59.1', ImpExpGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1430000, '59.1', ImpExpGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1440000, '59.1', ImpExpGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1450000, '59.2', IncomingServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1460000, '59.2', IncomingServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1470000, '59.2', IncomingServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1480000, '59.2', IncomingServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1490000, '59.2', IncomingServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1500000, '59.2', IncomingServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1510000, '59.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1520000, '59.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1530000, '59.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1540000, '59.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1550000, '59.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1560000, '59.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1570000, '59.2', ImpExpServices0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1580000, '59.2', ImpExpServices6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1590000, '59.2', ImpExpServices21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1600000, '59.3', IncomingInvestment0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1610000, '59.3', IncomingInvestment21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1620000, '59.3', ICAcqofInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1630000, '59.3', ICAcqofInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1640000, '59.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1650000, '59.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1660000, '59.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1670000, '59.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1680000, '59.3', ImpExpInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1690000, '59.3', ImpExpInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1700000, '59.4', InvoicesOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1710000, '61', RevisionsforTotVATPayableLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 1, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1720000, '62', RevisionsforTotVATDeductibleLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1730000, '63', ReimbVATReceivedCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '63.1..63.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1740000, '63.1', ReimbVATRecCMGoods6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1750000, '63.1', ReimbVATRecCMGoods12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1760000, '63.1', ReimbVATRecCMGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1770000, '63.2', ReimbVATRecCMServ6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1780000, '63.2', ReimbVATRecCMServ21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1790000, '63.3', ReimbVATRecCMInvestm21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1800000, '63.4', CreditMemosOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1810000, '64', ReimbVATShippedCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '64.1..64.4', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1820000, '64.1', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1830000, '64.1', CreditmemosconcRow02Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1840000, '64.1', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1850000, '64.2', CreditmemosconcRow01Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1860000, '64.2', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1870000, '64.3', CreditmemosconcRow03Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1880000, '64.4', CreditMemosOnlyVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Sale, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.VAT(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1890000, '65', ReservedforVATPayableLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1900000, '66', ReservedforVATDeductibleLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1910000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1920000, '71/72', StatementTotalsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', 'XX|YY', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1930000, 'XX', Left54555657616365Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '54|55|56|57|61|63|65', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1940000, 'YY', Right59626466Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '59|62|64|66', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1950000, '', '', Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1960000, '81', GoodsinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '81.1..81.4|84.1|85.01|85.11|85.21|85.41|86.1|87.1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1970000, '81.1', Goods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1980000, '81.1', Goods6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 1990000, '81.1', Goods12PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2000000, '81.1', Goods21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2010000, '81.1', ImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2020000, '81.1', ImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2030000, '81.1', ImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2040000, '81.1', ImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2050000, '82', ServinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '82.2..82.9|85.02|85.12|85.22|85.32|85.42|87.2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2060000, '82.2', Services0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2070000, '82.2', Services6PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2080000, '82.2', Services21PERCENTVAT2Lbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2090000, '82.2', ImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2100000, '82.2', ImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2110000, '82.2', ImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2120000, '83', InvestGoodsinclIncCreditMemosLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '83.3|84.3|85.03|85.13|85.23|85.43|86.3|87.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2130000, '83.3', Investment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2140000, '83.3', Investment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2150000, '83.3', ImportInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2160000, '83.3', ImportInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2170000, '84', CreditMemosconcICAcquisitionsLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '84.1..84.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2180000, '84.1', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2190000, '84.1', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2200000, '84.1', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2210000, '84.1', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2220000, '84.3', CreditMemosInvGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2230000, '84.3', CreditMemosInvGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2240000, '85', CreditMemosconcRow818283Lbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '85.01..85.43', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2250000, '85.01', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2260000, '85.01', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2270000, '85.01', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2280000, '85.01', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2290000, '85.02', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2300000, '85.02', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2310000, '85.02', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2320000, '85.03', CMInvestment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2330000, '85.03', CMInvestment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.DomesticPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2340000, '85.11', CMGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2350000, '85.11', CMGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2360000, '85.11', CMGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2370000, '85.11', CMGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2380000, '85.12', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2390000, '85.12', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2400000, '85.12', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2410000, '85.13', CMInvestment0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2420000, '85.13', CMInvestment21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2430000, '85.21', CMImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2440000, '85.21', CMImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2450000, '85.21', CMImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2460000, '85.21', CMImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2470000, '85.22', CMImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2480000, '85.22', CMImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2490000, '85.22', CMImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2500000, '85.23', CMImportInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2510000, '85.23', CMImportInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPEXP(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2520000, '85.32', CMServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2530000, '85.32', CMServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2540000, '85.32', CMServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2550000, '85.41', CMImportGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2560000, '85.41', CMImportGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2570000, '85.41', CMImportGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2580000, '85.41', CMImportGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2590000, '85.42', CMImportServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2600000, '85.42', CMImportServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2610000, '85.42', CMImportServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2620000, '85.43', CMImportInvestments0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2630000, '85.43', CMImportInvestments21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 3, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2640000, '86', AmntIntraCommAcquisitionsICALbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '86.1..86.3|84.1|84.3', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2650000, '86.1', ICAGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2660000, '86.1', ICAGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2670000, '86.1', ICAGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2680000, '86.1', ICAGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2690000, '86.3', ICAInvestmentGoods0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2700000, '86.3', ICAInvestmentGoods21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2710000, '87', OtherOperatingActivitiesLbl, Enum::"VAT Statement Line Type"::"Row Totaling", '', 0, Enum::"General Posting Type"::" ", '', '', '87.1..87.3|85.11..85.13|85.31..85.43', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2720000, '87.1', WIPGoods0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2730000, '87.1', WIPGoods6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2740000, '87.1', WIPGoods12PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2750000, '87.1', WIPGoods21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2760000, '87.1', ImportGoodsRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2770000, '87.1', ImportGoodsRevCharge6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2780000, '87.1', ImportGoodsRevCharge12PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G2(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2790000, '87.1', ImportGoodsRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.G3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2800000, '87.2', WIPServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2810000, '87.2', WIPServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2820000, '87.2', WIPServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2830000, '87.2', ImportEUServices0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2840000, '87.2', ImportEUServices6PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2850000, '87.2', ImportEUServices21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreatePostingGroup.EUPostingGroup(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2860000, '87.2', ImportServRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2870000, '87.2', ImportServRevCharge6PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S1(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2880000, '87.2', ImportServRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.S3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2890000, '87.3', WIPInvestments0PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2900000, '87.3', WIPInvestments21PERCENTVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.CC(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2910000, '87.3', ImportInvstRevCharge0PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I0(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2920000, '87.3', ImportInvstRevCharge21PERCVATLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', 7, Enum::"General Posting Type"::Purchase, CreateVatPostingGroupBE.IMPREV(), CreateVatPostingGroupBE.I3(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, false); + ContosoVATStatementBE.InsertVATStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 2930000, '91', PrepaymentLbl, Enum::"VAT Statement Line Type"::Description, '', 0, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, false); ContosoVATStatementBE.SetOverwriteData(false); end; @@ -366,7 +366,7 @@ codeunit 11425 "Create VAT Statement BE" ContosoVATStatementBE: Codeunit "Contoso VAT Statement BE"; CreateVATStatement: Codeunit "Create VAT Statement"; begin - ContosoVATStatementBE.InsertVATStatementName(CreateVATStatement.VATTemplateName(), StatementNameLbl, StatementNameDescLbl) + ContosoVATStatementBE.InsertVATStatementName(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), StatementNameDescLbl) end; var @@ -375,7 +375,6 @@ codeunit 11425 "Create VAT Statement BE" CZFormatLbl: Label '########', MaxLength = 20, Locked = true; CZFormat1Lbl: Label '#########', MaxLength = 20, Locked = true; CZFormat2Lbl: Label '##########', MaxLength = 20, Locked = true; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; CCPostingGroupDescriptionLbl: Label 'Cocontractor', MaxLength = 100; IMPREVPostingGroupDescriptionLbl: Label 'Import Reverse Charge VAT', MaxLength = 100; IMPExpPostingGroupDescriptionLbl: Label 'Other customers and vendors (not EU)', MaxLength = 100; diff --git a/Apps/CA/HybridBCLast_CA/app/src/tables/StgDataExchDefCA.Table.al b/Apps/CA/HybridBCLast_CA/app/src/tables/StgDataExchDefCA.Table.al deleted file mode 100644 index f0d4bda54d..0000000000 --- a/Apps/CA/HybridBCLast_CA/app/src/tables/StgDataExchDefCA.Table.al +++ /dev/null @@ -1,30 +0,0 @@ -#if not CLEANSCHEMA24 -table 4046 "Stg Data Exch Def CA" -{ - ReplicateData = false; - Extensible = false; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Code"; Code[20]) - { - DataClassification = CustomerContent; - } - field(3; Type; Enum "Data Exchange Definition Type") - { - DataClassification = CustomerContent; - } - } - - keys - { - key(PK; Code) - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/CH/SwissQRBill/app/src/core/SwissQRBillUmlautEncoding.Enum.al b/Apps/CH/SwissQRBill/app/src/core/SwissQRBillUmlautEncoding.Enum.al index cace9916e4..243d9456f5 100644 --- a/Apps/CH/SwissQRBill/app/src/core/SwissQRBillUmlautEncoding.Enum.al +++ b/Apps/CH/SwissQRBill/app/src/core/SwissQRBillUmlautEncoding.Enum.al @@ -1,4 +1,5 @@ -// ------------------------------------------------------------------------------------------------ +#if not CLEANSCHEMA26 +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -29,3 +30,4 @@ enum 11513 "Swiss QR-Bill Umlaut Encoding" Caption = 'Western European ISO-8859-1'; } } +#endif \ No newline at end of file diff --git a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al index e0145cced2..a7ba559f80 100644 --- a/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al +++ b/Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -17,19 +17,12 @@ table 11512 "Swiss QR-Bill Setup" field(1; "Primary key"; Code[10]) { } -#if not CLEANSCHEMA23 - field(2; "Swiss-Cross Image"; Media) - { - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Use W1 codeunit 4113 "Swiss QR Code Helper"'; - } -#endif field(3; "Address Type"; enum "Swiss QR-Bill Address Type") { Caption = 'Address Type'; } #if not CLEANSCHEMA26 +#pragma warning disable AS0105 field(6; "Umlaut Chars Encode Mode"; Enum "Swiss QR-Bill Umlaut Encoding") { Caption = 'German Umlaut Chars Encoding Mode'; @@ -37,6 +30,7 @@ table 11512 "Swiss QR-Bill Setup" ObsoleteState = Removed; ObsoleteTag = '26.0'; } +#pragma warning restore AS0105 #endif field(8; "Default Layout"; Code[20]) { @@ -126,4 +120,4 @@ table 11512 "Swiss QR-Bill Setup" "Journal Batch" := GenJournalBatch.Name; end; end; -} +} \ No newline at end of file diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/CopyDocumentMgtCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/CopyDocumentMgtCZZ.Codeunit.al index e6d16f0017..1c60ec3f8e 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/CopyDocumentMgtCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/CopyDocumentMgtCZZ.Codeunit.al @@ -59,10 +59,9 @@ codeunit 31178 "Copy Document Mgt. CZZ" OldSalesAdvLetterHeaderCZZ := ToSalesAdvLetterHeaderCZZ; ToSalesAdvLetterHeaderCZZ.TransferFields(FromSalesAdvLetterHeaderCZZ, false); ToSalesAdvLetterHeaderCZZ.Status := ToSalesAdvLetterHeaderCZZ.Status::New; - CopyFieldsFromOldSalesAdvLetterHeader(ToSalesAdvLetterHeaderCZZ, OldSalesAdvLetterHeaderCZZ); - if RecalculateLines then - ToSalesAdvLetterHeaderCZZ.CreateDimFromDefaultDim(0); ToSalesAdvLetterHeaderCZZ."No. Printed" := 0; + CopyFieldsFromOldSalesAdvLetterHeader(ToSalesAdvLetterHeaderCZZ, OldSalesAdvLetterHeaderCZZ); + OnBeforeModifySalesAdvLetterHeader(ToSalesAdvLetterHeaderCZZ, FromSalesAdvLetterHeaderCZZ, IncludeHeader, RecalculateLines, OldSalesAdvLetterHeaderCZZ); ToSalesAdvLetterHeaderCZZ.Modify(); end; @@ -95,6 +94,8 @@ codeunit 31178 "Copy Document Mgt. CZZ" ToSalesAdvLetterHeaderCZZ."No. Series" := OldSalesAdvLetterHeaderCZZ."No. Series"; ToSalesAdvLetterHeaderCZZ."Job No." := OldSalesAdvLetterHeaderCZZ."Job No."; ToSalesAdvLetterHeaderCZZ."Job Task No." := OldSalesAdvLetterHeaderCZZ."Job Task No."; + ToSalesAdvLetterHeaderCZZ."Variable Symbol" := OldSalesAdvLetterHeaderCZZ."Variable Symbol"; + OnAfterCopyFieldsFromOldSalesAdvLetterHeader(ToSalesAdvLetterHeaderCZZ, OldSalesAdvLetterHeaderCZZ); end; local procedure CopyDocumentLine(var ToSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var ToSalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; var FromSalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; var NextLineNo: Integer): Boolean @@ -115,6 +116,7 @@ codeunit 31178 "Copy Document Mgt. CZZ" ToSalesAdvLetterLineCZZ.Description := FromSalesAdvLetterLineCZZ.Description; end; + OnBeforeInsertSalesAdvLetterLine(ToSalesAdvLetterHeaderCZZ, ToSalesAdvLetterLineCZZ, FromSalesAdvLetterLineCZZ, NextLineNo, IncludeHeader, RecalculateLines); ToSalesAdvLetterLineCZZ.Insert(); exit(true); end; @@ -161,10 +163,9 @@ codeunit 31178 "Copy Document Mgt. CZZ" OldPurchAdvLetterHeaderCZZ := ToPurchAdvLetterHeaderCZZ; ToPurchAdvLetterHeaderCZZ.TransferFields(FromPurchAdvLetterHeaderCZZ, false); ToPurchAdvLetterHeaderCZZ.Status := ToPurchAdvLetterHeaderCZZ.Status::New; - CopyFieldsFromOldPurchAdvLetterHeader(ToPurchAdvLetterHeaderCZZ, OldPurchAdvLetterHeaderCZZ); - if RecalculateLines then - ToPurchAdvLetterHeaderCZZ.CreateDimFromDefaultDim(0); ToPurchAdvLetterHeaderCZZ."No. Printed" := 0; + CopyFieldsFromOldPurchAdvLetterHeader(ToPurchAdvLetterHeaderCZZ, OldPurchAdvLetterHeaderCZZ); + OnBeforeModifyPurchAdvLetterHeader(ToPurchAdvLetterHeaderCZZ, FromPurchAdvLetterHeaderCZZ, IncludeHeader, RecalculateLines, OldPurchAdvLetterHeaderCZZ); ToPurchAdvLetterHeaderCZZ.Modify(); end; @@ -195,6 +196,9 @@ codeunit 31178 "Copy Document Mgt. CZZ" local procedure CopyFieldsFromOldPurchAdvLetterHeader(var ToPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; OldPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin ToPurchAdvLetterHeaderCZZ."No. Series" := OldPurchAdvLetterHeaderCZZ."No. Series"; + ToPurchAdvLetterHeaderCZZ."Variable Symbol" := OldPurchAdvLetterHeaderCZZ."Variable Symbol"; + ToPurchAdvLetterHeaderCZZ."Vendor Adv. Letter No." := OldPurchAdvLetterHeaderCZZ."Vendor Adv. Letter No."; + OnAfterCopyFieldsFromOldPurchAdvLetterHeader(ToPurchAdvLetterHeaderCZZ, OldPurchAdvLetterHeaderCZZ); end; local procedure CopyDocumentLine(var ToPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var ToPurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; var FromPurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; var NextLineNo: Integer): Boolean @@ -215,6 +219,7 @@ codeunit 31178 "Copy Document Mgt. CZZ" ToPurchAdvLetterLineCZZ.Description := FromPurchAdvLetterLineCZZ.Description; end; + OnBeforeInsertPurchAdvLetterLine(ToPurchAdvLetterHeaderCZZ, ToPurchAdvLetterLineCZZ, FromPurchAdvLetterLineCZZ, NextLineNo, IncludeHeader, RecalculateLines); ToPurchAdvLetterLineCZZ.Insert(); exit(true); end; @@ -233,4 +238,36 @@ codeunit 31178 "Copy Document Mgt. CZZ" Error(CopyDocumentItselfErr, ToDocumentNo); end; #endregion + + #region Events + [IntegrationEvent(false, false)] + local procedure OnBeforeModifySalesAdvLetterHeader(var ToSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; FromSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; IncludeHeader: Boolean; RecalculateLines: Boolean; OldSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCopyFieldsFromOldSalesAdvLetterHeader(var ToSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; OldSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeInsertSalesAdvLetterLine(var ToSalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var ToSalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; FromSalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; var NextLineNo: Integer; IncludeHeader: Boolean; RecalculateLines: Boolean) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeModifyPurchAdvLetterHeader(var ToPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; FromPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; IncludeHeader: Boolean; RecalculateLines: Boolean; OldPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnAfterCopyFieldsFromOldPurchAdvLetterHeader(var ToPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; OldPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeInsertPurchAdvLetterLine(var ToPurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var ToPurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; FromPurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; var NextLineNo: Integer; IncludeHeader: Boolean; RecalculateLines: Boolean) + begin + end; + #endregion } diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZZ.Codeunit.al index 69fea3a203..5698f65ac0 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZZ.Codeunit.al @@ -20,17 +20,8 @@ codeunit 31067 "Doc. Attachment Handler CZZ" InitDocumentAttachmentFields(DocumentAttachment, RecRef); end; -#if not CLEAN25 - [Obsolete('Page Document Attachment Factbox is replaced by the "Doc. Attachment List Factbox" which supports multiple file upload. The corresponding event subscriber is replaced with GetTableOnAfterGetRecRefFail.', '25.0')] - [EventSubscriber(ObjectType::Page, Page::"Document Attachment Factbox", 'OnBeforeDrillDown', '', false, false)] - local procedure GetTableOnBeforeDrillDown(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) - begin - GetDocumentAttachmentTable(DocumentAttachment, RecRef); - end; -#endif - - [EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List Factbox", 'OnAfterGetRecRefFail', '', false, false)] - local procedure GetTableOnAfterGetRecRefFail(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document Attachment Mgmt", 'OnAfterGetRefTable', '', false, false)] + local procedure GetTableOnAfterGetRefTable(var RecRef: RecordRef; DocumentAttachment: Record "Document Attachment") begin GetDocumentAttachmentTable(DocumentAttachment, RecRef); end; diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/InstallApplicationCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/InstallApplicationCZZ.Codeunit.al index f2faaa8872..f1d101c035 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/InstallApplicationCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/InstallApplicationCZZ.Codeunit.al @@ -78,7 +78,6 @@ codeunit 31087 "Install Application CZZ" begin CopyCustomerLedgerEntries(); CopyVendorLedgerEntries(); - CopyAccScheduleExtension(); MoveIncomingDocument(); ModifyReportSelections(); end; @@ -167,16 +166,6 @@ codeunit 31087 "Install Application CZZ" until ReportSelections.Next() = 0; end; - local procedure CopyAccScheduleExtension() - var - AccScheduleExtensionCZL: Record "Acc. Schedule Extension CZL"; - AccScheduleExtensionCZLDataTransfer: DataTransfer; - begin - AccScheduleExtensionCZLDataTransfer.SetTables(Database::"Acc. Schedule Extension CZL", Database::"Acc. Schedule Extension CZL"); - AccScheduleExtensionCZLDataTransfer.AddFieldValue(AccScheduleExtensionCZL.FieldNo(Prepayment), AccScheduleExtensionCZL.FieldNo("Advance Payments CZZ")); - AccScheduleExtensionCZLDataTransfer.CopyFields(); - end; - local procedure MoveIncomingDocument() var IncomingDocument: Record "Incoming Document"; diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterManagementCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterManagementCZZ.Codeunit.al index af4f8e3f37..89ff9458f8 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterManagementCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterManagementCZZ.Codeunit.al @@ -1468,118 +1468,151 @@ codeunit 31019 "PurchAdvLetterManagement CZZ" local procedure OnUpdateStatus(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; DocStatus: Enum "Advance Letter Doc. Status CZZ") begin end; - +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnBeforePostPaymentApplication event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostPaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnAfterPostPaymentApplication event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostPaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnBeforePostAdvancePayment event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostPayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnAfterPostAdvancePayment event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostPayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif [IntegrationEvent(false, false)] local procedure OnBeforePostPaymentVAT(var PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; PostingDate: Date; var IsHandled: Boolean) begin end; +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnBeforePostInvoiceApplication event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnAfterPostInvoiceApplication event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostReversePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnBeforePostAdvancePaymentUsage event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnAfterPostAdvancePaymentUsage event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostReversePayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnBeforeReverseAdvancePaymentVAT event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePaymentVAT(var PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; PostingDate: Date; var Preview: Boolean; var IsHandled: Boolean) begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentClosingEntryOnBeforePostBalance event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostClosePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentClosingEntryOnAfterPostBalance event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostClosePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentClosingEntryOnBeforePost event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostClosePayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentClosingEntryOnAfterPost event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostClosePayment(var GenJournalLine: Record "Gen. Journal Line"; var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnUnapplyVendLedgEntryOnBeforePostUnapplyVendLedgEntry event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnUnapplyVendLedgEntryOnBeforePostUnapplyVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by events in "Gen. Journal Line CZZ" table extension, e.g. one of the events OnAfterCopyFromVendorLedgerEntryCZZ.', '24.0')] [IntegrationEvent(true, false)] local procedure OnAfterInitGenJnlLineFromVendLedgEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by events in "Gen. Journal Line CZZ" table extension, e.g. one of the events OnAfterCopyGenJnlLineFromPurchAdvLetterHeaderCZZ.', '24.0')] [IntegrationEvent(true, false)] local procedure OnAfterInitGenJnlLineFromAdvance(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnApplyAdvanceLetterOnBeforeTestAmount(var AdvanceLetterApplication: Record "Advance Letter Application CZZ"; VendorLedgerEntry: Record "Vendor Ledger Entry") begin end; +#if not CLEAN24 [Obsolete('Replaced by OnBeforePostAdvancePayment event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostAdvancePayment(VendorLedgerEntry: Record "Vendor Ledger Entry"; GenJournalLine: Record "Gen. Journal Line"; LinkAmount: Decimal; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean); begin end; +#endif [IntegrationEvent(false, false)] local procedure OnLinkAdvanceLetterOnBeforeModifyAdvanceLetterApplication(var AdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ"; var TempAdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ" temporary; var ModifyRecord: Boolean) @@ -1591,28 +1624,34 @@ codeunit 31019 "PurchAdvLetterManagement CZZ" begin end; +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentUsageOnAfterSetPurchAdvLetterEntryFilter event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnPostAdvancePaymentUsageOnBeforeLoopPurchAdvLetterEntry(var AdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ"; var PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnPostAdvanceCreditMemoVATOnAfterGetDocument(PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; var PostingDate: Date; var VATDate: Date; var OriginalDocumentVATDate: Date) begin end; +#if not CLEAN24 [Obsolete('Replaced by OnBeforePostAdvancePaymentUsage event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnBeforePostAdvancePaymentUsage(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentNo: Code[20]; var PurchInvHeader: Record "Purch. Inv. Header"; var VendorLedgerEntry: Record "Vendor Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; Preview: Boolean; var IsHandled: Boolean) begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentVATOnBeforePostVATDocumentAmounts event in "Purch. Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnPostAdvancePaymentVATOnBeforeGenJnlPostLine(PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnBeforeCheckAdvancePayment(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentHeader: Variant; var IsHandled: Boolean); diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterPostCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterPostCZZ.Codeunit.al index 9d57b4396b..32c901188e 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterPostCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/PurchAdvLetterPostCZZ.Codeunit.al @@ -530,7 +530,7 @@ codeunit 31142 "Purch. Adv. Letter-Post CZZ" UseAmount := AmountToUse; if UseAmount <> 0 then begin - UseAmountLCY := Round(UseAmount / TempPurchAdvLetterEntryCZZ."Currency Factor"); + UseAmountLCY := Round(UseAmount / TempPurchAdvLetterEntryCZZ.GetAdjustedCurrencyFactor()); ReverseAdvancePayment(TempPurchAdvLetterEntryCZZ, PurchInvHeader, UseAmount, UseAmountLCY, GenJnlPostLine, AdvancePostingParameters); AmountToUse -= UseAmount; TempAdvanceLetterApplicationCZZ.Amount -= UseAmount; @@ -1440,6 +1440,8 @@ codeunit 31142 "Purch. Adv. Letter-Post CZZ" TempPurchAdvLetterEntryCZZGlob.CopyFromGenJnlLine(GenJournalLine); TempPurchAdvLetterEntryCZZGlob.CopyFromPurchAdvLetterHeader(PurchAdvLetterHeaderCZZ); TempPurchAdvLetterEntryCZZGlob."Entry Type" := "Advance Letter Entry Type CZZ"::Usage; + TempPurchAdvLetterEntryCZZGlob."Amount (LCY)" := + Round(TempPurchAdvLetterEntryCZZGlob.Amount / PurchAdvLetterEntryCZZ."Currency Factor"); EntryNo := TempPurchAdvLetterEntryCZZGlob.InsertNewEntry(not AdvancePostingParametersCZZ."Temporary Entries Only"); if PurchAdvLetterHeaderCZZ."Automatic Post VAT Usage" then begin diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterManagementCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterManagementCZZ.Codeunit.al index c174098b0a..66cd8245f7 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterManagementCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterManagementCZZ.Codeunit.al @@ -811,7 +811,9 @@ codeunit 31002 "SalesAdvLetterManagement CZZ" GenJournalLine."Posting Group" := CustLedgerEntry."Customer Posting Group"; GenJournalLine.Validate("VAT Reporting Date", CustLedgerEntry."VAT Date CZL"); GenJournalLine."System-Created Entry" := true; +#if not CLEAN24 OnAfterInitGenJnlLineFromCustLedgEntry(CustLedgerEntry, GenJournalLine); +#endif end; procedure GetRemAmtSalAdvPayment(var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; BalanceAtDate: Date): Decimal @@ -1406,10 +1408,12 @@ codeunit 31002 "SalesAdvLetterManagement CZZ" OnAfterInitGenJnlLineFromAdvance(SalesAdvLetterHeaderCZZ, SalesAdvLetterEntryCZZ, GenJournalLine); end; +#if not CLEAN24 internal procedure RaiseOnAfterInitGenJnlLineFromCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJournalLine: Record "Gen. Journal Line") begin OnAfterInitGenJnlLineFromCustLedgEntry(CustLedgerEntry, GenJournalLine); end; +#endif internal procedure RaiseOnAfterPostAdvancePaymentUsage(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentNo: Code[20]; var SalesInvoiceHeader: Record "Sales Invoice Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; Preview: Boolean) begin @@ -1443,122 +1447,156 @@ codeunit 31002 "SalesAdvLetterManagement CZZ" begin end; +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnBeforePostPaymentApplication event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostPaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnAfterPostPaymentApplication event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostPaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnBeforePostAdvancePayment event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostPayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentOnAfterPostAdvancePayment event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostPayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; PostedGenJournalLine: Record "Gen. Journal Line") begin end; +#endif [IntegrationEvent(false, false)] local procedure OnBeforePostPaymentVAT(var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; PostingDate: Date; var IsHandled: Boolean) begin end; +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnBeforePostInvoiceApplication event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnAfterPostInvoiceApplication event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostReversePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnBeforePostAdvancePaymentUsage event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnReverseAdvancePaymentOnAfterPostAdvancePaymentUsage event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostReversePayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnBeforeReverseAdvancePaymentVAT event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostReversePaymentVAT(var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; PostingDate: Date; var Preview: Boolean; var IsHandled: Boolean) begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvanceLetterEntryClosingOnBeforePostBalance event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostClosePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvanceLetterEntryClosingOnBeforePostBalance event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostClosePaymentRepos(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvanceLetterEntryClosingOnBeforePost event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostClosePayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnPostAdvanceCreditMemoVATOnAfterGetValues(SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; PostingDate: Date; VATDate: Date) begin end; +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvanceLetterEntryClosingOnAfterPost event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostClosePayment(var GenJournalLine: Record "Gen. Journal Line"; var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnApplyAdvanceLetterOnBeforeTestAmount(var AdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ"; CustLedgerEntry: Record "Cust. Ledger Entry") begin end; +#if not CLEAN24 [Obsolete('Replaced by OnAfterInitGenJournalLineFromCustLedgerEntry event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnAfterInitGenJnlLineFromCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnUnapplyCustLedgEntryOnBeforePostUnapplyCustLedgEntry event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnUnapplyCustLedgEntryOnBeforePostUnapplyCustLedgEntry(var CustLedgerEntry: Record "Cust. Ledger Entry"; var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnAfterInitGenJournalLine event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnAfterInitGenJnlLineFromAdvance(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnBeforePostAdvancePayment event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnBeforePostAdvancePayment(CustLedgerEntry: Record "Cust. Ledger Entry"; GenJournalLine: Record "Gen. Journal Line"; LinkAmount: Decimal; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean); begin end; +#endif [IntegrationEvent(false, false)] local procedure OnLinkAdvanceLetterOnBeforeModifyAdvanceLetterApplication(var AdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ"; var TempAdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ" temporary; var ModifyRecord: Boolean) @@ -1570,34 +1608,42 @@ codeunit 31002 "SalesAdvLetterManagement CZZ" begin end; +#if not CLEAN24 [Obsolete('Replaced by OnPostAdvancePaymentUsageOnAfterSetSalesAdvLetterEntryFilter event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnPostAdvancePaymentUsageOnBeforeLoopSalesAdvLetterEntry(var AdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ"; var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ") begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnAfterPostAdvancePaymentUsage event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(false, false)] local procedure OnAfterPostAdvancePaymentUsage(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentNo: Code[20]; var SalesInvoiceHeader: Record "Sales Invoice Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; Preview: Boolean) begin end; +#endif +#if not CLEAN24 [Obsolete('Replaced by OnBeforePostAdvancePayment event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnBeforePostAdvancePaymentUsage(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentNo: Code[20]; var SalesInvoiceHeader: Record "Sales Invoice Header"; var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; Preview: Boolean; var IsHandled: Boolean) begin end; +#endif [IntegrationEvent(true, false)] local procedure OnBeforeCorrectDocumentAfterPaymentUsage(DocumentNo: Code[20]; var CustLedgerEntry: Record "Cust. Ledger Entry"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean) begin end; +#if not CLEAN24 [Obsolete('Replaced by OnBeforePostAdvancePayment event in "Sales Adv. Letter-Post CZZ" codeunit.', '24.0')] [IntegrationEvent(true, false)] local procedure OnPostAdvancePaymentVATOnBeforeGenJnlPostLine(SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; var GenJournalLine: Record "Gen. Journal Line") begin end; +#endif [IntegrationEvent(true, false)] local procedure OnBeforeCheckAdvancePayment(AdvLetterUsageDocTypeCZZ: Enum "Adv. Letter Usage Doc.Type CZZ"; DocumentHeader: Variant; var IsHandled: Boolean); diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterPostCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterPostCZZ.Codeunit.al index 7a35ec02fe..144465a90b 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterPostCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/SalesAdvLetterPostCZZ.Codeunit.al @@ -512,7 +512,7 @@ codeunit 31143 "Sales Adv. Letter-Post CZZ" UseAmount := AmountToUse; if UseAmount <> 0 then begin - UseAmountLCY := Round(UseAmount / TempSalesAdvLetterEntryCZZ."Currency Factor"); + UseAmountLCY := Round(UseAmount / TempSalesAdvLetterEntryCZZ.GetAdjustedCurrencyFactor()); ReverseAdvancePayment(TempSalesAdvLetterEntryCZZ, SalesInvoiceHeader, UseAmount, UseAmountLCY, GenJnlPostLine, AdvancePostingParameters); AmountToUse -= UseAmount; TempAdvanceLetterApplicationCZZ.Amount -= UseAmount; @@ -1293,6 +1293,8 @@ codeunit 31143 "Sales Adv. Letter-Post CZZ" TempSalesAdvLetterEntryCZZGlob.CopyFromGenJnlLine(GenJournalLine); TempSalesAdvLetterEntryCZZGlob.CopyFromSalesAdvLetterHeader(SalesAdvLetterHeaderCZZ); TempSalesAdvLetterEntryCZZGlob."Entry Type" := "Advance Letter Entry Type CZZ"::Usage; + TempSalesAdvLetterEntryCZZGlob."Amount (LCY)" := + Round(TempSalesAdvLetterEntryCZZGlob.Amount / SalesAdvLetterEntryCZZ."Currency Factor"); EntryNo := TempSalesAdvLetterEntryCZZGlob.InsertNewEntry(not AdvancePostingParametersCZZ."Temporary Entries Only"); if SalesAdvLetterHeaderCZZ."Automatic Post VAT Document" then begin diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/UpgradeApplicationCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/UpgradeApplicationCZZ.Codeunit.al index e8f90e052f..058ca7f612 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/UpgradeApplicationCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/UpgradeApplicationCZZ.Codeunit.al @@ -5,7 +5,6 @@ namespace Microsoft.Finance.AdvancePayments; using Microsoft; -using Microsoft.Foundation.Reporting; using System.Environment.Configuration; using System.Upgrade; @@ -39,8 +38,6 @@ codeunit 31088 "Upgrade Application CZZ" var AdvanceLetterTemplateCZZ: Record "Advance Letter Template CZZ"; begin - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZZ.GetDataVersion200PerCompanyUpgradeTag()) then - UpgradeAdvancePaymentsReportReportSelections(); if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZZ.GetDataVersion210PerCompanyUpgradeTag()) then if AdvanceLetterTemplateCZZ.IsEmpty() then // feature AdvancePaymentsLocalizationForCzech was disabled InstallApplicationCZZ.CopyData(); @@ -49,39 +46,6 @@ codeunit 31088 "Upgrade Application CZZ" UpgradePostVATDocForReverseCharge(); end; - local procedure UpgradeAdvancePaymentsReportReportSelections(); - var - AdvanceLetterTemplateCZZ: Record "Advance Letter Template CZZ"; - ReportSelectionHandlerCZZ: Codeunit "Report Selection Handler CZZ"; - begin - AdvanceLetterTemplateCZZ.SetRange("Sales/Purchase", AdvanceLetterTemplateCZZ."Sales/Purchase"::Purchase); - AdvanceLetterTemplateCZZ.SetFilter("Document Report ID", '<>0'); - if AdvanceLetterTemplateCZZ.FindFirst() then - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Purchase Advance Letter CZZ", '1', AdvanceLetterTemplateCZZ."Document Report ID") - else - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Purchase Advance Letter CZZ", '1', Report::"Purchase - Advance Letter CZZ"); - AdvanceLetterTemplateCZZ.SetRange("Document Report ID"); - AdvanceLetterTemplateCZZ.SetFilter("Invoice/Cr. Memo Report ID", '<>0'); - if AdvanceLetterTemplateCZZ.FindFirst() then - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Purchase Advance VAT Document CZZ", '1', AdvanceLetterTemplateCZZ."Invoice/Cr. Memo Report ID") - else - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Purchase Advance VAT Document CZZ", '1', Report::"Purchase - Advance VAT Doc.CZZ"); - - AdvanceLetterTemplateCZZ.Reset(); - AdvanceLetterTemplateCZZ.SetRange("Sales/Purchase", AdvanceLetterTemplateCZZ."Sales/Purchase"::Sales); - AdvanceLetterTemplateCZZ.SetFilter("Document Report ID", '<>0'); - if AdvanceLetterTemplateCZZ.FindFirst() then - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Sales Advance Letter CZZ", '1', AdvanceLetterTemplateCZZ."Document Report ID") - else - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Sales Advance Letter CZZ", '1', Report::"Sales - Advance Letter CZZ"); - AdvanceLetterTemplateCZZ.SetRange("Document Report ID"); - AdvanceLetterTemplateCZZ.SetFilter("Invoice/Cr. Memo Report ID", '<>0'); - if AdvanceLetterTemplateCZZ.FindFirst() then - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Sales Advance VAT Document CZZ", '1', AdvanceLetterTemplateCZZ."Invoice/Cr. Memo Report ID") - else - ReportSelectionHandlerCZZ.InsertRepSelection(Enum::"Report Selection Usage"::"Sales Advance VAT Document CZZ", '1', Report::"Sales - Advance VAT Doc. CZZ"); - end; - local procedure UpgradeCustomerNoInSalesAdvLetterEntries() var SalesAdvLetterEntry: Record "Sales Adv. Letter Entry CZZ"; diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/AdvanceLetterTemplateCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/AdvanceLetterTemplateCZZ.Table.al index 4800353b57..b95093ce97 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/AdvanceLetterTemplateCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/AdvanceLetterTemplateCZZ.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -7,7 +7,6 @@ namespace Microsoft.Finance.AdvancePayments; using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.VAT.Setup; using Microsoft.Foundation.NoSeries; -using System.Reflection; using System.Utilities; table 31003 "Advance Letter Template CZZ" @@ -101,48 +100,6 @@ table 31003 "Advance Letter Template CZZ" DataClassification = CustomerContent; TableRelation = "VAT Business Posting Group"; } -#if not CLEANSCHEMA23 - field(15; "Document Report ID"; Integer) - { - Caption = 'Document Report ID (Obsolete)'; - DataClassification = CustomerContent; - BlankZero = true; - TableRelation = AllObjWithCaption."Object ID" where("Object Type" = const(Report)); - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteTag = '23.0'; - ObsoleteState = Removed; - } - field(16; "Document Report Caption"; Text[249]) - { - Caption = 'Document Report Caption (Obsolete)'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup(AllObjWithCaption."Object Caption" where("Object Type" = const(Report), "Object ID" = field("Document Report ID"))); - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - } - field(18; "Invoice/Cr. Memo Report ID"; Integer) - { - Caption = 'Invoice/Cr. Memo Report ID (Obsolete)'; - DataClassification = CustomerContent; - BlankZero = true; - TableRelation = AllObjWithCaption."Object ID" where("Object Type" = const(Report)); - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - } - field(19; "Invoice/Cr. Memo Rep. Caption"; Text[249]) - { - Caption = 'Invoice/Cr. Memo Report Caption (Obsolete)'; - FieldClass = FlowField; - Editable = false; - CalcFormula = lookup(AllObjWithCaption."Object Caption" where("Object Type" = const(Report), "Object ID" = field("Invoice/Cr. Memo Report ID"))); - ObsoleteReason = 'Replaced by standard report selection.'; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - } -#endif field(25; "Automatic Post VAT Document"; Boolean) { Caption = 'Automatic Post VAT Document'; @@ -173,4 +130,4 @@ table 31003 "Advance Letter Template CZZ" var GLAccountCategoryMgt: Codeunit "G/L Account Category Mgt."; ConfirmManagement: Codeunit "Confirm Management"; -} +} \ No newline at end of file diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterEntryCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterEntryCZZ.Table.al index b77d214869..5318edcf07 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterEntryCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterEntryCZZ.Table.al @@ -449,6 +449,14 @@ table 31009 "Purch. Adv. Letter Entry CZZ" "VAT Bus. Posting Group", "VAT Prod. Posting Group"); end; + procedure GetAdjustedCurrencyFactor(): Decimal + var + VendorLedgerEntry: Record "Vendor Ledger Entry"; + begin + VendorLedgerEntry.Get("Vendor Ledger Entry No."); + exit(VendorLedgerEntry."Adjusted Currency Factor"); + end; + [IntegrationEvent(false, false)] local procedure OnBeforePrintRecords(var ReportSelections: Record "Report Selections"; var PurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ"; ShowRequestPage: Boolean; var IsHandled: Boolean) begin diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al index 5bff2fbdd3..aaba923a8f 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/PurchAdvLetterHeaderCZZ.Table.al @@ -1223,7 +1223,8 @@ table 31008 "Purch. Adv. Letter Header CZZ" Modify(); if OldDimSetID <> "Dimension Set ID" then - Modify(); + if not IsNullGuid(Rec.SystemId) then + Modify(); OnAfterValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode); end; diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterEntryCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterEntryCZZ.Table.al index 628f4f88e3..afa21bb0b6 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterEntryCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterEntryCZZ.Table.al @@ -453,6 +453,14 @@ table 31006 "Sales Adv. Letter Entry CZZ" OnAfterRemainingAmountLCY(Rec, BalanceAtDate, RemainingAmountLCY); end; + procedure GetAdjustedCurrencyFactor(): Decimal + var + CustLedgerEntry: Record "Cust. Ledger Entry"; + begin + CustLedgerEntry.Get("Cust. Ledger Entry No."); + exit(CustLedgerEntry."Adjusted Currency Factor"); + end; + [IntegrationEvent(false, false)] local procedure OnBeforePrintRecords(var ReportSelections: Record "Report Selections"; var SalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ"; ShowRequestPage: Boolean; var IsHandled: Boolean) begin diff --git a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterHeaderCZZ.Table.al b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterHeaderCZZ.Table.al index 54fecef654..48ef937908 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterHeaderCZZ.Table.al +++ b/Apps/CZ/AdvancePaymentsLocalization/app/Src/Tables/SalesAdvLetterHeaderCZZ.Table.al @@ -1333,7 +1333,8 @@ table 31004 "Sales Adv. Letter Header CZZ" Modify(); if OldDimSetID <> "Dimension Set ID" then - Modify(); + if not IsNullGuid(Rec.SystemId) then + Modify(); OnAfterValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode); end; diff --git a/Apps/CZ/AdvancePaymentsLocalization/test/Src/PurchAdvPaymentsFCYCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/test/Src/PurchAdvPaymentsFCYCZZ.Codeunit.al index 7d2c03fe48..e9584e67e9 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/test/Src/PurchAdvPaymentsFCYCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/test/Src/PurchAdvPaymentsFCYCZZ.Codeunit.al @@ -21,6 +21,7 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" LibraryReportDataset: Codeunit "Library - Report Dataset"; LibraryVariableStorage: Codeunit "Library - Variable Storage"; isInitialized: Boolean; + ApplyAdvanceLetterQst: Label 'Apply Advance Letter?'; CannotBeFoundErr: Label 'The field Advance Letter No. of table Gen. Journal Line contains a value (%1) that cannot be found in the related table (%2).', Comment = '%1 = advance letter no., %2 = table name'; ExceededVATDifferenceErr: Label 'The VAT Differnce must not be more than %1.', Comment = '%1 = max VAT difference allowed'; UnapplyAdvLetterQst: Label 'Unapply advance letter: %1\Continue?', Comment = '%1 = Advance Letters'; @@ -811,7 +812,7 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" // [GIVEN] Second purchase advance letter in foreign currency has been created // [GIVEN] Purchase advance letter line with normal VAT has been created - CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ2, PurchAdvLetterLineCZZ2, PurchAdvLetterHeaderCZZ1."Pay-to Vendor No."); + CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ2, PurchAdvLetterLineCZZ2, '', PurchAdvLetterHeaderCZZ1."Pay-to Vendor No."); // [GIVEN] Second purchase advance letter has been released LibraryPurchAdvancesCZZ.ReleasePurchAdvLetter(PurchAdvLetterHeaderCZZ2); @@ -1076,6 +1077,97 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" Assert.RecordIsNotEmpty(PurchAdvLetterEntryCZZ); end; + [Test] + [HandlerFunctions('ModalVATDocumentHandler,RequestPageAdjustExchangeRatesHandler,MessageHandler,ConfirmHandler')] + procedure ReapplyAdvanceLetterInFCYAndAdjustedPayment() + var + CurrencyExchangeRate: Record "Currency Exchange Rate"; + GLEntry: Record "G/L Entry"; + PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; + PurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; + PurchaseHeader: Record "Purchase Header"; + PurchaseLine: Record "Purchase Line"; + PurchInvHeader: Record "Purch. Inv. Header"; + VendorPostingGroup: Record "Vendor Posting Group"; + Vendor: Record Vendor; + CurrencyCode: Code[10]; + PostedDocumentNo: Code[20]; + FromEntryNo: Integer; + begin + // [SCENARIO] Apply the unapplied purchase advance letter in foreign currency and adjusted payment to the posted purchase invoice and check the zero balance of the advance letter g/l account and payables account + Initialize(); + + // [GIVEN] Foreign currency with random exchange rates has been created + CurrencyCode := LibraryERM.CreateCurrencyWithRandomExchRates(); + + // [GIVEN] Purchase advance letter in foreign currency has been created + // [GIVEN] Purchase advance letter line with normal VAT has been created + CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ, PurchAdvLetterLineCZZ, CurrencyCode); + + // [GIVEN] Purchase advance letter has been released + ReleasePurchAdvLetter(PurchAdvLetterHeaderCZZ); + + // [GIVEN] Purchase advance letter has been paid in full by the general journal + GLEntry.FindLast(); + FromEntryNo := GLEntry."Entry No." + 1; + CreateAndPostPaymentPurchAdvLetter(PurchAdvLetterHeaderCZZ, PurchAdvLetterLineCZZ."Amount Including VAT", 0, WorkDate()); + + // [GIVEN] Payment VAT has been posted + PostPurchAdvancePaymentVAT(PurchAdvLetterHeaderCZZ); + + // [GIVEN] New currency exchange rate has been created + CurrencyExchangeRate.SetRange("Currency Code", CurrencyCode); + CurrencyExchangeRate.FindFirst(); + LibraryERM.CreateExchangeRate(CurrencyCode, CalcDate('<-CY+1Y>', WorkDate()), + CurrencyExchangeRate."Exchange Rate Amount", + CurrencyExchangeRate."Adjustment Exch. Rate Amount" * LibraryRandom.RandDec(1, 2)); + + // [GIVEN] Adjust exchange rate has been ran + Commit(); + SetExpectedMessage(CurrExchRateAdjustedMsg); + RunAdjustExchangeRates( + PurchAdvLetterHeaderCZZ."Pay-to Vendor No.", PurchAdvLetterHeaderCZZ."Currency Code", + CalcDate('<-CY+1Y>', WorkDate()), CalcDate('', WorkDate()), CalcDate('<-CY+1Y>', WorkDate()), + PurchAdvLetterHeaderCZZ."No.", false, true, false, true, false); + + // [GIVEN] Purchase invoice in foreign currency has been created + // [GIVEN] Purchase invoice line has been created + LibraryPurchAdvancesCZZ.CreatePurchInvoice( + PurchaseHeader, PurchaseLine, PurchAdvLetterHeaderCZZ."Pay-to Vendor No.", CalcDate('<-CY+1Y>', WorkDate()), + PurchAdvLetterLineCZZ."VAT Bus. Posting Group", PurchAdvLetterLineCZZ."VAT Prod. Posting Group", + PurchAdvLetterHeaderCZZ."Currency Code", 0, true, PurchAdvLetterLineCZZ."Amount Including VAT"); + + // [GIVEN] Whole advance letter has been linked to purchase invoice + LibraryPurchAdvancesCZZ.LinkPurchAdvanceLetterToDocument( + PurchAdvLetterHeaderCZZ, Enum::"Adv. Letter Usage Doc.Type CZZ"::"Purchase Invoice", PurchaseHeader."No.", + PurchAdvLetterLineCZZ."Amount Including VAT", PurchAdvLetterLineCZZ."Amount Including VAT (LCY)"); + + // [GIVEN] Purchase invoice has been posted + PostedDocumentNo := PostPurchaseDocument(PurchaseHeader); + PurchInvHeader.Get(PostedDocumentNo); + + // [GIVEN] Purchase advance letter from posted purchase invoice has been unlinked + SetExpectedConfirm(StrSubstNo(UnapplyAdvLetterQst, PurchAdvLetterHeaderCZZ."No."), true); + LibraryPurchAdvancesCZZ.UnapplyAdvanceLetter(PurchInvHeader); + + // [WHEN] Link advance letter to posted purchase invoice again + SetExpectedConfirm(ApplyAdvanceLetterQst, true); + LibraryPurchAdvancesCZZ.ApplyPurchAdvanceLetter(PurchAdvLetterHeaderCZZ, PurchInvHeader); + + // [THEN] The balance of advance letter g/l account will be zero + GLEntry.SetFilter("Entry No.", '%1..', FromEntryNo); + GLEntry.SetRange("G/L Account No.", AdvanceLetterTemplateCZZ."Advance Letter G/L Account"); + GLEntry.CalcSums(Amount); + Assert.AreEqual(0, GLEntry.Amount, 'The balance of advance letter g/l account must be zero.'); + + // [THEN] The balance of payables account will be zero + Vendor.Get(PurchAdvLetterHeaderCZZ."Pay-to Vendor No."); + VendorPostingGroup.Get(Vendor."Vendor Posting Group"); + GLEntry.SetRange("G/L Account No.", VendorPostingGroup."Payables Account"); + GLEntry.CalcSums(Amount); + Assert.AreEqual(0, GLEntry.Amount, 'The balance of payables account must be zero.'); + end; + local procedure UpdateCurrency() var Currency: Record Currency; @@ -1091,7 +1183,7 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" LibraryERM.CreateExchangeRate(Currency.Code, CalcDate('', WorkDate()), 1 / 27, 1 / 27); end; - local procedure CreatePurchAdvLetter(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var PurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; VendorNo: Code[20]) + local procedure CreatePurchAdvLetter(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var PurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; CurrencyCode: Code[10]; VendorNo: Code[20]) var Currency: Record Currency; VATPostingSetup: Record "VAT Posting Setup"; @@ -1106,14 +1198,22 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" VendorNo := Vendor."No."; end; - FindForeignCurrency(Currency); + Currency.Code := CurrencyCode; + if Currency.Code = '' then + FindForeignCurrency(Currency); + LibraryPurchAdvancesCZZ.CreatePurchAdvLetterHeader(PurchAdvLetterHeaderCZZ, AdvanceLetterTemplateCZZ.Code, VendorNo, Currency.Code); LibraryPurchAdvancesCZZ.CreatePurchAdvLetterLine(PurchAdvLetterLineCZZ, PurchAdvLetterHeaderCZZ, VATPostingSetup."VAT Prod. Posting Group", LibraryRandom.RandDec(1000, 2)); end; local procedure CreatePurchAdvLetter(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var PurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ") begin - CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ, PurchAdvLetterLineCZZ, ''); + CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ, PurchAdvLetterLineCZZ, '', ''); + end; + + local procedure CreatePurchAdvLetter(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; var PurchAdvLetterLineCZZ: Record "Purch. Adv. Letter Line CZZ"; CurrencyCode: Code[10]) + begin + CreatePurchAdvLetter(PurchAdvLetterHeaderCZZ, PurchAdvLetterLineCZZ, CurrencyCode, ''); end; local procedure CreateAndPostPaymentPurchAdvLetter(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; Amount: Decimal; ExchangeRate: Decimal; PostingDate: Date) @@ -1142,11 +1242,6 @@ codeunit 148123 "Purch. Adv. Payments FCY CZZ" LibraryPurchAdvancesCZZ.ReleasePurchAdvLetter(PurchAdvLetterHeaderCZZ); end; - local procedure PostGenJournalLine(var GenJournalLine: Record "Gen. Journal Line") - begin - Codeunit.Run(Codeunit::"Gen. Jnl.-Post Line", GenJournalLine); - end; - local procedure PostPurchaseDocument(var PurchaseHeader: Record "Purchase Header"): Code[20] begin exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true)); diff --git a/Apps/CZ/AdvancePaymentsLocalization/test/Src/SalesAdvPaymentsFCYCZZ.Codeunit.al b/Apps/CZ/AdvancePaymentsLocalization/test/Src/SalesAdvPaymentsFCYCZZ.Codeunit.al index 228f45fa71..14a7aa5a3f 100644 --- a/Apps/CZ/AdvancePaymentsLocalization/test/Src/SalesAdvPaymentsFCYCZZ.Codeunit.al +++ b/Apps/CZ/AdvancePaymentsLocalization/test/Src/SalesAdvPaymentsFCYCZZ.Codeunit.al @@ -21,6 +21,7 @@ codeunit 148124 "Sales Adv. Payments FCY CZZ" LibraryReportDataset: Codeunit "Library - Report Dataset"; LibraryVariableStorage: Codeunit "Library - Variable Storage"; isInitialized: Boolean; + ApplyAdvanceLetterQst: Label 'Apply Advance Letter?'; CannotBeFoundErr: Label 'The field Advance Letter No. of table Gen. Journal Line contains a value (%1) that cannot be found in the related table (%2).', Comment = '%1 = advance letter no., %2 = table name'; UnapplyAdvLetterQst: Label 'Unapply advance letter: %1\Continue?', Comment = '%1 = Advance Letters'; CurrExchRateAdjustedMsg: Label 'One or more currency exchange rates have been adjusted.'; @@ -559,7 +560,7 @@ codeunit 148124 "Sales Adv. Payments FCY CZZ" // [GIVEN] Second sales advance letter in foreign currency has been created // [GIVEN] Sales advance letter line with normal VAT has been created - CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ2, SalesAdvLetterLineCZZ2, SalesAdvLetterHeaderCZZ1."Bill-to Customer No."); + CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ2, SalesAdvLetterLineCZZ2, '', SalesAdvLetterHeaderCZZ1."Bill-to Customer No."); // [GIVEN] Second sales advance letter has been released LibrarySalesAdvancesCZZ.ReleaseSalesAdvLetter(SalesAdvLetterHeaderCZZ2); @@ -808,6 +809,94 @@ codeunit 148124 "Sales Adv. Payments FCY CZZ" Assert.RecordIsNotEmpty(SalesAdvLetterEntryCZZ); end; + [Test] + [HandlerFunctions('RequestPageAdjustExchangeRatesHandler,MessageHandler,ConfirmHandler')] + procedure ReapplyAdvanceLetterInFCYAndAdjustedPayment() + var + CurrencyExchangeRate: Record "Currency Exchange Rate"; + GLEntry: Record "G/L Entry"; + SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; + SalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesInvoiceHeader: Record "Sales Invoice Header"; + CustomerPostingGroup: Record "Customer Posting Group"; + Customer: Record Customer; + CurrencyCode: Code[10]; + PostedDocumentNo: Code[20]; + FromEntryNo: Integer; + begin + // [SCENARIO] Apply the unapplied sales advance letter in foreign currency and adjusted payment to the posted sales invoice and check the zero balance of the advance letter g/l account and receivables account + Initialize(); + + // [GIVEN] Foreign currency with random exchange rates has been created + CurrencyCode := LibraryERM.CreateCurrencyWithRandomExchRates(); + + // [GIVEN] Sales advance letter in foreign currency has been created + // [GIVEN] Sales advance letter line with normal VAT has been created + CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ, SalesAdvLetterLineCZZ, CurrencyCode); + + // [GIVEN] Sales advance letter has been released + ReleaseSalesAdvLetter(SalesAdvLetterHeaderCZZ); + + // [GIVEN] Sales advance letter has been paid in full by the general journal + GLEntry.FindLast(); + FromEntryNo := GLEntry."Entry No." + 1; + CreateAndPostPaymentSalesAdvLetter(SalesAdvLetterHeaderCZZ, -SalesAdvLetterLineCZZ."Amount Including VAT", 0, WorkDate()); + + // [GIVEN] New currency exchange rate has been created + CurrencyExchangeRate.SetRange("Currency Code", CurrencyCode); + CurrencyExchangeRate.FindFirst(); + LibraryERM.CreateExchangeRate(CurrencyCode, CalcDate('<-CY+1Y>', WorkDate()), + CurrencyExchangeRate."Exchange Rate Amount", + CurrencyExchangeRate."Adjustment Exch. Rate Amount" * LibraryRandom.RandDec(1, 2)); + + // [GIVEN] Adjust exchange rate has been ran + Commit(); + SetExpectedMessage(CurrExchRateAdjustedMsg); + RunAdjustExchangeRates( + SalesAdvLetterHeaderCZZ."Bill-to Customer No.", SalesAdvLetterHeaderCZZ."Currency Code", + CalcDate('<-CY+1Y>', WorkDate()), CalcDate('', WorkDate()), CalcDate('<-CY+1Y>', WorkDate()), + SalesAdvLetterHeaderCZZ."No.", true, false, false, true, false); + + // [GIVEN] Sales invoice in foreign currency has been created + // [GIVEN] Sales invoice line has been created + LibrarySalesAdvancesCZZ.CreateSalesInvoice( + SalesHeader, SalesLine, SalesAdvLetterHeaderCZZ."Bill-to Customer No.", CalcDate('<-CY+1Y>', WorkDate()), + SalesAdvLetterLineCZZ."VAT Bus. Posting Group", SalesAdvLetterLineCZZ."VAT Prod. Posting Group", + SalesAdvLetterHeaderCZZ."Currency Code", 0, true, SalesAdvLetterLineCZZ."Amount Including VAT"); + + // [GIVEN] Whole advance letter has been linked to sales invoice + LibrarySalesAdvancesCZZ.LinkSalesAdvanceLetterToDocument( + SalesAdvLetterHeaderCZZ, Enum::"Adv. Letter Usage Doc.Type CZZ"::"Sales Invoice", SalesHeader."No.", + SalesAdvLetterLineCZZ."Amount Including VAT", SalesAdvLetterLineCZZ."Amount Including VAT (LCY)"); + + // [GIVEN] Sales invoice has been posted + PostedDocumentNo := PostSalesDocument(SalesHeader); + SalesInvoiceHeader.Get(PostedDocumentNo); + + // [GIVEN] Sales advance letter from posted sales invoice has been unlinked + SetExpectedConfirm(StrSubstNo(UnapplyAdvLetterQst, SalesAdvLetterHeaderCZZ."No."), true); + LibrarySalesAdvancesCZZ.UnapplyAdvanceLetter(SalesInvoiceHeader); + + // [WHEN] Link advance letter to posted sales invoice again + SetExpectedConfirm(ApplyAdvanceLetterQst, true); + LibrarySalesAdvancesCZZ.ApplySalesAdvanceLetter(SalesAdvLetterHeaderCZZ, SalesInvoiceHeader); + + // [THEN] The balance of advance letter g/l account will be zero + GLEntry.SetFilter("Entry No.", '%1..', FromEntryNo); + GLEntry.SetRange("G/L Account No.", AdvanceLetterTemplateCZZ."Advance Letter G/L Account"); + GLEntry.CalcSums(Amount); + Assert.AreEqual(0, GLEntry.Amount, 'The balance of advance letter g/l account must be zero.'); + + // [THEN] The balance of receivables account will be zero + Customer.Get(SalesAdvLetterHeaderCZZ."Bill-to Customer No."); + CustomerPostingGroup.Get(Customer."Customer Posting Group"); + GLEntry.SetRange("G/L Account No.", CustomerPostingGroup."Receivables Account"); + GLEntry.CalcSums(Amount); + Assert.AreEqual(0, GLEntry.Amount, 'The balance of receivables account must be zero.'); + end; + local procedure UpdateCurrency() var Currency: Record Currency; @@ -823,7 +912,7 @@ codeunit 148124 "Sales Adv. Payments FCY CZZ" LibraryERM.CreateExchangeRate(Currency.Code, CalcDate('', WorkDate()), 1 / 27, 1 / 27); end; - local procedure CreateSalesAdvLetter(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var SalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; CustomerNo: Code[20]) + local procedure CreateSalesAdvLetter(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var SalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; CurrencyCode: Code[10]; CustomerNo: Code[20]) var Currency: Record Currency; VATPostingSetup: Record "VAT Posting Setup"; @@ -838,14 +927,23 @@ codeunit 148124 "Sales Adv. Payments FCY CZZ" CustomerNo := Customer."No."; end; + Currency.Code := CurrencyCode; + if Currency.Code = '' then + FindForeignCurrency(Currency); + FindForeignCurrency(Currency); LibrarySalesAdvancesCZZ.CreateSalesAdvLetterHeader(SalesAdvLetterHeaderCZZ, AdvanceLetterTemplateCZZ.Code, CustomerNo, Currency.Code); LibrarySalesAdvancesCZZ.CreateSalesAdvLetterLine(SalesAdvLetterLineCZZ, SalesAdvLetterHeaderCZZ, VATPostingSetup."VAT Prod. Posting Group", LibraryRandom.RandDec(1000, 2)); end; + local procedure CreateSalesAdvLetter(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var SalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ"; CurrencyCode: Code[10]) + begin + CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ, SalesAdvLetterLineCZZ, CurrencyCode, ''); + end; + local procedure CreateSalesAdvLetter(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; var SalesAdvLetterLineCZZ: Record "Sales Adv. Letter Line CZZ") begin - CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ, SalesAdvLetterLineCZZ, ''); + CreateSalesAdvLetter(SalesAdvLetterHeaderCZZ, SalesAdvLetterLineCZZ, '', ''); end; local procedure CreateAndPostPaymentSalesAdvLetter(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; Amount: Decimal; ExchangeRate: Decimal; PostingDate: Date) diff --git a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/DefaultDimensionHandlerCZA.Codeunit.al b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/DefaultDimensionHandlerCZA.Codeunit.al index 00babd327d..759cdbd091 100644 --- a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/DefaultDimensionHandlerCZA.Codeunit.al +++ b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/DefaultDimensionHandlerCZA.Codeunit.al @@ -6,6 +6,7 @@ namespace Microsoft.Finance.Dimension; using Microsoft.HumanResources.Employee; using Microsoft.Inventory.Item; +using Microsoft.Projects.Project.Job; using Microsoft.Purchases.Vendor; using Microsoft.Sales.Customer; @@ -93,6 +94,33 @@ codeunit 31392 "Default Dimension Handler CZA" end; end; + [EventSubscriber(ObjectType::Table, Database::Job, 'OnCopyDefaultDimensionsFromCustomerOnBeforeUpdateDefaultDim', '', false, false)] + local procedure JobOnCopyDefaultDimensionsFromCustomerOnBeforeUpdateDefaultDim(var Job: Record Job) + var + JobDefaultDimension: Record "Default Dimension"; + AutoDefaultDimension: Record "Default Dimension"; + NewDimensionValue: Record "Dimension Value"; + DimensionManagement: Codeunit DimensionManagement; + begin + AutoDefaultDimension.SetRange("Table ID", Database::Job); + AutoDefaultDimension.SetRange("No.", ''); + AutoDefaultDimension.SetRange("Automatic Create CZA", true); + if AutoDefaultDimension.FindSet() then + repeat + if NewDimensionValue.Get(AutoDefaultDimension."Dimension Code", Job."No.") then + if not JobDefaultDimension.Get(Database::Job, Job."No.", AutoDefaultDimension."Dimension Code") then begin + JobDefaultDimension.Init(); + JobDefaultDimension."Table ID" := Database::Job; + JobDefaultDimension."No." := Job."No."; + JobDefaultDimension."Dimension Code" := AutoDefaultDimension."Dimension Code"; + JobDefaultDimension."Dimension Value Code" := NewDimensionValue.Code; + JobDefaultDimension."Value Posting" := AutoDefaultDimension."Auto. Create Value Posting CZA"; + JobDefaultDimension.Insert(); + DimensionManagement.DefaultDimOnInsert(JobDefaultDimension); + end; + until AutoDefaultDimension.Next() = 0; + end; + var DimensionAutoUpdateMgtCZA: Codeunit "Dimension Auto.Update Mgt. CZA"; } diff --git a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/InstallApplicationCZA.Codeunit.al b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/InstallApplicationCZA.Codeunit.al index af21b50a93..730e8bfe75 100644 --- a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/InstallApplicationCZA.Codeunit.al +++ b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/InstallApplicationCZA.Codeunit.al @@ -50,64 +50,11 @@ codeunit 31250 "Install Application CZA" tabledata "Default Dimension" = m, tabledata "Standard Item Journal Line" = m; - var - InstallApplicationsMgtCZL: Codeunit "Install Applications Mgt. CZL"; - AppInfo: ModuleInfo; - trigger OnInstallAppPerCompany() begin - if not InitializeDone() then begin - BindSubscription(InstallApplicationsMgtCZL); - CopyData(); - UnbindSubscription(InstallApplicationsMgtCZL); - end; CompanyInitialize(); end; - local procedure InitializeDone(): boolean - begin - NavApp.GetCurrentModuleInfo(AppInfo); - exit(AppInfo.DataVersion() <> Version.Create('0.0.0.0')); - end; - - local procedure CopyData() - begin - CopyTransferShipmentLine(); - CopyItemEntryRelation(); - CopyStandardItemJournalLine(); - end; - - local procedure CopyTransferShipmentLine(); - var - TransferShipmentLine: Record "Transfer Shipment Line"; - TransferShipmentLineDataTransfer: DataTransfer; - begin - TransferShipmentLineDataTransfer.SetTables(Database::"Transfer Shipment Line", Database::"Transfer Shipment Line"); - TransferShipmentLineDataTransfer.AddFieldValue(TransferShipmentLine.FieldNo(Correction), TransferShipmentLine.FieldNo("Correction CZA")); - TransferShipmentLineDataTransfer.AddFieldValue(TransferShipmentLine.FieldNo("Transfer Order Line No."), TransferShipmentLine.FieldNo("Transfer Order Line No. CZA")); - TransferShipmentLineDataTransfer.CopyFields(); - end; - - local procedure CopyItemEntryRelation(); - var - ItemEntryRelation: Record "Item Entry Relation"; - ItemEntryRelationDataTransfer: DataTransfer; - begin - ItemEntryRelationDataTransfer.SetTables(Database::"Item Entry Relation", Database::"Item Entry Relation"); - ItemEntryRelationDataTransfer.AddFieldValue(ItemEntryRelation.FieldNo(Undo), ItemEntryRelation.FieldNo("Undo CZA")); - ItemEntryRelationDataTransfer.CopyFields(); - end; - - local procedure CopyStandardItemJournalLine(); - var - StandardItemJournalLine: Record "Standard Item Journal Line"; - StandardItemJournalLineDataTransfer: DataTransfer; - begin - StandardItemJournalLineDataTransfer.SetTables(Database::"Standard Item Journal Line", Database::"Standard Item Journal Line"); - StandardItemJournalLineDataTransfer.AddFieldValue(StandardItemJournalLine.FieldNo("New Location Code"), StandardItemJournalLine.FieldNo("New Location Code CZA")); - StandardItemJournalLineDataTransfer.CopyFields(); - end; - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Company-Initialize", 'OnCompanyInitialize', '', false, false)] local procedure CompanyInitialize() var diff --git a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZA.Codeunit.al b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZA.Codeunit.al index 353f0db9fc..68f91ef36e 100644 --- a/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZA.Codeunit.al +++ b/Apps/CZ/AdvancedLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZA.Codeunit.al @@ -4,7 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace System.Upgrade; -using Microsoft; using Microsoft.Finance.GeneralLedger.Ledger; using Microsoft.Inventory.Item; using Microsoft.Inventory.Journal; @@ -28,7 +27,6 @@ codeunit 31251 "Upgrade Application CZA" DataUpgradeMgt: Codeunit "Data Upgrade Mgt."; UpgradeTag: Codeunit "Upgrade Tag"; UpgradeTagDefinitionsCZA: Codeunit "Upgrade Tag Definitions CZA"; - InstallApplicationsMgtCZL: Codeunit "Install Applications Mgt. CZL"; trigger OnUpgradePerDatabase() begin @@ -36,62 +34,6 @@ codeunit 31251 "Upgrade Application CZA" SetDatabaseUpgradeTags(); end; - trigger OnUpgradePerCompany() - begin - DataUpgradeMgt.SetUpgradeInProgress(); - BindSubscription(InstallApplicationsMgtCZL); - UpgradeData(); - UnbindSubscription(InstallApplicationsMgtCZL); - SetCompanyUpgradeTags(); - end; - - local procedure UpgradeData() - begin - UpgradeTransferShipmentLine(); - UpgradeItemEntryRelation(); - UpgradeStandardItemJournalLine(); - end; - - local procedure UpgradeTransferShipmentLine(); - var - TransferShipmentLine: Record "Transfer Shipment Line"; - TransferShipmentLineDataTransfer: DataTransfer; - begin - if UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion200PerCompanyUpgradeTag()) then - exit; - - TransferShipmentLineDataTransfer.SetTables(Database::"Transfer Shipment Line", Database::"Transfer Shipment Line"); - TransferShipmentLineDataTransfer.AddFieldValue(TransferShipmentLine.FieldNo(Correction), TransferShipmentLine.FieldNo("Correction CZA")); - TransferShipmentLineDataTransfer.AddFieldValue(TransferShipmentLine.FieldNo("Transfer Order Line No."), TransferShipmentLine.FieldNo("Transfer Order Line No. CZA")); - TransferShipmentLineDataTransfer.CopyFields(); - end; - - local procedure UpgradeItemEntryRelation(); - var - ItemEntryRelation: Record "Item Entry Relation"; - ItemEntryRelationDataTransfer: DataTransfer; - begin - if UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion200PerCompanyUpgradeTag()) then - exit; - - ItemEntryRelationDataTransfer.SetTables(Database::"Item Entry Relation", Database::"Item Entry Relation"); - ItemEntryRelationDataTransfer.AddFieldValue(ItemEntryRelation.FieldNo(Undo), ItemEntryRelation.FieldNo("Undo CZA")); - ItemEntryRelationDataTransfer.CopyFields(); - end; - - local procedure UpgradeStandardItemJournalLine(); - var - StandardItemJournalLine: Record "Standard Item Journal Line"; - StandardItemJournalLineDataTransfer: DataTransfer; - begin - if UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion210PerCompanyUpgradeTag()) then - exit; - - StandardItemJournalLineDataTransfer.SetTables(Database::"Standard Item Journal Line", Database::"Standard Item Journal Line"); - StandardItemJournalLineDataTransfer.AddFieldValue(StandardItemJournalLine.FieldNo("New Location Code"), StandardItemJournalLine.FieldNo("New Location Code CZA")); - StandardItemJournalLineDataTransfer.CopyFields(); - end; - local procedure SetDatabaseUpgradeTags(); begin if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion180PerDatabaseUpgradeTag()) then @@ -105,18 +47,4 @@ codeunit 31251 "Upgrade Application CZA" if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion220PerDatabaseUpgradeTag()) then UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion220PerDatabaseUpgradeTag()); end; - - local procedure SetCompanyUpgradeTags(); - begin - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion180PerCompanyUpgradeTag()) then - UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion180PerCompanyUpgradeTag()); - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion182PerCompanyUpgradeTag()) then - UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion182PerCompanyUpgradeTag()); - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion183PerCompanyUpgradeTag()) then - UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion183PerCompanyUpgradeTag()); - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion200PerCompanyUpgradeTag()) then - UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion200PerCompanyUpgradeTag()); - if not UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion220PerCompanyUpgradeTag()) then - UpgradeTag.SetUpgradeTag(UpgradeTagDefinitionsCZA.GetDataVersion220PerCompanyUpgradeTag()); - end; } diff --git a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZB.Codeunit.al b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZB.Codeunit.al index f5ffc05fde..b18cb1568d 100644 --- a/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZB.Codeunit.al +++ b/Apps/CZ/BankingDocumentsLocalization/app/Src/Codeunits/DocAttachmentHandlerCZB.Codeunit.al @@ -20,17 +20,8 @@ codeunit 31361 "Doc. Attachment Handler CZB" InitDocumentAttachmentFields(DocumentAttachment, RecRef); end; -#if not CLEAN25 - [Obsolete('Page Document Attachment Factbox is replaced by the "Doc. Attachment List Factbox" which supports multiple file upload. The corresponding event subscriber is replaced with GetTableOnAfterGetRecRefFail.', '25.0')] - [EventSubscriber(ObjectType::Page, Page::"Document Attachment Factbox", 'OnBeforeDrillDown', '', false, false)] - local procedure GetTableOnBeforeDrillDown(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) - begin - GetDocumentAttachmentTable(DocumentAttachment, RecRef); - end; -#endif - - [EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List Factbox", 'OnAfterGetRecRefFail', '', false, false)] - local procedure GetTableOnAfterGetRecRefFail(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document Attachment Mgmt", 'OnAfterGetRefTable', '', false, false)] + local procedure GetTableOnAfterGetRefTable(var RecRef: RecordRef; DocumentAttachment: Record "Document Attachment") begin GetDocumentAttachmentTable(DocumentAttachment, RecRef); end; @@ -148,29 +139,25 @@ codeunit 31361 "Doc. Attachment Handler CZB" Database::"Payment Order Header CZB": begin DocumentRecordRef.Open(Database::"Payment Order Header CZB"); - PaymentOrderHeaderCZB.SetRange("No.", DocumentAttachment."No."); - if PaymentOrderHeaderCZB.FindFirst() then + if PaymentOrderHeaderCZB.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(PaymentOrderHeaderCZB); end; Database::"Iss. Payment Order Header CZB": begin DocumentRecordRef.Open(Database::"Iss. Payment Order Header CZB"); - IssPaymentOrderHeaderCZB.SetRange("No.", DocumentAttachment."No."); - if IssPaymentOrderHeaderCZB.FindFirst() then + if IssPaymentOrderHeaderCZB.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(IssPaymentOrderHeaderCZB); end; Database::"Bank Statement Header CZB": begin DocumentRecordRef.Open(Database::"Bank Statement Header CZB"); - BankStatementHeaderCZB.SetRange("No.", DocumentAttachment."No."); - if BankStatementHeaderCZB.FindFirst() then + if BankStatementHeaderCZB.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(BankStatementHeaderCZB); end; Database::"Iss. Bank Statement Header CZB": begin DocumentRecordRef.Open(Database::"Iss. Bank Statement Header CZB"); - IssBankStatementHeaderCZB.SetRange("No.", DocumentAttachment."No."); - if IssBankStatementHeaderCZB.FindFirst() then + if IssBankStatementHeaderCZB.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(IssBankStatementHeaderCZB); end; end; diff --git a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/CashDeskManagementCZP.Codeunit.al b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/CashDeskManagementCZP.Codeunit.al index f81cc00862..b533c60f08 100644 --- a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/CashDeskManagementCZP.Codeunit.al +++ b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/CashDeskManagementCZP.Codeunit.al @@ -726,6 +726,7 @@ codeunit 11724 "Cash Desk Management CZP" CashDesksFilter += '|' + TempCashDeskCZP."No."; until TempCashDeskCZP.Next() = 0; CashDesksFilter := CopyStr(CashDesksFilter, 2); + OnAfterGetCashDesksFilterFromBuffer(TempCashDeskCZP, CashDesksFilter); end; procedure IsEntityBlocked(AccountType: Enum "Cash Document Account Type CZP"; AccountNo: Code[20]): Boolean @@ -820,4 +821,9 @@ codeunit 11724 "Cash Desk Management CZP" local procedure OnBeforeCheckResponsibilityCenter(RespCenter: Code[10]; UserCode: Code[50]; var IsHandled: Boolean; var Result: Boolean) begin end; + + [IntegrationEvent(true, false)] + local procedure OnAfterGetCashDesksFilterFromBuffer(var TempCashDeskCZP: Record "Cash Desk CZP" temporary; var CashDesksFilter: Text) + begin + end; } diff --git a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/DocAttachmentHandlerCZP.Codeunit.al b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/DocAttachmentHandlerCZP.Codeunit.al index 59e7739c22..36c7a5d1d0 100644 --- a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/DocAttachmentHandlerCZP.Codeunit.al +++ b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/DocAttachmentHandlerCZP.Codeunit.al @@ -20,17 +20,8 @@ codeunit 31009 "Doc. Attachment Handler CZP" InitDocumentAttachmentFields(DocumentAttachment, RecRef); end; -#if not CLEAN25 - [Obsolete('Page Document Attachment Factbox is replaced by the "Doc. Attachment List Factbox" which supports multiple file upload. The corresponding event subscriber is replaced with GetTableOnAfterGetRecRefFail.', '25.0')] - [EventSubscriber(ObjectType::Page, Page::"Document Attachment Factbox", 'OnBeforeDrillDown', '', false, false)] - local procedure GetTableOnBeforeDrillDown(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) - begin - GetDocumentAttachmentTable(DocumentAttachment, RecRef); - end; -#endif - - [EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List Factbox", 'OnAfterGetRecRefFail', '', false, false)] - local procedure GetTableOnAfterGetRecRefFail(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document Attachment Mgmt", 'OnAfterGetRefTable', '', false, false)] + local procedure GetTableOnAfterGetRefTable(var RecRef: RecordRef; DocumentAttachment: Record "Document Attachment") begin GetDocumentAttachmentTable(DocumentAttachment, RecRef); end; diff --git a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/ServiceHandlerCZP.Codeunit.al b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/ServiceHandlerCZP.Codeunit.al index cded4cc2b5..464ffe8e2d 100644 --- a/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/ServiceHandlerCZP.Codeunit.al +++ b/Apps/CZ/CashDeskLocalization/app/Src/Codeunits/ServiceHandlerCZP.Codeunit.al @@ -47,8 +47,8 @@ codeunit 11738 "Service Handler CZP" end; end; - [EventSubscriber(ObjectType::Codeunit, Codeunit::"Service-Post", 'OnAfterPostServiceDoc', '', false, false)] - local procedure CreateCashDocumentOnAfterPostServiceDoc(var ServiceHeader: Record "Service Header"; ServInvoiceNo: Code[20]; ServCrMemoNo: Code[20]) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Serv-Documents Mgt.", 'OnAfterFinalize', '', false, false)] + local procedure CreateCashDocumentOnAfterPostServiceDoc(var ServiceHeader: Record "Service Header") var ServiceInvoiceHeader: Record "Service Invoice Header"; ServiceCrMemoHeader: Record "Service Cr.Memo Header"; @@ -57,10 +57,10 @@ codeunit 11738 "Service Handler CZP" exit; if ServiceHeader."Document Type" in [ServiceHeader."Document Type"::Order, ServiceHeader."Document Type"::Invoice] then begin - ServiceInvoiceHeader.Get(ServInvoiceNo); + ServiceInvoiceHeader.Get(ServiceHeader."Last Posting No."); CashDeskManagementCZP.CreateCashDocumentFromServiceInvoice(ServiceInvoiceHeader); end else begin - ServiceCrMemoHeader.Get(ServCrMemoNo); + ServiceCrMemoHeader.Get(ServiceHeader."Last Posting No."); CashDeskManagementCZP.CreateCashDocumentFromServiceCrMemo(ServiceCrMemoHeader); end; end; diff --git a/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentHeaderCZP.Table.al b/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentHeaderCZP.Table.al index 0836175e6f..cb460336d7 100644 --- a/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentHeaderCZP.Table.al +++ b/Apps/CZ/CashDeskLocalization/app/Src/Tables/CashDocumentHeaderCZP.Table.al @@ -855,7 +855,8 @@ table 11732 "Cash Document Header CZP" Modify(); if OldDimSetID <> "Dimension Set ID" then begin - Modify(); + if not IsNullGuid(Rec.SystemId) then + Modify(); if CashDocLinesExist() then UpdateAllLineDim("Dimension Set ID", OldDimSetID); end; diff --git a/Apps/CZ/CompensationLocalization/app/Src/Codeunits/CompensationPostCZC.Codeunit.al b/Apps/CZ/CompensationLocalization/app/Src/Codeunits/CompensationPostCZC.Codeunit.al index 5b1b376741..15d720933b 100644 --- a/Apps/CZ/CompensationLocalization/app/Src/Codeunits/CompensationPostCZC.Codeunit.al +++ b/Apps/CZ/CompensationLocalization/app/Src/Codeunits/CompensationPostCZC.Codeunit.al @@ -78,6 +78,7 @@ codeunit 31269 "Compensation - Post CZC" GenJournalLine."Source Code" := SourceCodeSetup."Compensation CZC"; GenJournalLine."System-Created Entry" := true; + OnRunOnBeforeRunGenJnlPostLine(GenJournalLine, CompensationLineCZC, TempAmount); GenJnlPostLine.RunWithCheck(GenJournalLine); CompensationLineCZC."Amount (LCY)" := TempAmount; CompensationLineCZC.Modify(); @@ -204,4 +205,9 @@ codeunit 31269 "Compensation - Post CZC" local procedure OnAfterPostCompensationCZC(var CompensationHeaderCZC: Record "Compensation Header CZC"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PostedCompensationHeaderNo: Code[20]) begin end; + + [IntegrationEvent(true, false)] + local procedure OnRunOnBeforeRunGenJnlPostLine(var GenJournalLine: Record "Gen. Journal Line"; var CompensationLineCZC: Record "Compensation Line CZC"; var TempAmount: Decimal) + begin + end; } diff --git a/Apps/CZ/CompensationLocalization/app/Src/Codeunits/DocAttachmentHandlerCZC.Codeunit.al b/Apps/CZ/CompensationLocalization/app/Src/Codeunits/DocAttachmentHandlerCZC.Codeunit.al index 44965a5c29..46258cfb62 100644 --- a/Apps/CZ/CompensationLocalization/app/Src/Codeunits/DocAttachmentHandlerCZC.Codeunit.al +++ b/Apps/CZ/CompensationLocalization/app/Src/Codeunits/DocAttachmentHandlerCZC.Codeunit.al @@ -20,17 +20,8 @@ codeunit 31267 "Doc. Attachment Handler CZC" InitDocumentAttachmentFields(DocumentAttachment, RecRef); end; -#if not CLEAN25 - [Obsolete('Page Document Attachment Factbox is replaced by the "Doc. Attachment List Factbox" which supports multiple file upload. The corresponding event subscriber is replaced with GetTableOnAfterGetRecRefFail.', '25.0')] - [EventSubscriber(ObjectType::Page, Page::"Document Attachment Factbox", 'OnBeforeDrillDown', '', false, false)] - local procedure GetTableOnBeforeDrillDown(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) - begin - GetDocumentAttachmentTable(DocumentAttachment, RecRef); - end; -#endif - - [EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List Factbox", 'OnAfterGetRecRefFail', '', false, false)] - local procedure GetTableOnAfterGetRecRefFail(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document Attachment Mgmt", 'OnAfterGetRefTable', '', false, false)] + local procedure GetTableOnAfterGetRefTable(var RecRef: RecordRef; DocumentAttachment: Record "Document Attachment") begin GetDocumentAttachmentTable(DocumentAttachment, RecRef); end; @@ -110,15 +101,13 @@ codeunit 31267 "Doc. Attachment Handler CZC" Database::"Compensation Header CZC": begin DocumentRecordRef.Open(Database::"Compensation Header CZC"); - CompensationHeaderCZC.SetRange("No.", DocumentAttachment."No."); - if CompensationHeaderCZC.FindFirst() then + if CompensationHeaderCZC.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(CompensationHeaderCZC); end; Database::"Posted Compensation Header CZC": begin DocumentRecordRef.Open(Database::"Posted Compensation Header CZC"); - PostedCompensationHeaderCZC.SetRange("No.", DocumentAttachment."No."); - if PostedCompensationHeaderCZC.FindFirst() then + if PostedCompensationHeaderCZC.Get(DocumentAttachment."No.") then DocumentRecordRef.GetTable(PostedCompensationHeaderCZC); end; end; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DocAttachmentHandlerCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DocAttachmentHandlerCZL.Codeunit.al index 6128ab2632..bf497799a4 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DocAttachmentHandlerCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/DocAttachmentHandlerCZL.Codeunit.al @@ -20,17 +20,8 @@ codeunit 31015 "Doc. Attachment Handler CZL" InitDocumentAttachmentFields(DocumentAttachment, RecRef); end; -#if not CLEAN25 - [Obsolete('Page Document Attachment Factbox is replaced by the "Doc. Attachment List Factbox" which supports multiple file upload. The corresponding event subscriber is replaced with GetTableOnAfterGetRecRefFail.', '25.0')] - [EventSubscriber(ObjectType::Page, Page::"Document Attachment Factbox", 'OnBeforeDrillDown', '', false, false)] - local procedure GetTableOnBeforeDrillDown(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) - begin - GetDocumentAttachmentTable(DocumentAttachment, RecRef); - end; -#endif - - [EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List Factbox", 'OnAfterGetRecRefFail', '', false, false)] - local procedure GetTableOnAfterGetRecRefFail(DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef) + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Document Attachment Mgmt", 'OnAfterGetRefTable', '', false, false)] + local procedure GetTableOnAfterGetRefTable(var RecRef: RecordRef; DocumentAttachment: Record "Document Attachment") begin GetDocumentAttachmentTable(DocumentAttachment, RecRef); end; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al index 2a8f8db952..31eefe0fd4 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/InstallApplicationCZL.Codeunit.al @@ -236,7 +236,6 @@ codeunit 11748 "Install Application CZL" CopyServiceHeader(); CopyServiceInvoiceHeader(); CopyServiceCrMemoHeader(); - CopyIssuedReminderHeader(); CopyVATStatementTemplate(); CopyVATStatementLine(); CopyAccScheduleLine(); @@ -417,25 +416,6 @@ codeunit 11748 "Install Application CZL" ServiceCrMemoHeaderDataTransfer.CopyFields(); end; - local procedure CopyIssuedReminderHeader(); - var - IssuedReminderHeader: Record "Issued Reminder Header"; - IssuedReminderHeaderDataTransfer: DataTransfer; - begin - IssuedReminderHeaderDataTransfer.SetTables(Database::"Issued Reminder Header", Database::"Issued Reminder Header"); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Specific Symbol"), IssuedReminderHeader.FieldNo("Specific Symbol CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Variable Symbol"), IssuedReminderHeader.FieldNo("Variable Symbol CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Constant Symbol"), IssuedReminderHeader.FieldNo("Constant Symbol CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Bank No."), IssuedReminderHeader.FieldNo("Bank Account Code CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Bank Account No."), IssuedReminderHeader.FieldNo("Bank Account No. CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Bank Branch No."), IssuedReminderHeader.FieldNo("Bank Branch No. CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Bank Name"), IssuedReminderHeader.FieldNo("Bank Name CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("Transit No."), IssuedReminderHeader.FieldNo("Transit No. CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo(IBAN), IssuedReminderHeader.FieldNo("IBAN CZL")); - IssuedReminderHeaderDataTransfer.AddFieldValue(IssuedReminderHeader.FieldNo("SWIFT Code"), IssuedReminderHeader.FieldNo("SWIFT Code CZL")); - IssuedReminderHeaderDataTransfer.CopyFields(); - end; - local procedure CopyVATStatementTemplate(); var VATStatementTemplate: Record "VAT Statement Template"; @@ -500,49 +480,6 @@ codeunit 11748 "Install Application CZL" end; - local procedure CreateTemplateHeader(var ConfigTemplateHeader: Record "Config. Template Header"; "Code": Code[10]; Description: Text[100]; TableID: Integer) - begin - ConfigTemplateHeader.Init(); - ConfigTemplateHeader.Code := Code; - ConfigTemplateHeader.Description := Description; - ConfigTemplateHeader."Table ID" := TableID; - ConfigTemplateHeader.Enabled := true; - ConfigTemplateHeader.Insert(); - end; - - local procedure CreateTemplateLine(var ConfigTemplateHeader: Record "Config. Template Header"; FieldID: Integer; Value: Text[50]) - var - ConfigTemplateLine: Record "Config. Template Line"; - NextLineNo: Integer; - begin - NextLineNo := 10000; - ConfigTemplateLine.SetRange("Data Template Code", ConfigTemplateHeader.Code); - if ConfigTemplateLine.FindLast() then - NextLineNo := ConfigTemplateLine."Line No." + 10000; - - ConfigTemplateLine.Init(); - ConfigTemplateLine.Validate("Data Template Code", ConfigTemplateHeader.Code); - ConfigTemplateLine.Validate("Line No.", NextLineNo); - ConfigTemplateLine.Validate(Type, ConfigTemplateLine.Type::Field); - ConfigTemplateLine.Validate("Table ID", ConfigTemplateHeader."Table ID"); - ConfigTemplateLine.Validate("Field ID", FieldID); - ConfigTemplateLine."Default Value" := Value; - ConfigTemplateLine.Insert(true); - end; - - local procedure GetNextDataTemplateAvailableCode(): Code[10] - var - ConfigTemplateHeader: Record "Config. Template Header"; - StockkeepingUnitConfigTemplCode: Code[10]; - StockkeepingUnitConfigTemplCodeTxt: Label 'SKU0000000', MaxLength = 10; - begin - StockkeepingUnitConfigTemplCode := StockkeepingUnitConfigTemplCodeTxt; - repeat - StockkeepingUnitConfigTemplCode := CopyStr(IncStr(StockkeepingUnitConfigTemplCode), 1, MaxStrLen(ConfigTemplateHeader.Code)); - until not ConfigTemplateHeader.Get(StockkeepingUnitConfigTemplCode); - exit(StockkeepingUnitConfigTemplCode); - end; - local procedure ModifyGenJournalTemplate() var GenJournalTemplate: Record "Gen. Journal Template"; diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZL.Codeunit.al b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZL.Codeunit.al index bd799f5b81..d6aa836f03 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZL.Codeunit.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/UpgradeApplicationCZL.Codeunit.al @@ -406,9 +406,6 @@ codeunit 31017 "Upgrade Application CZL" Customer: Record Customer; DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; - PurchasesPayablesSetup: Record "Purchases & Payables Setup"; - SalesReceivablesSetup: Record "Sales & Receivables Setup"; - ServiceMgtSetup: Record "Service Mgt. Setup"; Vendor: Record Vendor; CustomerDataTransfer: DataTransfer; DetCustLedgEntryDataTransfer: DataTransfer; @@ -418,21 +415,6 @@ codeunit 31017 "Upgrade Application CZL" if UpgradeTag.HasUpgradeTag(UpgradeTagDefinitionsCZL.GetReplaceAllowAlterPostingGroupsUpgradeTag()) then exit; - if PurchasesPayablesSetup.Get() then begin - PurchasesPayablesSetup."Allow Multiple Posting Groups" := PurchasesPayablesSetup."Allow Alter Posting Groups CZL"; - PurchasesPayablesSetup.Modify(); - end; - - if SalesReceivablesSetup.Get() then begin - SalesReceivablesSetup."Allow Multiple Posting Groups" := SalesReceivablesSetup."Allow Alter Posting Groups CZL"; - SalesReceivablesSetup.Modify(); - end; - - if ServiceMgtSetup.Get() then begin - ServiceMgtSetup."Allow Multiple Posting Groups" := ServiceMgtSetup."Allow Alter Posting Groups CZL"; - ServiceMgtSetup.Modify(); - end; - VendorDataTransfer.SetTables(Database::"Vendor", Database::"Vendor"); VendorDataTransfer.AddConstantValue(true, Vendor.FieldNo("Allow Multiple Posting Groups")); VendorDataTransfer.CopyFields(); diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchasesPayablesSetupCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchasesPayablesSetupCZL.TableExt.al index 5e1440c1bb..7f8c8d19d9 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchasesPayablesSetupCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/PurchasesPayablesSetupCZL.TableExt.al @@ -1,4 +1,4 @@ -#if not CLEANSCHEMA25 +#if not CLEANSCHEMA25 // ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -21,16 +21,6 @@ tableextension 11715 "Purchases & Payables Setup CZL" extends "Purchases & Payab ObsoleteTag = '25.0'; ObsoleteReason = 'Replaced by VAT Reporting Date in General Ledger Setup.'; } -#if not CLEANSCHEMA23 - field(11781; "Allow Alter Posting Groups CZL"; Boolean) - { - Caption = 'Allow Alter Posting Groups'; - DataClassification = CustomerContent; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - ObsoleteReason = 'It will be replaced by "Allow Multiple Posting Groups" field.'; - } -#endif #if not CLEANSCHEMA25 field(31110; "Def. Orig. Doc. VAT Date CZL"; Option) { @@ -45,4 +35,4 @@ tableextension 11715 "Purchases & Payables Setup CZL" extends "Purchases & Payab #endif } } -#endif +#endif \ No newline at end of file diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/SalesReceivablesSetupCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/SalesReceivablesSetupCZL.TableExt.al index b6f177a898..e5e82ec620 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/SalesReceivablesSetupCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/SalesReceivablesSetupCZL.TableExt.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -22,16 +22,6 @@ tableextension 11714 "Sales & Receivables Setup CZL" extends "Sales & Receivable ObsoleteTag = '25.0'; ObsoleteReason = 'Replaced by VAT Reporting Date in General Ledger Setup.'; } -#endif -#if not CLEANSCHEMA23 - field(11781; "Allow Alter Posting Groups CZL"; Boolean) - { - Caption = 'Allow Alter Posting Groups'; - DataClassification = CustomerContent; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - ObsoleteReason = 'It will be replaced by "Allow Multiple Posting Groups" field.'; - } #endif field(11782; "Print QR Payment CZL"; Boolean) { @@ -57,4 +47,4 @@ tableextension 11714 "Sales & Receivables Setup CZL" extends "Sales & Receivable PrintQROnPremFontkNotification.Scope := NotificationScope::LocalScope; PrintQROnPremFontkNotification.Send(); end; -} +} \ No newline at end of file diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ServiceMgtSetupCZL.TableExt.al b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ServiceMgtSetupCZL.TableExt.al index 1b24ab5490..380396d6e5 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ServiceMgtSetupCZL.TableExt.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/TableExtensions/ServiceMgtSetupCZL.TableExt.al @@ -1,4 +1,4 @@ -#if not CLEANSCHEMA25 +#if not CLEANSCHEMA25 // ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -21,16 +21,6 @@ tableextension 11716 "Service Mgt. Setup CZL" extends "Service Mgt. Setup" ObsoleteTag = '25.0'; ObsoleteReason = 'Replaced by VAT Reporting Date in General Ledger Setup.'; } -#if not CLEANSCHEMA23 - field(11781; "Allow Alter Posting Groups CZL"; Boolean) - { - Caption = 'Allow Alter Posting Groups'; - DataClassification = CustomerContent; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - ObsoleteReason = 'It will be replaced by "Allow Multiple Posting Groups" field.'; - } -#endif } } #endif \ No newline at end of file diff --git a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/AccScheduleExtensionCZL.Table.al b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/AccScheduleExtensionCZL.Table.al index a199599715..ebe312f295 100644 --- a/Apps/CZ/CoreLocalizationPack/app/Src/Tables/AccScheduleExtensionCZL.Table.al +++ b/Apps/CZ/CoreLocalizationPack/app/Src/Tables/AccScheduleExtensionCZL.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -97,18 +97,6 @@ table 31092 "Acc. Schedule Extension CZL" OptionCaption = ' ,Purchase,Sale'; OptionMembers = " ",Purchase,Sale; } -#if not CLEANSCHEMA23 - field(17; Prepayment; Option) - { - Caption = 'Prepayment'; - DataClassification = CustomerContent; - OptionCaption = ' ,Yes,No'; - OptionMembers = " ",Yes,No; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - ObsoleteReason = 'Replaced by Advance Payments field in Advance Payments Localization for Czech app'; - } -#endif field(18; "Reverse Sign"; Boolean) { Caption = 'Reverse Sign'; @@ -239,4 +227,4 @@ table 31092 "Acc. Schedule Extension CZL" CustLedgerEntry: Record "Cust. Ledger Entry"; VendorLedgerEntry: Record "Vendor Ledger Entry"; RenameErr: Label 'You cannot rename a %1.', Comment = '%1 = TableCaption'; -} +} \ No newline at end of file diff --git a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgIntrastatJnlLine.Table.al b/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgIntrastatJnlLine.Table.al deleted file mode 100644 index 7408ee20fb..0000000000 --- a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgIntrastatJnlLine.Table.al +++ /dev/null @@ -1,322 +0,0 @@ -#if not CLEANSCHEMA24 -table 11716 "Stg Intrastat Jnl. Line" -{ - Caption = 'Staging Intrastat Jnl. Line'; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Journal Template Name"; Code[10]) - { - Caption = 'Journal Template Name'; - TableRelation = "Intrastat Jnl. Template"; - } - field(2; "Journal Batch Name"; Code[10]) - { - Caption = 'Journal Batch Name'; - TableRelation = "Intrastat Jnl. Batch".Name WHERE("Journal Template Name" = FIELD("Journal Template Name")); - } - field(3; "Line No."; Integer) - { - Caption = 'Line No.'; - } - field(4; Type; Option) - { - Caption = 'Type'; - OptionCaption = 'Receipt,Shipment'; - OptionMembers = Receipt,Shipment; - } - field(5; Date; Date) - { - Caption = 'Date'; - } - field(6; "Tariff No."; Code[20]) - { - Caption = 'Tariff No.'; - NotBlank = true; - TableRelation = "Tariff Number"; - } - field(7; "Item Description"; Text[250]) - { - Caption = 'Item Description'; - } - field(8; "Country/Region Code"; Code[10]) - { - Caption = 'Country/Region Code'; - TableRelation = "Country/Region"; - } - field(9; "Transaction Type"; Code[10]) - { - Caption = 'Transaction Type'; - TableRelation = "Transaction Type"; - } - field(10; "Transport Method"; Code[10]) - { - Caption = 'Transport Method'; - TableRelation = "Transport Method"; - } - field(11; "Source Type"; Option) - { - BlankZero = true; - Caption = 'Source Type'; - OptionCaption = ',Item Entry,Job Entry'; - OptionMembers = ,"Item Entry","Job Entry"; - } - field(12; "Source Entry No."; Integer) - { - Caption = 'Source Entry No.'; - Editable = false; - TableRelation = IF ("Source Type" = CONST("Item Entry")) "Item Ledger Entry" - ELSE - IF ("Source Type" = CONST("Job Entry")) "Job Ledger Entry"; - } - field(13; "Net Weight"; Decimal) - { - Caption = 'Net Weight'; - DecimalPlaces = 2 : 5; - } - field(14; Amount; Decimal) - { - Caption = 'Amount'; - DecimalPlaces = 0 : 0; - } - field(15; Quantity; Decimal) - { - Caption = 'Quantity'; - DecimalPlaces = 0 : 3; - } - field(16; "Cost Regulation %"; Decimal) - { - Caption = 'Cost Regulation %'; - DecimalPlaces = 2 : 2; - MaxValue = 100; - MinValue = -100; - } - field(17; "Indirect Cost"; Decimal) - { - Caption = 'Indirect Cost'; - DecimalPlaces = 0 : 0; - } - field(18; "Statistical Value"; Decimal) - { - Caption = 'Statistical Value'; - DecimalPlaces = 0 : 0; - } - field(19; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(20; "Item No."; Code[20]) - { - Caption = 'Item No.'; - TableRelation = Item; - } - field(21; Name; Text[100]) - { - Caption = 'Name'; - } - field(22; "Total Weight"; Decimal) - { - Caption = 'Total Weight'; - DecimalPlaces = 2 : 5; - Editable = false; - } - field(23; "Supplementary Units"; Boolean) - { - Caption = 'Supplementary Units'; - Editable = false; - } - field(24; "Internal Ref. No."; Text[10]) - { - Caption = 'Internal Ref. No.'; - Editable = false; - } - field(25; "Country/Region of Origin Code"; Code[10]) - { - Caption = 'Country/Region of Origin Code'; - TableRelation = "Country/Region"; - } - field(26; "Entry/Exit Point"; Code[10]) - { - Caption = 'Entry/Exit Point'; - TableRelation = "Entry/Exit Point"; - } - field(27; "Area"; Code[10]) - { - Caption = 'Area'; - TableRelation = Area; - } - field(28; "Transaction Specification"; Code[10]) - { - Caption = 'Transaction Specification'; - TableRelation = "Transaction Specification"; - } - field(29; "Shpt. Method Code"; Code[10]) - { - Caption = 'Shpt. Method Code'; - TableRelation = "Shipment Method"; - } - field(30; "Partner VAT ID"; Text[50]) - { - Caption = 'Partner VAT ID'; - } - field(31; "Location Code"; Code[10]) - { - Caption = 'Location Code'; - TableRelation = Location; - } -#if not CLEANSCHEMA23 - field(31060; "Additional Costs"; Boolean) - { - Caption = 'Additional Costs'; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31061; "Source Entry Date"; Date) - { - Caption = 'Source Entry Date'; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31062; "Statistic Indication"; Code[10]) - { - Caption = 'Statistic Indication'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31063; "Statistics Period"; Code[10]) - { - Caption = 'Statistics Period'; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31065; "Declaration No."; Code[10]) - { - Caption = 'Declaration No.'; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31066; "Statement Type"; Option) - { - Caption = 'Statement Type'; - Editable = false; - OptionCaption = 'Primary,Null,Replacing,Deleting'; - OptionMembers = Primary,Null,Replacing,Deleting; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31067; "Prev. Declaration No."; Code[10]) - { - Caption = 'Prev. Declaration No.'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31068; "Prev. Declaration Line No."; Integer) - { - Caption = 'Prev. Declaration Line No.'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - field(31069; "Shipment Method Code"; Code[10]) - { - Caption = 'Shipment Method Code'; - TableRelation = "Shipment Method"; - } -#if not CLEANSCHEMA23 - field(31070; "Specific Movement"; Code[10]) - { - Caption = 'Specific Movement'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31071; "Supplem. UoM Code"; Code[10]) - { - Caption = 'Supplem. UoM Code'; - Editable = false; - TableRelation = "Item Unit of Measure".Code WHERE("Item No." = FIELD("Item No.")); - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31072; "Supplem. UoM Quantity"; Decimal) - { - Caption = 'Supplem. UoM Quantity'; - DecimalPlaces = 0 : 3; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31073; "Supplem. UoM Net Weight"; Decimal) - { - Caption = 'Supplem. UoM Net Weight'; - DecimalPlaces = 2 : 5; - Editable = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31074; "Base Unit of Measure"; Code[10]) - { - Caption = 'Base Unit of Measure'; - Editable = false; - TableRelation = "Item Unit of Measure".Code WHERE("Item No." = FIELD("Item No.")); - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - } - - keys - { - key(Key1; "Journal Template Name", "Journal Batch Name", "Line No.") - { - Clustered = true; - } - key(Key2; "Source Type", "Source Entry No.") - { - } - key(Key3; Type, "Country/Region Code", "Tariff No.", "Transaction Type", "Transport Method") - { - } - key(Key4; "Internal Ref. No.") - { - } -#if not CLEANSCHEMA23 - key(Key5; Type, "Country/Region Code", "Tariff No.", "Statistic Indication", "Transaction Type", "Shpt. Method Code", "Area", "Transport Method") - { - ObsoleteState = Removed; - ObsoleteReason = 'Field "Statistic Indication" is removed and cannot be used in an active key.'; - ObsoleteTag = '23.0'; - } - key(Key6; Type, "Tariff No.", "Country/Region Code", "Country/Region of Origin Code", "Statistic Indication", "Transaction Type", "Shpt. Method Code", "Area", "Transport Method") - { - ObsoleteState = Removed; - ObsoleteReason = 'Field "Statistic Indication" is removed and cannot be used in an active key.'; - ObsoleteTag = '23.0'; - } -#endif - key(Key7; "Document No.") - { - } - } - -} -#endif \ No newline at end of file diff --git a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemJournalLine.Table.al b/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemJournalLine.Table.al deleted file mode 100644 index 7c32aff6b6..0000000000 --- a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemJournalLine.Table.al +++ /dev/null @@ -1,1009 +0,0 @@ -#if not CLEANSCHEMA24 -table 11714 "Stg Item Journal Line" -{ - Caption = 'Stg Item Journal Line'; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Journal Template Name"; Code[10]) - { - Caption = 'Journal Template Name'; - TableRelation = "Item Journal Template"; - } - field(2; "Line No."; Integer) - { - Caption = 'Line No.'; - } - field(3; "Item No."; Code[20]) - { - Caption = 'Item No.'; - TableRelation = Item; - } - field(4; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(5; "Entry Type"; Enum "Item Ledger Entry Type") - { - Caption = 'Entry Type'; - } - field(6; "Source No."; Code[20]) - { - Caption = 'Source No.'; - Editable = false; - TableRelation = IF ("Source Type" = CONST(Customer)) Customer - ELSE - IF ("Source Type" = CONST(Vendor)) Vendor - ELSE - IF ("Source Type" = CONST(Item)) Item; - } - field(7; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(8; Description; Text[100]) - { - Caption = 'Description'; - } - field(9; "Location Code"; Code[10]) - { - Caption = 'Location Code'; - TableRelation = Location; - } - field(10; "Inventory Posting Group"; Code[20]) - { - Caption = 'Inventory Posting Group'; - Editable = false; - TableRelation = "Inventory Posting Group"; - } - field(11; "Source Posting Group"; Code[20]) - { - Caption = 'Source Posting Group'; - Editable = false; - TableRelation = IF ("Source Type" = CONST(Customer)) "Customer Posting Group" - ELSE - IF ("Source Type" = CONST(Vendor)) "Vendor Posting Group" - ELSE - IF ("Source Type" = CONST(Item)) "Inventory Posting Group"; - } - field(13; Quantity; Decimal) - { - Caption = 'Quantity'; - DecimalPlaces = 0 : 5; - } - field(15; "Invoiced Quantity"; Decimal) - { - Caption = 'Invoiced Quantity'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(16; "Unit Amount"; Decimal) - { - AutoFormatType = 2; - Caption = 'Unit Amount'; - } - field(17; "Unit Cost"; Decimal) - { - AutoFormatType = 2; - Caption = 'Unit Cost'; - } - field(18; Amount; Decimal) - { - AutoFormatType = 1; - Caption = 'Amount'; - } - field(22; "Discount Amount"; Decimal) - { - AutoFormatType = 1; - Caption = 'Discount Amount'; - Editable = false; - } - field(23; "Salespers./Purch. Code"; Code[20]) - { - Caption = 'Salespers./Purch. Code'; - TableRelation = "Salesperson/Purchaser"; - } - field(26; "Source Code"; Code[10]) - { - Caption = 'Source Code'; - Editable = false; - TableRelation = "Source Code"; - } - field(29; "Applies-to Entry"; Integer) - { - Caption = 'Applies-to Entry'; - } - field(32; "Item Shpt. Entry No."; Integer) - { - Caption = 'Item Shpt. Entry No.'; - Editable = false; - } - field(34; "Shortcut Dimension 1 Code"; Code[20]) - { - Caption = 'Shortcut Dimension 1 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(1)); - } - field(35; "Shortcut Dimension 2 Code"; Code[20]) - { - Caption = 'Shortcut Dimension 2 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(2)); - } - field(37; "Indirect Cost %"; Decimal) - { - Caption = 'Indirect Cost %'; - DecimalPlaces = 0 : 5; - MinValue = 0; - } - field(39; "Source Type"; Enum "Analysis Source Type") - { - Caption = 'Source Type'; - Editable = false; - } - field(40; "Shpt. Method Code"; Code[10]) - { - Caption = 'Shpt. Method Code'; - TableRelation = "Shipment Method"; - } - field(41; "Journal Batch Name"; Code[10]) - { - Caption = 'Journal Batch Name'; - TableRelation = "Item Journal Batch".Name WHERE("Journal Template Name" = FIELD("Journal Template Name")); - } - field(42; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - } - field(43; "Recurring Method"; Option) - { - BlankZero = true; - Caption = 'Recurring Method'; - OptionCaption = ',Fixed,Variable'; - OptionMembers = ,"Fixed",Variable; - } - field(44; "Expiration Date"; Date) - { - Caption = 'Expiration Date'; - } - field(45; "Recurring Frequency"; DateFormula) - { - Caption = 'Recurring Frequency'; - } - field(46; "Drop Shipment"; Boolean) - { - AccessByPermission = tabledata "Drop Shpt. Post. Buffer" = R; - Caption = 'Drop Shipment'; - Editable = false; - } - field(47; "Transaction Type"; Code[10]) - { - Caption = 'Transaction Type'; - TableRelation = "Transaction Type"; - } - field(48; "Transport Method"; Code[10]) - { - Caption = 'Transport Method'; - TableRelation = "Transport Method"; - } - field(49; "Country/Region Code"; Code[10]) - { - Caption = 'Country/Region Code'; - TableRelation = "Country/Region"; - } - field(50; "New Location Code"; Code[10]) - { - Caption = 'New Location Code'; - TableRelation = Location; - } - field(51; "New Shortcut Dimension 1 Code"; Code[20]) - { - Caption = 'New Shortcut Dimension 1 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(1)); - } - field(52; "New Shortcut Dimension 2 Code"; Code[20]) - { - Caption = 'New Shortcut Dimension 2 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(2)); - } - field(53; "Qty. (Calculated)"; Decimal) - { - Caption = 'Qty. (Calculated)'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(54; "Qty. (Phys. Inventory)"; Decimal) - { - Caption = 'Qty. (Phys. Inventory)'; - DecimalPlaces = 0 : 5; - } - field(55; "Last Item Ledger Entry No."; Integer) - { - Caption = 'Last Item Ledger Entry No.'; - Editable = false; - TableRelation = "Item Ledger Entry"; - } - field(56; "Phys. Inventory"; Boolean) - { - Caption = 'Phys. Inventory'; - Editable = false; - } - field(57; "Gen. Bus. Posting Group"; Code[20]) - { - Caption = 'Gen. Bus. Posting Group'; - TableRelation = "Gen. Business Posting Group"; - } - field(58; "Gen. Prod. Posting Group"; Code[20]) - { - Caption = 'Gen. Prod. Posting Group'; - TableRelation = "Gen. Product Posting Group"; - } - field(59; "Entry/Exit Point"; Code[10]) - { - Caption = 'Entry/Exit Point'; - TableRelation = "Entry/Exit Point"; - } - field(60; "Document Date"; Date) - { - Caption = 'Document Date'; - } - field(62; "External Document No."; Code[35]) - { - Caption = 'External Document No.'; - } - field(63; "Area"; Code[10]) - { - Caption = 'Area'; - TableRelation = Area; - } - field(64; "Transaction Specification"; Code[10]) - { - Caption = 'Transaction Specification'; - TableRelation = "Transaction Specification"; - } - field(65; "Posting No. Series"; Code[20]) - { - Caption = 'Posting No. Series'; - TableRelation = "No. Series"; - } - field(68; "Reserved Quantity"; Decimal) - { - AccessByPermission = tabledata "Purch. Rcpt. Header" = R; - Caption = 'Reserved Quantity'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(72; "Unit Cost (ACY)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Unit Cost (ACY)'; - Editable = false; - } - field(73; "Source Currency Code"; Code[10]) - { - AccessByPermission = tabledata "Drop Shpt. Post. Buffer" = R; - Caption = 'Source Currency Code'; - Editable = false; - TableRelation = Currency; - } - field(79; "Document Type"; Enum "Item Ledger Document Type") - { - Caption = 'Document Type'; - } - field(80; "Document Line No."; Integer) - { - Caption = 'Document Line No.'; - } - field(90; "Order Type"; Enum "Inventory Order Type") - { - Caption = 'Order Type'; - Editable = false; - } - field(91; "Order No."; Code[20]) - { - Caption = 'Order No.'; - TableRelation = IF ("Order Type" = CONST(Production)) "Production Order"."No." WHERE(Status = CONST(Released)); - } - field(92; "Order Line No."; Integer) - { - Caption = 'Order Line No.'; - TableRelation = IF ("Order Type" = CONST(Production)) "Prod. Order Line"."Line No." WHERE(Status = CONST(Released), - "Prod. Order No." = FIELD("Order No.")); - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - } - field(481; "New Dimension Set ID"; Integer) - { - Caption = 'New Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - } - field(904; "Assemble to Order"; Boolean) - { - Caption = 'Assemble to Order'; - Editable = false; - } - field(1000; "Job No."; Code[20]) - { - Caption = 'Job No.'; - } - field(1001; "Job Task No."; Code[20]) - { - Caption = 'Job Task No.'; - } - field(1002; "Job Purchase"; Boolean) - { - Caption = 'Job Purchase'; - } - field(1030; "Job Contract Entry No."; Integer) - { - Caption = 'Job Contract Entry No.'; - Editable = false; - } - field(5402; "Variant Code"; Code[10]) - { - Caption = 'Variant Code'; - TableRelation = "Item Variant".Code WHERE("Item No." = FIELD("Item No.")); - } - field(5403; "Bin Code"; Code[20]) - { - Caption = 'Bin Code'; - TableRelation = IF ("Entry Type" = FILTER(Purchase | "Positive Adjmt." | Output), - Quantity = FILTER(>= 0)) Bin.Code WHERE("Location Code" = FIELD("Location Code"), - "Item Filter" = FIELD("Item No."), - "Variant Filter" = FIELD("Variant Code")) - ELSE - IF ("Entry Type" = FILTER(Purchase | "Positive Adjmt." | Output), - Quantity = FILTER(< 0)) "Bin Content"."Bin Code" WHERE("Location Code" = FIELD("Location Code"), - "Item No." = FIELD("Item No."), - "Variant Code" = FIELD("Variant Code")) - ELSE - IF ("Entry Type" = FILTER(Sale | "Negative Adjmt." | Transfer | Consumption), - Quantity = FILTER(> 0)) "Bin Content"."Bin Code" WHERE("Location Code" = FIELD("Location Code"), - "Item No." = FIELD("Item No."), - "Variant Code" = FIELD("Variant Code")) - ELSE - IF ("Entry Type" = FILTER(Sale | "Negative Adjmt." | Transfer | Consumption), - Quantity = FILTER(<= 0)) Bin.Code WHERE("Location Code" = FIELD("Location Code"), - "Item Filter" = FIELD("Item No."), - "Variant Filter" = FIELD("Variant Code")); - } - field(5404; "Qty. per Unit of Measure"; Decimal) - { - Caption = 'Qty. per Unit of Measure'; - DecimalPlaces = 0 : 5; - Editable = false; - InitValue = 1; - } - field(5406; "New Bin Code"; Code[20]) - { - Caption = 'New Bin Code'; - TableRelation = Bin.Code WHERE("Location Code" = FIELD("New Location Code"), - "Item Filter" = FIELD("Item No."), - "Variant Filter" = FIELD("Variant Code")); - } - field(5407; "Unit of Measure Code"; Code[10]) - { - Caption = 'Unit of Measure Code'; - TableRelation = "Item Unit of Measure".Code WHERE("Item No." = FIELD("Item No.")); - } - field(5408; "Derived from Blanket Order"; Boolean) - { - Caption = 'Derived from Blanket Order'; - Editable = false; - } - field(5413; "Quantity (Base)"; Decimal) - { - Caption = 'Quantity (Base)'; - DecimalPlaces = 0 : 5; - } - field(5415; "Invoiced Qty. (Base)"; Decimal) - { - Caption = 'Invoiced Qty. (Base)'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(5468; "Reserved Qty. (Base)"; Decimal) - { - AccessByPermission = tabledata "Purch. Rcpt. Header" = R; - Caption = 'Reserved Qty. (Base)'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(5560; Level; Integer) - { - Caption = 'Level'; - Editable = false; - } - field(5561; "Flushing Method"; Enum "Flushing Method") - { - Caption = 'Flushing Method'; - Editable = false; - } - field(5562; "Changed by User"; Boolean) - { - Caption = 'Changed by User'; - Editable = false; - } - field(5700; "Cross-Reference No."; Code[20]) - { - Caption = 'Cross-Reference No.'; - } - field(5701; "Originally Ordered No."; Code[20]) - { - AccessByPermission = tabledata "Item Substitution" = R; - Caption = 'Originally Ordered No.'; - TableRelation = Item; - } - field(5702; "Originally Ordered Var. Code"; Code[10]) - { - AccessByPermission = tabledata "Item Substitution" = R; - Caption = 'Originally Ordered Var. Code'; - TableRelation = "Item Variant".Code WHERE("Item No." = FIELD("Originally Ordered No.")); - } - field(5703; "Out-of-Stock Substitution"; Boolean) - { - Caption = 'Out-of-Stock Substitution'; - } - field(5704; "Item Category Code"; Code[20]) - { - Caption = 'Item Category Code'; - TableRelation = "Item Category"; - } - field(5705; Nonstock; Boolean) - { - Caption = 'Catalog'; - } - field(5706; "Purchasing Code"; Code[10]) - { - AccessByPermission = tabledata "Drop Shpt. Post. Buffer" = R; - Caption = 'Purchasing Code'; - TableRelation = Purchasing; - } - field(5707; "Product Group Code"; Code[10]) - { - Caption = 'Product Group Code'; - } - field(5725; "Item Reference No."; Code[50]) - { - Caption = 'Item Reference No.'; - } - field(5791; "Planned Delivery Date"; Date) - { - Caption = 'Planned Delivery Date'; - } - field(5793; "Order Date"; Date) - { - Caption = 'Order Date'; - } - field(5800; "Value Entry Type"; Enum "Cost Entry Type") - { - Caption = 'Value Entry Type'; - } - field(5801; "Item Charge No."; Code[20]) - { - Caption = 'Item Charge No.'; - TableRelation = "Item Charge"; - } - field(5802; "Inventory Value (Calculated)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Inventory Value (Calculated)'; - Editable = false; - } - field(5803; "Inventory Value (Revalued)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Inventory Value (Revalued)'; - MinValue = 0; - } - field(5804; "Variance Type"; Enum "Cost Variance Type") - { - Caption = 'Variance Type'; - } - field(5805; "Inventory Value Per"; Option) - { - Caption = 'Inventory Value Per'; - Editable = false; - OptionCaption = ' ,Item,Location,Variant,Location and Variant'; - OptionMembers = " ",Item,Location,Variant,"Location and Variant"; - } - field(5806; "Partial Revaluation"; Boolean) - { - Caption = 'Partial Revaluation'; - Editable = false; - } - field(5807; "Applies-from Entry"; Integer) - { - Caption = 'Applies-from Entry'; - MinValue = 0; - } - field(5808; "Invoice No."; Code[20]) - { - Caption = 'Invoice No.'; - } - field(5809; "Unit Cost (Calculated)"; Decimal) - { - AutoFormatType = 2; - Caption = 'Unit Cost (Calculated)'; - Editable = false; - } - field(5810; "Unit Cost (Revalued)"; Decimal) - { - AutoFormatType = 2; - Caption = 'Unit Cost (Revalued)'; - MinValue = 0; - } - field(5811; "Applied Amount"; Decimal) - { - AutoFormatType = 1; - Caption = 'Applied Amount'; - Editable = false; - } - field(5812; "Update Standard Cost"; Boolean) - { - Caption = 'Update Standard Cost'; - } - field(5813; "Amount (ACY)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Amount (ACY)'; - } - field(5817; Correction; Boolean) - { - Caption = 'Correction'; - } - field(5818; Adjustment; Boolean) - { - Caption = 'Adjustment'; - } - field(5819; "Applies-to Value Entry"; Integer) - { - Caption = 'Applies-to Value Entry'; - } - field(5820; "Invoice-to Source No."; Code[20]) - { - Caption = 'Invoice-to Source No.'; - TableRelation = IF ("Source Type" = CONST(Customer)) Customer - ELSE - IF ("Source Type" = CONST(Vendor)) Vendor; - } - field(5830; Type; Enum "Capacity Type Journal") - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Type'; - } - field(5831; "No."; Code[20]) - { - Caption = 'No.'; - TableRelation = IF (Type = CONST("Machine Center")) "Machine Center" - ELSE - IF (Type = CONST("Work Center")) "Work Center" - ELSE - IF (Type = CONST(Resource)) Resource; - } - field(5838; "Operation No."; Code[10]) - { - Caption = 'Operation No.'; - TableRelation = IF ("Order Type" = CONST(Production)) "Prod. Order Routing Line"."Operation No." WHERE(Status = CONST(Released), - "Prod. Order No." = FIELD("Order No."), - "Routing No." = FIELD("Routing No."), - "Routing Reference No." = FIELD("Routing Reference No.")); - } - field(5839; "Work Center No."; Code[20]) - { - Caption = 'Work Center No.'; - Editable = false; - TableRelation = "Work Center"; - } - field(5841; "Setup Time"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Setup Time'; - DecimalPlaces = 0 : 5; - } - field(5842; "Run Time"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Run Time'; - DecimalPlaces = 0 : 5; - } - field(5843; "Stop Time"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Stop Time'; - DecimalPlaces = 0 : 5; - } - field(5846; "Output Quantity"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Output Quantity'; - DecimalPlaces = 0 : 5; - } - field(5847; "Scrap Quantity"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Scrap Quantity'; - DecimalPlaces = 0 : 5; - } - field(5849; "Concurrent Capacity"; Decimal) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Concurrent Capacity'; - DecimalPlaces = 0 : 5; - } - field(5851; "Setup Time (Base)"; Decimal) - { - Caption = 'Setup Time (Base)'; - DecimalPlaces = 0 : 5; - } - field(5852; "Run Time (Base)"; Decimal) - { - Caption = 'Run Time (Base)'; - DecimalPlaces = 0 : 5; - } - field(5853; "Stop Time (Base)"; Decimal) - { - Caption = 'Stop Time (Base)'; - DecimalPlaces = 0 : 5; - } - field(5856; "Output Quantity (Base)"; Decimal) - { - Caption = 'Output Quantity (Base)'; - DecimalPlaces = 0 : 5; - } - field(5857; "Scrap Quantity (Base)"; Decimal) - { - Caption = 'Scrap Quantity (Base)'; - DecimalPlaces = 0 : 5; - } - field(5858; "Cap. Unit of Measure Code"; Code[10]) - { - Caption = 'Cap. Unit of Measure Code'; - TableRelation = IF (Type = CONST(Resource)) "Resource Unit of Measure".Code WHERE("Resource No." = FIELD("No.")) - ELSE - "Capacity Unit of Measure"; - } - field(5859; "Qty. per Cap. Unit of Measure"; Decimal) - { - Caption = 'Qty. per Cap. Unit of Measure'; - DecimalPlaces = 0 : 5; - } - field(5873; "Starting Time"; Time) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Starting Time'; - } - field(5874; "Ending Time"; Time) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Ending Time'; - } - field(5882; "Routing No."; Code[20]) - { - Caption = 'Routing No.'; - Editable = false; - TableRelation = "Routing Header"; - } - field(5883; "Routing Reference No."; Integer) - { - Caption = 'Routing Reference No.'; - } - field(5884; "Prod. Order Comp. Line No."; Integer) - { - Caption = 'Prod. Order Comp. Line No.'; - TableRelation = IF ("Order Type" = CONST(Production)) "Prod. Order Component"."Line No." WHERE(Status = CONST(Released), - "Prod. Order No." = FIELD("Order No."), - "Prod. Order Line No." = FIELD("Order Line No.")); - } - field(5885; Finished; Boolean) - { - AccessByPermission = tabledata "Machine Center" = R; - Caption = 'Finished'; - } - field(5887; "Unit Cost Calculation"; Option) - { - Caption = 'Unit Cost Calculation'; - OptionCaption = 'Time,Units'; - OptionMembers = Time,Units; - } - field(5888; Subcontracting; Boolean) - { - Caption = 'Subcontracting'; - } - field(5895; "Stop Code"; Code[10]) - { - Caption = 'Stop Code'; - TableRelation = Stop; - } - field(5896; "Scrap Code"; Code[10]) - { - Caption = 'Scrap Code'; - TableRelation = Scrap; - } - field(5898; "Work Center Group Code"; Code[10]) - { - Caption = 'Work Center Group Code'; - Editable = false; - TableRelation = "Work Center Group"; - } - field(5899; "Work Shift Code"; Code[10]) - { - Caption = 'Work Shift Code'; - TableRelation = "Work Shift"; - } - field(6500; "Serial No."; Code[50]) - { - Caption = 'Serial No.'; - Editable = false; - } - field(6501; "Lot No."; Code[50]) - { - Caption = 'Lot No.'; - Editable = false; - } - field(6502; "Warranty Date"; Date) - { - Caption = 'Warranty Date'; - Editable = false; - } - field(6503; "New Serial No."; Code[50]) - { - Caption = 'New Serial No.'; - Editable = false; - } - field(6504; "New Lot No."; Code[50]) - { - Caption = 'New Lot No.'; - Editable = false; - } - field(6505; "New Item Expiration Date"; Date) - { - Caption = 'New Item Expiration Date'; - } - field(6506; "Item Expiration Date"; Date) - { - Caption = 'Item Expiration Date'; - Editable = false; - } - field(6515; "Package No."; Code[50]) - { - Caption = 'Package No.'; - Editable = false; - } - field(6516; "New Package No."; Code[50]) - { - Caption = 'New Package No.'; - Editable = false; - } - field(6600; "Return Reason Code"; Code[10]) - { - Caption = 'Return Reason Code'; - TableRelation = "Return Reason"; - } - field(7000; "Price Calculation Method"; Enum "Price Calculation Method") - { - Caption = 'Price Calculation Method'; - } - field(7315; "Warehouse Adjustment"; Boolean) - { - Caption = 'Warehouse Adjustment'; - } - field(7316; "Direct Transfer"; Boolean) - { - Caption = 'Direct Transfer'; - DataClassification = SystemMetadata; - } - field(7380; "Phys Invt Counting Period Code"; Code[10]) - { - Caption = 'Phys Invt Counting Period Code'; - Editable = false; - TableRelation = "Phys. Invt. Counting Period"; - } - field(7381; "Phys Invt Counting Period Type"; Option) - { - Caption = 'Phys Invt Counting Period Type'; - Editable = false; - OptionCaption = ' ,Item,SKU'; - OptionMembers = " ",Item,SKU; - } -#if not CLEANSCHEMA23 - field(11763; "G/L Correction"; Boolean) - { - Caption = 'G/L Correction'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif -#if not CLEANSCHEMA23 - field(11791; "Source No. 3"; Code[20]) - { - Caption = 'Delivery-to Source No.'; - TableRelation = IF ("Source Type" = CONST(Customer)) "Ship-to Address".Code WHERE("Customer No." = FIELD("Source No.")) - ELSE - IF ("Source Type" = CONST(Vendor)) "Order Address".Code WHERE("Vendor No." = FIELD("Source No.")); - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif -#if not CLEANSCHEMA23 - field(31061; "Tariff No."; Code[20]) - { - Caption = 'Tariff No.'; - TableRelation = "Tariff Number"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31063; "Physical Transfer"; Boolean) - { - Caption = 'Physical Transfer'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - field(31065; "Shipment Method Code"; Code[10]) - { - Caption = 'Shipment Method Code'; - TableRelation = "Shipment Method"; - } -#if not CLEANSCHEMA23 - field(31066; "Net Weight"; Decimal) - { - Caption = 'Net Weight'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31069; "Incl. in Intrastat Stat. Value"; Boolean) - { - Caption = 'Incl. in Intrastat Stat. Value'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31070; "Incl. in Intrastat Amount"; Boolean) - { - Caption = 'Incl. in Intrastat Amount'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31071; "Country/Region of Origin Code"; Code[10]) - { - Caption = 'Country/Region of Origin Code'; - TableRelation = "Country/Region"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31072; "Statistic Indication"; Code[10]) - { - Caption = 'Statistic Indication'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31074; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31075; "Currency Factor"; Decimal) - { - Caption = 'Currency Factor'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31076; "Intrastat Transaction"; Boolean) - { - Caption = 'Intrastat Transaction'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - field(31077; "Whse. Net Change Template"; Code[10]) - { - Caption = 'Whse. Net Change Template'; - } - field(99000755; "Overhead Rate"; Decimal) - { - Caption = 'Overhead Rate'; - DecimalPlaces = 0 : 5; - } - field(99000756; "Single-Level Material Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Single-Level Material Cost'; - } - field(99000757; "Single-Level Capacity Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Single-Level Capacity Cost'; - } - field(99000758; "Single-Level Subcontrd. Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Single-Level Subcontrd. Cost'; - } - field(99000759; "Single-Level Cap. Ovhd Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Single-Level Cap. Ovhd Cost'; - } - field(99000760; "Single-Level Mfg. Ovhd Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Single-Level Mfg. Ovhd Cost'; - } - field(99000761; "Rolled-up Material Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Rolled-up Material Cost'; - } - field(99000762; "Rolled-up Capacity Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Rolled-up Capacity Cost'; - } - field(99000763; "Rolled-up Subcontracted Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Rolled-up Subcontracted Cost'; - } - field(99000764; "Rolled-up Mfg. Ovhd Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Rolled-up Mfg. Ovhd Cost'; - } - field(99000765; "Rolled-up Cap. Overhead Cost"; Decimal) - { - AutoFormatType = 1; - Caption = 'Rolled-up Cap. Overhead Cost'; - } - } - - keys - { - key(Key1; "Journal Template Name", "Journal Batch Name", "Line No.") - { - Clustered = true; - MaintainSIFTIndex = false; - } - key(Key2; "Entry Type", "Item No.", "Variant Code", "Location Code", "Bin Code", "Posting Date") - { - MaintainSIFTIndex = false; - SumIndexFields = "Quantity (Base)"; - } - key(Key3; "Entry Type", "Item No.", "Variant Code", "New Location Code", "New Bin Code", "Posting Date") - { - MaintainSIFTIndex = false; - SumIndexFields = "Quantity (Base)"; - } - key(Key4; "Item No.", "Posting Date") - { - } - key(Key5; "Journal Template Name", "Journal Batch Name", "Item No.", "Location Code", "Variant Code") - { - } - } - - fieldgroups - { - } -} -#endif \ No newline at end of file diff --git a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemLedgerEntry.Table.al b/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemLedgerEntry.Table.al deleted file mode 100644 index 6c02b5fa8c..0000000000 --- a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgItemLedgerEntry.Table.al +++ /dev/null @@ -1,658 +0,0 @@ -#if not CLEANSCHEMA24 -table 11715 "Stg Item Ledger Entry" -{ - Caption = 'Stg Item Ledger Entry'; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Entry No."; Integer) - { - Caption = 'Entry No.'; - } - field(2; "Item No."; Code[20]) - { - Caption = 'Item No.'; - TableRelation = Item; - } - field(3; "Posting Date"; Date) - { - Caption = 'Posting Date'; - } - field(4; "Entry Type"; Enum "Item Ledger Entry Type") - { - Caption = 'Entry Type'; - } - field(5; "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(Item)) Item; - } - field(6; "Document No."; Code[20]) - { - Caption = 'Document No.'; - } - field(7; Description; Text[100]) - { - Caption = 'Description'; - } - field(8; "Location Code"; Code[10]) - { - Caption = 'Location Code'; - TableRelation = Location; - } - field(12; Quantity; Decimal) - { - Caption = 'Quantity'; - DecimalPlaces = 0 : 5; - } - field(13; "Remaining Quantity"; Decimal) - { - Caption = 'Remaining Quantity'; - DecimalPlaces = 0 : 5; - } - field(14; "Invoiced Quantity"; Decimal) - { - Caption = 'Invoiced Quantity'; - DecimalPlaces = 0 : 5; - } - field(28; "Applies-to Entry"; Integer) - { - Caption = 'Applies-to Entry'; - } - field(29; Open; Boolean) - { - Caption = 'Open'; - } - field(33; "Global Dimension 1 Code"; Code[20]) - { - CaptionClass = '1,1,1'; - Caption = 'Global Dimension 1 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(1)); - } - field(34; "Global Dimension 2 Code"; Code[20]) - { - CaptionClass = '1,1,2'; - Caption = 'Global Dimension 2 Code'; - TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(2)); - } - field(36; Positive; Boolean) - { - Caption = 'Positive'; - } - field(40; "Shpt. Method Code"; Code[10]) - { - Caption = 'Shpt. Method Code'; - TableRelation = "Shipment Method"; - } - field(41; "Source Type"; Enum "Analysis Source Type") - { - Caption = 'Source Type'; - } - field(47; "Drop Shipment"; Boolean) - { - AccessByPermission = tabledata "Drop Shpt. Post. Buffer" = R; - Caption = 'Drop Shipment'; - } - field(50; "Transaction Type"; Code[10]) - { - Caption = 'Transaction Type'; - TableRelation = "Transaction Type"; - } - field(51; "Transport Method"; Code[10]) - { - Caption = 'Transport Method'; - TableRelation = "Transport Method"; - } - field(52; "Country/Region Code"; Code[10]) - { - Caption = 'Country/Region Code'; - TableRelation = "Country/Region"; - } - field(59; "Entry/Exit Point"; Code[10]) - { - Caption = 'Entry/Exit Point'; - TableRelation = "Entry/Exit Point"; - } - field(60; "Document Date"; Date) - { - Caption = 'Document Date'; - } - field(61; "External Document No."; Code[35]) - { - Caption = 'External Document No.'; - } - field(62; "Area"; Code[10]) - { - Caption = 'Area'; - TableRelation = Area; - } - field(63; "Transaction Specification"; Code[10]) - { - Caption = 'Transaction Specification'; - TableRelation = "Transaction Specification"; - } - field(64; "No. Series"; Code[20]) - { - Caption = 'No. Series'; - TableRelation = "No. Series"; - } - field(70; "Reserved Quantity"; Decimal) - { - AccessByPermission = tabledata "Purch. Rcpt. Header" = R; - Caption = 'Reserved Quantity'; - DecimalPlaces = 0 : 5; - Editable = false; - } - field(79; "Document Type"; Enum "Item Ledger Document Type") - { - Caption = 'Document Type'; - } - field(80; "Document Line No."; Integer) - { - Caption = 'Document Line No.'; - } - field(90; "Order Type"; Enum "Inventory Order Type") - { - Caption = 'Order Type'; - Editable = false; - } - field(91; "Order No."; Code[20]) - { - Caption = 'Order No.'; - Editable = false; - } - field(92; "Order Line No."; Integer) - { - Caption = 'Order Line No.'; - Editable = false; - } - field(480; "Dimension Set ID"; Integer) - { - Caption = 'Dimension Set ID'; - Editable = false; - TableRelation = "Dimension Set Entry"; - } - field(481; "Shortcut Dimension 3 Code"; Code[20]) - { - CaptionClass = '1,2,3'; - Caption = 'Shortcut Dimension 3 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(3))); - } - field(482; "Shortcut Dimension 4 Code"; Code[20]) - { - CaptionClass = '1,2,4'; - Caption = 'Shortcut Dimension 4 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(4))); - } - field(483; "Shortcut Dimension 5 Code"; Code[20]) - { - CaptionClass = '1,2,5'; - Caption = 'Shortcut Dimension 5 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(5))); - } - field(484; "Shortcut Dimension 6 Code"; Code[20]) - { - CaptionClass = '1,2,6'; - Caption = 'Shortcut Dimension 6 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(6))); - } - field(485; "Shortcut Dimension 7 Code"; Code[20]) - { - CaptionClass = '1,2,7'; - Caption = 'Shortcut Dimension 7 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(7))); - } - field(486; "Shortcut Dimension 8 Code"; Code[20]) - { - CaptionClass = '1,2,8'; - Caption = 'Shortcut Dimension 8 Code'; - Editable = false; - FieldClass = FlowField; - CalcFormula = lookup("Dimension Set Entry"."Dimension Value Code" where("Dimension Set ID" = field("Dimension Set ID"), - "Global Dimension No." = const(8))); - } - field(904; "Assemble to Order"; Boolean) - { - AccessByPermission = tabledata "BOM Component" = R; - Caption = 'Assemble to Order'; - } - field(1000; "Job No."; Code[20]) - { - Caption = 'Job No.'; - TableRelation = Job."No."; - } - field(1001; "Job Task No."; Code[20]) - { - Caption = 'Job Task No.'; - TableRelation = "Job Task"."Job Task No." WHERE("Job No." = FIELD("Job No.")); - } - field(1002; "Job Purchase"; Boolean) - { - Caption = 'Job Purchase'; - } - field(5402; "Variant Code"; Code[10]) - { - Caption = 'Variant Code'; - TableRelation = "Item Variant".Code WHERE("Item No." = FIELD("Item No.")); - } - field(5404; "Qty. per Unit of Measure"; Decimal) - { - Caption = 'Qty. per Unit of Measure'; - DecimalPlaces = 0 : 5; - } - field(5407; "Unit of Measure Code"; Code[10]) - { - Caption = 'Unit of Measure Code'; - TableRelation = "Item Unit of Measure".Code WHERE("Item No." = FIELD("Item No.")); - } - field(5408; "Derived from Blanket Order"; Boolean) - { - Caption = 'Derived from Blanket Order'; - } - field(5700; "Cross-Reference No."; Code[20]) - { - Caption = 'Cross-Reference No.'; - } - field(5701; "Originally Ordered No."; Code[20]) - { - AccessByPermission = tabledata "Item Substitution" = R; - Caption = 'Originally Ordered No.'; - TableRelation = Item; - } - field(5702; "Originally Ordered Var. Code"; Code[10]) - { - AccessByPermission = tabledata "Item Substitution" = R; - Caption = 'Originally Ordered Var. Code'; - TableRelation = "Item Variant".Code WHERE("Item No." = FIELD("Originally Ordered No.")); - } - field(5703; "Out-of-Stock Substitution"; Boolean) - { - Caption = 'Out-of-Stock Substitution'; - } - field(5704; "Item Category Code"; Code[20]) - { - Caption = 'Item Category Code'; - TableRelation = "Item Category"; - } - field(5705; Nonstock; Boolean) - { - Caption = 'Catalog'; - } - field(5706; "Purchasing Code"; Code[10]) - { - Caption = 'Purchasing Code'; - TableRelation = Purchasing; - } - field(5707; "Product Group Code"; Code[10]) - { - Caption = 'Product Group Code'; - } - field(5725; "Item Reference No."; Code[50]) - { - Caption = 'Item Reference No.'; - } - field(5800; "Completely Invoiced"; Boolean) - { - Caption = 'Completely Invoiced'; - } - field(5801; "Last Invoice Date"; Date) - { - Caption = 'Last Invoice Date'; - } - field(5802; "Applied Entry to Adjust"; Boolean) - { - Caption = 'Applied Entry to Adjust'; - } - field(5803; "Cost Amount (Expected)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Expected)'; - Editable = false; - } - field(5804; "Cost Amount (Actual)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Actual)'; - Editable = false; - } - field(5805; "Cost Amount (Non-Invtbl.)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Non-Invtbl.)'; - Editable = false; - } - field(5806; "Cost Amount (Expected) (ACY)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Expected) (ACY)'; - Editable = false; - } - field(5807; "Cost Amount (Actual) (ACY)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Actual) (ACY)'; - Editable = false; - } - field(5808; "Cost Amount (Non-Invtbl.)(ACY)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Cost Amount (Non-Invtbl.)(ACY)'; - Editable = false; - } - field(5813; "Purchase Amount (Expected)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Purchase Amount (Expected)'; - Editable = false; - } - field(5814; "Purchase Amount (Actual)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Purchase Amount (Actual)'; - Editable = false; - } - field(5815; "Sales Amount (Expected)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Sales Amount (Expected)'; - Editable = false; - } - field(5816; "Sales Amount (Actual)"; Decimal) - { - AutoFormatType = 1; - Caption = 'Sales Amount (Actual)'; - Editable = false; - } - field(5817; Correction; Boolean) - { - Caption = 'Correction'; - } - field(5818; "Shipped Qty. Not Returned"; Decimal) - { - AccessByPermission = tabledata "Sales Header" = R; - Caption = 'Shipped Qty. Not Returned'; - DecimalPlaces = 0 : 5; - } - field(5833; "Prod. Order Comp. Line No."; Integer) - { - AccessByPermission = tabledata "Production Order" = R; - Caption = 'Prod. Order Comp. Line No.'; - } - field(6500; "Serial No."; Code[50]) - { - Caption = 'Serial No.'; - } - field(6501; "Lot No."; Code[50]) - { - Caption = 'Lot No.'; - } - field(6502; "Warranty Date"; Date) - { - Caption = 'Warranty Date'; - } - field(6503; "Expiration Date"; Date) - { - Caption = 'Expiration Date'; - } - field(6510; "Item Tracking"; Enum "Item Tracking Entry Type") - { - Caption = 'Item Tracking'; - Editable = false; - } - field(6515; "Package No."; Code[50]) - { - Caption = 'Package No.'; - CaptionClass = '6,1'; - } - field(6602; "Return Reason Code"; Code[10]) - { - Caption = 'Return Reason Code'; - TableRelation = "Return Reason"; - } -#if not CLEANSCHEMA23 - field(11790; "Source No. 2"; Code[20]) - { - Caption = 'Invoice-to Source No.'; - TableRelation = IF ("Source Type" = CONST(Customer)) Customer - ELSE - IF ("Source Type" = CONST(Vendor)) Vendor; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(11791; "Source No. 3"; Code[20]) - { - Caption = 'Delivery-to Source No.'; - TableRelation = IF ("Source Type" = CONST(Customer)) "Ship-to Address".Code WHERE("Customer No." = FIELD("Source No.")) - ELSE - IF ("Source Type" = CONST(Vendor)) "Order Address".Code WHERE("Vendor No." = FIELD("Source No.")); - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(11793; "Source Code"; Code[10]) - { - Caption = 'Source Code'; - TableRelation = "Source Code"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(11794; "Reason Code"; Code[10]) - { - Caption = 'Reason Code'; - TableRelation = "Reason Code"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(11795; "User ID"; Code[50]) - { - Caption = 'User ID'; - DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; - ValidateTableRelation = false; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif -#if not CLEANSCHEMA23 - field(31061; "Tariff No."; Code[20]) - { - Caption = 'Tariff No.'; - TableRelation = "Tariff Number"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31062; "Statistic Indication"; Code[10]) - { - Caption = 'Statistic Indication'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31063; "Physical Transfer"; Boolean) - { - Caption = 'Physical Transfer'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - field(31065; "Shipment Method Code"; Code[10]) - { - Caption = 'Shipment Method Code'; - TableRelation = "Shipment Method"; - } -#if not CLEANSCHEMA23 - field(31066; "Net Weight"; Decimal) - { - Caption = 'Net Weight'; - DecimalPlaces = 0 : 5; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31068; "Country/Region of Origin Code"; Code[10]) - { - Caption = 'Country/Region of Origin Code'; - TableRelation = "Country/Region"; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31074; "Currency Code"; Code[10]) - { - Caption = 'Currency Code'; - TableRelation = Currency; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31075; "Currency Factor"; Decimal) - { - Caption = 'Currency Factor'; - DecimalPlaces = 0 : 15; - Editable = false; - MinValue = 0; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Advanced Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } - field(31076; "Intrastat Transaction"; Boolean) - { - Caption = 'Intrastat Transaction'; - ObsoleteState = Removed; - ObsoleteReason = 'Moved to Core Localization Pack for Czech.'; - ObsoleteTag = '23.0'; - } -#endif - } - - keys - { - key(Key1; "Entry No.") - { - Clustered = true; - } - key(Key2; "Item No.") - { - SumIndexFields = "Invoiced Quantity", Quantity; - } - key(Key3; "Item No.", "Posting Date") - { - } - key(Key4; "Item No.", "Entry Type", "Variant Code", "Drop Shipment", "Location Code", "Posting Date") - { - SumIndexFields = Quantity, "Invoiced Quantity"; - } - key(Key5; "Source Type", "Source No.", "Item No.", "Variant Code", "Posting Date") - { - SumIndexFields = Quantity; - } - key(Key6; "Item No.", Open, "Variant Code", Positive, "Location Code", "Posting Date") - { - SumIndexFields = Quantity, "Remaining Quantity"; - } -#pragma warning disable AS0009 - key(Key7; "Item No.", Open, "Variant Code", Positive, "Location Code", "Posting Date", "Expiration Date", "Lot No.", "Serial No.", "Package No.") -#pragma warning restore AS0009 - { - Enabled = false; - SumIndexFields = Quantity, "Remaining Quantity"; - } - key(Key8; "Country/Region Code", "Entry Type", "Posting Date") - { - } - key(Key9; "Document No.", "Document Type", "Document Line No.") - { - } - key(Key10; "Item No.", "Entry Type", "Variant Code", "Drop Shipment", "Global Dimension 1 Code", "Global Dimension 2 Code", "Location Code", "Posting Date") - { - Enabled = false; - SumIndexFields = Quantity, "Invoiced Quantity"; - } - key(Key11; "Source Type", "Source No.", "Global Dimension 1 Code", "Global Dimension 2 Code", "Item No.", "Variant Code", "Posting Date") - { - Enabled = false; - SumIndexFields = Quantity; - } - key(Key12; "Order Type", "Order No.", "Order Line No.", "Entry Type", "Prod. Order Comp. Line No.") - { - MaintainSIFTIndex = false; - SumIndexFields = Quantity; - } - key(Key13; "Item No.", "Applied Entry to Adjust") - { - } - key(Key14; "Item No.", Positive, "Location Code", "Variant Code") - { - } - key(Key15; "Entry Type", Nonstock, "Item No.", "Posting Date") - { - Enabled = false; - } -#pragma warning disable AS0009 - key(Key16; "Item No.", "Location Code", Open, "Variant Code", "Unit of Measure Code", "Lot No.", "Serial No.", "Package No.") -#pragma warning restore AS0009 - { - Enabled = false; - SumIndexFields = "Remaining Quantity"; - } -#pragma warning disable AS0009 - key(Key17; "Item No.", Open, "Variant Code", Positive, "Lot No.", "Serial No.", "Package No.") -#pragma warning restore AS0009 - { - } -#pragma warning disable AS0009 - key(Key18; "Item No.", Open, "Variant Code", "Location Code", "Item Tracking", "Lot No.", "Serial No.", "Package No.") -#pragma warning restore AS0009 - { - Enabled = false; - MaintainSIFTIndex = false; - MaintainSQLIndex = false; - SumIndexFields = "Remaining Quantity"; - } - key(Key19; "Lot No.") - { - } - key(Key20; "Serial No.") - { - } - key(Key21; SystemModifiedAt) - { - } - } - - fieldgroups - { - fieldgroup(DropDown; "Entry No.", Description, "Item No.", "Posting Date", "Entry Type", "Document No.") - { - } - } -} -#endif \ No newline at end of file diff --git a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATControlReportLine.Table.al b/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATControlReportLine.Table.al deleted file mode 100644 index ae751a1dde..0000000000 --- a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATControlReportLine.Table.al +++ /dev/null @@ -1,41 +0,0 @@ -#if not CLEANSCHEMA24 -table 11717 "Stg VAT Control Report Line" -{ - ReplicateData = false; - Extensible = false; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Control Report No."; Code[20]) - { - DataClassification = CustomerContent; - } - field(2; "Line No."; Integer) - { - DataClassification = CustomerContent; - } - field(43; "Corrections for Bad Receivable"; Option) - { - DataClassification = CustomerContent; - OptionCaption = ' ,Insolvency Proceedings (p.44),Bad Receivable (p.46 resp. 74a)'; - OptionMembers = " ","Insolvency Proceedings (p.44)","Bad Receivable (p.46 resp. 74a)"; - } - field(44; "Insolvency Proceedings (p.44)"; Boolean) - { - DataClassification = CustomerContent; - Caption = 'Insolvency Proceedings (p.44)'; - } - } - - keys - { - key(Key1; "Control Report No.", "Line No.") - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATPostingSetup.Table.al b/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATPostingSetup.Table.al deleted file mode 100644 index 74a01ccccc..0000000000 --- a/Apps/CZ/HybridBCLast_CZ/app/src/tables/StgVATPostingSetup.Table.al +++ /dev/null @@ -1,42 +0,0 @@ -#if not CLEANSCHEMA24 -table 11700 "Stg VAT Posting Setup" -{ - ReplicateData = false; - Extensible = false; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "VAT Bus. Posting Group"; Code[20]) - { - DataClassification = CustomerContent; - } - field(2; "VAT Prod. Posting Group"; Code[20]) - { - DataClassification = CustomerContent; - } - field(31102; "Insolvency Proceedings (p.44)"; Boolean) - { - DataClassification = CustomerContent; - } - field(31104; "Corrections for Bad Receivable"; Option) - { - DataClassification = CustomerContent; - OptionMembers = " ","Insolvency Proceedings (p.44)","Bad Receivable (p.46 resp. 74a)"; - } - } - - keys - { - key(Key1; "VAT Bus. Posting Group", "VAT Prod. Posting Group") - { - Clustered = true; - } - key(Key2; "VAT Prod. Posting Group", "VAT Bus. Posting Group") - { - } - } -} -#endif \ No newline at end of file diff --git a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateDEVATStatement.Codeunit.al b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateDEVATStatement.Codeunit.al index 2e4d25239a..a82a21f6e7 100644 --- a/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateDEVATStatement.Codeunit.al +++ b/Apps/DE/ContosoCoffeeDemoDatasetDE/app/DemoData/Finance/2. Master data/CreateDEVATStatement.Codeunit.al @@ -6,7 +6,7 @@ codeunit 11120 "Create DE VAT Statement" trigger OnRun() var begin - ContosoVATStatement.InsertVATStatementName(CreateVATStatement.VATTemplateName(), StatementNameLbl, StatementNameDescLbl); + ContosoVATStatement.InsertVATStatementName(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), StatementNameDescLbl); CreateVATStatementLine(); end; @@ -15,76 +15,75 @@ codeunit 11120 "Create DE VAT Statement" CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; CreateDEVATPostingGroups: Codeunit "Create DE VAT Posting Groups"; begin - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MehrwertsteuerabrechnungLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '41', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, SteuerfreieErlöse41B1Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '41', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, SteuerfreieErlöse41B2Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '43', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StfrUmsätzeMVorstAbzug43B1Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '43', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StfrUmsätzeMVorstAbzug43B2Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '81A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze81BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '81S', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Umsatzsteuer81SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '50A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, MinderungBmg5019Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '50AS', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, MinderungBetr5019Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '81', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81A|50A', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, StpflUmsätze81BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '81ST', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81S|50AS', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Umsatzsteuer81SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '86A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze86BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '86S', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Umsatzsteuer86SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '87', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze87Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '50B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, MinderungBmg507Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '50BS', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, MinderungBetr507Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '86', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '86A|50B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, StpflUmsätze886BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '86ST', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '86S|50BS', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Umsatzsteuer86SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, MinderungBmg5019Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, MinderungBmg507Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '36', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, UmsätzeZuAnderenSteuersätzen36Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '35', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, SteuerAusUmsätzeZuAnderenSteuersätzen35Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '91', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, InnergemErwerbe91Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 310000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 320000, '89', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, StpflInnergemErwerbe89BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 330000, '89', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, Erwerbsteuer89SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 340000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 350000, '93', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, StpflInnergemErwerbe93BLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 360000, '93', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, Erwerbsteuer93SLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 370000, '90', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflInnergemErwerbe90Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 380000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 390000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 400000, '66A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, VorsteuerN66S1Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 410000, '66B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, VorsteuerN66S2Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 420000, '37A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, MinderungBetr19Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 430000, '37B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, MinderungBetr7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 440000, '66', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '66A|66B|37A|37B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VorsteuerN66Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 450000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 460000, '37', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, MinderungBetr19Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 470000, '37', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, MinderungBetr7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 480000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 490000, '61A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Erwerbvorsteuer61S1Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 500000, '61B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Erwerbvorsteuer61S2Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 510000, '61', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '61A|61B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Erwerbvorsteuer61Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 520000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 530000, '62', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.EUPostingGroupST(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, EntrichteteEinfuhrumsatzsteuerLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 540000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 550000, '83', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81|86|35|89|93|66|61|62', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VerbleibenderBetragLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 560000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 570000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ProbeLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 580000, '10', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, UmsatzsteuerP51Lbl, '1775'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 590000, '11', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, UmsatzsteuerP86Lbl, '1771'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 600000, '12', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ErwerbsteuerP97Lbl, '1773'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 610000, '13', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ErwerbsteuerP93Lbl, '1772'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 620000, '14', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VorsteuerP66Lbl, '1571|1575'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 630000, '15', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ErwerbvorsteuerP61Lbl, '1773|1784'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 640000, '16', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..15', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VerbleibenderBetragLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MehrwertsteuerabrechnungLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '41', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, SteuerfreieErlöse41B1Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '41', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, SteuerfreieErlöse41B2Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '43', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StfrUmsätzeMVorstAbzug43B1Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '43', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StfrUmsätzeMVorstAbzug43B2Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '81A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze81BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '81S', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Umsatzsteuer81SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '50A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, MinderungBmg5019Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '50AS', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, MinderungBetr5019Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '81', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81A|50A', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, StpflUmsätze81BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '81ST', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81S|50AS', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Umsatzsteuer81SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '86A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze86BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '86S', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Umsatzsteuer86SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '87', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflUmsätze87Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '50B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, MinderungBmg507Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '50BS', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, MinderungBetr507Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '86', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '86A|50B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, StpflUmsätze886BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '86ST', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '86S|50BS', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Umsatzsteuer86SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, MinderungBmg5019Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, MinderungBmg507Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '36', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, UmsätzeZuAnderenSteuersätzen36Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '35', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, SteuerAusUmsätzeZuAnderenSteuersätzen35Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '91', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, InnergemErwerbe91Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '89', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, StpflInnergemErwerbe89BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '89', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, Erwerbsteuer89SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '93', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, true, 1, StpflInnergemErwerbe93BLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '93', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, Erwerbsteuer93SLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '90', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.NoVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, StpflInnergemErwerbe90Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 380000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 390000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 400000, '66A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, VorsteuerN66S1Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 410000, '66B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, VorsteuerN66S2Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 420000, '37A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, MinderungBetr19Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 430000, '37B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, MinderungBetr7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 440000, '66', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '66A|66B|37A|37B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VorsteuerN66Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 450000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 460000, '37', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, MinderungBetr19Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 470000, '37', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.Min7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, true, 1, MinderungBetr7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 480000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 490000, '61A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT19(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Erwerbvorsteuer61S1Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 500000, '61B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateDEVATPostingGroups.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Erwerbvorsteuer61S2Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 510000, '61', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '61A|61B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Erwerbvorsteuer61Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 520000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 530000, '62', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateDEVATPostingGroups.EUPostingGroupST(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, EntrichteteEinfuhrumsatzsteuerLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 540000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 550000, '83', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '81|86|35|89|93|66|61|62', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VerbleibenderBetragLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 560000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 570000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ProbeLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 580000, '10', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, UmsatzsteuerP51Lbl, '1775'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 590000, '11', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, UmsatzsteuerP86Lbl, '1771'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 600000, '12', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ErwerbsteuerP97Lbl, '1773'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 610000, '13', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ErwerbsteuerP93Lbl, '1772'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 620000, '14', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VorsteuerP66Lbl, '1571|1575'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 630000, '15', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ErwerbvorsteuerP61Lbl, '1773|1784'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 640000, '16', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..15', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VerbleibenderBetragLbl, ''); end; var ContosoVATStatement: Codeunit "Contoso VAT Statement"; CreateVATStatement: Codeunit "Create VAT Statement"; - StatementNameLbl: Label 'USTVA', MaxLength = 10; StatementNameDescLbl: Label 'VAT Statement Germany', MaxLength = 100; MehrwertsteuerabrechnungLbl: Label 'MEHRWERTSTEUERABRECHNUNG', MaxLength = 100; SteuerfreieErlöse41B1Lbl: Label '41B1 / Steuerfreie Erlöse §4 1b UStG EG m. ID-Nr.', MaxLength = 100; diff --git a/Apps/DE/Elster/app/src/Install/ElsterDataMigration.Codeunit.al b/Apps/DE/Elster/app/src/Install/ElsterDataMigration.Codeunit.al index b80d98a621..c0460a2486 100644 --- a/Apps/DE/Elster/app/src/Install/ElsterDataMigration.Codeunit.al +++ b/Apps/DE/Elster/app/src/Install/ElsterDataMigration.Codeunit.al @@ -1,3 +1,4 @@ +#if not CLEAN26 // ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. @@ -6,73 +7,8 @@ codeunit 11022 "Elster - Data Migration" { Subtype = Upgrade; - - trigger OnUpgradePerCompany() - begin - UpgradeOldTables(); - CleanupOldTables(); - end; - - local procedure UpgradeOldTables() - var - UpgradeTag: Codeunit "Upgrade Tag"; - ElsterManagement: Codeunit "Elster Management"; - begin - if UpgradeTag.HasUpgradeTag(ElsterManagement.GetElsterUpgradeTag()) then - exit; - - MigrateSalesVATAdvanceNotification(); - MigrateElecVATDeclSetup(); - - UpgradeTag.SetUpgradeTag(ElsterManagement.GetElsterUpgradeTag()); - end; - - local procedure MigrateSalesVATAdvanceNotification() - var - SalesVATAdvanceNotification: Record "Sales VAT Advance Notification"; - SalesVATAdvanceNotif: Record "Sales VAT Advance Notif."; - begin - if not SalesVATAdvanceNotif.IsEmpty() then - exit; - - if SalesVATAdvanceNotification.FindSet() then - repeat - SalesVATAdvanceNotif.TransferFields(SalesVATAdvanceNotification, true); - SalesVATAdvanceNotification.CalcFields("XML Submission Document"); - SalesVATAdvanceNotif."XML Submission Document" := SalesVATAdvanceNotification."XML Submission Document"; - SalesVATAdvanceNotif.Insert(); - until SalesVATAdvanceNotification.Next() = 0; - end; - - local procedure MigrateElecVATDeclSetup() - var - ElectronicVATDeclSetup: Record "Electronic VAT Decl. Setup"; - ElecVATDeclSetup: Record "Elec. VAT Decl. Setup"; - begin - if ElecVATDeclSetup.Get() then - exit; - - if not ElectronicVATDeclSetup.Get() then - exit; - - ElecVATDeclSetup.Validate("Sales VAT Adv. Notif. Path", ElectronicVATDeclSetup."Sales VAT Adv. Notif. Path"); - ElecVATDeclSetup.Validate("XML File Default Name", ElectronicVATDeclSetup."Sales VAT Adv. Notif. Path"); - ElecVATDeclSetup.insert(true); - end; - - local procedure CleanupOldTables() - var - SalesVATAdvanceNotification: Record "Sales VAT Advance Notification"; - ElectronicVATDeclSetup: Record "Electronic VAT Decl. Setup"; - UpgradeTag: Codeunit "Upgrade Tag"; - ElsterManagement: Codeunit "Elster Management"; - begin - if UpgradeTag.HasUpgradeTag(ElsterManagement.GetCleanupElsterTag()) then - exit; - - SalesVATAdvanceNotification.DeleteAll(); - ElectronicVATDeclSetup.DeleteAll(); - - UpgradeTag.SetUpgradeTag(ElsterManagement.GetCleanupElsterTag()); - end; + ObsoleteReason = 'This codeunit is obsolete and will be removed in a future release.'; + ObsoleteState = Pending; + ObsoleteTag = '26.0'; } +#endif \ No newline at end of file diff --git a/Apps/DE/Elster/app/src/Tables/SalesVATAdvanceNotif.Table.al b/Apps/DE/Elster/app/src/Tables/SalesVATAdvanceNotif.Table.al index 6c477cfc72..5622e6644b 100644 --- a/Apps/DE/Elster/app/src/Tables/SalesVATAdvanceNotif.Table.al +++ b/Apps/DE/Elster/app/src/Tables/SalesVATAdvanceNotif.Table.al @@ -68,22 +68,6 @@ table 11021 "Sales VAT Advance Notif." Editable = false; TableRelation = "No. Series"; } -#if not CLEANSCHEMA23 - field(9; "XSL-Filename"; Text[250]) - { - DataClassification = CustomerContent; - ObsoleteTag = '23.0'; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality is not in use and not supported'; - } - field(10; "XSD-Filename"; Text[250]) - { - DataClassification = CustomerContent; - ObsoleteTag = '23.0'; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality is not in use and not supported'; - } -#endif field(11; "Statement Template Name"; Code[10]) { DataClassification = CustomerContent; @@ -735,4 +719,3 @@ table 11021 "Sales VAT Advance Notif." begin end; } - diff --git a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/Demo Data/Finance/1.Setup Data/CreateVATStatementLineDK.Codeunit.al b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/Demo Data/Finance/1.Setup Data/CreateVATStatementLineDK.Codeunit.al index ee6ae6c61c..1cdc6fad47 100644 --- a/Apps/DK/ContosoCoffeeDemoDatasetDK/app/Demo Data/Finance/1.Setup Data/CreateVATStatementLineDK.Codeunit.al +++ b/Apps/DK/ContosoCoffeeDemoDatasetDK/app/Demo Data/Finance/1.Setup Data/CreateVATStatementLineDK.Codeunit.al @@ -22,54 +22,53 @@ codeunit 13704 "Create VAT Statement Line DK" CreateVATPostingGroupsDK: Codeunit "Create VAT Posting Groups DK"; begin ContosoVatStatement.SetOverwriteData(true); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT25outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '1019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesVAT25outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '1030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT25onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '1031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onforeignpurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '1039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1030..1038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VAT25ongoodspurchasedabroadLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '1040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onEUservicepurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '1041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onforeignservicepurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '1049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1040..1048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VAT25onforeignservicepurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '1050', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '1070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1019|1039|1049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '1099', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT25DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '1130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT25EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '1131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onforeignpurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '1140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onEUservicepurchasesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '1141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onservicepurchasesforeignLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '1159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '1160', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '1180', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, FuelTaxLbl, '24210'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '1181', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ElectricityTaxLbl, '24220'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '1182', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NaturalGasTaxLbl, '24240'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '1183', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CoalTaxLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '1184', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CO2TaxLbl, '24230'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '1185', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, WaterTaxLbl, '24250'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '1189', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1180..1188', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalTaxesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '1190', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '1194', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '1195', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1070|1190', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '1196', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases25Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 310000, '1219', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1210..1218', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofEUPurchases25Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 320000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUservicepurchases25Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 330000, '1229', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1220..1228', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofEUservicepurchases25Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 340000, '1230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofnonVATliableEUsalesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 350000, '1239', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1230..1238', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofnonVATliableEUsalesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 360000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ValueofnonVATliableEUsalesotherLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 370000, '1249', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofnonVATliableEUsalesotherLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 380000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesExportLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 390000, '1319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1318', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesExportLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 400000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDenmarkLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 410000, '1329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1320..1328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDenmarkLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT25outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '1019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesVAT25outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '1030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT25onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '1031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onforeignpurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '1039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1030..1038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VAT25ongoodspurchasedabroadLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '1040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onEUservicepurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '1041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 0, VAT25onforeignservicepurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '1049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1040..1048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VAT25onforeignservicepurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '1050', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '1070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1019|1039|1049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '1099', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT25DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '1130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT25EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '1131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onforeignpurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '1140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onEUservicepurchasesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '1141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, VAT25onservicepurchasesforeignLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '1159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '1160', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '1180', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, FuelTaxLbl, '24210'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '1181', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ElectricityTaxLbl, '24220'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '1182', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NaturalGasTaxLbl, '24240'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '1183', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CoalTaxLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '1184', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, CO2TaxLbl, '24230'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '1185', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, WaterTaxLbl, '24250'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '1189', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1180..1188', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalTaxesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '1190', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '1194', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '1195', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1070|1190', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '1196', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases25Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '1219', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1210..1218', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofEUPurchases25Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroupsDK.Vat25Serv(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUservicepurchases25Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '1229', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1220..1228', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofEUservicepurchases25Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '1230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofnonVATliableEUsalesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '1239', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1230..1238', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofnonVATliableEUsalesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ValueofnonVATliableEUsalesotherLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '1249', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueofnonVATliableEUsalesotherLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 380000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesExportLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 390000, '1319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1318', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesExportLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 400000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDenmarkLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 410000, '1329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1320..1328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDenmarkLbl, ''); ContosoVatStatement.SetOverwriteData(false); end; var ContosoVatStatement: Codeunit "Contoso VAT Statement"; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; SalesVAT25outgoingLbl: Label 'Sales VAT 25 % (outgoing)', MaxLength = 100; VAT25onEUPurchasesetcLbl: Label 'VAT 25 % % on EU Purchases etc.', MaxLength = 100; VAT25ongoodspurchasedabroadLbl: Label 'VAT 25% on goods purchased abroad', MaxLength = 100; diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Bank/4.Historical Data/CreateESBankAccReco.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Bank/4.Historical Data/CreateESBankAccReco.Codeunit.al deleted file mode 100644 index 2a1f6978ec..0000000000 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Bank/4.Historical Data/CreateESBankAccReco.Codeunit.al +++ /dev/null @@ -1,68 +0,0 @@ -codeunit 10829 "Create ES Bank Acc. Reco." -{ - SingleInstance = true; - EventSubscriberInstance = Manual; - InherentEntitlements = X; - InherentPermissions = X; - - trigger OnRun() - begin - UpdateBankAccReconciliation(); - end; - - local procedure UpdateBankAccReconciliation() - var - BankAccReconciliation: Record "Bank Acc. Reconciliation"; - CreateBankAccount: Codeunit "Create Bank Account"; - begin - if not BankAccReconciliation.Get(Enum::"Bank Acc. Rec. Stmt. Type"::"Bank Reconciliation", CreateBankAccount.Checking(), '24') then - exit; - - BankAccReconciliation.Validate("Statement Ending Balance", 17924.53); - BankAccReconciliation.Modify(); - end; - - [EventSubscriber(ObjectType::Table, Database::"Bank Acc. Reconciliation Line", 'OnBeforeInsertEvent', '', false, false)] - local procedure OnInsertRecord(var Rec: Record "Bank Acc. Reconciliation Line"; RunTrigger: Boolean) - var - CreateBankAccount: Codeunit "Create Bank Account"; - begin - if (Rec."Statement Type" = Rec."Statement Type"::"Bank Reconciliation") then begin - if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = '24') then - case Rec."Statement Line No." of - 10000: - ValidateRecordFields(Rec, Rec.Description, 2757.62); - 20000: - ValidateRecordFields(Rec, Rec.Description, 4136.43); - 30000: - ValidateRecordFields(Rec, DepositToAccountLbl, 11030.48); - end; - end else - if (Rec."Bank Account No." = CreateBankAccount.Checking()) and (Rec."Statement No." = 'PREC000') then - case Rec."Statement Line No." of - 10000: - ValidateRecordFields(Rec, Rec.Description, -2520); - 20000: - ValidateRecordFields(Rec, Rec.Description, -1828); - 30000: - ValidateRecordFields(Rec, Rec.Description, -1340.1); - 40000: - ValidateRecordFields(Rec, Rec.Description, 929.76); - 50000: - ValidateRecordFields(Rec, Rec.Description, 10743.39); - 60000: - ValidateRecordFields(Rec, Rec.Description, 3273.72); - end; - end; - - local procedure ValidateRecordFields(var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; Description: Text[100]; Amount: Decimal) - begin - BankAccReconciliationLine.Validate(Description, Description); - BankAccReconciliationLine.Validate("Transaction Text", Description); - BankAccReconciliationLine.Validate("Statement Amount", Amount); - BankAccReconciliationLine.Validate("Applied Amount", Amount); - end; - - var - DepositToAccountLbl: Label 'Deposit to Account 18/01/24', MaxLength = 100; -} \ No newline at end of file diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESAccScheduleName.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESAccScheduleName.Codeunit.al deleted file mode 100644 index 81b251f80a..0000000000 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/1.Setup Data/CreateESAccScheduleName.Codeunit.al +++ /dev/null @@ -1,55 +0,0 @@ -codeunit 10791 "Create ES Acc Schedule Name" -{ - InherentEntitlements = X; - InherentPermissions = X; - - trigger OnRun() - var - ContosoAccountSchedule: Codeunit "Contoso Account Schedule"; - begin - ContosoAccountSchedule.SetOverwriteData(true); - ContosoAccountSchedule.InsertAccScheduleName(BalanceSheetDetail(), BalanceSheetDetailedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(BalanceSheetSummarized(), BalanceSheetSummarizedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(IncomeStatementDetail(), IncomeStatementDetailedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(IncomeStatementSummarized(), IncomeStatementSummarizedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(TrialBalance(), TrialBalanceLbl, ''); - ContosoAccountSchedule.SetOverwriteData(false); - end; - - procedure BalanceSheetDetail(): Code[10] - begin - exit(BalanceSheetDetailTok); - end; - - procedure BalanceSheetSummarized(): Code[10] - begin - exit(BalanceSheetSummarizedTok); - end; - - procedure IncomeStatementDetail(): Code[10] - begin - exit(IncomeStatementDetailTok); - end; - - procedure IncomeStatementSummarized(): Code[10] - begin - exit(IncomeStatementSummarizedTok); - end; - - procedure TrialBalance(): Code[10] - begin - exit(TrialBalanceTok); - end; - - var - BalanceSheetDetailTok: Label 'BS DET', MaxLength = 10; - BalanceSheetSummarizedTok: Label 'BS SUM', MaxLength = 10; - IncomeStatementDetailTok: Label 'IS DET', MaxLength = 10; - IncomeStatementSummarizedTok: Label 'IS SUM', MaxLength = 10; - TrialBalanceTok: Label 'TB', MaxLength = 10; - BalanceSheetDetailedLbl: Label 'Balance Sheet Detailed', MaxLength = 80; - BalanceSheetSummarizedLbl: Label 'Balance Sheet Summarized', MaxLength = 80; - IncomeStatementDetailedLbl: Label 'Income Statement Detailed', MaxLength = 80; - IncomeStatementSummarizedLbl: Label 'Income Statement Summarized', MaxLength = 80; - TrialBalanceLbl: Label 'Trial Balance', MaxLength = 80; -} \ No newline at end of file diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESFinancialReport.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESFinancialReport.Codeunit.al index babde4b442..c506c01684 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESFinancialReport.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESFinancialReport.Codeunit.al @@ -5,38 +5,15 @@ codeunit 10792 "Create ES Financial Report" InherentEntitlements = X; InherentPermissions = X; - trigger OnRun() - var - ContosoAccountSchedule: Codeunit "Contoso Account Schedule"; - CreateESAccountScheduleName: Codeunit "Create ES Acc Schedule Name"; - begin - ContosoAccountSchedule.SetOverwriteData(true); - ContosoAccountSchedule.InsertFinancialReport(CreateESAccountScheduleName.BalanceSheetDetail(), BalanceSheetDetailedLbl, CreateESAccountScheduleName.BalanceSheetDetail(), BalanceSheetTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(CreateESAccountScheduleName.BalanceSheetSummarized(), BalanceSheetSummarizedLbl, CreateESAccountScheduleName.BalanceSheetSummarized(), BalanceSheetTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(CreateESAccountScheduleName.IncomeStatementDetail(), IncomeStatementDetailedLbl, CreateESAccountScheduleName.IncomeStatementDetail(), IncomeStatementTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(CreateESAccountScheduleName.IncomeStatementSummarized(), IncomeStatementSummarizedLbl, CreateESAccountScheduleName.IncomeStatementSummarized(), IncomeStatementTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(CreateESAccountScheduleName.TrialBalance(), TrialBalanceLbl, CreateESAccountScheduleName.TrialBalance(), BeginningBalanceDebitsCreditsEndingBalanceLbl); - ContosoAccountSchedule.SetOverwriteData(false); - end; - [EventSubscriber(ObjectType::Table, Database::"Financial Report", 'OnBeforeInsertEvent', '', false, false)] local procedure OnBeforeInsertFinancialReport(var Rec: Record "Financial Report") var CreateFinancialReport: Codeunit "Create Financial Report"; + CreateColumnLayoutName: Codeunit "Create Column Layout Name"; begin case Rec.Name of CreateFinancialReport.CapitalStructure(): - Rec.Validate("Financial Report Column Group", 'DEFAULT'); + Rec.Validate("Financial Report Column Group", CreateColumnLayoutName.DefaultLayout()); end; end; - - var - BalanceSheetDetailedLbl: Label 'Balance Sheet Detailed', MaxLength = 80; - BalanceSheetSummarizedLbl: Label 'Balance Sheet Summarized', MaxLength = 80; - IncomeStatementDetailedLbl: Label 'Income Statement Detailed', MaxLength = 80; - IncomeStatementSummarizedLbl: Label 'Income Statement Summarized', MaxLength = 80; - TrialBalanceLbl: Label 'Trial Balance', MaxLength = 80; - BalanceSheetTrendLbl: Label 'BSTREND', MaxLength = 10; - IncomeStatementTrendLbl: Label 'ISTREND', MaxLength = 10; - BeginningBalanceDebitsCreditsEndingBalanceLbl: Label 'BBDRCREB', MaxLength = 10; } \ No newline at end of file diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementLine.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementLine.Codeunit.al index fd4d936f4f..5a0308bf91 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementLine.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementLine.Codeunit.al @@ -20,235 +20,236 @@ codeunit 10832 "Create ES VAT Statement Line" CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; CreateVATStatement: Codeunit "Create VAT Statement"; CreateESVATPostingGroup: Codeunit "Create ES VAT Posting Groups"; + CreateESVATStatementName: Codeunit "Create ES VAT Statement Name"; begin ContosoVatStatement.SetOverwriteData(true); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT21outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT7outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT21onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT7onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '1030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT4outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '1070', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT4onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT21DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT7DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT21EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '1130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT4DomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '1170', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT4EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases21Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '1230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '1260', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 320000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 330000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 340000, '1330', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 350000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 360000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 380000, '10', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT16outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 390000, 'B010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT16outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 400000, '19', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..18', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT16outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 400000, '3'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 410000, 'B019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B010..B018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT16outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 410000, '1'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 420000, '1D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SixteenLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 420000, '2'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 430000, '20', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT7outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 440000, 'B020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT7outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 450000, '29', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '20..28', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT7outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 450000, '6'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 460000, 'B029', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B020..B028', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT7outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 460000, '4'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 470000, '2D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SevenLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 470000, '5'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 480000, '30', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, AmountVAT16onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 490000, 'B030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 1, BaseVAT16onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 500000, '39', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '30..38', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT16onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 510000, 'B039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B030..B038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT16onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 520000, '40', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, AmountVAT7onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 530000, 'B040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 1, BaseVAT7onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 540000, '49', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '40..48', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT7onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 550000, 'B049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B040..B048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, BaseAmountVAT7onEUPurchasesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 560000, '50', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '39|49', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVATEUPurchasesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 560000, '20'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 570000, 'B050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B039|B049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVATEUPurchasesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 570000, '19'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 580000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 590000, '99', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '19|29|50', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedVATAmountLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 590000, '21'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 600000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 610000, '110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 620000, 'B110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 630000, '119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110..118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 640000, 'B119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B110..B118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 650000, '120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 660000, 'B120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 670000, '129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '120..128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 680000, 'B129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B120..B128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 690000, '130', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '119|129', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchasesLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 690000, '23'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 700000, 'B130', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B119|B129', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 700000, '22'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 710000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, BasePurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 720000, 'B131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 730000, '139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT16EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 740000, 'B139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B131..B138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 750000, '140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 760000, 'B140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 770000, '149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140..148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 780000, 'B149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B140..B148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 790000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '139|149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchasesEULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 790000, '27'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 800000, 'B170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B139|B149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesUELbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 800000, '26'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 810000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 820000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 830000, '199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '130|170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 830000, '30'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 840000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 850000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '99|199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DifferenceLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 850000, '31'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 860000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 870000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 880000, '230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 890000, '240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 900000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '230|240', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueofEUSalesLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 900000, '35'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 910000, '310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 920000, '311', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 930000, '319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '310|311', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 930000, '36'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 940000, '320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement320Lbl, 950000, '329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '320..328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement320Lbl, 950000, '37'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 960000, '10', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT16outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 970000, 'B010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT16outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 980000, '19', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..18', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT16outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 980000, '6'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 990000, 'B019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B010..B018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT16outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 990000, '5'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1000000, '1D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SixteenLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1010000, '20', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT7outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1020000, 'B020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT7outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1030000, '29', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '20..28', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT7outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1030000, '4'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1040000, 'B029', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B020..B028', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT7outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1040000, '3'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1050000, '2D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SevenLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1060000, '30', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT4outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1070000, 'B030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT4outgoingLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1080000, '39', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '30..38', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT4outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1080000, '2'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1090000, 'B039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B030..B038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT4outgoingLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1090000, '1'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1100000, '3D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, FourLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1110000, '4D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '19|29|39', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVATLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1120000, '5D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B019|B029|B039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVATLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1140000, '40', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT16onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1150000, 'B040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT16onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1160000, '49', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '40..48', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT16onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1160000, '26'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1170000, 'B049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B040..B048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT16onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1170000, '25'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1180000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT7onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1190000, 'B050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT7onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1200000, '59', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '50..58', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT7onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1200000, '24'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1210000, 'B059', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B050..B058', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT7onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1210000, '23'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1220000, '60', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT4onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1230000, 'B060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT4onEUSalesetcLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1240000, '69', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '60..68', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT4onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1240000, '22'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1250000, 'B069', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B060..B068', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBaseVAT4onEUSalesetcLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1250000, '21'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1260000, '6D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '49|59|69', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVATEUSalesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1270000, '7D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B049|B059|B069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVATEUSalesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1280000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1290000, '1T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4D|6D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedVATAmountLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1290000, '34'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1300000, '1TB', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5D|7D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedBaseVATLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1300000, '33'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1320000, '110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1330000, 'B110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1340000, '119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110..118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT16Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1340000, '195'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1350000, 'B119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B110..B118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1350000, '194'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1360000, '120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1370000, 'B120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1380000, '129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '120..128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT7Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1380000, '193'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1390000, 'B129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B120..B128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1390000, '192'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1400000, '130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1410000, 'B130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1420000, '139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '130..138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT4Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1420000, '191'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1430000, 'B139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B130..B138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT4Lbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1430000, '190'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1440000, '8D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '119|129|139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchasesVATLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1440000, '49'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1450000, '9D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B119|B129|B139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesVATLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1450000, '48'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1460000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1470000, '140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT16EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1480000, 'B140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1490000, '149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140..148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT16EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1490000, '219'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1500000, 'B149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B140..B148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1500000, '218'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1510000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1520000, 'B150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1530000, '159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '150..158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT7EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1530000, '217'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1540000, 'B159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B150..B158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1540000, '216'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1550000, '160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT4EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1560000, 'B160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT4EULbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1570000, '169', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '160..168', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT4EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1570000, '215'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1580000, 'B169', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B160..B168', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT4EULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1580000, '214'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1590000, '10D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '149|159|169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchasesEULbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1590000, '57'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1600000, '11D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B149|B159|B169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesUELbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1600000, '56'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1610000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1620000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1630000, '2T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '8D|10D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1630000, '64'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1640000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1650000, '3T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1T|2T', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DifferenceLbl, ''); - UpdateBoxValue(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1650000, '65'); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1660000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1670000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1680000, '230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1690000, '240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1700000, '250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1710000, '260', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '230|240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueofEUSalesLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1720000, '310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas16Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1730000, '311', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas7Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1740000, '312', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas4Lbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1750000, '319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '310|311|312', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalNonVATliablesalesOverseasLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1760000, '320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesDomesticLbl, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1770000, '329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '320..328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalNonVATliablesalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT21outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT7outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT21onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT7onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '1030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, SalesVAT4outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '1070', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, VAT4onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT21DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT7DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT21EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '1130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT4DomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '1170', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, PurchaseVAT4EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases21Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '1230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, ValueofEUPurchases4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '1260', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '1330', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 380000, '10', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT16outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 390000, 'B010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT16outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 400000, '19', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..18', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT16outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 400000, '3'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 410000, 'B019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B010..B018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT16outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 410000, '1'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 420000, '1D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SixteenLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 420000, '2'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 430000, '20', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT7outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 440000, 'B020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT7outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 450000, '29', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '20..28', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT7outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 450000, '6'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 460000, 'B029', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B020..B028', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT7outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 460000, '4'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 470000, '2D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SevenLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 470000, '5'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 480000, '30', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, AmountVAT16onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 490000, 'B030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 1, BaseVAT16onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 500000, '39', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '30..38', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT16onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 510000, 'B039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B030..B038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT16onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 520000, '40', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, AmountVAT7onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 530000, 'B040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 1, false, 1, BaseVAT7onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 540000, '49', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '40..48', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT7onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 550000, 'B049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B040..B048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, BaseAmountVAT7onEUPurchasesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 560000, '50', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '39|49', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVATEUPurchasesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 560000, '20'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 570000, 'B050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B039|B049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVATEUPurchasesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 570000, '19'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 580000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 590000, '99', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '19|29|50', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedVATAmountLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 590000, '21'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 600000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 610000, '110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 620000, 'B110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 630000, '119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110..118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 640000, 'B119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B110..B118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 650000, '120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 660000, 'B120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 670000, '129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '120..128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 680000, 'B129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B120..B128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 690000, '130', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '119|129', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchasesLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 690000, '23'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 700000, 'B130', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B119|B129', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 700000, '22'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 710000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, BasePurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 720000, 'B131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 730000, '139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT16EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 740000, 'B139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B131..B138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 750000, '140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountPurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 760000, 'B140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 770000, '149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140..148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 780000, 'B149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B140..B148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 790000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '139|149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountPurchasesEULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 790000, '27'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 800000, 'B170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B139|B149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesUELbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 800000, '26'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 810000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 820000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 830000, '199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '130|170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 830000, '30'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 840000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 850000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '99|199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DifferenceLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 850000, '31'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 860000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 870000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 880000, '230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 890000, '240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 900000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '230|240', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueofEUSalesLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 900000, '35'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 910000, '310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 920000, '311', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 930000, '319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '310|311', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 930000, '36'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 940000, '320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 950000, '329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '320..328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement320(), 950000, '37'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 960000, '10', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT16outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 970000, 'B010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT16outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 980000, '19', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '10..18', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT16outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 980000, '6'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 990000, 'B019', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B010..B018', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT16outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 990000, '5'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1000000, '1D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SixteenLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1010000, '20', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT7outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1020000, 'B020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT7outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1030000, '29', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '20..28', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT7outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1030000, '4'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1040000, 'B029', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B020..B028', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT7outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1040000, '3'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1050000, '2D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SevenLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1060000, '30', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountSalesVAT4outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1070000, 'B030', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseSalesVAT4outgoingLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1080000, '39', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '30..38', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVAT4outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1080000, '2'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1090000, 'B039', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B030..B038', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVAT4outgoingLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1090000, '1'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1100000, '3D', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, FourLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1110000, '4D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '19|29|39', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountSalesVATLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1120000, '5D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B019|B029|B039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseSalesVATLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1140000, '40', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT16onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1150000, 'B040', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT16onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1160000, '49', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '40..48', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT16onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1160000, '26'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1170000, 'B049', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B040..B048', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT16onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1170000, '25'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1180000, '50', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT7onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1190000, 'B050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT7onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1200000, '59', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '50..58', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT7onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1200000, '24'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1210000, 'B059', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B050..B058', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVAT7onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1210000, '23'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1220000, '60', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, AmountVAT4onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1230000, 'B060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, BaseVAT4onEUSalesetcLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1240000, '69', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '60..68', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVAT4onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1240000, '22'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1250000, 'B069', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B060..B068', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBaseVAT4onEUSalesetcLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1250000, '21'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1260000, '6D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '49|59|69', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalAmountVATEUSalesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1270000, '7D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B049|B059|B069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalBaseVATEUSalesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1280000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1290000, '1T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4D|6D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedVATAmountLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1290000, '34'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1300000, '1TB', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5D|7D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDuedBaseVATLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1300000, '33'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1320000, '110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1330000, 'B110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1340000, '119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110..118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT16Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1340000, '195'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1350000, 'B119', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B110..B118', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1350000, '194'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1360000, '120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1370000, 'B120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1380000, '129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '120..128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT7Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1380000, '193'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1390000, 'B129', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B120..B128', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1390000, '192'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1400000, '130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1410000, 'B130', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1420000, '139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '130..138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT4Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1420000, '191'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1430000, 'B139', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B130..B138', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT4Lbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1430000, '190'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1440000, '8D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '119|129|139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchasesVATLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1440000, '49'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1450000, '9D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B119|B129|B139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesVATLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1450000, '48'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1460000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1470000, '140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT16EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1480000, 'B140', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT16EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1490000, '149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140..148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT16EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1490000, '219'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1500000, 'B149', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B140..B148', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT16EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1500000, '218'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1510000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1520000, 'B150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT7EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1530000, '159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '150..158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT7EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1530000, '217'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1540000, 'B159', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B150..B158', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT7EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1540000, '216'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1550000, '160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, AmountPurchaseVAT4EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1560000, 'B160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, BasePurchaseVAT4EULbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1570000, '169', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '160..168', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchaseVAT4EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1570000, '215'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1580000, 'B169', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B160..B168', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchaseVAT4EULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1580000, '214'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1590000, '10D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '149|159|169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalAmountPurchasesEULbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1590000, '57'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1600000, '11D', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', 'B149|B159|B169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalBasePurchasesUELbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1600000, '56'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1610000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1620000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1630000, '2T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '8D|10D', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1630000, '64'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1640000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1650000, '3T', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1T|2T', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DifferenceLbl, ''); + UpdateBoxValue(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1650000, '65'); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1660000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1670000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1680000, '230', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales21Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1690000, '240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1700000, '250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, ValueofEUSales4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1710000, '260', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '230|240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueofEUSalesLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1720000, '310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT21(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas16Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1730000, '311', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT7(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas7Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1740000, '312', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateESVATPostingGroup.VAT4(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesOverseas4Lbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1750000, '319', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '310|311|312', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalNonVATliablesalesOverseasLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1760000, '320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateESVATPostingGroup.NOVAT(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, NonVATliablesalesDomesticLbl, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateESVATStatementName.VATStatement392(), 1770000, '329', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '320..328', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalNonVATliablesalesDomesticLbl, ''); ContosoVatStatement.SetOverwriteData(false); end; @@ -265,16 +266,13 @@ codeunit 10832 "Create ES VAT Statement Line" var ContosoVatStatement: Codeunit "Contoso VAT Statement"; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; - Statement320Lbl: Label 'STMT. 320', MaxLength = 10; - Statement392Lbl: Label 'STMT. 392', MaxLength = 10; SalesVAT21outgoingLbl: Label 'Sales VAT 21 % (outgoing)', MaxLength = 100; SalesVAT7outgoingLbl: Label 'Sales VAT 7 % (outgoing)', MaxLength = 100; VAT21onEUPurchasesetcLbl: Label 'VAT 21 % % on EU Purchases etc.', MaxLength = 100; VAT7onEUPurchasesetcLbl: Label 'VAT 7 % % on EU Purchases etc.', MaxLength = 100; SalesVAT4outgoingLbl: Label 'Sales VAT 4 % (outgoing)', MaxLength = 100; VAT4onEUPurchasesetcLbl: Label 'VAT 4 % % on EU Purchases etc.', MaxLength = 100; - SeparationLineLbl: Label '--------------------------------------------------', MaxLength = 100; + SeparationLineLbl: Label '--------------------------------------------------', Locked = true; TotalLbl: Label 'Total', MaxLength = 100; PurchaseVAT21DomesticLbl: Label 'Purchase VAT 21 % Domestic', MaxLength = 100; PurchaseVAT7DomesticLbl: Label 'Purchase VAT 7 % Domestic', MaxLength = 100; diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementName.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementName.Codeunit.al index b1023f77d2..55b6b9d8af 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementName.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Finance/2.Master Data/CreateESVatStatementName.Codeunit.al @@ -8,11 +8,11 @@ codeunit 10833 "Create ES VAT Statement Name" CreateVATStatement: Codeunit "Create VAT Statement"; ContosoVatStatment: Codeunit "Contoso VAT Statement"; begin - ContosoVatStatment.InsertVATStatementName(CreateVATStatement.VATTemplateName(), Statement320Lbl, TelematicStatement320DescLbl); - ContosoVatStatment.InsertVATStatementName(CreateVATStatement.VATTemplateName(), Statement392Lbl, TelematicStatement392DescLbl); - UpdateTemplateType(CreateVATStatement.VATTemplateName(), StatementNameLbl, 0); - UpdateTemplateType(CreateVATStatement.VATTemplateName(), Statement320Lbl, 1); - UpdateTemplateType(CreateVATStatement.VATTemplateName(), Statement392Lbl, 1); + ContosoVatStatment.InsertVATStatementName(CreateVATStatement.VATTemplateName(), VATStatement320(), TelematicStatement320DescLbl); + ContosoVatStatment.InsertVATStatementName(CreateVATStatement.VATTemplateName(), VATStatement392(), TelematicStatement392DescLbl); + UpdateTemplateType(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 0); + UpdateTemplateType(CreateVATStatement.VATTemplateName(), VATStatement320(), 1); + UpdateTemplateType(CreateVATStatement.VATTemplateName(), VATStatement392(), 1); end; local procedure UpdateTemplateType(StatementTemplateName: Code[10]; StatementName: Code[10]; TemplateType: option) @@ -26,8 +26,17 @@ codeunit 10833 "Create ES VAT Statement Name" VatStatementName.Modify(true); end; + procedure VATStatement320(): Code[10] + begin + exit(Statement320Lbl); + end; + + procedure VATStatement392(): Code[10] + begin + exit(Statement392Lbl); + end; + var - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; Statement320Lbl: Label 'STMT. 320', MaxLength = 10; Statement392Lbl: Label 'STMT. 392', MaxLength = 10; TelematicStatement320DescLbl: Label '320 Telematic Statement', MaxLength = 100; diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Fixed Asset/1.Setup Data/CreateESFAPostingGroup.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Fixed Asset/1.Setup Data/CreateESFAPostingGroup.Codeunit.al index a00f84b391..b133803eca 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Fixed Asset/1.Setup Data/CreateESFAPostingGroup.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Fixed Asset/1.Setup Data/CreateESFAPostingGroup.Codeunit.al @@ -16,10 +16,6 @@ codeunit 10807 "Create ES FA Posting Group" CreateFAPostingGrp.Goodwill(), CreateFAPostingGrp.Plant(), CreateFAPostingGrp.Property(), - // CreateFAPostingGrp.IP(), - // CreateFAPostingGrp.LeaseHold(), - // CreateFAPostingGrp.Patents(), - // CreateFAPostingGrp.Furniture(): CreateFAPostingGrp.Vehicles(): ValidateRecordFields(Rec, CreateESGLAccounts.IndustrialMachinery(), CreateESGLAccounts.DepIndustrialMachinery(), CreateESGLAccounts.IndustrialMachinery(), CreateESGLAccounts.DepIndustrialMachinery(), '', CreateESGLAccounts.LossOnTangAssetsTransf(), CreateESGLAccounts.Repairs(), CreateESGLAccounts.DeprOfTangAssets(), CreateESGLAccounts.IndustrialMachinery()); end; @@ -37,12 +33,4 @@ codeunit 10807 "Create ES FA Posting Group" FAPostingGroup.Validate("Depreciation Expense Acc.", DepreciationExpenseAcc); FAPostingGroup.Validate("Acquisition Cost Bal. Acc.", AcquisitionCostBalAcc); end; - - procedure Building(): Code[20] - begin - exit(BuildingTok); - end; - - var - BuildingTok: Label 'BUILDING', MaxLength = 20; } \ No newline at end of file diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Sale/2.Master Data/CreateESSalesDimValue.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Sale/2.Master Data/CreateESSalesDimValue.Codeunit.al index cf88986948..0ac86411c6 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Sale/2.Master Data/CreateESSalesDimValue.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoData/Sale/2.Master Data/CreateESSalesDimValue.Codeunit.al @@ -16,24 +16,18 @@ codeunit 10836 "Create ES Sales Dim Value" case Rec."Dimension Code" of CreateDimension.AreaDimension(): ValidateRecordFields(Rec, CreateDimensionValue.EuropeSouthArea(), Enum::"Default Dimension Value Posting Type"::"Code Mandatory"); - // CreateDimension.CustomerGroupDimension(): - // ValidateRecordFields(Rec, CreateDimensionValue.MediumBusinessCustomerGroup(), Enum::"Default Dimension Value Posting Type"::"Same Code"); end; if (Rec."Table ID" = Database::Customer) and (Rec."No." = CreateCustomer.DomesticTreyResearch()) then case Rec."Dimension Code" of CreateDimension.AreaDimension(): ValidateRecordFields(Rec, CreateDimensionValue.EuropeSouthArea(), Enum::"Default Dimension Value Posting Type"::"Code Mandatory"); - // CreateDimension.CustomerGroupDimension(): - // ValidateRecordFields(Rec, CreateDimensionValue.LargeBusinessCustomerGroup(), Enum::"Default Dimension Value Posting Type"::"Same Code"); end; if (Rec."Table ID" = Database::Customer) and (Rec."No." = CreateCustomer.DomesticRelecloud()) then case Rec."Dimension Code" of CreateDimension.AreaDimension(): ValidateRecordFields(Rec, CreateDimensionValue.EuropeSouthArea(), Enum::"Default Dimension Value Posting Type"::"Code Mandatory"); - // CreateDimension.CustomerGroupDimension(): - // ValidateRecordFields(Rec, CreateDimensionValue.MediumBusinessCustomerGroup(), Enum::"Default Dimension Value Posting Type"::"Same Code"); end; end; diff --git a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoTool/ESContosoLocalization.Codeunit.al b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoTool/ESContosoLocalization.Codeunit.al index 3a57c3248f..e912f132e8 100644 --- a/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoTool/ESContosoLocalization.Codeunit.al +++ b/Apps/ES/ContosoCoffeeDemoDatasetES/app/DemoTool/ESContosoLocalization.Codeunit.al @@ -31,8 +31,6 @@ codeunit 10824 "ES Contoso Localization" case ContosoDemoDataLevel of Enum::"Contoso Demo Data Level"::"Setup Data": Codeunit.Run(Codeunit::"Create ES Payment Method"); - Enum::"Contoso Demo Data Level"::"Historical Data": - Codeunit.Run(Codeunit::"Create ES Bank Acc. Reco."); end; end; @@ -113,7 +111,6 @@ codeunit 10824 "ES Contoso Localization" begin Codeunit.Run(Codeunit::"Create ES Posting Groups"); CreateESVATPostingGroups.InsertVATPostingSetupWithGLAccounts(); - Codeunit.Run(Codeunit::"Create ES Acc Schedule Name"); Codeunit.Run(Codeunit::"Create ES Column Layout Name"); Codeunit.Run(Codeunit::"Create ES General Ledger Setup"); Codeunit.Run(Codeunit::"Create ES Currency"); @@ -122,7 +119,6 @@ codeunit 10824 "ES Contoso Localization" Enum::"Contoso Demo Data Level"::"Master Data": begin Codeunit.Run(Codeunit::"Create ES Column Layout"); - Codeunit.Run(Codeunit::"Create ES Financial Report"); Codeunit.Run(Codeunit::"Create ES VAT Statement Name"); Codeunit.Run(Codeunit::"Create ES VAT Statement Line"); Codeunit.Run(Codeunit::"Create ES Currency Exch"); @@ -152,7 +148,6 @@ codeunit 10824 "ES Contoso Localization" CreateESPostingGroups: Codeunit "Create ES Posting Groups"; CreateESEmployee: Codeunit "Create ES Employee"; CreateESEmployeeTemplate: Codeunit "Create ES Employee Template"; - CreateESBankAccReco: Codeunit "Create ES Bank Acc. Reco."; CreateESAccScheduleLine: Codeunit "Create ES Acc. Schedule Line"; CreateESFinancialReport: Codeunit "Create ES Financial Report"; CreateESReminderLevel: Codeunit "Create ES Reminder Level"; @@ -187,7 +182,6 @@ codeunit 10824 "ES Contoso Localization" begin BindSubscription(CreateESBankAccPostingGrp); BindSubscription(CreateESBankAccount); - BindSubscription(CreateESBankAccReco); end; Enum::"Contoso Demo Data Module"::Purchase: begin @@ -234,7 +228,6 @@ codeunit 10824 "ES Contoso Localization" CreateESPostingGroups: Codeunit "Create ES Posting Groups"; CreateESEmployee: Codeunit "Create ES Employee"; CreateESEmployeeTemplate: Codeunit "Create ES Employee Template"; - CreateESBankAccReco: Codeunit "Create ES Bank Acc. Reco."; CreateESAccScheduleLine: Codeunit "Create ES Acc. Schedule Line"; CreateESFinancialReport: Codeunit "Create ES Financial Report"; CreateESReminderLevel: Codeunit "Create ES Reminder Level"; @@ -253,7 +246,6 @@ codeunit 10824 "ES Contoso Localization" begin UnbindSubscription(CreateESBankAccPostingGrp); UnbindSubscription(CreateESBankAccount); - UnbindSubscription(CreateESBankAccReco); end; Enum::"Contoso Demo Data Module"::Inventory: begin diff --git a/Apps/ES/HybridBCLast_ES/app/src/tables/StgReportSelections.Table.al b/Apps/ES/HybridBCLast_ES/app/src/tables/StgReportSelections.Table.al deleted file mode 100644 index 31102d7676..0000000000 --- a/Apps/ES/HybridBCLast_ES/app/src/tables/StgReportSelections.Table.al +++ /dev/null @@ -1,30 +0,0 @@ -#if not CLEANSCHEMA23 -table 4034 "Stg Report Selections" -{ - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '23.0'; - ReplicateData = false; - - fields - { - field(1; Usage; Enum "Report Selection Usage") - { - DataClassification = CustomerContent; - } - field(2; Sequence; Code[10]) - { - DataClassification = CustomerContent; - Numeric = true; - } - } - - keys - { - key(Key1; Usage, Sequence) - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/ES/HybridBCLast_ES/app/src/tables/StgSIISetup.Table.al b/Apps/ES/HybridBCLast_ES/app/src/tables/StgSIISetup.Table.al deleted file mode 100644 index a44fdb839e..0000000000 --- a/Apps/ES/HybridBCLast_ES/app/src/tables/StgSIISetup.Table.al +++ /dev/null @@ -1,33 +0,0 @@ -#if not CLEANSCHEMA23 -table 4033 "Stg SII Setup" -{ - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '23.0'; - ReplicateData = false; - - fields - { - field(1; "Primary Key"; Code[10]) - { - DataClassification = CustomerContent; - } - field(2; Certificate; BLOB) - { - DataClassification = CustomerContent; - } - field(3; Password; Text[250]) - { - DataClassification = CustomerContent; - } - } - - keys - { - key(PK; "Primary Key") - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/Demo Data/Finance/2.Master Data/CreateVATStatementFI.Codeunit.al b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/Demo Data/Finance/2.Master Data/CreateVATStatementFI.Codeunit.al index d12d1d6390..4ab36cc5dd 100644 --- a/Apps/FI/ContosoCoffeeDemoDatasetFI/app/Demo Data/Finance/2.Master Data/CreateVATStatementFI.Codeunit.al +++ b/Apps/FI/ContosoCoffeeDemoDatasetFI/app/Demo Data/Finance/2.Master Data/CreateVATStatementFI.Codeunit.al @@ -10,7 +10,7 @@ codeunit 13447 "Create VAT Statement FI" var CreateVATStatement: Codeunit "Create VAT Statement"; begin - if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = StatementNameLbl) then + if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = CreateVATStatement.VATStatementName()) then case Rec."Line No." of 200000: Rec.Validate(Description, SalesStandardLbl); @@ -104,7 +104,6 @@ codeunit 13447 "Create VAT Statement FI" end; var - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; SalesStandardLbl: Label 'Sales 24 % ', MaxLength = 100; SalesStandardFullLbl: Label 'Sales 24 % FULL', MaxLength = 100; SalesStandardTotalLbl: Label 'Sales 24 % total', MaxLength = 100; diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Finance/2. Master Data/CreateVATStatementFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Finance/2. Master Data/CreateVATStatementFR.Codeunit.al index dfcc71aa92..d423e2794b 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Finance/2. Master Data/CreateVATStatementFR.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Finance/2. Master Data/CreateVATStatementFR.Codeunit.al @@ -26,36 +26,36 @@ codeunit 10897 "Create VAT Statement FR" CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; begin ContosoVatStatement.SetOverwriteData(true); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, StrSubstNo(SalesVATPERCENToutgoingLbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, StrSubstNo(SalesVATPERCENToutgoingLbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, StrSubstNo(VATPERCENTonEUPurchasesetcLbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, StrSubstNo(VATPERCENTonEUPurchasesetcLbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTDomesticLbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTDomesticLbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTEULbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTEULbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, StrSubstNo(ValueofEUPurchasesPERCENTLbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, StrSubstNo(ValueofEUPurchasesPERCENTLbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, StrSubstNo(ValueofEUSalesPERCENTLbl, 20)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, StrSubstNo(ValueofEUSalesPERCENTLbl, 5)); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl); - ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '1010', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, StrSubstNo(SalesVATPERCENToutgoingLbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '1020', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 1, StrSubstNo(SalesVATPERCENToutgoingLbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '1050', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, StrSubstNo(VATPERCENTonEUPurchasesetcLbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '1060', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 1, false, 1, StrSubstNo(VATPERCENTonEUPurchasesetcLbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '1099', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1010..1090', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '1110', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTDomesticLbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '1120', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTDomesticLbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '1150', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTEULbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '1160', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, false, 0, StrSubstNo(PurchaseVATPERCENTEULbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '1179', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1110..1170', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseVATingoingLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '1199', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1159|1189', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalDeductionsLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1099|1199', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VATPayableLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '1210', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, StrSubstNo(ValueofEUPurchasesPERCENTLbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '1220', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, StrSubstNo(ValueofEUPurchasesPERCENTLbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '1240', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, StrSubstNo(ValueofEUSalesPERCENTLbl, 20)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '1250', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 1, StrSubstNo(ValueofEUSalesPERCENTLbl, 5)); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '1310', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '1320', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesOverseasLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1310..1330', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesOverseasLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '1340', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, false, 0, NonVATliablesalesDomesticLbl); + ContosoVatStatement.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1340..1348', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonVATliablesalesDomesticLbl); ContosoVatStatement.SetOverwriteData(false); end; @@ -63,7 +63,6 @@ codeunit 10897 "Create VAT Statement FR" CZFormatLbl: Label '########', MaxLength = 20, Locked = true; CZFormat1Lbl: Label '#########', MaxLength = 20, Locked = true; CZFormat2Lbl: Label '##########', MaxLength = 20, Locked = true; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; SalesVATPERCENToutgoingLbl: Label 'Sales VAT %1 % (outgoing)', Comment = '%1 is Vat Percentage', MaxLength = 100; VATPERCENTonEUPurchasesetcLbl: Label 'VAT %1 % % on EU Purchases etc.', Comment = '%1 is Vat Percentage', MaxLength = 100; PurchaseVATPERCENTDomesticLbl: Label 'Purchase VAT %1 % Domestic', Comment = '%1 is Vat Percentage', MaxLength = 100; diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Inventory/2. Master Data/CreateItemFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Inventory/2. Master Data/CreateItemFR.Codeunit.al index a0044f4a8f..c4213d9e09 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Inventory/2. Master Data/CreateItemFR.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Inventory/2. Master Data/CreateItemFR.Codeunit.al @@ -1,4 +1,4 @@ -codeunit 10879 "Create Item FR" +codeunit 10900 "Create Item FR" { SingleInstance = true; EventSubscriberInstance = Manual; diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Purchase/1. Setup Data/CreateVendorPostingGrpFR.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Purchase/1. Setup Data/CreateVendorPostingGrpFR.Codeunit.al index cad22bfb96..0a55a51f27 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Purchase/1. Setup Data/CreateVendorPostingGrpFR.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Data/Purchase/1. Setup Data/CreateVendorPostingGrpFR.Codeunit.al @@ -1,4 +1,4 @@ -codeunit 10880 "Create Vendor Posting Grp FR" +codeunit 10901 "Create Vendor Posting Grp FR" { SingleInstance = true; EventSubscriberInstance = Manual; diff --git a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Tool/CreateFRGLAccounts.Codeunit.al b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Tool/CreateFRGLAccounts.Codeunit.al index 2103877b8d..774c74713e 100644 --- a/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Tool/CreateFRGLAccounts.Codeunit.al +++ b/Apps/FR/ContosoCoffeeDemoDatasetFR/app/Demo Tool/CreateFRGLAccounts.Codeunit.al @@ -21,7 +21,7 @@ codeunit 10850 "Create FR GL Accounts" ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.SalesVATStandardName(), '445711'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.PurchaseVATStandardName(), '445661'); - ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.DirectCostAppliedRawMatName(), ''); + ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.DirectCostAppliedRawMatName(), '904100'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.DirectCostAppliedRetailName(), '603710'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.OverheadAppliedRawMatName(), '905100'); @@ -33,7 +33,7 @@ codeunit 10850 "Create FR GL Accounts" ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.RawMaterialsName(), '350000'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.PurchRawMatDomName(), '601100'); - ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.InventoryAdjRawMatName(), ''); + ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.InventoryAdjRawMatName(), '961000'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.InventoryAdjRetailName(), '603712'); ContosoGLAccount.AddAccountForLocalization(CommonGLAccount.ResalesName(), '370000'); diff --git a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/1.Setup Data/CreateGBVATReportSetup.Codeunit.al b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/1.Setup Data/CreateGBVATReportSetup.Codeunit.al index 5c7b733a0b..b71bdd5ad8 100644 --- a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/1.Setup Data/CreateGBVATReportSetup.Codeunit.al +++ b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/1.Setup Data/CreateGBVATReportSetup.Codeunit.al @@ -1,4 +1,4 @@ -codeunit 10525 "Create GB VAT Report Setup" +codeunit 10542 "Create GB VAT Report Setup" { SingleInstance = true; EventSubscriberInstance = Manual; diff --git a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateGBVATStatement.Codeunit.al b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateGBVATStatement.Codeunit.al index 767a0013e4..2dd7e8f610 100644 --- a/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateGBVATStatement.Codeunit.al +++ b/Apps/GB/ContosoCoffeeDemoDatasetGB/app/DemoData/Finance/2.Master Data/CreateGBVATStatement.Codeunit.al @@ -1,4 +1,4 @@ -codeunit 10526 "Create GB VAT Statement" +codeunit 10543 "Create GB VAT Statement" { SingleInstance = true; EventSubscriberInstance = Manual; @@ -8,6 +8,7 @@ codeunit 10526 "Create GB VAT Statement" trigger OnRun() var ContosoCoffeeDemoDataSetup: Record "Contoso Coffee Demo Data Setup"; + CreateVATStatement: Codeunit "Create VAT Statement"; begin ContosoCoffeeDemoDataSetup.Get(); @@ -16,85 +17,86 @@ codeunit 10526 "Create GB VAT Statement" ContosoVatStatement.InsertVATStatementTemplate(VATGBTemplateName(), VATReturnDescLbl, Page::"VAT Statement", Report::"VAT Statement"); - ContosoVatStatement.InsertVATStatementName(VATGBTemplateName(), StatementNameLbl, StatementNameDescLbl); + ContosoVatStatement.InsertVATStatementName(VATGBTemplateName(), CreateVATStatement.VATStatementName(), StatementNameDescLbl); CreateVATStatementLine(); end; local procedure CreateVATStatementLine() var CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; + CreateVATStatement: Codeunit "Create VAT Statement"; begin - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 780000, '001', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatDueOnSalesAndOtherOutputsLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 790000, '002', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '090|100', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatOnGoodsAcquiredInNorthernIrelandFromEuLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 800000, '003', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '001|002', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalVatDueLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 810000, '004', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '040|050|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalVatDueInclEuAcquisitionsLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 820000, '005', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, NetVatToBePaidOrToBeReclaimedLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 830000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 840000, '006', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110|120|170|180|190|008', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueOfSalesExclVatInclRow8Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 850000, '007', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '210|220|270|280|290|009', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValueOfPurchasesExclVatInclRow9Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 860000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 870000, '008', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140|150', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfGoodsExVatFromNorthernIrelandToEuLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 880000, '009', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, GoodsExVatAcquiredInNorthernIrelandFromEuLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 890000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 900000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLineLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 910000, '011', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 920000, '012', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales20FullLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 930000, '020', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '011..019', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Sales20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 940000, '021', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 950000, '022', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales5FullLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 960000, '030', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '021..029', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Sales5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 970000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 980000, '031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EuAcquisitions20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 990000, '040', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '031..039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EuAcquisitions20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1000000, '041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EuAcquisitions5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1010000, '050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '041..049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EuAcquisitions5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1020000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1030000, '061', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat20DomesticLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1040000, '062', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat20FullDomesticLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1050000, '070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '061..069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Purchase20DomesticTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1060000, '071', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat5DomesticLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1070000, '072', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, Purchase5DomesticTotalFullLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1080000, '080', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '071..079', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Purchase5DomesticTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1090000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1100000, '081', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EuAcquisitions20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1110000, '090', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '081..089', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EuAcquisitions20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1120000, '091', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EuAcquisitions5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1130000, '100', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '091..099', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EuAcquisitions5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1140000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1150000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1160000, '101', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfDomesticSales20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1170000, '110', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '101..109', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfDomesticSales20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1180000, '111', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfDomesticSales5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1190000, '120', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '111..119', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfDomesticSales5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1200000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1210000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfEuSupplies20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1220000, '140', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfEuSupplies20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1230000, '141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfEuSupplies5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1240000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '141..149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfEuSupplies5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1250000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1260000, '161', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfOverseasSales20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1270000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '161..169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfOverseasSales20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1280000, '171', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfOverseasSales5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1290000, '180', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '171..179', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfOverseasSales5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1300000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1310000, '190', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 1, ValueOfNonVatLiableSalesLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1320000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1330000, '201', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfDomesticPurchases20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1340000, '210', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '201..209', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfDomesticPurchases20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1350000, '211', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfDomesticPurchases5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1360000, '220', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '211..219', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfDomesticPurchases5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1370000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1380000, '231', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfEuAcquisitions20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1390000, '240', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '231..239', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfEuAcquisitions20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1400000, '241', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfEuAcquisitions5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1410000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '241..249', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfEuAcquisitions5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1420000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1430000, '261', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfOverseasPurchases20Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1440000, '270', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '261..269', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfOverseasPurchases20TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1450000, '271', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfOverseasPurchases5Lbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1460000, '280', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '271..279', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfOverseasPurchases5TotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1470000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), StatementNameLbl, 1480000, '290', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 0, ValueOfNonVatLiablePurchasesLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 780000, '001', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatDueOnSalesAndOtherOutputsLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 790000, '002', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '090|100', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatOnGoodsAcquiredInNorthernIrelandFromEuLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 800000, '003', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '001|002', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalVatDueLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 810000, '004', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '040|050|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalVatDueInclEuAcquisitionsLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 820000, '005', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, NetVatToBePaidOrToBeReclaimedLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 830000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 840000, '006', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110|120|170|180|190|008', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueOfSalesExclVatInclRow8Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 850000, '007', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '210|220|270|280|290|009', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValueOfPurchasesExclVatInclRow9Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 860000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 870000, '008', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140|150', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfGoodsExVatFromNorthernIrelandToEuLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 880000, '009', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, GoodsExVatAcquiredInNorthernIrelandFromEuLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 890000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 900000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeperationLineLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 910000, '011', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 920000, '012', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales20FullLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 930000, '020', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '011..019', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Sales20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 940000, '021', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 950000, '022', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, Sales5FullLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 960000, '030', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '021..029', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, Sales5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 970000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 980000, '031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EuAcquisitions20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 990000, '040', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '031..039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EuAcquisitions20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1000000, '041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EuAcquisitions5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1010000, '050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '041..049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EuAcquisitions5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1020000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1030000, '061', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat20DomesticLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1040000, '062', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat20FullDomesticLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1050000, '070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '061..069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Purchase20DomesticTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1060000, '071', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseVat5DomesticLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1070000, '072', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, Purchase5DomesticTotalFullLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1080000, '080', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '071..079', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, Purchase5DomesticTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1090000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1100000, '081', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EuAcquisitions20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1110000, '090', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '081..089', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EuAcquisitions20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1120000, '091', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EuAcquisitions5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1130000, '100', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '091..099', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EuAcquisitions5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1140000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1150000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1160000, '101', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfDomesticSales20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1170000, '110', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '101..109', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfDomesticSales20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1180000, '111', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfDomesticSales5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1190000, '120', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '111..119', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfDomesticSales5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1200000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1210000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfEuSupplies20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1220000, '140', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfEuSupplies20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1230000, '141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfEuSupplies5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1240000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '141..149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfEuSupplies5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1250000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1260000, '161', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfOverseasSales20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1270000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '161..169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfOverseasSales20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1280000, '171', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, ValueOfOverseasSales5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1290000, '180', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '171..179', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ValueOfOverseasSales5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1300000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1310000, '190', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 1, ValueOfNonVatLiableSalesLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1320000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1330000, '201', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfDomesticPurchases20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1340000, '210', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '201..209', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfDomesticPurchases20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1350000, '211', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfDomesticPurchases5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1360000, '220', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '211..219', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfDomesticPurchases5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1370000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1380000, '231', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfEuAcquisitions20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1390000, '240', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '231..239', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfEuAcquisitions20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1400000, '241', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfEuAcquisitions5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1410000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '241..249', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfEuAcquisitions5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1420000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1430000, '261', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfOverseasPurchases20Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1440000, '270', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '261..269', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfOverseasPurchases20TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1450000, '271', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, ValueOfOverseasPurchases5Lbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1460000, '280', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '271..279', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ValueOfOverseasPurchases5TotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1470000, '', Enum::"VAT Statement Line Type"::"Description", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATGBTemplateName(), CreateVATStatement.VATStatementName(), 1480000, '290', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 0, ValueOfNonVatLiablePurchasesLbl); end; [EventSubscriber(ObjectType::Table, Database::"VAT Statement Line", 'OnBeforeInsertEvent', '', false, false)] @@ -102,7 +104,7 @@ codeunit 10526 "Create GB VAT Statement" var CreateVATStatement: Codeunit "Create VAT Statement"; begin - if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = StatementNameLbl) then + if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = CreateVATStatement.VATStatementName()) then case Rec."Line No." of 10000: @@ -222,7 +224,7 @@ codeunit 10526 "Create GB VAT Statement" Rec.Validate(Description, OverseasPurchaseReducedTotalLbl); end; - if (Rec."Statement Template Name" = VATGBTemplateName()) and (Rec."Statement Name" = StatementNameLbl) then + if (Rec."Statement Template Name" = VATGBTemplateName()) and (Rec."Statement Name" = CreateVATStatement.VATStatementName()) then case Rec."Line No." of 780000: @@ -254,7 +256,6 @@ codeunit 10526 "Create GB VAT Statement" var ContosoVatStatement: Codeunit "Contoso VAT Statement"; VatGBTemplateNameTok: Label 'VATGB', Locked = true; - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; StatementNameDescLbl: Label 'Default Statement', MaxLength = 100; VATReturnDescLbl: Label 'VAT Return', MaxLength = 80; VatDueOnSalesAndOtherOutputsLbl: Label 'VAT due on sales and other outputs', MaxLength = 100; diff --git a/Apps/IN/INFADepreciation/app/src/page/FixedAssetShifts.Page.al b/Apps/IN/INFADepreciation/app/src/page/FixedAssetShifts.Page.al index 54dc516b80..36195a8828 100644 --- a/Apps/IN/INFADepreciation/app/src/page/FixedAssetShifts.Page.al +++ b/Apps/IN/INFADepreciation/app/src/page/FixedAssetShifts.Page.al @@ -27,6 +27,7 @@ page 18633 "Fixed Asset Shifts" ToolTip = 'Specifies the depreciation book code.'; ApplicationArea = FixedAssets; } +#if not CLEAN26 field("FA Posting Group"; Rec."FA Posting Group") { Editable = false; @@ -43,6 +44,7 @@ page 18633 "Fixed Asset Shifts" Error(FAPostingGroupsErr); end; } +#endif field("Fixed Asset Posting Group"; Rec."Fixed Asset Posting Group") { Editable = false; diff --git a/Apps/IN/INFADepreciation/app/src/table/FixedAssetShift.Table.al b/Apps/IN/INFADepreciation/app/src/table/FixedAssetShift.Table.al index 39fced3bb7..e7fd7f5678 100644 --- a/Apps/IN/INFADepreciation/app/src/table/FixedAssetShift.Table.al +++ b/Apps/IN/INFADepreciation/app/src/table/FixedAssetShift.Table.al @@ -185,14 +185,20 @@ table 18633 "Fixed Asset Shift" ModifyDeprFields(); end; } +#if not CLEANSCHEMA26 field(13; "FA Posting Group"; Code[10]) { Caption = 'FA Posting Group'; DataClassification = CustomerContent; - ObsoleteState = Pending; ObsoleteReason = 'New field introduced as Fixed Asset Posting Group'; +#if CLEAN26 + ObsoleteState = Removed; + ObsoleteTag = '26.0'; +#else + ObsoleteState = Pending; ObsoleteTag = '23.0'; - +#endif +#endif trigger OnValidate() begin ModifyDeprFields(); diff --git a/Apps/MX/HybridBCLast_MX/app/src/tables/StgDataExchDefMX.Table.al b/Apps/MX/HybridBCLast_MX/app/src/tables/StgDataExchDefMX.Table.al deleted file mode 100644 index ac7705c914..0000000000 --- a/Apps/MX/HybridBCLast_MX/app/src/tables/StgDataExchDefMX.Table.al +++ /dev/null @@ -1,29 +0,0 @@ -#if not CLEANSCHEMA24 -table 4045 "Stg Data Exch Def MX" -{ - ReplicateData = false; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - - fields - { - field(1; "Code"; Code[20]) - { - DataClassification = CustomerContent; - } - field(3; Type; Enum "Data Exchange Definition Type") - { - DataClassification = CustomerContent; - } - } - - keys - { - key(PK; Code) - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/Demo Data/CRM/2.Master Data/CreateVatStatementLineNL.Codeunit.al b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/Demo Data/CRM/2.Master Data/CreateVatStatementLineNL.Codeunit.al index 3762af5902..5bcc323661 100644 --- a/Apps/NL/ContosoCoffeeDemoDatasetNL/app/Demo Data/CRM/2.Master Data/CreateVatStatementLineNL.Codeunit.al +++ b/Apps/NL/ContosoCoffeeDemoDatasetNL/app/Demo Data/CRM/2.Master Data/CreateVatStatementLineNL.Codeunit.al @@ -15,60 +15,59 @@ codeunit 11545 "Create Vat Statement Line NL" CreateElecTaxDeclarationNL: Codeunit "Create Elec Tax Declaration NL"; begin ContosoVatStatementNL.SetOverwriteData(true); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 10000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesDomesticLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 20000, '1A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1A1(), CreateElecTaxDeclarationNL.ElecVatCategory1A1()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 30000, '1A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1A2(), CreateElecTaxDeclarationNL.ElecVatCategory1A2()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 40000, '1B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1B1(), CreateElecTaxDeclarationNL.ElecVatCategory1B1()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 50000, '1B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1B2(), CreateElecTaxDeclarationNL.ElecVatCategory1B2()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 60000, '1E', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, '', '', CreateElecTaxDeclarationNL.ElecVatCategory1E(), CreateElecTaxDeclarationNL.ElecVatCategory1E()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 90000, '2A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 100000, '2A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 110000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '2A-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory2A1(), CreateElecTaxDeclarationNL.ElecVatCategory2A1()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 120000, '2A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 130000, '2A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 140000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '2A-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory2A2(), CreateElecTaxDeclarationNL.ElecVatCategory2A2()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesForeignnonEULbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 160000, '3A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 170000, '3A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 180000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '3A', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonEUShipmentsLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory3A(), CreateElecTaxDeclarationNL.ElecVatCategory3A()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 190000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 200000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesForeignEULbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 210000, '3B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 220000, '3B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 230000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '3B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUShipmentsLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory3B(), CreateElecTaxDeclarationNL.ElecVatCategory3B()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 240000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 250000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchasesForeignLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 260000, '4A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 270000, '4A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 280000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4A-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignnonEUBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4A1(), CreateElecTaxDeclarationNL.ElecVatCategory4A1()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 290000, '4A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 300000, '4A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 310000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4A-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignnonEUTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4A2(), CreateElecTaxDeclarationNL.ElecVatCategory4A2()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 320000, '4B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 330000, '4B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 340000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4B-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignEUBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4B1(), CreateElecTaxDeclarationNL.ElecVatCategory4B1()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 350000, '4B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 360000, '4B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4B-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignEUTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4B2(), CreateElecTaxDeclarationNL.ElecVatCategory4B2()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 380000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 390000, '5A', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1A-2|1B-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SubtotalSalesTaxLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory5A(), CreateElecTaxDeclarationNL.ElecVatCategory5A()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 400000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 410000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 420000, '5B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Taxedwith21Lbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 430000, '5B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Taxedwith6Lbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 440000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PaidinadvanceLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory5B(), CreateElecTaxDeclarationNL.ElecVatCategory5B()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 450000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 460000, '5C', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5A|5B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SubtotalLbl, '', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 470000, '5D', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '1580', CreateElecTaxDeclarationNL.ElecVatCategory5D(), CreateElecTaxDeclarationNL.ElecVatCategory5D()); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 480000, '5D-1', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '1580', '', ''); - ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), StatementNameLbl, 490000, '5G', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '5C|5D-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', CreateElecTaxDeclarationNL.ElecVatCategory5G(), CreateElecTaxDeclarationNL.ElecVatCategory5G()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 10000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesDomesticLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 20000, '1A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1A1(), CreateElecTaxDeclarationNL.ElecVatCategory1A1()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 30000, '1A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1A2(), CreateElecTaxDeclarationNL.ElecVatCategory1A2()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 40000, '1B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1B1(), CreateElecTaxDeclarationNL.ElecVatCategory1B1()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 50000, '1B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory1B2(), CreateElecTaxDeclarationNL.ElecVatCategory1B2()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 60000, '1E', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, '', '', CreateElecTaxDeclarationNL.ElecVatCategory1E(), CreateElecTaxDeclarationNL.ElecVatCategory1E()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 70000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 90000, '2A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 100000, '2A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 110000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '2A-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory2A1(), CreateElecTaxDeclarationNL.ElecVatCategory2A1()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 120000, '2A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 130000, '2A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 140000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '2A-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory2A2(), CreateElecTaxDeclarationNL.ElecVatCategory2A2()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesForeignnonEULbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 160000, '3A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 170000, '3A', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 180000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '3A', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, NonEUShipmentsLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory3A(), CreateElecTaxDeclarationNL.ElecVatCategory3A()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 190000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 200000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SalesForeignEULbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 210000, '3B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 220000, '3B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Sale, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 230000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '3B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUShipmentsLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory3B(), CreateElecTaxDeclarationNL.ElecVatCategory3B()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 240000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 250000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchasesForeignLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 260000, '4A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 270000, '4A-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 280000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4A-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignnonEUBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4A1(), CreateElecTaxDeclarationNL.ElecVatCategory4A1()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 290000, '4A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 300000, '4A-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 310000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4A-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignnonEUTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4A2(), CreateElecTaxDeclarationNL.ElecVatCategory4A2()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 320000, '4B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith21BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 330000, '4B-1', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Base, 0, true, 1, Taxedwith6BaseAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 340000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4B-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignEUBaseAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4B1(), CreateElecTaxDeclarationNL.ElecVatCategory4B1()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 350000, '4B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith21TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 360000, '4B-2', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 1, Taxedwith6TaxAmountLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 370000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '4B-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesForeignEUTaxAmountLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory4B2(), CreateElecTaxDeclarationNL.ElecVatCategory4B2()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 380000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 390000, '5A', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '1A-2|1B-2', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SubtotalSalesTaxLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory5A(), CreateElecTaxDeclarationNL.ElecVatCategory5A()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 400000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 410000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PurchasesDomesticLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 420000, '5B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Taxedwith21Lbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 430000, '5B', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::Purchase, CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::Amount, 0, true, 0, Taxedwith6Lbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 440000, '', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, PaidinadvanceLbl, '', CreateElecTaxDeclarationNL.ElecVatCategory5B(), CreateElecTaxDeclarationNL.ElecVatCategory5B()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 450000, '', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 460000, '5C', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '5A|5B', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, SubtotalLbl, '', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 470000, '5D', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '1580', CreateElecTaxDeclarationNL.ElecVatCategory5D(), CreateElecTaxDeclarationNL.ElecVatCategory5D()); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 480000, '5D-1', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '1580', '', ''); + ContosoVatStatementNL.InsertVatStatementLine(CreateVATStatement.VATTemplateName(), CreateVATStatement.VATStatementName(), 490000, '5G', Enum::"VAT Statement Line Type"::"Account Totaling", Enum::"General Posting Type"::" ", '', '', '5C|5D-1', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, '', '', CreateElecTaxDeclarationNL.ElecVatCategory5G(), CreateElecTaxDeclarationNL.ElecVatCategory5G()); ContosoVatStatementNL.SetOverwriteData(false); end; var - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; SalesDomesticLbl: Label 'Sales (Domestic)', MaxLength = 100; Taxedwith21BaseAmountLbl: Label 'Taxed with 21% (Base Amount)', MaxLength = 100; Taxedwith21TaxAmountLbl: Label 'Taxed with 21% (Tax Amount)', MaxLength = 100; diff --git a/Apps/NO/NorwegianSAFT/app/src/Export Engine/SAFTExportHeader.Table.al b/Apps/NO/NorwegianSAFT/app/src/Export Engine/SAFTExportHeader.Table.al index cbc217ea37..0ff595805e 100644 --- a/Apps/NO/NorwegianSAFT/app/src/Export Engine/SAFTExportHeader.Table.al +++ b/Apps/NO/NorwegianSAFT/app/src/Export Engine/SAFTExportHeader.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -119,16 +119,6 @@ table 10682 "SAF-T Export Header" Caption = 'Execution End Date/Time'; Editable = false; } -#if not CLEANSCHEMA24 - field(20; "SAF-T File"; Blob) - { - DataClassification = CustomerContent; - Caption = 'SAF-T File'; - ObsoleteState = Removed; - ObsoleteReason = 'Replaced with the SAF-T Export File table'; - ObsoleteTag = '24.0'; - } -#endif field(30; "Latest Data Check Date/Time"; DateTime) { DataClassification = CustomerContent; @@ -226,4 +216,4 @@ table 10682 "SAF-T Export Header" exit(false); exit("Folder Path" <> ''); end; -} +} \ No newline at end of file diff --git a/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTSetup.Table.al b/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTSetup.Table.al index d12dd656ae..0aabce33f5 100644 --- a/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTSetup.Table.al +++ b/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTSetup.Table.al @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ @@ -18,16 +18,6 @@ table 10670 "SAF-T Setup" DataClassification = CustomerContent; Caption = 'Primary Key'; } -#if not CLEANSCHEMA24 - field(2; "Dimension No. Series Code"; Code[20]) - { - DataClassification = CustomerContent; - Caption = 'Dimension No. Series Code'; - ObsoleteState = Removed; - ObsoleteReason = 'Replaced with Dimension No.'; - ObsoleteTag = '24.0'; - } -#endif field(3; "Last Tax Code"; Integer) { DataClassification = CustomerContent; @@ -102,4 +92,4 @@ table 10670 "SAF-T Setup" Clustered = true; } } -} +} \ No newline at end of file diff --git a/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTUpgrade.Codeunit.al b/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTUpgrade.Codeunit.al index e6cf2a8672..d9d337b0ab 100644 --- a/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTUpgrade.Codeunit.al +++ b/Apps/NO/NorwegianSAFT/app/src/Install and Setup/SAFTUpgrade.Codeunit.al @@ -14,38 +14,10 @@ codeunit 10678 "SAF-T Upgrade" trigger OnUpgradePerCompany() begin - UpgradeSAFTFileFromHeaderToSAFTExportFileTable(); UpgradeSAFTMediaResourcesToTenantMedia(); UpgradeExportCurrenfyInformationInSAFTExportHeader(); end; - local procedure UpgradeSAFTFileFromHeaderToSAFTExportFileTable() - var - SAFTExportHeader: Record "SAF-T Export Header"; - SAFTExportFile: Record "SAF-T Export File"; - UpgradeTag: Codeunit "Upgrade Tag"; - begin - if UpgradeTag.HasUpgradeTag(GetSAFTFileFromHeaderToSAFTExportFileTableUpgradeTag()) then - exit; - - SAFTExportHeader.SetRange(Status, SAFTExportHeader.Status::Completed); - If SAFTExportHeader.FindSet() then - repeat - SAFTExportHeader.CalcFields("SAF-T File"); - If SAFTExportHeader."SAF-T File".HasValue() then begin - SAFTExportFile.SetRange("Export ID", SAFTExportHeader.ID); - IF SAFTExportFile.FindLast() then; - SAFTExportFile.Init(); - SAFTExportFile."Export ID" := SAFTExportHeader.Id; - SAFTExportFile."File No." += 1; - SAFTExportFile."SAF-T File" := SAFTExportHeader."SAF-T File"; - SAFTExportFile.Insert(); - end; - until SAFTExportHeader.Next() = 0; - - UpgradeTag.SetUpgradeTag(GetSAFTFileFromHeaderToSAFTExportFileTableUpgradeTag()); - end; - local procedure UpgradeSAFTMediaResourcesToTenantMedia() var SAFTMappingSource: Record "SAF-T Mapping Source"; diff --git a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/Demo Data/Finance/2.Master Data/CreateNZVATStatement.Codeunit.al b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/Demo Data/Finance/2.Master Data/CreateNZVATStatement.Codeunit.al index b19c8827a4..816eedf7b6 100644 --- a/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/Demo Data/Finance/2.Master Data/CreateNZVATStatement.Codeunit.al +++ b/Apps/NZ/ContosoCoffeeDemoDatasetNZ/app/Demo Data/Finance/2.Master Data/CreateNZVATStatement.Codeunit.al @@ -12,7 +12,7 @@ codeunit 17144 "Create NZ VAT Statement" CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; CreateNZVATPostingGroup: Codeunit "Create NZ VAT Posting Group"; begin - if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = StatementNameLbl) then + if (Rec."Statement Template Name" = CreateVATStatement.VATTemplateName()) and (Rec."Statement Name" = CreateVATStatement.VATStatementName()) then case Rec."Line No." of 10000: ValidateRecordFields(Rec, '1010', SalesVat15PercOutgoingLbl, Enum::"VAT Statement Line Type"::"VAT Entry Totaling", '', Enum::"General Posting Type"::Sale, CreateVATPostingGroups.Domestic(), CreateNZVATPostingGroup.VAT15(), '', Enum::"VAT Statement Line Amount Type"::Amount, Rec."Calculate with"::Sign, false, Rec."Print with"::"Opposite Sign", '5'); @@ -109,12 +109,11 @@ codeunit 17144 "Create NZ VAT Statement" end; var - StatementNameLbl: Label 'DEFAULT', MaxLength = 10; SalesVat15PercOutgoingLbl: Label 'Sales VAT 15 % (outgoing)', MaxLength = 100; SalesVat9PercOutgoingLbl: Label 'Sales VAT 9 % (outgoing)', MaxLength = 100; Vat15PercPercOnEuPurchasesEtcLbl: Label 'VAT 15 % % on EU Purchases etc.', MaxLength = 100; Vat9PercPercOnEuPurchasesEtcLbl: Label 'VAT 9 % % on EU Purchases etc.', MaxLength = 100; - BlankLbl: Label '--------------------------------------------------', MaxLength = 100; + BlankLbl: Label '--------------------------------------------------', MaxLength = 100, Locked = true; TotalLbl: Label 'Total', MaxLength = 100; PurchaseVat15PercDomesticLbl: Label 'Purchase VAT 15 % Domestic', MaxLength = 100; PurchaseVat9PercDomesticLbl: Label 'Purchase VAT 9 % Domestic', MaxLength = 100; diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Bank/2.Master Data/CreateGenJournalLineSE.Codeunit.al b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Bank/2.Master Data/CreateGenJournalLineSE.Codeunit.al index a71408b83d..6246c2b168 100644 --- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Bank/2.Master Data/CreateGenJournalLineSE.Codeunit.al +++ b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Bank/2.Master Data/CreateGenJournalLineSE.Codeunit.al @@ -4,11 +4,6 @@ codeunit 11244 "Create Gen. Journal Line SE" EventSubscriberInstance = Manual; InherentEntitlements = X; InherentPermissions = X; - trigger OnRun() - begin - UpdateGenJournalLine(); - UpdateBankAccReconciliationLine(); - end; [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnBeforeInsertEvent', '', false, false)] local procedure OnBeforeInsertGenJournalLine(var Rec: Record "Gen. Journal Line") @@ -28,34 +23,4 @@ codeunit 11244 "Create Gen. Journal Line SE" Rec.Validate(Amount, -35981.71); end; end; - - local procedure UpdateGenJournalLine() - var - GenJournalLine: Record "Gen. Journal Line"; - CreateGenJournalTemplate: Codeunit "Create Gen. Journal Template"; - CreateBankJnlBatch: Codeunit "Create Bank Jnl. Batches"; - begin - GenJournalLine.Get(CreateGenJournalTemplate.General(), CreateBankJnlBatch.Daily(), 10000); - if GenJournalLine."Account No." = '' then begin - GenJournalLine.Validate(Amount, 0); - GenJournalLine.Modify(true); - end; - end; - - local procedure UpdateBankAccReconciliationLine() - var - BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; - BankAccount: Record "Bank Account"; - CreateBankAccount: Codeunit "Create Bank Account"; - begin - BankAccount.Get(CreateBankAccount.Checking()); - - BankAccReconciliationLine.Get(BankAccReconciliationLine."Statement Type"::"Bank Reconciliation", BankAccount."No.", BankAccount."Last Statement No.", 30000); - BankAccReconciliationLine.Validate("Transaction Text", DepositToAccountLbl); - BankAccReconciliationLine.Validate(Description, CopyStr(BankAccReconciliationLine."Transaction Text", 1, MaxStrLen(BankAccReconciliationLine.Description))); - BankAccReconciliationLine.Modify(true); - end; - - var - DepositToAccountLbl: Label 'Deposit to Account 24-01-18', MaxLength = 100; } \ No newline at end of file diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/CRM/1.Setup Data/CreateMarketingSetupSE.Codeunit.al b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/CRM/1.Setup Data/CreateMarketingSetupSE.Codeunit.al deleted file mode 100644 index b4dc853331..0000000000 --- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/CRM/1.Setup Data/CreateMarketingSetupSE.Codeunit.al +++ /dev/null @@ -1,20 +0,0 @@ -codeunit 11206 "Create Marketing Setup SE" -{ - InherentEntitlements = X; - InherentPermissions = X; - - trigger OnRun() - begin - UpdateMarketingSetup(); - end; - - local procedure UpdateMarketingSetup() - var - MarketingSetup: Record "Marketing Setup"; - begin - MarketingSetup.Get(); - - MarketingSetup.Validate("Default Country/Region Code", ''); - MarketingSetup.Modify(true); - end; -} \ No newline at end of file diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Finance/1.Setup Data/CreateAccScheduleSE.Codeunit.al b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Finance/1.Setup Data/CreateAccScheduleSE.Codeunit.al index 804f5d4cce..61578ae6d1 100644 --- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Finance/1.Setup Data/CreateAccScheduleSE.Codeunit.al +++ b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Data/Finance/1.Setup Data/CreateAccScheduleSE.Codeunit.al @@ -5,12 +5,6 @@ codeunit 11212 "Create Acc. Schedule SE" InherentEntitlements = X; InherentPermissions = X; - trigger OnRun() - begin - CreateAccScheduleName(); - CreateFinancialReport(); - end; - [EventSubscriber(ObjectType::Table, Database::"Acc. Schedule Line", 'OnBeforeInsertEvent', '', false, false)] local procedure OnBeforeInsertAccScheduleLine(var Rec: Record "Acc. Schedule Line") var @@ -96,10 +90,7 @@ codeunit 11212 "Create Acc. Schedule SE" if Rec."Schedule Name" = CreateAccountScheduleName.ReducedTrialBalance() then case Rec."Line No." of 10000: - begin - ValidateRecordFields(Rec, CreateGLAccount.TotalRevenue(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts", false); - Rec.Validate(Description, TotalRevenueLbl); - end; + ValidateRecordFields(Rec, CreateGLAccount.TotalRevenue(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts", false); 20000: ValidateRecordFields(Rec, CreateGLAccount.TotalCost(), Enum::"Acc. Schedule Line Totaling Type"::"Total Accounts", false); 40000: @@ -136,69 +127,4 @@ codeunit 11212 "Create Acc. Schedule SE" if HideCurrencySymbol then AccScheduleLine.Validate("Hide Currency Symbol", HideCurrencySymbol); end; - - local procedure CreateAccScheduleName() - var - ContosoAccountSchedule: Codeunit "Contoso Account Schedule"; - begin - ContosoAccountSchedule.InsertAccScheduleName(BalanceSheetDetailed(), BalanceSheetDetailedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(BalanceSheetSummarized(), BalanceSheetSummarizedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(IncomeStatementDetailed(), IncomeStatementDetailedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(IncomeStatementSummarized(), IncomeStatementSummarizedLbl, ''); - ContosoAccountSchedule.InsertAccScheduleName(TrialBalance(), TrialBalanceLbl, ''); - end; - - local procedure CreateFinancialReport() - var - ContosoAccountSchedule: Codeunit "Contoso Account Schedule"; - begin - ContosoAccountSchedule.SetOverwriteData(true); - ContosoAccountSchedule.InsertFinancialReport(BalanceSheetDetailed(), BalanceSheetDetailedLbl, BalanceSheetDetailed(), BalanceSheetTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(BalanceSheetSummarized(), BalanceSheetSummarizedLbl, BalanceSheetSummarized(), BalanceSheetTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(IncomeStatementDetailed(), IncomeStatementDetailedLbl, IncomeStatementDetailed(), IncomeStatementTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(IncomeStatementSummarized(), IncomeStatementSummarizedLbl, IncomeStatementSummarized(), IncomeStatementTrendLbl); - ContosoAccountSchedule.InsertFinancialReport(TrialBalance(), TrialBalanceLbl, TrialBalance(), BeginningBalanceDebitsCreditsEndingBalanceLbl); - ContosoAccountSchedule.SetOverwriteData(false); - end; - - procedure BalanceSheetDetailed(): Code[10] - begin - exit(BalanceSheetDetailedTok); - end; - - procedure BalanceSheetSummarized(): Code[10] - begin - exit(BalanceSheetSummarizedTok); - end; - - procedure IncomeStatementDetailed(): Code[10] - begin - exit(IncomeStatementDetailedTok); - end; - - procedure IncomeStatementSummarized(): Code[10] - begin - exit(IncomeStatementSummarizedTok); - end; - - procedure TrialBalance(): Code[10] - begin - exit(TrialBalanceTok); - end; - - var - BalanceSheetDetailedTok: Label 'BS DET', MaxLength = 10, Locked = true; - BalanceSheetTrendLbl: Label 'BSTREND', MaxLength = 10, Locked = true; - IncomeStatementTrendLbl: Label 'ISTREND', MaxLength = 10, Locked = true; - TrialBalanceTok: Label 'TB', MaxLength = 10, Locked = true; - BalanceSheetSummarizedTok: Label 'BS SUM', MaxLength = 10, Locked = true; - BeginningBalanceDebitsCreditsEndingBalanceLbl: Label 'BBDRCREB', MaxLength = 10, Locked = true; - IncomeStatementSummarizedTok: Label 'IS SUM', MaxLength = 10, Locked = true; - IncomeStatementDetailedTok: Label 'IS DET', MaxLength = 10, Locked = true; - BalanceSheetDetailedLbl: Label 'Balance Sheet Detailed', MaxLength = 80; - BalanceSheetSummarizedLbl: Label 'Balance Sheet Summarized', MaxLength = 80; - IncomeStatementDetailedLbl: Label 'Income Statement Detailed', MaxLength = 80; - IncomeStatementSummarizedLbl: Label 'Income Statement Summarized', MaxLength = 80; - TrialBalanceLbl: Label 'Trial Balance', MaxLength = 80; - TotalRevenueLbl: Label 'Total Revenue', MaxLength = 100; } \ No newline at end of file diff --git a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Tool/SEContosoLocalization.Codeunit.al b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Tool/SEContosoLocalization.Codeunit.al index 4ead59e49e..2c8c4c7e77 100644 --- a/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Tool/SEContosoLocalization.Codeunit.al +++ b/Apps/SE/ContosoCoffeeDemoDatasetSE/app/Demo Tool/SEContosoLocalization.Codeunit.al @@ -18,10 +18,6 @@ codeunit 11214 "SE Contoso Localization" FixedAssetModule(ContosoDemoDataLevel); if Module = Enum::"Contoso Demo Data Module"::Inventory then InventoryModule(ContosoDemoDataLevel); - if Module = Enum::"Contoso Demo Data Module"::Bank then - BankModule(ContosoDemoDataLevel); - if Module = Enum::"Contoso Demo Data Module"::CRM then - CRMModule(ContosoDemoDataLevel); UnBindSubscriptionDemoData(Module); end; @@ -54,7 +50,6 @@ codeunit 11214 "SE Contoso Localization" Enum::"Contoso Demo Data Level"::"Master Data": begin Codeunit.Run(Codeunit::"Create Currency Ex. Rate SE"); - Codeunit.Run(Codeunit::"Create Acc. Schedule SE"); Codeunit.Run(Codeunit::"Create VAT Setup PostingGrp SE"); Codeunit.Run(Codeunit::"Create VAT Statement SE"); end; @@ -80,14 +75,6 @@ codeunit 11214 "SE Contoso Localization" end; end; - local procedure CRMModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level") - begin - case ContosoDemoDataLevel of - Enum::"Contoso Demo Data Level"::"Setup Data": - Codeunit.Run(Codeunit::"Create Marketing Setup SE"); - end; - end; - local procedure HumanResourceModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level") begin case ContosoDemoDataLevel of @@ -101,14 +88,6 @@ codeunit 11214 "SE Contoso Localization" end; end; - local procedure BankModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level") - begin - case ContosoDemoDataLevel of - Enum::"Contoso Demo Data Level"::"Historical Data": - Codeunit.Run(Codeunit::"Create Gen. Journal Line SE"); - end; - end; - local procedure InventoryModule(ContosoDemoDataLevel: Enum "Contoso Demo Data Level") begin case ContosoDemoDataLevel of diff --git a/Apps/US/HybridBCLast_US/app/src/tables/StgDataExchDefUS.Table.al b/Apps/US/HybridBCLast_US/app/src/tables/StgDataExchDefUS.Table.al deleted file mode 100644 index 6643645403..0000000000 --- a/Apps/US/HybridBCLast_US/app/src/tables/StgDataExchDefUS.Table.al +++ /dev/null @@ -1,29 +0,0 @@ -#if not CLEANSCHEMA24 -table 4043 "Stg Data Exch Def US" -{ - ReplicateData = false; - Extensible = false; - ObsoleteState = Removed; - ObsoleteReason = 'This functionality will be replaced by invoking the actual upgrade from each of the apps'; - ObsoleteTag = '24.0'; - fields - { - field(1; "Code"; Code[20]) - { - DataClassification = CustomerContent; - } - field(3; Type; Enum "Data Exchange Definition Type") - { - DataClassification = CustomerContent; - } - } - - keys - { - key(PK; Code) - { - Clustered = true; - } - } -} -#endif \ No newline at end of file diff --git a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocHeader.Table.al b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocHeader.Table.al index dd61af4ac3..a4cf0db166 100644 --- a/Apps/US/IRSForms/app/src/Document/IRS1099FormDocHeader.Table.al +++ b/Apps/US/IRSForms/app/src/Document/IRS1099FormDocHeader.Table.al @@ -121,6 +121,7 @@ table 10035 "IRS 1099 Form Doc. Header" CannotCreateFormDocSamePeriodVendorFormErr: Label 'You cannot create multiple form documents with the same period, vendor and form.'; EmailAddressChangeQst: Label 'The email address has been changed. Do you want to continue?'; CannotMakeChangeWhenLineExistErr: Label 'You cannot make this change when one or more lines exist.'; + UniquenessFilterModifiedErr: Label 'It is not allowed to modify the period, vendor or form uniqueness filter in the customization.'; trigger OnDelete() var @@ -160,7 +161,23 @@ table 10035 "IRS 1099 Form Doc. Header" IRS1099FormDocHeader.SetRange("Period No.", "Period No."); IRS1099FormDocHeader.SetRange("Vendor No.", "Vendor No."); IRS1099FormDocHeader.SetRange("Form No.", "Form No."); + AddPeriodFormVendUniquenessFilters(IRS1099FormDocHeader); if not IRS1099FormDocHeader.IsEmpty() then Error(CannotCreateFormDocSamePeriodVendorFormErr); end; + + local procedure AddPeriodFormVendUniquenessFilters(var IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header") + begin + OnAddPeriodFormVendUniquenessFilters(IRS1099FormDocHeader); + if (IRS1099FormDocHeader.GetFilter("Period No.") <> Rec."Period No.") or + (IRS1099FormDocHeader.GetFilter("Vendor No.") <> Rec."Vendor No.") or + (IRS1099FormDocHeader.GetFilter("Form No.") <> Rec."Form No.") + then + Error(UniquenessFilterModifiedErr); + end; + + [IntegrationEvent(false, false)] + local procedure OnAddPeriodFormVendUniquenessFilters(var IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header") + begin + end; } diff --git a/Apps/W1/APIV2/app/src/pages/APIV2SalespersonPurchaser.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2SalespersonPurchaser.Page.al new file mode 100644 index 0000000000..77bd6f55d2 --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2SalespersonPurchaser.Page.al @@ -0,0 +1,73 @@ +namespace Microsoft.API.V2; + +using Microsoft.CRM.Team; + +page 30075 "APIV2 - Salesperson/Purchaser" +{ + DelayedInsert = true; + APIVersion = 'v2.0'; + EntityCaption = 'Salesperson/Purchaser'; + EntitySetCaption = 'Salespeople/Purchasers'; + PageType = API; + ODataKeyFields = SystemId; + EntityName = 'salespersonPurchaser'; + EntitySetName = 'salespeoplePurchasers'; + SourceTable = "Salesperson/Purchaser"; + Extensible = false; + + layout + { + area(Content) + { + repeater(Group) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + Editable = false; + } + field(code; Rec."Code") + { + Caption = 'Code'; + } + field(displayName; Rec.Name) + { + Caption = 'Name'; + } + field(email; Rec."E-Mail") + { + Caption = 'Email'; + } + field(email2; Rec."E-Mail 2") + { + Caption = 'Email 2'; + } + field(phoneNo; Rec."Phone No.") + { + Caption = 'Phone No.'; + } + field(jobTitle; Rec."Job Title") + { + Caption = 'Job Title'; + } + field(commisionPercent; Rec."Commission %") + { + Caption = 'Commission %'; + } + field(privacyBlocked; Rec."Privacy Blocked") + { + Caption = 'Privacy Blocked'; + } + field(blocked; Rec.Blocked) + { + Caption = 'Blocked'; + } + field(lastModifiedDateTime; Rec.SystemModifiedAt) + { + Caption = 'Last Modified Date'; + Editable = false; + } + } + } + } +} diff --git a/Apps/W1/APIV2/test/src/APIV2SalespersonPurchE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2SalespersonPurchE2E.Codeunit.al new file mode 100644 index 0000000000..2c2c86a25f --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2SalespersonPurchE2E.Codeunit.al @@ -0,0 +1,171 @@ +codeunit 139882 "APIV2 - Salesperson/Purch E2E" +{ + Subtype = Test; + + var + Assert: Codeunit Assert; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + LibraryUtility: Codeunit "Library - Utility"; + LibraryRandom: Codeunit "Library - Random"; + IsInitialized: Boolean; + EmptyJSONErr: Label 'JSON should not be empty.', Locked = true; + ServiceNameTxt: Label 'salespeoplePurchasers', Locked = true; + + local procedure Initialize() + begin + if IsInitialized then + exit; + + IsInitialized := true; + Commit(); + end; + + [Test] + procedure GetSalespersonPurchaser() + var + SalespersonPurchaser: Record "Salesperson/Purchaser"; + Response: Text; + TargetURL: Text; + begin + // [SCENARIO] User can get a salesperson/purchaser with a GET request to the service. + Initialize(); + + // [GIVEN] A salesperson/purchaser exists in the system. + CreateSalespersonPurchaser(SalespersonPurchaser); + + // [WHEN] The user makes a GET request for a given salesperson/purchaser. + TargetURL := LibraryGraphMgt.CreateTargetURL(SalespersonPurchaser.SystemId, Page::"APIV2 - Salesperson/Purchaser", ServiceNameTxt); + LibraryGraphMgt.GetFromWebService(Response, TargetURL); + + // [THEN] The response text contains the information about salesperson/purchaser. + VerifyProperties(Response, SalespersonPurchaser); + end; + + [Test] + procedure CreateSalespersonPurchaser() + var + SalespersonPurchaser: Record "Salesperson/Purchaser"; + TempSalespersonPurchaser: Record "Salesperson/Purchaser" temporary; + SalespersonPurchaserJSON: Text; + TargetURL: Text; + Response: Text; + begin + // [SCENARIO] User can create a new salesperson/purchaser through a POST method. + Initialize(); + + // [GIVEN] The user has constructed a salesperson/purchaser JSON object to send to the service. + CreateSalespersonPurchaser(TempSalespersonPurchaser); + SalespersonPurchaserJSON := GetSalespersonPurchaserJSON(TempSalespersonPurchaser); + + // [WHEN] The user posts the JSON to the service. + TargetURL := LibraryGraphMgt.CreateTargetURL('', Page::"APIV2 - Salesperson/Purchaser", ServiceNameTxt); + LibraryGraphMgt.PostToWebService(TargetURL, SalespersonPurchaserJSON, Response); + + // [THEN] The salesperson/purchaser has been created in the database with all the details. + SalespersonPurchaser.Get(TempSalespersonPurchaser.Code); + VerifyProperties(Response, SalespersonPurchaser); + end; + + [Test] + procedure ModifySalespersonPurchaserJobTitle() + var + SalespersonPurchaser: Record "Salesperson/Purchaser"; + TempSalespersonPurchaser: Record "Salesperson/Purchaser" temporary; + RequestBody: Text; + Response: Text; + TargetURL: Text; + begin + // [SCENARIO] User can modify a salesperson/purchaser through a PATCH request. + Initialize(); + + // [GIVEN] A salesperson/purchaser exists. + CreateSalespersonPurchaser(SalespersonPurchaser); + TempSalespersonPurchaser.TransferFields(SalespersonPurchaser); + TempSalespersonPurchaser."Job Title" := LibraryUtility.GenerateGUID(); + RequestBody := GetSalespersonPurchaserJSON(TempSalespersonPurchaser); + + // [WHEN] The user makes a patch request to the service and specifies Job Title field. + TargetURL := LibraryGraphMgt.CreateTargetURL(SalespersonPurchaser.SystemId, Page::"APIV2 - Salesperson/Purchaser", ServiceNameTxt); + LibraryGraphMgt.PatchToWebService(TargetURL, RequestBody, Response); + + // [THEN] The response contains the new values. + VerifyProperties(Response, TempSalespersonPurchaser); + + // [THEN] The salesperson/purchaser in the database contains the updated values. + SalespersonPurchaser.Get(SalespersonPurchaser.Code); + Assert.AreEqual(SalespersonPurchaser."Job Title", TempSalespersonPurchaser."Job Title", 'Job Title should be equal.'); + end; + + [Test] + procedure DeleteSalespersonPurchaser() + var + SalespersonPurchaser: Record "Salesperson/Purchaser"; + SalespersonPurchaserCode: Code[10]; + TargetURL: Text; + Response: Text; + begin + // [SCENARIO] User can delete a salesperson/purchaser by making a DELETE request. + Initialize(); + + // [GIVEN] A salesperson/purchaser exists. + CreateSalespersonPurchaser(SalespersonPurchaser); + SalespersonPurchaserCode := SalespersonPurchaser.Code; + + // [WHEN] The user makes a DELETE request to the endpoint for the salesperson/purchaser. + TargetURL := LibraryGraphMgt.CreateTargetURL(SalespersonPurchaser.SystemId, Page::"APIV2 - Salesperson/Purchaser", ServiceNameTxt); + LibraryGraphMgt.DeleteFromWebService(TargetURL, '', Response); + + // [THEN] The response is empty. + Assert.AreEqual('', Response, 'DELETE response should be empty.'); + + // [THEN] The salesperson/purchaser is no longer in the database. + SalespersonPurchaser.SetRange(Code, SalespersonPurchaserCode); + Assert.IsTrue(SalespersonPurchaser.IsEmpty(), 'Salesperson/Purchaser should be deleted.'); + end; + + local procedure CreateSalespersonPurchaser(var SalespersonPurchaser: Record "Salesperson/Purchaser"): Code[20] + begin + SalespersonPurchaser.Init(); + SalespersonPurchaser.Validate( + Code, LibraryUtility.GenerateRandomCode(SalespersonPurchaser.FieldNo(Code), DATABASE::"Salesperson/Purchaser")); + SalespersonPurchaser.Name := LibraryUtility.GenerateRandomText(50); + SalespersonPurchaser."E-Mail" := LibraryUtility.GenerateRandomEmail(); + SalespersonPurchaser."E-Mail 2" := LibraryUtility.GenerateRandomEmail(); + SalespersonPurchaser."Phone No." := LibraryUtility.GenerateRandomPhoneNo(); + SalespersonPurchaser."Job Title" := LibraryUtility.GenerateRandomText(30); + SalespersonPurchaser."Commission %" := LibraryRandom.RandDec(100, 2); + SalespersonPurchaser."Privacy Blocked" := true; + SalespersonPurchaser.Blocked := true; + SalespersonPurchaser."Coupled to Dataverse" := true; + SalespersonPurchaser.Insert(true); + Commit(); + exit(SalespersonPurchaser.Code); + end; + + local procedure GetSalespersonPurchaserJSON(var SalespersonPurchaser: Record "Salesperson/Purchaser") SalespersonPurchaserJSON: Text + begin + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'code', SalespersonPurchaser.Code); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'displayName', SalespersonPurchaser.Name); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'email', SalespersonPurchaser."E-Mail"); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'email2', SalespersonPurchaser."E-Mail 2"); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'phoneNo', SalespersonPurchaser."Phone No."); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'jobTitle', SalespersonPurchaser."Job Title"); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'commisionPercent', SalespersonPurchaser."Commission %"); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'privacyBlocked', SalespersonPurchaser."Privacy Blocked"); + SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'blocked', SalespersonPurchaser.Blocked); + exit(SalespersonPurchaserJSON); + end; + + local procedure VerifyProperties(JSON: Text; SalespersonPurchaser: Record "Salesperson/Purchaser") + begin + Assert.AreNotEqual('', JSON, EmptyJSONErr); + LibraryGraphMgt.VerifyIDInJSON(JSON); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'code', SalespersonPurchaser.Code); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'displayName', SalespersonPurchaser.Name); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'email', SalespersonPurchaser."E-Mail"); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'email2', SalespersonPurchaser."E-Mail 2"); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'phoneNo', SalespersonPurchaser."Phone No."); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'jobTitle', SalespersonPurchaser."Job Title"); + LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'commisionPercent', Format(SalespersonPurchaser."Commission %", 0, 9)); + end; +} diff --git a/Apps/W1/BankDeposits/app/src/codeunits/UpgradeBankDeposits.Codeunit.al b/Apps/W1/BankDeposits/app/src/codeunits/UpgradeBankDeposits.Codeunit.al index 1d693bd849..19c95c872e 100644 --- a/Apps/W1/BankDeposits/app/src/codeunits/UpgradeBankDeposits.Codeunit.al +++ b/Apps/W1/BankDeposits/app/src/codeunits/UpgradeBankDeposits.Codeunit.al @@ -3,10 +3,6 @@ namespace Microsoft.Bank.Deposit; using System.Environment; using System.Upgrade; using Microsoft.Foundation.Reporting; -using System.Reflection; -using Microsoft.Bank.Reconciliation; -using Microsoft.Bank.Ledger; -using Microsoft.Bank.Check; using Microsoft.Bank.Reports; codeunit 1714 "Upgrade Bank Deposits" @@ -26,8 +22,7 @@ codeunit 1714 "Upgrade Bank Deposits" exit; if UpgradeTag.HasUpgradeTag(UpgTagDefBankDeposits.GetNADepositsUpgradeTag()) then exit; - UpgradeNADepositsIntoBankDeposits(); - UpgradeNABankRecWorksheetsIntoBankReconciliations(); + #if not CLEAN24 SetDepositsPageMgtPages(); #endif @@ -83,251 +78,4 @@ codeunit 1714 "Upgrade Bank Deposits" DepositsPageMgt.SetSetupKey(Enum::"Deposits Page Setup Key"::PostedBankDepositListPage, Page::"Posted Bank Deposit List"); end; #endif - - local procedure UpgradeNADepositsIntoBankDeposits() - var - BankDepositHeader: Record "Bank Deposit Header"; - DepositHeaderRecRef: RecordRef; - BankDepositHeaderRecRef: RecordRef; - PreviousDepositNoFieldRef: FieldRef; - PreviousDepositNo: Code[20]; - DepositsTableId: Integer; - begin - DepositsTableId := 10140; - DepositHeaderRecRef.Open(DepositsTableId, false); - if DepositHeaderRecRef.IsEmpty() then - exit; - DepositHeaderRecRef.FindSet(); - BankDepositHeaderRecRef.Open(Database::"Bank Deposit Header", false); - repeat - PreviousDepositNoFieldRef := DepositHeaderRecRef.Field(BankDepositHeader.FieldNo("No.")); - PreviousDepositNo := PreviousDepositNoFieldRef.Value(); - if not BankDepositHeader.Get(PreviousDepositNo) then begin - BankDepositHeaderRecRef.Init(); - TransferFields(BankDepositHeaderRecRef, DepositHeaderRecRef); - BankDepositHeaderRecRef.Insert(); - end; - until DepositHeaderRecRef.Next() = 0; - end; - - local procedure TransferFields(var TargetRecRef: RecordRef; var SourceRecRef: RecordRef) - var - Field: Record Field; - SourceFieldRef: FieldRef; - TargetFieldRef: FieldRef; - begin - Field.SetRange(TableNo, SourceRecRef.Number()); - repeat - if TryGetFieldRef(SourceRecRef, SourceFieldRef, Field."No.") and TryGetFieldRef(TargetRecRef, TargetFieldRef, Field."No.") then - TargetFieldRef.Value(SourceFieldRef.Value()); - until Field.Next() = 0; - end; - - [TryFunction()] - local procedure TryGetFieldRef(var RecordRef: RecordRef; var FieldRef: FieldRef; FieldNo: Integer) - begin - FieldRef := RecordRef.Field(FieldNo); - end; - - - local procedure UpgradeNABankRecWorksheetsIntoBankReconciliations() - var - BankAccReconciliation: Record "Bank Acc. Reconciliation"; - BankRecHeaderRecRef: RecordRef; - BankRecHeaderStatementNoFieldRef: FieldRef; - BankRecHeaderBankAccountNoFieldRef: FieldRef; - StatementNo: Code[20]; - BankAccountNo: Code[20]; - BankRecHeaderTableId: Integer; - begin - BankRecHeaderTableId := 10120; - BankRecHeaderRecRef.Open(BankRecHeaderTableId, false); - if BankRecHeaderRecRef.IsEmpty() then - exit; - BankRecHeaderRecRef.FindSet(); - repeat - BankRecHeaderStatementNoFieldRef := BankRecHeaderRecRef.Field(BankAccReconciliation.FieldNo("Statement No.")); - BankRecHeaderBankAccountNoFieldRef := BankRecHeaderRecRef.Field(BankAccReconciliation.FieldNo("Bank Account No.")); - StatementNo := BankRecHeaderStatementNoFieldRef.Value(); - BankAccountNo := BankRecHeaderBankAccountNoFieldRef.Value(); - if not BankAccReconciliation.Get(BankAccReconciliation."Statement Type"::"Bank Reconciliation", BankAccountNo, StatementNo) then - TransferBankReconciliation(BankRecHeaderRecRef, BankAccountNo, StatementNo); - until BankRecHeaderRecRef.Next() = 0; - end; - - local procedure TransferBankReconciliation(var BankRecHeaderRecRef: RecordRef; BankAccountNo: Code[20]; StatementNo: Code[20]) - var - BankAccReconciliation: Record "Bank Acc. Reconciliation"; - BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; - BankRecLineRecRef: RecordRef; - BankRecLineFieldRef: FieldRef; - BankRecLineTableId, StatementLineNo : Integer; - begin - BankRecLineTableId := 10121; - BankAccReconciliation."Statement Type" := BankAccReconciliation."Statement Type"::"Bank Reconciliation"; - BankAccReconciliation."Bank Account No." := BankAccountNo; - BankAccReconciliation."Statement No." := StatementNo; - - BankAccReconciliation."Statement Ending Balance" := GetRecRefFieldFromFieldName(BankRecHeaderRecRef, 'Statement Balance').Value(); - BankAccReconciliation."Statement Date" := GetRecRefFieldFromFieldName(BankRecHeaderRecRef, 'Statement Date').Value(); - BankAccReconciliation."Dimension Set ID" := GetRecRefFieldFromFieldName(BankRecHeaderRecRef, 'Dimension Set ID').Value(); - BankAccReconciliation.Insert(); - - UnmatchBankLedgerEntries(BankAccountNo, StatementNo); - - BankRecLineRecRef.Open(BankRecLineTableId, false); - BankRecLineFieldRef := BankRecLineRecRef.Field(BankAccReconciliationLine.FieldNo("Bank Account No.")); - BankRecLineFieldRef.SetRange(BankAccountNo); - BankRecLineFieldRef := BankRecLineRecRef.Field(BankAccReconciliationLine.FieldNo("Statement No.")); - BankRecLineFieldRef.SetRange(StatementNo); - TransferCheckLines(BankRecLineRecRef, StatementLineNo, BankAccountNo, StatementNo); - TransferDepositAndAdjustmentLines(BankRecLineRecRef, StatementLineNo, BankAccountNo, StatementNo); - end; - - local procedure TransferDepositAndAdjustmentLines(var BankRecLineRecRef: RecordRef; var StatementLineNo: Integer; BankAccountNo: Code[20]; StatementNo: Code[20]) - var - StatementAmount: Decimal; - begin - GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Record Type').SetFilter('%1|%2', 1, 2); - if BankRecLineRecRef.IsEmpty() then - exit; - BankRecLineRecRef.FindSet(); - repeat - StatementAmount := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Cleared Amount').Value(); - InsertBankReconciliationLine(BankAccountNo, StatementNo, StatementAmount, BankRecLineRecRef, StatementLineNo); - until BankRecLineRecRef.Next() = 0; - end; - - local procedure GetRecRefFieldFromFieldName(var RecRef: RecordRef; FieldName: Text[30]): FieldRef - begin - exit(RecRef.Field(GetFieldNo(RecRef.Number(), FieldName))); - end; - - local procedure GetFieldNo(TableId: Integer; FieldName: Text[30]): Integer - var - Field: Record Field; - begin - Field.SetRange(TableNo, TableId); - Field.SetRange(FieldName, FieldName); - Field.FindFirst(); - exit(Field."No."); - end; - - local procedure TransferCheckLines(var BankRecLineRecRef: RecordRef; var StatementLineNo: Integer; BankAccountNo: Code[20]; StatementNo: Code[20]) - var - StatementAmount: Decimal; - begin - GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Record Type').SetRange(0); - if BankRecLineRecRef.IsEmpty() then - exit; - BankRecLineRecRef.FindSet(); - repeat - StatementAmount := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Cleared Amount').Value(); - StatementAmount *= -1; // check lines are positive in NA's BankRecLine, although Bank entries are negative - InsertBankReconciliationLine(BankAccountNo, StatementNo, StatementAmount, BankRecLineRecRef, StatementLineNo); - until BankRecLineRecRef.Next() = 0; - end; - - local procedure InsertBankReconciliationLine(BankAccountNo: Code[20]; StatementNo: Code[20]; StatementAmount: Decimal; var BankRecLineRecRef: RecordRef; var StatementLineNo: Integer) - var - BankAccountLedgerEntry: Record "Bank Account Ledger Entry"; - BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; - MatchBankRecLines: Codeunit "Match Bank Rec. Lines"; - BankLedgerEntryNo: Integer; - begin - if not GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Cleared').Value() then - exit; - StatementLineNo += 10000; - BankAccReconciliationLine."Bank Account No." := BankAccountNo; - BankAccReconciliationLine."Statement No." := StatementNo; - BankAccReconciliationLine."Statement Line No." := StatementLineNo; - BankAccReconciliationLine."Transaction Date" := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Posting Date').Value(); - BankAccReconciliationLine.Description := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Description').Value(); - BankAccReconciliationLine."Statement Amount" := StatementAmount; - BankAccReconciliationLine."Statement Type" := BankAccReconciliationLine."Statement Type"::"Bank Reconciliation"; - BankAccReconciliationLine."Shortcut Dimension 1 Code" := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Shortcut Dimension 1 Code').Value(); - BankAccReconciliationLine."Shortcut Dimension 2 Code" := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Shortcut Dimension 2 Code').Value(); - BankAccReconciliationLine."Dimension Set ID" := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Dimension Set ID').Value(); - BankAccReconciliationLine."Applied Entries" := 0; - BankAccReconciliationLine.Insert(); - BankAccReconciliationLine.Validate("Applied Amount", 0); - BankLedgerEntryNo := GetRecRefFieldFromFieldName(BankRecLineRecRef, 'Bank Ledger Entry No.').Value(); - if BankLedgerEntryNo <> 0 then - if BankAccountLedgerEntry.Get(BankLedgerEntryNo) then - if ShouldMatch(BankAccountLedgerEntry) then begin - BankAccountLedgerEntry.SetRecFilter(); - BankAccReconciliationLine.SetRecFilter(); - MatchBankRecLines.MatchManually(BankAccReconciliationLine, BankAccountLedgerEntry); - end; - end; - - local procedure ShouldMatch(BankAccountLedgerEntry: Record "Bank Account Ledger Entry"): Boolean - var - CheckLedgerEntry: Record "Check Ledger Entry"; - begin - if not BankAccountLedgerEntry.Open then - exit(false); - if BankAccountLedgerEntry."Statement No." <> '' then - exit(false); - if BankAccountLedgerEntry."Statement Line No." <> 0 then - exit(false); - CheckLedgerEntry.ReadIsolation := CheckLedgerEntry.ReadIsolation::ReadCommitted; - CheckLedgerEntry.SetRange("Bank Account Ledger Entry No.", BankAccountLedgerEntry."Entry No."); - CheckLedgerEntry.SetRange(Open, true); - if not CheckLedgerEntry.FindSet() then - exit(true); - repeat - if CheckLedgerEntry."Statement No." <> '' then - exit(false); - if CheckLedgerEntry."Statement Line No." <> 0 then - exit(false); - if CheckLedgerEntry."Statement Status" <> CheckLedgerEntry."Statement Status"::Open then - exit(false); - until CheckLedgerEntry.Next() = 0; - exit(true); - end; - - - local procedure UnmatchBankLedgerEntries(BankAccountNo: Code[20]; StatementNo: Code[20]) - var - BankAccountLedgerEntry: Record "Bank Account Ledger Entry"; - CheckLedgerEntry: Record "Check Ledger Entry"; - begin - if (BankAccountNo = '') or (StatementNo = '') then - exit; - BankAccountLedgerEntry.SetRange("Bank Account No.", BankAccountNo); - BankAccountLedgerEntry.SetRange("Statement No.", StatementNo); - BankAccountLedgerEntry.SetRange(Open, true); - if not BankAccountLedgerEntry.IsEmpty() then begin - BankAccountLedgerEntry.FindSet(); - repeat - BankAccountLedgerEntry."Statement Status" := BankAccountLedgerEntry."Statement Status"::Open; - BankAccountLedgerEntry."Statement No." := ''; - BankAccountLedgerEntry."Statement Line No." := 0; - Clear(CheckLedgerEntry); - CheckLedgerEntry.SetRange("Bank Account Ledger Entry No.", BankAccountLedgerEntry."Entry No."); - if not CheckLedgerEntry.IsEmpty() then begin - CheckLedgerEntry.FindSet(); - repeat - CheckLedgerEntry."Statement Status" := CheckLedgerEntry."Statement Status"::Open; - CheckLedgerEntry."Statement No." := ''; - CheckLedgerEntry."Statement Line No." := 0; - CheckLedgerEntry.Modify(); - until CheckLedgerEntry.Next() = 0; - end; - BankAccountLedgerEntry.Modify(); - until BankAccountLedgerEntry.Next() = 0; - end; - Clear(CheckLedgerEntry); - CheckLedgerEntry.SetRange("Bank Account No.", BankAccountNo); - CheckLedgerEntry.SetRange("Statement No.", StatementNo); - CheckLedgerEntry.SetRange(Open, true); - if CheckLedgerEntry.IsEmpty() then - exit; - CheckLedgerEntry.ModifyAll("Statement Status", CheckLedgerEntry."Statement Status"::Open); - CheckLedgerEntry.ModifyAll("Statement No.", ''); - CheckLedgerEntry.ModifyAll("Statement Line No.", 0); - end; - - } \ No newline at end of file diff --git a/Apps/W1/BankDeposits/app/src/pages/BankDepositSubform.Page.al b/Apps/W1/BankDeposits/app/src/pages/BankDepositSubform.Page.al index 05dae73824..5845ff97df 100644 --- a/Apps/W1/BankDeposits/app/src/pages/BankDepositSubform.Page.al +++ b/Apps/W1/BankDeposits/app/src/pages/BankDepositSubform.Page.al @@ -432,7 +432,8 @@ page 1693 "Bank Deposit Subform" Rec."Currency Factor" := BankDepositHeader."Currency Factor"; Rec."Document Date" := BankDepositHeader."Document Date"; Rec."Posting Date" := BankDepositHeader."Posting Date"; - Rec."Document No." := BankDepositHeader."No."; + if BankDepositHeader."Post as Lump Sum" or (Rec."Document No." = '') then + Rec."Document No." := BankDepositHeader."No."; Rec."External Document No." := ''; Rec."Reason Code" := BankDepositHeader."Reason Code"; end; diff --git a/Apps/W1/CompanyHub/app/src/Setup/CompanyHub.Profile.al b/Apps/W1/CompanyHub/app/src/Setup/CompanyHub.Profile.al index 2b74fb841e..c1ed82b796 100644 --- a/Apps/W1/CompanyHub/app/src/Setup/CompanyHub.Profile.al +++ b/Apps/W1/CompanyHub/app/src/Setup/CompanyHub.Profile.al @@ -5,5 +5,4 @@ profile "CompanyHub" Caption = 'Company Hub'; ProfileDescription = 'For users that primarily do work in other companies. Company Hub gives you a list of links to the companies you work in.'; RoleCenter = 1151; - Promoted = true; } \ No newline at end of file diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Bank/4.Historical/PostBankPaymentEntry.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Bank/4.Historical/PostBankPaymentEntry.Codeunit.al index 75b1d5e746..86229fdcde 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Bank/4.Historical/PostBankPaymentEntry.Codeunit.al +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Bank/4.Historical/PostBankPaymentEntry.Codeunit.al @@ -1,5 +1,8 @@ codeunit 5667 "Post Bank Payment Entry" { + InherentEntitlements = X; + InherentPermissions = X; + trigger OnRun() var GenJournalLine: Record "Gen. Journal Line"; diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateCurrency.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateCurrency.Codeunit.al index 6959516b9f..3eee3f5277 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateCurrency.Codeunit.al +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/1.Setup data/CreateCurrency.Codeunit.al @@ -300,52 +300,52 @@ codeunit 5525 "Create Currency" end; var - EuroLbl: Label 'Euro'; - AustraliandollarLbl: Label 'Australian dollar'; - BulgarianlevaLbl: Label 'Bulgarian leva'; - BruneiDarussalemdollarLbl: Label 'Brunei Darussalem dollar'; - BrazilianrealLbl: Label 'Brazilian real'; - CanadiandollarLbl: Label 'Canadian dollar'; - CroatianKunaLbl: Label 'Croatian Kuna'; - SwissfrancLbl: Label 'Swiss franc'; - CzechkorunaLbl: Label 'Czech koruna'; - DanishkroneLbl: Label 'Danish krone'; - FijidollarLbl: Label 'Fiji dollar'; - BritishpoundLbl: Label 'Pound Sterling'; - HongKongdollarLbl: Label 'Hong Kong dollar'; - IndonesianrupiahLbl: Label 'Indonesian rupiah'; - JapaneseyenLbl: Label 'Japanese yen'; - IndianrupeeLbl: Label 'Indian rupee'; - IcelandickronaLbl: Label 'Icelandic krona'; - MalaysianringgitLbl: Label 'Malaysian ringgit'; - MexicanpesoLbl: Label 'Mexican peso'; - NorwegiankroneLbl: Label 'Norwegian krone'; - NewZealanddollarLbl: Label 'New Zealand dollar'; - PhilippinespesoLbl: Label 'Philippines peso'; - PolishzlotyLbl: Label 'Polish zloty'; - RussianrubleLbl: Label 'Russian ruble'; - SwedishkronaLbl: Label 'Swedish krona'; - SingaporedollarLbl: Label 'Singapore dollar'; - SaudiArabianryialLbl: Label 'Saudi Arabian ryial'; - SolomonIslandsdollarLbl: Label 'Solomon Islands dollar'; - ThaibahtLbl: Label 'Thai baht'; - USdollarLbl: Label 'US dollar'; - VanuatuvatuLbl: Label 'Vanuatu vatu'; - WesternSamoantalaLbl: Label 'Western Samoan tala'; - SouthAfricanrandLbl: Label 'South African rand'; - UnitedArabEmiratesdirhamLbl: Label 'United Arab Emirates dirham'; - AlgeriandinarLbl: Label 'Algerian dinar'; - HungarianforintLbl: Label 'Hungarian forint'; - KenyanShillingLbl: Label 'Kenyan Shilling'; - MoroccandirhamLbl: Label 'Moroccan dirham'; - MozambiquemeticalLbl: Label 'Mozambique metical'; - NigeriannairaLbl: Label 'Nigerian naira'; - RomanianleuLbl: Label 'Romanian leu'; - SwazilandlilangeniLbl: Label 'Swaziland lilangeni'; - SerbianDinarLbl: Label 'Serbian Dinar'; - TunesiandinarLbl: Label 'Tunesian dinar'; - UgandanShillingLbl: Label 'Ugandan Shilling'; - NewTurkishliraLbl: Label 'New Turkish lira'; - TonganPaangaLbl: Label 'Tongan Pa anga'; - FrenchPacificFrancLbl: Label 'French Pacific Franc'; + EuroLbl: Label 'Euro', MaxLength = 30; + AustraliandollarLbl: Label 'Australian dollar', MaxLength = 30; + BulgarianlevaLbl: Label 'Bulgarian leva', MaxLength = 30; + BruneiDarussalemdollarLbl: Label 'Brunei Darussalem dollar', MaxLength = 30; + BrazilianrealLbl: Label 'Brazilian real', MaxLength = 30; + CanadiandollarLbl: Label 'Canadian dollar', MaxLength = 30; + CroatianKunaLbl: Label 'Croatian Kuna', MaxLength = 30; + SwissfrancLbl: Label 'Swiss franc', MaxLength = 30; + CzechkorunaLbl: Label 'Czech koruna', MaxLength = 30; + DanishkroneLbl: Label 'Danish krone', MaxLength = 30; + FijidollarLbl: Label 'Fiji dollar', MaxLength = 30; + BritishpoundLbl: Label 'Pound Sterling', MaxLength = 30; + HongKongdollarLbl: Label 'Hong Kong dollar', MaxLength = 30; + IndonesianrupiahLbl: Label 'Indonesian rupiah', MaxLength = 30; + JapaneseyenLbl: Label 'Japanese yen', MaxLength = 30; + IndianrupeeLbl: Label 'Indian rupee', MaxLength = 30; + IcelandickronaLbl: Label 'Icelandic krona', MaxLength = 30; + MalaysianringgitLbl: Label 'Malaysian ringgit', MaxLength = 30; + MexicanpesoLbl: Label 'Mexican peso', MaxLength = 30; + NorwegiankroneLbl: Label 'Norwegian krone', MaxLength = 30; + NewZealanddollarLbl: Label 'New Zealand dollar', MaxLength = 30; + PhilippinespesoLbl: Label 'Philippines peso', MaxLength = 30; + PolishzlotyLbl: Label 'Polish zloty', MaxLength = 30; + RussianrubleLbl: Label 'Russian ruble', MaxLength = 30; + SwedishkronaLbl: Label 'Swedish krona', MaxLength = 30; + SingaporedollarLbl: Label 'Singapore dollar', MaxLength = 30; + SaudiArabianryialLbl: Label 'Saudi Arabian ryial', MaxLength = 30; + SolomonIslandsdollarLbl: Label 'Solomon Islands dollar', MaxLength = 30; + ThaibahtLbl: Label 'Thai baht', MaxLength = 30; + USdollarLbl: Label 'US dollar', MaxLength = 30; + VanuatuvatuLbl: Label 'Vanuatu vatu', MaxLength = 30; + WesternSamoantalaLbl: Label 'Western Samoan tala', MaxLength = 30; + SouthAfricanrandLbl: Label 'South African rand', MaxLength = 30; + UnitedArabEmiratesdirhamLbl: Label 'United Arab Emirates dirham', MaxLength = 30; + AlgeriandinarLbl: Label 'Algerian dinar', MaxLength = 30; + HungarianforintLbl: Label 'Hungarian forint', MaxLength = 30; + KenyanShillingLbl: Label 'Kenyan Shilling', MaxLength = 30; + MoroccandirhamLbl: Label 'Moroccan dirham', MaxLength = 30; + MozambiquemeticalLbl: Label 'Mozambique metical', MaxLength = 30; + NigeriannairaLbl: Label 'Nigerian naira', MaxLength = 30; + RomanianleuLbl: Label 'Romanian leu', MaxLength = 30; + SwazilandlilangeniLbl: Label 'Swaziland lilangeni', MaxLength = 30; + SerbianDinarLbl: Label 'Serbian Dinar', MaxLength = 30; + TunesiandinarLbl: Label 'Tunesian dinar', MaxLength = 30; + UgandanShillingLbl: Label 'Ugandan Shilling', MaxLength = 30; + NewTurkishliraLbl: Label 'New Turkish lira', MaxLength = 30; + TonganPaangaLbl: Label 'Tongan Pa anga', MaxLength = 30; + FrenchPacificFrancLbl: Label 'French Pacific Franc', MaxLength = 30; } \ No newline at end of file diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateVATStatement.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateVATStatement.Codeunit.al index 06784d7330..681e54117c 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateVATStatement.Codeunit.al +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Finance/2.Master data/CreateVATStatement.Codeunit.al @@ -14,7 +14,7 @@ codeunit 5630 "Create VAT Statement" ContosoVatStatement.InsertVATStatementTemplate(VATTemplateName(), VATStatementDescLbl, Page::"VAT Statement", Report::"VAT Statement"); - ContosoVatStatement.InsertVATStatementName(VATTemplateName(), StatementNameLbl, StatementNameDescLbl); + ContosoVatStatement.InsertVATStatementName(VATTemplateName(), VATStatementName(), StatementNameDescLbl); CreateVATStatementLine(); end; @@ -22,83 +22,83 @@ codeunit 5630 "Create VAT Statement" var CreateVATPostingGroups: Codeunit "Create VAT Posting Groups"; begin - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 10000, '001', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatSalesDueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 20000, '002', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '090|100', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatAcquisitionDueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 30000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MemberStatesECLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 40000, '003', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '001|002', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalVatDueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 50000, '004', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '040|050|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VatReclaimedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 60000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, InputsAcquisitionECLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 70000, '005', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, NetVatPaidLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 90000, '006', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110|120|170|180|008', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueSalesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 100000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ExcludingVatLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 110000, '007', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '210|220|270|280|009', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValuePurchaseLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 120000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ExcludingVatLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 140000, '008', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140|150', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueSuppliesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ECMemberStatesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 160000, '009', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValueAcquisitionLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 170000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ExcludingVatECLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 180000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MemberStatesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 200000, '011', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesStandardLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 210000, '012', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesStandardFullLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 220000, '020', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '011..019', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 230000, '021', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 240000, '022', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesReducedFullLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 250000, '030', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '021..029', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 260000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 270000, '031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EUStandardLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 280000, '040', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '031..039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 290000, '041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EUReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 300000, '050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '041..049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 320000, '061', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseStandardLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 330000, '062', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseStandardFullLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 340000, '070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '061..069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 350000, '071', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 360000, '072', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseReducedFullLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 370000, '080', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '071..079', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 380000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 390000, '081', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EUStandardLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 400000, '090', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '081..089', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EUStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 410000, '091', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EUReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 420000, '100', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '091..099', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EUReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 430000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 440000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 450000, '101', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, DomesticStandardSalesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 460000, '110', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '101..109', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, DomesticStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 470000, '111', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, DomesticReducedValueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 480000, '120', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '111..119', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, DomesticReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 490000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 500000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, EUStandardSuppliesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 510000, '140', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUStandardSuppliesTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 520000, '141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, EUReducedSuppliesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 530000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '141..149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUReducedSuppliesTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 540000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 550000, '161', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, OverseasSalesValueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 560000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '161..169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, OverseasSalesTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 570000, '171', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, OverseasSalesReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 580000, '180', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '171..179', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, OverseasSalesReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 590000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 600000, '190', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 1, NonVatLiableSalesLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 610000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 620000, '201', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, DomesticStandardPurchaseLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 630000, '210', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '201..209', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DomesticStandardPurchaseTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 640000, '211', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, DomesticReducedPurchaseValueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 650000, '220', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '211..219', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DomesticReducedPurchaseTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 660000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 670000, '231', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, EUAcquisitionStandardLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 680000, '240', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '231..239', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, EUAcquisitionStandardTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 690000, '241', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, EUAcquisitionReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 700000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '241..249', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, EUAcquisitionReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 710000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 720000, '261', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, OverseasPurchaseValueLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 730000, '270', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '261..269', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, OverseasPurchaseTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 740000, '271', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, OverseasPurchaseReducedLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 750000, '280', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '271..279', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, OverseasPurchaseReducedTotalLbl); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 760000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); - ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), StatementNameLbl, 770000, '290', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 0, NonVatLiablePurchaseLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 10000, '001', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatSalesDueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 20000, '002', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '090|100', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, VatAcquisitionDueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 30000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MemberStatesECLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 40000, '003', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '001|002', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalVatDueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 50000, '004', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '040|050|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, VatReclaimedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 60000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, InputsAcquisitionECLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 70000, '005', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '020|030|070|080', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, NetVatPaidLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 80000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 90000, '006', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '110|120|170|180|008', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueSalesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 100000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ExcludingVatLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 110000, '007', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '210|220|270|280|009', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValuePurchaseLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 120000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ExcludingVatLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 130000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 140000, '008', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '140|150', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, TotalValueSuppliesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 150000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, ECMemberStatesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 160000, '009', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '240|250', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, TotalValueAcquisitionLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 170000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ExcludingVatECLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 180000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, MemberStatesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 190000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SeparationLineLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 200000, '011', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesStandardLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 210000, '012', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesStandardFullLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 220000, '020', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '011..019', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 230000, '021', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 240000, '022', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 0, SalesReducedFullLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 250000, '030', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '021..029', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, SalesReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 260000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 270000, '031', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EUStandardLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 280000, '040', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '031..039', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 290000, '041', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, EUReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 300000, '050', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '041..049', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 310000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 320000, '061', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseStandardLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 330000, '062', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullNormal(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseStandardFullLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 340000, '070', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '061..069', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 350000, '071', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 360000, '072', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.FullRed(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 1, false, 1, PurchaseReducedFullLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 370000, '080', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '071..079', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, PurchaseReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 380000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 390000, '081', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EUStandardLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 400000, '090', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '081..089', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EUStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 410000, '091', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Amount", 0, false, 1, EUReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 420000, '100', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '091..099', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 1, EUReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 430000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, false, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 440000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 450000, '101', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, DomesticStandardSalesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 460000, '110', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '101..109', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, DomesticStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 470000, '111', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, DomesticReducedValueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 480000, '120', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '111..119', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, DomesticReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 490000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 500000, '131', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, EUStandardSuppliesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 510000, '140', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '131..139', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUStandardSuppliesTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 520000, '141', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, EUReducedSuppliesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 530000, '150', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '141..149', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, EUReducedSuppliesTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 540000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 550000, '161', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, OverseasSalesValueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 560000, '170', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '161..169', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, OverseasSalesTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 570000, '171', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 1, OverseasSalesReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 580000, '180', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '171..179', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 1, OverseasSalesReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 590000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 600000, '190', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Sale", CreateVATPostingGroups.Domestic(), '', '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 1, NonVatLiableSalesLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 610000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 620000, '201', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, DomesticStandardPurchaseLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 630000, '210', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '201..209', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DomesticStandardPurchaseTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 640000, '211', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, DomesticReducedPurchaseValueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 650000, '220', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '211..219', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, DomesticReducedPurchaseTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 660000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 670000, '231', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, EUAcquisitionStandardLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 680000, '240', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '231..239', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, EUAcquisitionStandardTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 690000, '241', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.EU(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, EUAcquisitionReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 700000, '250', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '241..249', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, EUAcquisitionReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 710000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 720000, '261', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Standard(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, OverseasPurchaseValueLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 730000, '270', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '261..269', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, OverseasPurchaseTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 740000, '271', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Export(), CreateVATPostingGroups.Reduced(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, false, 0, OverseasPurchaseReducedLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 750000, '280', Enum::"VAT Statement Line Type"::"Row Totaling", Enum::"General Posting Type"::" ", '', '', '271..279', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, OverseasPurchaseReducedTotalLbl); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 760000, '', Enum::"VAT Statement Line Type"::Description, Enum::"General Posting Type"::" ", '', '', '', Enum::"VAT Statement Line Amount Type"::" ", 0, true, 0, ''); + ContosoVatStatement.InsertVatStatementLine(VATTemplateName(), VATStatementName(), 770000, '290', Enum::"VAT Statement Line Type"::"VAT Entry Totaling", Enum::"General Posting Type"::"Purchase", CreateVATPostingGroups.Domestic(), CreateVATPostingGroups.Zero(), '', Enum::"VAT Statement Line Amount Type"::"Base", 0, true, 0, NonVatLiablePurchaseLbl); end; procedure VATTemplateName(): Code[10] @@ -106,6 +106,11 @@ codeunit 5630 "Create VAT Statement" exit(VatTemplateNameTok); end; + procedure VATStatementName(): Code[10] + begin + exit(StatementNameLbl); + end; + var ContosoVatStatement: Codeunit "Contoso VAT Statement"; VatTemplateNameTok: Label 'VAT', Locked = true; diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateContosoTenantData.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateContosoTenantData.Codeunit.al new file mode 100644 index 0000000000..5800709748 --- /dev/null +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateContosoTenantData.Codeunit.al @@ -0,0 +1,182 @@ +codeunit 5691 "Create Contoso Tenant Data" +{ + trigger OnRun() + begin + Codeunit.Run(Codeunit::"Create Media Repositry"); + CreatePermissions(); + Codeunit.Run(Codeunit::"Create Web Services"); + SetupApplicationArea(); + end; + + local procedure SetupApplicationArea() + var + ExperienceTierSetup: Record "Experience Tier Setup"; + ApplicationAreaMgmtFacade: Codeunit "Application Area Mgmt. Facade"; + begin + ApplicationAreaMgmtFacade.SaveExperienceTierCurrentCompany(ExperienceTierSetup.FieldCaption(Essential)); + end; + + procedure CreatePermissions() + var + PlanIDs: Codeunit "Plan Ids"; + begin + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'D365 BACKUP/RESTORE', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'D365 FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'D365 RAPIDSTART', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedAdminPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'D365 FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'D365 RAPIDSTART', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetHelpDeskPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'D365 FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'D365 RAPIDSTART', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPartnerPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(D365AutomationPlanIdLbl, 'D365 AUTOMATION', BaseApplicationAppIdLbl); + AddPermissionSet(D365AutomationPlanIdLbl, 'D365 RAPIDSTART', BaseApplicationAppIdLbl); + AddPermissionSet(D365AutomationPlanIdLbl, 'EXTEN. MGT. - ADMIN', SystemApplicationAppIdLbl); + AddPermissionSet(D365AutomationPlanIdLbl, 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(D365AutomationPlanIdLbl, 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'D365 BACKUP/RESTORE', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'SECURITY', EmptyAppId); + AddPermissionSet(PlanIDs.GetGlobalAdminPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPartnerSandboxPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPartnerSandboxPlanId(), 'D365 BUS PREMIUM', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPartnerSandboxPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPartnerSandboxPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPartnerSandboxPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialISVPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialISVPlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialISVPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialISVPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialISVPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'D365 TEAM MEMBER', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPlanId(), 'D365 BUS PREMIUM', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBasicPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBasicPlanId(), 'D365 BASIC ISV', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBasicPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBasicPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBasicPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialPlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetInfrastructurePlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetInfrastructurePlanId(), 'D365 FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetInfrastructurePlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetInfrastructurePlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetInfrastructurePlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'D365 ACCOUNTANTS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'D365 BASIC', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'D365 JOBS, EDIT', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetAccountantHubPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDevicePlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDevicePlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDevicePlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDevicePlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDevicePlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'D365 TEAM MEMBER', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetTeamMemberISVPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetExternalAccountantPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumISVPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumISVPlanId(), 'D365 BUS PREMIUM', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumISVPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumISVPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetPremiumISVPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDeviceISVPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDeviceISVPlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDeviceISVPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDeviceISVPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDeviceISVPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'D365 BUS PREMIUM', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetViralSignupPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'D365 BACKUP/RESTORE', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'SECURITY', EmptyAppId); + AddPermissionSet(PlanIDs.GetD365AdminPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetMicrosoft365PlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialAttachPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialAttachPlanId(), 'D365 BUS FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialAttachPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialAttachPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetEssentialAttachPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'D365 BACKUP/RESTORE', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'D365 FULL ACCESS', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'D365 RAPIDSTART', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetDelegatedBCAdminPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'AUTOMATE - EXEC', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'D365 BACKUP/RESTORE', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'D365 READ', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'EXCEL EXPORT ACTION', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'LOCAL', BaseApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'LOGIN', SystemApplicationAppIdLbl); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'SECURITY', EmptyAppId); + AddPermissionSet(PlanIDs.GetBCAdminPlanId(), 'TROUBLESHOOT TOOLS', SystemApplicationAppIdLbl); + end; + + local procedure AddPermissionSet(PlanId: Guid; RoleId: Code[20]; AppId: Guid) + var + AggregatePermissionSet: Record "Aggregate Permission Set"; + PlanConfiguration: Codeunit "Plan Configuration"; + Scope: Option System,Tenant; + begin + if AggregatePermissionSet.Get(Scope::System, AppId, RoleId) then + PlanConfiguration.AddDefaultPermissionSetToPlan(PlanId, RoleId, AppId, Scope::System); + end; + + var + D365AutomationPlanIdLbl: Label '{00000000-0000-0000-0000-000000000010}', Locked = true; + BaseApplicationAppIdLbl: Label '{437dbf0e-84ff-417a-965d-ed2bb9650972}', Locked = true; + SystemApplicationAppIdLbl: Label '{63ca2fa4-4f03-4f2b-a480-172fef340d3f}', Locked = true; + EmptyAppId: Guid; +} diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateMediaRepositry.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateMediaRepositry.Codeunit.al new file mode 100644 index 0000000000..e1d6d5183b --- /dev/null +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateMediaRepositry.Codeunit.al @@ -0,0 +1,83 @@ +codeunit 5685 "Create Media Repositry" +{ + trigger OnRun() + begin + InsertMediaResources(); + InsertExcelTemplates(); + end; + + local procedure InsertMediaResources() + begin + InsertMediaResource('CopilotNotAvailable.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('ImageAnalysis-Setup-NoText.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('OutlookAddinIllustration.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('TeamsAppIllustration.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('PowerBi-OptIn-480px.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + + InsertMediaResource('AssistedSetup-NoText-400px.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('AssistedSetupDone-NoText-400px.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('AssistedSetupInfo-NoText.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('ExternalSync-NoText.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('FirstInvoice1.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Phone)); + InsertMediaResource('FirstInvoice2.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Phone)); + InsertMediaResource('FirstInvoice3.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Phone)); + InsertMediaResource('FirstInvoiceSplash.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Phone)); + InsertMediaResource('PowerBi-OptIn-480px.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Tablet)); + InsertMediaResource('PowerBi-OptIn-480px.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Phone)); + InsertMediaResource('WhatsNewWizard-Banner-First.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + InsertMediaResource('WhatsNewWizard-Banner-Second.png', ImagesSystemFolderLbl, Format(CLIENTTYPE::Web)); + end; + + + local procedure InsertExcelTemplates() + begin + InsertExcelTemplate('ExcelTemplateBalanceSheet.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateIncomeStatement.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateAgedAccountsPayable.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateAgedAccountsReceivable.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateCashFlowStatement.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateRetainedEarnings.xltm', ExcelTemplatesFolderLbl); + InsertExcelTemplate('ExcelTemplateTrialBalance.xltm', ExcelTemplatesFolderLbl); + end; + + procedure InsertExcelTemplate(FileName: Text[50]; PathToFile: Text) + var + MediaResources: Record "Media Resources"; + InStream: InStream; + OutStream: OutStream; + begin + if MediaResources.Get(FileName) then + exit; + + NavApp.GetResource(PathToFile + FileName, InStream); + MediaResources.Blob.CreateOutStream(OutStream); + CopyStream(OutStream, InStream); + MediaResources.Code := FileName; + if MediaResources.Insert(true) then; + end; + + procedure InsertMediaResource(MediaFile: Text[50]; Path: Text[200]; DisplayTarget: Code[50]) + var + MediaRepository: Record "Media Repository"; + MediaResourcesMgt: Codeunit "Media Resources Mgt."; + InStream: InStream; + MediaResourcesCode: Code[50]; + begin + if MediaRepository.Get(MediaFile, DisplayTarget) then + exit; + + NavApp.GetResource(Path + MediaFile, InStream); + + MediaRepository.Validate("File Name", MediaFile); + MediaRepository.Validate("Display Target", DisplayTarget); + MediaResourcesCode := CopyStr(MediaFile, 1, MaxStrLen(MediaRepository."Media Resources Ref")); + MediaRepository.Validate("Media Resources Ref", MediaResourcesCode); + MediaRepository.Insert(true); + + MediaResourcesMgt.InsertMediaFromInstream(MediaResourcesCode, InStream); + end; + + var + ImagesSystemFolderLbl: Label 'Images/System/', Locked = true; + ExcelTemplatesFolderLbl: Label 'ExcelTemplates/', Locked = true; +} \ No newline at end of file diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateWebServices.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateWebServices.Codeunit.al new file mode 100644 index 0000000000..5bf89d3070 --- /dev/null +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/1.Setup data/CreateWebServices.Codeunit.al @@ -0,0 +1,894 @@ +codeunit 5690 "Create Web Services" +{ + trigger OnRun() + var + WebService: Record "Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateWebService(WebService."Object Type"::Codeunit, Codeunit::"Company Setup Service", 'CompanySetupService', true); + WebServiceManagement.CreateWebService(WebService."Object Type"::Codeunit, Codeunit::"Exchange Service Setup", 'ExchangeServiceSetup', true); + WebServiceManagement.CreateWebService(WebService."Object Type"::Codeunit, Codeunit::"Page Summary Provider", 'SummaryProvider', true); + WebServiceManagement.CreateWebService(WebService."Object Type"::Codeunit, Codeunit::"Page Action Provider", 'PageActionProvider', true); + CreatePowerBIWebServices(); + CreateSegmentWebService(); + CreateJobWebServices(); + CreatePowerBITenantWebServices(); + CreateAccountantPortalWebServices(); + CreateWorkflowWebhookWebServices(); + CreateExcelTemplateWebServices(); + end; + + procedure CreatePowerBIWebServices() + var + WebService: Record "Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Page, PAGE::"Acc. Sched. KPI WS Dimensions", PowerBIFinance(), true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Dimension Sets", '', true); + + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Top Customer Overview", '', true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Sales Dashboard", '', true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Item Sales by Customer", 'ItemSalesByCustomer', true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Item Sales and Profit", 'ItemSalesAndProfit', true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Sales Orders by Sales Person", 'SalesOrdersBySalesPerson', true); + WebServiceManagement.CreateTenantWebService(WebService."Object Type"::Query, QUERY::"Sales Opportunities", '', true); + end; + + procedure CreateSegmentWebService() + var + TenantWebService: Record "Tenant Web Service"; + TenantWebServiceOData: Record "Tenant Web Service OData"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + SelectText: Text; + ODataV3FilterText: Text; + ODataV4FilterText: Text; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Segment Lines", SegmentLines(), true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, SegmentLines()); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 1, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 3, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 5, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 6, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 12, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 18, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 19, DATABASE::"Segment Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, 27, DATABASE::"Segment Line", metaData); + + TenantWebServiceOData.Init(); + TenantWebServiceOData.TenantWebServiceID := TenantWebService.RecordId; + if not TenantWebServiceOData.Insert() then; + ODataUtility.GenerateSelectText(TenantWebService."Service Name", TenantWebService."Object Type", SelectText); + ODataUtility.GenerateODataV3FilterText(TenantWebService."Service Name", TenantWebService."Object Type", ODataV3FilterText); + ODataUtility.GenerateODataV4FilterText(TenantWebService."Service Name", TenantWebService."Object Type", ODataV4FilterText); + WebServiceManagement.SetODataSelectClause(TenantWebServiceOData, SelectText); + WebServiceManagement.SetODataFilterClause(TenantWebServiceOData, ODataV3FilterText); + WebServiceManagement.SetODataV4FilterClause(TenantWebServiceOData, ODataV4FilterText); + TenantWebServiceOData.Modify(); + end; + + procedure CreateJobWebServices() + var + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Page, PAGE::"Job List", JobListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, JobListTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 3, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 5, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 19, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 20, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 2, DATABASE::Job); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1036, DATABASE::Job); + + CreateTenantWebServiceOData(TenantWebService); + + Clear(TenantWebService); + + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Page, PAGE::"Job Task Lines", JobTaskLinesTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, JobTaskLinesTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 2, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 3, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 4, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 21, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 7, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 6, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 9, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 66, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 67, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 10, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 11, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 12, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 13, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 14, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 15, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 17, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 16, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 64, DATABASE::"Job Task"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 65, DATABASE::"Job Task"); + + CreateTenantWebServiceOData(TenantWebService); + + Clear(TenantWebService); + + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Page, PAGE::"Job Planning Lines", JobPlanningLinesTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, JobPlanningLinesTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1000, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 3, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 5794, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 4, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 5, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 7, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 8, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 9, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1060, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1002, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1003, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1004, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1006, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1071, DATABASE::"Job Planning Line"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, 1035, DATABASE::"Job Planning Line"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreateTenantWebServiceOData(TenantWebService: Record "Tenant Web Service") + var + TenantWebServiceOData: Record "Tenant Web Service OData"; + WebServiceManagement: Codeunit "Web Service Management"; + SelectText: Text; + begin + TenantWebServiceOData.Init(); + TenantWebServiceOData.TenantWebServiceID := TenantWebService.RecordId; + if not TenantWebServiceOData.Insert() then; + ODataUtility.GenerateSelectText(TenantWebService."Service Name", TenantWebService."Object Type", SelectText); + WebServiceManagement.SetODataSelectClause(TenantWebServiceOData, SelectText); + TenantWebServiceOData.Modify(); + end; + + procedure CreatePowerBITenantWebServices() + var + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + CreatePowerBICustomerList(); + CreatePowerBIVendorList(); + CreatePowerBIJobList(); + CreatePowerBISalesList(); + CreatePowerBIPurchaseList(); + CreatePowerBIItemPurchaseList(); + CreatePowerBIItemSalesList(); + CreatePowerBIGLAmountList(); + CreatePowerBIGLBudgetedAmountList(); + CreatePowerBITopCustOverviewWebService(); + CreatePowerBISalesHdrCustWebService(); + CreatePowerBICustItemLedgEntWebService(); + CreatePowerBICustLedgerEntriesWebService(); + CreatePowerBIVendorLedgerEntriesWebService(); + CreatePowerBIPurchaseHdrVendorWebService(); + CreatePowerBIVendItemLedgEntWebService(); + CreatePowerBIAgedAccPayableWebService(); + CreatePowerBIAgedAccReceivableWebService(); + CreatePowerBIAgedInventoryChartWebService(); + CreatePowerBIJobActBudgPriceWebService(); + CreatePowerBIJobProfitabilityWebService(); + CreatePowerBIJobActBudgCostWebService(); + CreatePowerBISalesPipelineWebService(); + CreatePowerBITop5OpportunitiesWebService(); + CreatePowerBIWorkDateCalcWebService(); + + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Dimension Set Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"G/L Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Cust. Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Vendor Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Bank Account Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Item Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Value Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"FA Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Job Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Res. Ledger Entries", '', true); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"G/L Budget Entries", '', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Chart of Accounts", PowerBIChartOfAccountsTxt, true); + end; + + local procedure CreatePowerBICustomerList() + var + TenantWebService: Record "Tenant Web Service"; + Customer: Record Customer; + DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Power BI Customer List", PowerBICustomerListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBICustomerListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("No."), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo(Name), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("Credit Limit (LCY)"), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("Balance Due"), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo("Posting Date"), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo("Cust. Ledger Entry No."), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo(Amount), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo("Amount (LCY)"), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo("Transaction No."), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedCustLedgEntry.FieldNo("Entry No."), DATABASE::"Detailed Cust. Ledg. Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIVendorList() + var + Vendor: Record Vendor; + DetailedVendorLedgEntry: Record "Detailed Vendor Ledg. Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Vendor List", PowerBIVendorListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIVendorListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo("No."), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo(Name), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo("Balance Due"), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Posting Date"), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Applied Vend. Ledger Entry No."), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo(Amount), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Amount (LCY)"), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Transaction No."), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Entry No."), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, DetailedVendorLedgEntry.FieldNo("Remaining Pmt. Disc. Possible"), DATABASE::"Detailed Vendor Ledg. Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIJobList() + var + JobLedgerEntry: Record "Job Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + Job: Record Job; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Power BI Jobs List", PowerBIJobsListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIJobsListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Job.FieldNo("No."), DATABASE::Job, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Job.FieldNo("Search Description"), DATABASE::Job, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Job.FieldNo(Complete), DATABASE::Job, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Job.FieldNo(Status), DATABASE::Job, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, JobLedgerEntry.FieldNo("Posting Date"), DATABASE::"Job Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, JobLedgerEntry.FieldNo("Total Cost"), DATABASE::"Job Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, JobLedgerEntry.FieldNo("Entry No."), DATABASE::"Job Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, JobLedgerEntry.FieldNo("Entry Type"), DATABASE::"Job Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBISalesList() + var + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Sales List", PowerBISalesListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBISalesListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesHeader.FieldNo("No."), DATABASE::"Sales Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesHeader.FieldNo("Requested Delivery Date"), DATABASE::"Sales Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesHeader.FieldNo("Shipment Date"), DATABASE::"Sales Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesHeader.FieldNo("Due Date"), DATABASE::"Sales Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo(Quantity), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo(Amount), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo("No."), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo(Description), DATABASE::"Sales Line", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIPurchaseList() + var + PurchaseHeader: Record "Purchase Header"; + PurchaseLine: Record "Purchase Line"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Purchase List", PowerBIPurchaseListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIPurchaseListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("No."), + DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("Order Date"), + DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("Expected Receipt Date"), + DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("Due Date"), + DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("Pmt. Discount Date"), + DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo(Quantity), + DATABASE::"Purchase Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo(Amount), + DATABASE::"Purchase Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo("No."), + DATABASE::"Purchase Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo(Description), + DATABASE::"Purchase Line", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIItemPurchaseList() + var + Item: Record Item; + ItemLedgerEntry: Record "Item Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Item Purchase List", PowerBIItemPurchasesListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIItemPurchasesListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("No."), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Search Description"), + DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo("Posting Date"), + DATABASE::"Item Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo("Invoiced Quantity"), + DATABASE::"Item Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo("Entry No."), + DATABASE::"Item Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIItemSalesList() + var + Item: Record Item; + ValueEntry: Record "Value Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Item Sales List", PowerBIItemSalesListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIItemSalesListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("No."), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Search Description"), + DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ValueEntry.FieldNo("Posting Date"), + DATABASE::"Value Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ValueEntry.FieldNo("Invoiced Quantity"), + DATABASE::"Value Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ValueEntry.FieldNo("Entry No."), + DATABASE::"Value Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIGLAmountList() + var + GLAccount: Record "G/L Account"; + GLEntry: Record "G/L Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI GL Amount List", PowerBIGLAmountListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIGLAmountListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("No."), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo(Name), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("Account Type"), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("Debit/Credit"), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLEntry.FieldNo("Posting Date"), DATABASE::"G/L Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLEntry.FieldNo(Amount), DATABASE::"G/L Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLEntry.FieldNo("Entry No."), DATABASE::"G/L Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIGLBudgetedAmountList() + var + GLAccount: Record "G/L Account"; + GLBudgetEntry: Record "G/L Budget Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI GL Budgeted Amount", PowerBIGLBudgetedAmountListTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIGLBudgetedAmountListTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("No."), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo(Name), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("Account Type"), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLAccount.FieldNo("Debit/Credit"), DATABASE::"G/L Account", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLBudgetEntry.FieldNo(Date), DATABASE::"G/L Budget Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, GLBudgetEntry.FieldNo(Amount), DATABASE::"G/L Budget Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBITopCustOverviewWebService() + var + CustLedgerEntry: Record "Cust. Ledger Entry"; + Customer: Record Customer; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Power BI Top Cust. Overview", PowerBITopCustOverviewTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBITopCustOverviewTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Entry No."), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Posting Date"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Customer No."), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Sales (LCY)"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo(Name), DATABASE::Customer, metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBISalesHdrCustWebService() + var + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + Item: Record Item; + Customer: Record Customer; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Sales Hdr. Cust.", PowerBISalesHdrCustTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBISalesHdrCustTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesHeader.FieldNo("No."), DATABASE::"Sales Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo("No."), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo(Quantity), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo("Qty. Invoiced (Base)"), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, SalesLine.FieldNo("Qty. Shipped (Base)"), DATABASE::"Sales Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Base Unit of Measure"), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo(Description), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo(Inventory), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Unit Price"), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("No."), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo(Name), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo(Balance), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("Country/Region Code"), DATABASE::Customer, metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBICustItemLedgEntWebService() + var + Customer: Record Customer; + ItemLedgerEntry: Record "Item Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Cust. Item Ledg. Ent.", PowerBICustItemLedgEntTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBICustItemLedgEntTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Customer.FieldNo("No."), DATABASE::Customer, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo("Item No."), DATABASE::"Item Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo(Quantity), DATABASE::"Item Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBICustLedgerEntriesWebService() + var + CustLedgerEntry: Record "Cust. Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Cust. Ledger Entries", PowerBICustLedgerEntriesTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBICustLedgerEntriesTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Entry No."), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Due Date"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Remaining Amt. (LCY)"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo(Open), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Customer Posting Group"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Sales (LCY)"), DATABASE::"Cust. Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, CustLedgerEntry.FieldNo("Posting Date"), DATABASE::"Cust. Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIVendorLedgerEntriesWebService() + var + VendorLedgerEntry: Record "Vendor Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Vendor Ledger Entries", PowerBIVendorLedgerEntriesTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIVendorLedgerEntriesTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, VendorLedgerEntry.FieldNo("Entry No."), DATABASE::"Vendor Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, VendorLedgerEntry.FieldNo("Due Date"), DATABASE::"Vendor Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, VendorLedgerEntry.FieldNo("Remaining Amt. (LCY)"), DATABASE::"Vendor Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, VendorLedgerEntry.FieldNo(Open), DATABASE::"Vendor Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIPurchaseHdrVendorWebService() + var + PurchaseHeader: Record "Purchase Header"; + PurchaseLine: Record "Purchase Line"; + Item: Record Item; + Vendor: Record Vendor; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Query, QUERY::"Power BI Purchase Hdr. Vendor", PowerBIPurchaseHdrVendorTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIPurchaseHdrVendorTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseHeader.FieldNo("No."), DATABASE::"Purchase Header", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo("No."), DATABASE::"Purchase Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, PurchaseLine.FieldNo(Quantity), DATABASE::"Purchase Line", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Base Unit of Measure"), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo(Description), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo(Inventory), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Qty. on Purch. Order"), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Item.FieldNo("Unit Price"), DATABASE::Item, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo("No."), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo(Name), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo(Balance), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo("Country/Region Code"), DATABASE::Vendor, metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIVendItemLedgEntWebService() + var + Vendor: Record Vendor; + ItemLedgerEntry: Record "Item Ledger Entry"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + metaData: DotNet QueryMetadataReader; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Query, QUERY::"Power BI Vend. Item Ledg. Ent.", PowerBIVendItemLedgEntTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Query, PowerBIVendItemLedgEntTxt); + ODataUtility.GetTenantWebServiceMetadata(TenantWebService, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, Vendor.FieldNo("No."), DATABASE::Vendor, metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo("Item No."), DATABASE::"Item Ledger Entry", metaData); + WebServiceManagement.CreateTenantWebServiceColumnForQuery(TenantWebService.RecordId, ItemLedgerEntry.FieldNo(Quantity), DATABASE::"Item Ledger Entry", metaData); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIAgedAccPayableWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Aged Acc. Payable", PowerBIAgedAccPayableTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIAgedAccPayableTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(ID), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Date), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Date Sorting"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type Sorting"), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIAgedAccReceivableWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Aged Acc. Receivable", PowerBIAgedAccReceivableTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIAgedAccReceivableTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(ID), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Date), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Date Sorting"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type Sorting"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIAgedInventoryChartWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Aged Inventory Chart", PowerBIAgedInventoryChartTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIAgedInventoryChartTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(ID), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Date), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Period Type Sorting"), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIJobActBudgPriceWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Job Act. v. Budg. Price", PowerBIJobActBudgPriceTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIJobActBudgPriceTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure No."), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIJobProfitabilityWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Job Profitability", PowerBIJobProfitabilityTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIJobProfitabilityTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure No."), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIJobActBudgCostWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Job Act. v. Budg. Cost", PowerBIJobActBudgCostTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIJobActBudgCostTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure No."), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBISalesPipelineWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Sales Pipeline", PowerBISalesPipelineTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBISalesPipelineTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(ID), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Row No."), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure No."), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBITop5OpportunitiesWebService() + var + PowerBIChartBuffer: Record "Power BI Chart Buffer"; + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI Top 5 Opportunities", PowerBITop5OpportunitiesTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBITop5OpportunitiesTxt); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(ID), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo(Value), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure Name"), DATABASE::"Power BI Chart Buffer"); + WebServiceManagement.CreateTenantWebServiceColumnForPage(TenantWebService.RecordId, PowerBIChartBuffer.FieldNo("Measure No."), DATABASE::"Power BI Chart Buffer"); + + CreateTenantWebServiceOData(TenantWebService); + end; + + local procedure CreatePowerBIWorkDateCalcWebService() + var + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"PBI WorkDate Calc.", PowerBIWorkDateCalcTxt, true); + + TenantWebService.Get(TenantWebService."Object Type"::Page, PowerBIWorkDateCalcTxt); + + CreateTenantWebServiceOData(TenantWebService); + end; + + procedure CreateAccountantPortalWebServices() + begin + CreateAccountantPortalWebService(AccountantPortalActivityCuesTxt, PAGE::"AccountantPortal Activity Cues"); + CreateAccountantPortalWebService(AccountantPortalFinanceCuesTxt, PAGE::"Accountant Portal Finance Cues"); + CreateAccountantPortalWebService(AccountantPortalUserTasksTxt, PAGE::"Accountant Portal User Tasks"); + CreateAccountantPortalWebService(UserTaskSetCompleteTxt, PAGE::"User Task List"); + end; + + local procedure CreateAccountantPortalWebService(ObjectName: Text; PageID: Integer) + var + WebService: Record "Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + Clear(WebService); + WebServiceManagement.CreateWebService(WebService."Object Type"::Page, PageID, ObjectName, true); + end; + + procedure CreateWorkflowWebhookWebServices() + var + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Sales Document Entity", 'salesDocuments', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Sales Document Line Entity", 'salesDocumentLines', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Purchase Document Entity", 'purchaseDocuments', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Purchase Document Line Entity", 'purchaseDocumentLines', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Sales Document Entity", 'workflowSalesDocuments', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Sales Document Line Entity", 'workflowSalesDocumentLines', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Purchase Document Entity", 'workflowPurchaseDocuments', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Purchase Document Line Entity", 'workflowPurchaseDocumentLines', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Gen. Journal Batch Entity", 'workflowGenJournalBatches', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Gen. Journal Line Entity", 'workflowGenJournalLines', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Workflow - Customer Entity", 'workflowCustomers', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Workflow - Item Entity", 'workflowItems', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Workflow - Vendor Entity", 'workflowVendors', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Page, PAGE::"Workflow Webhook Subscriptions", 'workflowWebhookSubscriptions', true); + WebServiceManagement.CreateTenantWebService( + TenantWebService."Object Type"::Codeunit, CODEUNIT::"Workflow Webhook Subscription", 'WorkflowActionResponse', true); + end; + + procedure CreateExcelTemplateWebServices() + begin + CreateExcelTemplateWebService(ExcelTemplateIncomeStatementTxt, PAGE::"Income Statement Entity"); + CreateExcelTemplateWebService(ExcelTemplateBalanceSheetTxt, PAGE::"Balance Sheet Entity"); + CreateExcelTemplateWebService(ExcelTemplateTrialBalanceTxt, PAGE::"Trial Balance Entity"); + CreateExcelTemplateWebService(ExcelTemplateRetainedEarningsStatementTxt, PAGE::"Retained Earnings Entity"); + CreateExcelTemplateWebService(ExcelTemplateCashFlowStatementTxt, PAGE::"Cash Flow Statement Entity"); + CreateExcelTemplateWebService(ExcelTemplateAgedAccountsReceivableTxt, PAGE::"Aged AR Entity"); + CreateExcelTemplateWebService(ExcelTemplateAgedAccountsPayableTxt, PAGE::"Aged AP Entity"); + CreateExcelTemplateWebService(ExcelTemplateCompanyInformationTxt, PAGE::ExcelTemplateCompanyInfo); + end; + + local procedure CreateExcelTemplateWebService(ObjectName: Text; PageID: Integer) + var + TenantWebService: Record "Tenant Web Service"; + WebServiceManagement: Codeunit "Web Service Management"; + begin + Clear(TenantWebService); + WebServiceManagement.CreateTenantWebService(TenantWebService."Object Type"::Page, PageID, ObjectName, true) + end; + + procedure PowerBIFinance(): Text + begin + exit('powerbifinance'); + end; + + procedure SegmentLines(): Text + begin + exit('SegmentLines'); + end; + + var + ODataUtility: Codeunit ODataUtility; + JobListTxt: Label 'Job List', Locked = true; + JobTaskLinesTxt: Label 'Job Task Lines', Locked = true; + JobPlanningLinesTxt: Label 'Job Planning Lines', Locked = true; + PowerBICustomerListTxt: Label 'Power BI Customer List', Locked = true; + PowerBIVendorListTxt: Label 'Power BI Vendor List', Locked = true; + PowerBIJobsListTxt: Label 'Power BI Jobs List', Locked = true; + PowerBISalesListTxt: Label 'Power BI Sales List', Locked = true; + PowerBIPurchaseListTxt: Label 'Power BI Purchase List', Locked = true; + PowerBIItemPurchasesListTxt: Label 'Power BI Item Purchase List', Locked = true; + PowerBIItemSalesListTxt: Label 'Power BI Item Sales List', Locked = true; + PowerBIGLAmountListTxt: Label 'Power BI GL Amount List', Locked = true; + PowerBIGLBudgetedAmountListTxt: Label 'Power BI GL BudgetedAmount', Locked = true; + PowerBITopCustOverviewTxt: Label 'Power BI Top Cust. Overview', Locked = true; + PowerBISalesHdrCustTxt: Label 'Power BI Sales Hdr. Cust.', Locked = true; + PowerBICustItemLedgEntTxt: Label 'Power BI Cust. Item Ledg. Ent.', Locked = true; + PowerBICustLedgerEntriesTxt: Label 'Power BI Cust. Ledger Entries', Locked = true; + PowerBIVendorLedgerEntriesTxt: Label 'Power BI Vendor Ledger Entries', Locked = true; + PowerBIPurchaseHdrVendorTxt: Label 'Power BI Purchase Hdr. Vendor', Locked = true; + PowerBIVendItemLedgEntTxt: Label 'Power BI Vend. Item Ledg. Ent.', Locked = true; + PowerBIAgedAccPayableTxt: Label 'Power BI Aged Acc. Payable', Locked = true; + PowerBIAgedAccReceivableTxt: Label 'Power BI Aged Acc. Receivable', Locked = true; + PowerBIAgedInventoryChartTxt: Label 'Power BI Aged Inventory Chart', Locked = true; + PowerBIJobActBudgPriceTxt: Label 'Power BI Job Act. v. Budg. Price', Locked = true; + PowerBIJobProfitabilityTxt: Label 'Power BI Job Profitability', Locked = true; + PowerBIJobActBudgCostTxt: Label 'Power BI Job Act. v. Budg. Cost', Locked = true; + PowerBISalesPipelineTxt: Label 'Power BI Sales Pipeline', Locked = true; + PowerBITop5OpportunitiesTxt: Label 'Power BI Top 5 Opportunities', Locked = true; + PowerBIWorkDateCalcTxt: Label 'Power BI WorkDate Calc.', Locked = true; + AccountantPortalActivityCuesTxt: Label 'AccountantPortalActivityCues', Locked = true; + AccountantPortalFinanceCuesTxt: Label 'AccountantPortalFinanceCues', Locked = true; + ExcelTemplateIncomeStatementTxt: Label 'ExcelTemplateIncomeStatement', Locked = true; + ExcelTemplateBalanceSheetTxt: Label 'ExcelTemplateBalanceSheet', Locked = true; + ExcelTemplateTrialBalanceTxt: Label 'ExcelTemplateTrialBalance', Locked = true; + ExcelTemplateRetainedEarningsStatementTxt: Label 'ExcelTemplateRetainedEarnings', Locked = true; + ExcelTemplateCashFlowStatementTxt: Label 'ExcelTemplateCashFlowStatement', Locked = true; + ExcelTemplateAgedAccountsReceivableTxt: Label 'ExcelTemplateAgedAccountsReceivable', Locked = true; + ExcelTemplateAgedAccountsPayableTxt: Label 'ExcelTemplateAgedAccountsPayable', Locked = true; + ExcelTemplateCompanyInformationTxt: Label 'ExcelTemplateViewCompanyInformation', Locked = true; + AccountantPortalUserTasksTxt: Label 'AccountantPortalUserTasks', Locked = true; + UserTaskSetCompleteTxt: Label 'UserTaskSetComplete', Locked = true; + PowerBIChartOfAccountsTxt: Label 'Chart of Accounts', Locked = true; +} + diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/FoundationModule.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/FoundationModule.Codeunit.al index e93e666278..4dfd6f6cc0 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/FoundationModule.Codeunit.al +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoData/Foundation/FoundationModule.Codeunit.al @@ -13,7 +13,6 @@ codeunit 5203 "Foundation Module" implements "Contoso Demo Data Module" end; procedure CreateSetupData() - var begin Codeunit.Run(Codeunit::"Create Shipping Data"); Codeunit.Run(Codeunit::"Create Language"); @@ -33,7 +32,6 @@ codeunit 5203 "Foundation Module" implements "Contoso Demo Data Module" Codeunit.Run(Codeunit::"Create Data Exchange Type"); Codeunit.Run(Codeunit::"Create Custom Report Layout"); Codeunit.Run(Codeunit::"Create O365 Template"); - // Codeunit.Run(Codeunit::"Create Excel Template"); end; procedure CreateMasterData() diff --git a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/ContosoDemoTool.Codeunit.al b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/ContosoDemoTool.Codeunit.al index b315864a8e..951d23b327 100644 --- a/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/ContosoDemoTool.Codeunit.al +++ b/Apps/W1/ContosoCoffeeDemoDataset/app/DemoTool/ContosoDemoTool.Codeunit.al @@ -80,6 +80,11 @@ codeunit 5193 "Contoso Demo Tool" until ContosoDemoDataModule.Next() = 0; end; + /// + /// Refresh all the demo data modules basing on the Enum and build dependencies. + /// Modules are then filtered based on the application areas. + /// + /// All available demo data modules basing on the current Application Area internal procedure RefreshModules(var ContosoDemoDataModule: Record "Contoso Demo Data Module") var ContosoModuleDependency: codeunit "Contoso Module Dependency"; @@ -201,22 +206,34 @@ codeunit 5193 "Contoso Demo Tool" end; end; + /// + /// Creates all demo data for all modules. This function is used in build scripts to create Cronus Company. + /// procedure CreateAllDemoData() var ContosoDemoDataModule: Record "Contoso Demo Data Module"; begin RefreshModules(ContosoDemoDataModule); + // clearing any filter on the record, so that all modules are included during build + ContosoDemoDataModule.Reset(); + if ContosoDemoDataModule.FindSet() then CreateDemoData(ContosoDemoDataModule, Enum::"Contoso Demo Data Level"::All); end; + /// + /// Creates setup demo data for all modules. This function is used in build scripts to create MyCompany. + /// procedure CreateSetupDemoData() var ContosoDemoDataModule: Record "Contoso Demo Data Module"; begin RefreshModules(ContosoDemoDataModule); + // clearing any filter on the record, so that all modules are included during build + ContosoDemoDataModule.Reset(); + if ContosoDemoDataModule.FindSet() then CreateDemoData(ContosoDemoDataModule, Enum::"Contoso Demo Data Level"::"Setup Data"); end; diff --git a/Apps/W1/DataSearch/App/DataSearch.page.al b/Apps/W1/DataSearch/App/DataSearch.page.al index cfde7eec86..f8294b29b7 100644 --- a/Apps/W1/DataSearch/App/DataSearch.page.al +++ b/Apps/W1/DataSearch/App/DataSearch.page.al @@ -53,6 +53,7 @@ page 2680 "Data Search" ApplicationArea = All; UpdatePropagation = Both; } +#if not CLEAN26 group(lines) { ObsoleteState = Pending; @@ -61,6 +62,7 @@ page 2680 "Data Search" Visible = false; ShowCaption = false; } +#endif } } diff --git a/Apps/W1/EDocument/app/README.md b/Apps/W1/EDocument/app/README.md index 18d241f247..3c186a97c9 100644 --- a/Apps/W1/EDocument/app/README.md +++ b/Apps/W1/EDocument/app/README.md @@ -16,7 +16,7 @@ In order to implement your localization on top of EDocument core application, you should undertake the following steps. -### 1. Create and setup new extension +# 1. Create and setup new extension Create a new extension and add dependency to "EDocument Core" application In your app.json file, add dependency on "EDocument" extension: @@ -32,7 +32,7 @@ In your app.json file, add dependency on "EDocument" extension: ] ``` -### 2. Implement the document Interface. +# 2. Implement the document Interface. The E-Document interface comprises a collection of methods designed to streamline the export of Business Central documents (such as Sales Invoices) into E-Document blobs based on predefined format specifications. Furthermore, it facilitates the reverse process by enabling the import of documents from blobs back into Business Central. @@ -175,503 +175,384 @@ procedure PrepareDocument(var EDocument: Record "E-Document"; var CreatedDocumen end; ``` -### 3. Implement the integration interface. +# 3. Implement the integration interface. + + The E-Document integration interface comprises a collection of methods designed to streamline the process of integrating with endpoints for submitting electronic documents. First, you will need to extend the enum and associate it with your implementation codeunit: ``` -enumextension 50101 "EDocument Integration Ext" extends "E-Document Integration" +enumextension 50100 Integration extends "Service Integration" { - value(50100; "Example Service") + value(50100; "Avalara") { - Implementation = "E-Document Integration" = "Example Integration SVC"; + Implementation = IDocumentSender = "Integration Impl.", IDocumentReceiver = "Integration Impl."; } } ``` -Here's an example of how you could implement each of the methods within the interface: - -- Send: use it to send an E-Document to external service. - -``` - procedure Send(var EDocument: Record "E-Document"; var TempBlob: Codeunit "Temp Blob"; var IsAsync: Boolean; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage); - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - Payload: Text; - begin - ExampleIntegration.Get(); - Payload := EDocumentHelper.TempBlobToTxt(TempBlob); +## Sending + +Here's an example of how you could implement each of the methods within the IDocumentSender interface: + +The `IDocumentSender` interface defines methods for sending E-Documents to an external service. By implementing this interface, you enable integration between an application and external E-Document services. This interface is part of the `Microsoft.eServices.EDocument.Integration.Interfaces` namespace and facilitates asynchronous and batch operations while ensuring proper logging of communication details. + +### Key Features +- **Async Sending:** Supports asynchronous sending of E-Documents. +- **Batch Processing:** Enables sending multiple E-Documents using filters. +- **Automatic Logging:** Automatically logs HTTP request content and headers when provided in `SendContext`. - // Manipulate the payload and set the headers if needed - HttpRequest.Content.WriteFrom(Payload); - HttpRequest.Method := 'POST'; - HttpRequest.SetRequestUri(ExampleIntegration."Sending Endpoint"); - - HttpClient.Send(HttpRequest, HttpResponse); - - // Parse the response if needed. +### How to Implement +To implement the `IDocumentSender` interface, you need to provide logic for the `Send` procedure, which handles sending E-Documents. Below is a detailed guide and example implementations. + +### `Send` Method +The `Send` method is responsible for sending an E-Document to an external service. It takes three parameters: + +- `EDocument`: The record representing the E-Document to be sent. +- `EDocumentService`: The record containing service configuration details such as the URL and access tokens. +- `SendContext`: A codeunit that provides context and resources for the send operation. + +#### Example Implementation +Here is an example implementation of the `Send` method: + +```al +procedure Send(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; SendContext: Codeunit SendContext) +var + MyServiceSetup: Record MyServiceSetup; + TempBlob: Codeunit "Temp Blob"; + HttpClient: HttpClient; + HttpRequest: HttpRequestMessage; + HttpResponse: HttpResponseMessage; +begin + // Retrieve the TempBlob from SendContext + SendContext.GetTempBlob(TempBlob); + + // Prepare the HTTP request using the TempBlob content + HttpRequest := SendContext.Http().GetHttpRequestMessage(); + HttpRequest.Method := 'POST'; + HttpRequest.SetRequestUri(MyServiceSetup."Service URL"); + SetContent(HttpRequest, TempBlob); // Some method to do that + + // Add authorization headers + HttpRequest.Headers.Add('Authorization', 'Bearer ' + MyServiceSetup."Access Token"); + + // Send the request and capture the response + HttpClient.Send(HttpRequest, HttpResponse); + + // Handle the response + if HttpResponse.IsSuccessStatusCode() then + Message('E-Document sent successfully.'); + else + Error('Failed to send E-Document: %1', HttpResponse.ReasonPhrase); +end; +``` + +### Notes for Implementation +1. **Asynchronous Sending:** To support asynchronous sending, ensure that the implementation also includes the `IDocumentResponseHandler` interface. This enables the processing of responses for async requests. +2. **Batch Support:** When handling multiple E-Documents in batch operations, the `EDocument` record is populated using filters. +3. **Error Handling:** Properly handle HTTP response errors and log necessary details for debugging and monitoring. +4. **Logging:** Utilize the `SendContext` to log HTTP request details for traceability. + +## Sending Async + +The IDocumentResponseHandler interface provides a standardized method for retrieving responses from external E-Document services for asynchronously sent E-Documents. If the service is handling documents async, implement this interface on the same codeunit that implements IDocumentSender. + +The primary purpose of the `IDocumentResponseHandler` is to retrieve the status of a previously sent E-Document from the external service and appropriately update the E-Document Service Status based on the response. It also logs relevant HTTP response details automatically for better traceability. + +### Key Features +- **Asynchronous Response Handling:** Supports retrieving responses for asynchronously sent E-Documents. +- **Status Updates:** Automatically updates the E-Document status based on the external service's response. +- **Error Management:** Handles errors gracefully, including logging error details. +- **Automatic Logging:** Automatically logs HTTP request and response details when using `SendContext`. + +### How to Implement +To implement the `IDocumentResponseHandler` interface, you need to provide logic for the `GetResponse` procedure, which handles retrieving the status of an E-Document. Below is a detailed guide and example implementation. + +### `GetResponse` Method +The `GetResponse` method retrieves the response from the external service for an asynchronously sent E-Document. It takes three parameters: + +- **`EDocument`**: The record representing the E-Document for which the response is being retrieved. +- **`EDocumentService`**: The record containing service configuration details such as the URL and access tokens. +- **`SendContext`**: A codeunit that provides context and resources for the get-response operation. + +#### Example Implementation +Here is an example implementation of the `GetResponse` method: + +```al +procedure GetResponse( + var EDocument: Record "E-Document"; + var EDocumentService: Record "E-Document Service"; + SendContext: Codeunit SendContext +): Boolean +var + MyServiceSetup: Record MyServiceSetup; + HttpClient: HttpClient; + HttpRequest: HttpRequestMessage; + HttpResponse: HttpResponseMessage; +begin + // Prepare the HTTP request to check the status of the E-Document + HttpRequest := SendContext.Http().GetHttpRequestMessage(); + HttpRequest.Method := 'GET'; + HttpRequest.SetRequestUri(MyServiceSetup."Service URL" + '/status/' + EDocument."Document ID"); + HttpRequest.Headers.Add('Authorization', 'Bearer ' + MyServiceSetup."Access Token"); + + // Send the HTTP request + HttpClient.Send(HttpRequest, HttpResponse); + + // Set the response in SendContext for automatic logging + SendContext.Http().SetHttpResponseMessage(HttpResponse); + + // Handle the response based on the HTTP status code + if HttpResponse.IsSuccessStatusCode() then + exit(true); // The document was successfully processed + else if HttpResponse.HttpStatusCode() = 202 then + exit(false); // The document is still being processed + else begin + // Log the error and set the status to "Sending Error" + EDocumentErrorHelper.LogSimpleErrorMessage(EDocument, 'Error retrieving response: ' + Format(HttpResponse.HttpStatusCode())); + exit(false); end; -``` - -- SendBatch: use it to send a batch of E-Documents to external service. - -``` - procedure SendBatch(var EDocuments: Record "E-Document"; var TempBlob: Codeunit "Temp Blob"; var IsAsync: Boolean; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage); - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - Payload: Text; - begin - ExampleIntegration.Get(); - Payload := EDocumentHelper.TempBlobToTxt(TempBlob); - - // Manipulate the payload and set the headers if needed - HttpRequest.Content.WriteFrom(Payload); - HttpRequest.Method := 'POST'; - HttpRequest.SetRequestUri(ExampleIntegration."Sending Endpoint"); - - HttpClient.Send(HttpRequest, HttpResponse); - - // Parse the response if needed. +end; +``` + +## Receiving + +The `IDocumentReceiver` interface provides a standardized method for receiving and downloading electronic documents (E-Documents) from external API services. If your system requires integration with an E-Document service, implement this interface to handle document retrieval and data download operations efficiently. + +### Key Features +- **Document Retrieval**: Fetch one or more E-Documents from an external API and store their metadata in temporary blobs for processing. +- **Content Download**: Download the specific content (e.g., XML, PDF) of a document using its metadata. +- **Error Handling**: Log and handle errors gracefully during the retrieval and download processes. +- **Context Management**: Utilize `ReceiveContext` for managing HTTP requests and responses. + +### How to Implement +To implement the `IDocumentReceiver` interface, you need to provide logic for the `ReceiveDocuments` and `DownloadDocument` methods. Below are detailed explanations and example implementations. + +### `ReceiveDocuments` Method +The `ReceiveDocuments` method retrieves one or more documents from the external API and stores their metadata in temporary blobs for further processing. + +#### Parameters +- **`EDocumentService`**: Record representing the E-Document Service configuration, including the API endpoint. +- **`DocumentsMetadata`**: Temporary blob list for storing retrieved document metadata. +- **`ReceiveContext`**: A codeunit providing context and resources for the receive operation. + +#### Example Implementation +```al +procedure ReceiveDocuments(var EDocumentService: Record "E-Document Service"; DocumentsMetadata: Codeunit "Temp Blob List"; ReceiveContext: Codeunit ReceiveContext) +var + HttpRequest: HttpRequestMessage; + JsonResponse: JsonArray; + DocumentBlob: Codeunit "Temp Blob"; + JsonObject: JsonObject; + OutStream: OutStream; +begin + // Prepare the HTTP request + HttpRequest := ReceiveContext.Http().GetHttpRequestMessage(); + HttpRequest.Method := 'GET'; + HttpRequest.SetRequestUri(EDocumentService."Service URL" + '/documents'); + + // Send the HTTP request + HttpClient.Send(HttpRequest, ReceiveContext.Http().GetHttpResponseMessage()); + + // Parse the JSON response + JsonResponse.ReadFrom(HttpResponse.ContentAsText()); + + // Iterate over each object in the JSON array and add a temp blob to the DocumentsMetadata list + foreach JsonObject in JsonResponse do begin + DocumentBlob.CreateOutStream(OutStream); + JsonObject.WriteTo(OutStream); + DocumentsMetadata.Add(DocumentBlob); end; -``` - -- GetResponse: use it to get response of async send request. - -``` - procedure GetResponse(var EDocument: Record "E-Document"; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage): Boolean; - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - begin - ExampleIntegration.Get(); - - // Manipulate the payload and set the headers if needed - HttpRequest.Method := 'GET'; - HttpRequest.SetRequestUri(ExampleIntegration."Get Response Endpoint"); - - HttpClient.Send(HttpRequest, HttpResponse); - - // Parse the response if needed. +end; +``` + +--- + +### `DownloadDocument` Method +The `DownloadDocument` method downloads the content of a specific document (e.g., XML, PDF) using the document metadata. + +#### Parameters +- **`EDocument`**: Record representing the specific E-Document. +- **`EDocumentService`**: Record containing service configuration details such as the URL and authentication tokens. +- **`DocumentMetadata`**: Temporary blob containing the metadata for the document. +- **`ReceiveContext`**: A codeunit providing context and resources for the download operation. + +#### Example Implementation +```al +procedure DownloadDocument(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; DocumentMetadata: Codeunit "Temp Blob"; ReceiveContext: Codeunit ReceiveContext) +var + Request: Codeunit Requests; + HttpExecutor: Codeunit "Http Executor"; + ResponseContent: Text; + InStream: InStream; + DocumentId: Text; + OutStream: OutStream; +begin + // Read the document ID from the DocumentMetadata + DocumentMetadata.CreateInStream(InStream, TextEncoding::UTF8); + InStream.ReadText(DocumentId); + + if DocumentId = '' then begin + EDocumentErrorHelper.LogSimpleErrorMessage(EDocument, DocumentIdNotFoundErr); + exit; end; -``` -- GetApproval: use it to check if document is approved or rejected. + // Update the document record with the document ID + EDocument."Document Id" := CopyStr(DocumentId, 1, MaxStrLen(EDocument."Document Id")); + EDocument.Modify(); -``` - procedure GetResponse(var EDocument: Record "E-Document"; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage): Boolean; - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - begin - ExampleIntegration.Get(); - - // Manipulate the payload and set the headers if needed - HttpRequest.Method := 'GET'; - HttpRequest.SetRequestUri(ExampleIntegration."Get Response Endpoint"); - - HttpClient.Send(HttpRequest, HttpResponse); - - // Parse the response if needed. - end; -``` - -- GetApproval: Use it to check if document is approved or rejected. - -``` - procedure GetApproval(var EDocument: Record "E-Document"; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage): Boolean; - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - begin - ExampleIntegration.Get(); - - // Manipulate the payload and set the headers if needed - HttpRequest.Method := 'GET'; - HttpRequest.SetRequestUri(ExampleIntegration."Get Approval Endpoint"); + // Prepare the HTTP request + Request.Init(); + Request.Authenticate().CreateDownloadRequest(DocumentId); + ReceiveContext.Http().SetHttpRequestMessage(Request.GetRequest()); - HttpClient.Send(HttpRequest, HttpResponse); + // Execute the HTTP request + ResponseContent := HttpExecutor.ExecuteHttpRequest(Request, ReceiveContext.Http().GetHttpResponseMessage()); - // Parse the response if needed. - end; + // Store the response in the ReceiveContext + ReceiveContext.GetTempBlob().CreateOutStream(OutStream, TextEncoding::UTF8); + OutStream.WriteText(ResponseContent); +end; ``` -- Cancel: use it to send a cancel request for an E-Document. +## Sent Document Actions -``` - procedure Cancel(var EDocument: Record "E-Document"; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage): Boolean; - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - begin - ExampleIntegration.Get(); +The `ISentDocumentActions` interface provides a set of default actions for managing outgoing E-Documents through integration with external APIs. This interface simplifies the process of communicating with external services to manage document statuses effectively. Developers can use the provided methods to handle approval and cancellation processes seamlessly, ensuring accurate status updates within the system. - // Manipulate the payload and set the headers if needed - HttpRequest.Method := 'Delete'; - HttpRequest.SetRequestUri(ExampleIntegration."Cancel Endpoint"); +### Key Features - HttpClient.Send(HttpRequest, HttpResponse); +These actions allow you to: - // Parse the response if needed. - end; -``` +- **Check Approval Status**: Verify whether a sent E-Document has been approved by the external service. +- **Check Cancellation Status**: Determine whether a sent E-Document has been successfully canceled by the external service. +- **Streamline Integration**: Standardize HTTP request handling for approval and cancellation workflows. -- ReceiveDocument: use it to receive E-Document from external service. +### How to Implement -``` - procedure ReceiveDocument(var TempBlob: Codeunit "Temp Blob"; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage); - var - // Record that hold integration setup - ExampleIntegration: Record "Example - Test Integration"; - HttpClient: HttpClient; - Result: Text; - begin - ExampleIntegration.Get(); +To use the `ISentDocumentActions` interface, you need to implement the `GetApprovalStatus` and `GetCancellationStatus` methods. Each method interacts with the external API to manage the status of E-Documents. - HttpRequest.Method := 'GET'; - HttpRequest.SetRequestUri(ExampleIntegration."Receiving Endpoint"); +### `GetApprovalStatus` Method - HttpClient.Send(HttpRequest, HttpResponse); +#### Parameters +- `EDocument`: Record of type "E-Document" representing the document to be approved. +- `EDocumentService`: Record of type "E-Document Service" for interacting with the external API. +- `ActionContext`: Codeunit `ActionContext` for managing HTTP requests and responses. - HttpResponse.Content.ReadAs(Result); - WriteToTempBlob(TempBlob, Result); - end; -``` +#### Example Implementation +```al +procedure GetApprovalStatus(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; ActionContext: Codeunit ActionContext): Boolean +var + Request: Codeunit Requests; + HttpExecutor: Codeunit "Http Executor"; + ResponseContent: Text; +begin + // Prepare the HTTP request + Request.Init(); + Request.Authenticate().CreateApprovalRequest(EDocument."Document ID"); + ActionContext.Http().SetHttpRequestMessage(Request.GetRequest()); -- GetDocumentCountInBatch: use it to define how many received documents in batch import. + // Execute the HTTP request + ResponseContent := HttpExecutor.ExecuteHttpRequest(Request, ActionContext.Http().GetHttpResponseMessage()); -``` - procedure GetDocumentCountInBatch(var TempBlob: Codeunit "Temp Blob"): Integer - begin - // Parse the TempBlob to find how many documents in the batch. - exit(1); + // Process the response to determine the approval status + if ResponseContent.Contains('approved') then begin + ActionContext.SetStatus(ActionContext.GetStatus()."Approved"); + exit(true); + end else if ResponseContent.Contains('rejected') then begin + ActionContext.SetStatus(ActionContext.GetStatus()."Rejected"); + exit(true); end; -``` - -- GetIntegrationSetup: use it to define the integration setup of a service - -``` - procedure GetIntegrationSetup(var SetupPage: Integer; var SetupTable: Integer) - begin - SetupPage := page::"Example - Test Integration"; - SetupTable := Database::"Example - Test Integration"; + exit(false); +end; +``` + +### `GetCancellationStatus` Method + +#### Parameters +- `EDocument`: Record of type "E-Document" representing the document to be canceled. +- `EDocumentService`: Record of type "E-Document Service" for interacting with the external API. +- `ActionContext`: Codeunit `ActionContext` for managing HTTP requests and responses. + +#### Example Implementation +```al +procedure GetCancellationStatus(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; ActionContext: Codeunit ActionContext): Boolean +var + Request: Codeunit Requests; + HttpExecutor: Codeunit "Http Executor"; + ResponseContent: Text; +begin + // Prepare the HTTP request + Request.Init(); + Request.Authenticate().CreateCancellationRequest(EDocument."Document ID"); + ActionContext.Http().SetHttpRequestMessage(Request.GetRequest()); + + // Execute the HTTP request + ResponseContent := HttpExecutor.ExecuteHttpRequest(Request, ActionContext.Http().GetHttpResponseMessage()); + + // Process the response to determine the cancellation status + if ResponseContent.Contains('canceled') then begin + ActionContext.SetStatus(ActionContext.GetStatus()."Canceled"); + exit(true); end; -``` - -### 4. Implement Setup Wizard - -Create a setup wizard that directs customers through the process of configuring E-Documents, gathering all necessary details for seamless integration with the service. - -1. Create Wizard Page -2. First page should show an introduction about the feature -3. Integration Setup information: this can be url endpoints, username/passwords, certificates and schema uris -4. Setup Sending profiles -5. If your service will submit documents to the endpoint, get consent from the user and enable HTTP outgoing calls for document core extension and your localization - -Here is an example Wizard + exit(false); +end; ``` -page 6138 "Edocument Setup Wizard" -{ - PageType = NavigatePage; - ApplicationArea = All; - Caption = 'E-Document setup wizard'; - layout - { - area(Content) - { - group(MediaStandard) - { - Caption = ''; - Editable = false; - Visible = TopBannerVisible; - field("MediaResourcesStandard Media Reference"; MediaResourcesStandard."Media Reference") - { - ApplicationArea = All; - Editable = false; - ShowCaption = false; - } - } - group(FirstPage) - { - - Caption = ''; - Visible = FirstStepVisible; - group("IntroductionGroup") - { - Caption = 'Welcome to Edocument service'; - Visible = FirstStepVisible; - - group(LearnMoreLinkGroup) - { - Caption = ''; - - field(CanLearnMore; YouCanLearnMoreTxt) - { - ApplicationArea = Basic, Suite; - ShowCaption = false; - Editable = false; - MultiLine = true; - } - } - } - } - - group(SetupService) - { - Caption = ''; - Visible = SetupServiceStepVisible; - - field("Service Name"; EdocFormat.Code) - { - ApplicationArea = Basic, Suite; - Caption = 'Service Name'; - } - field(Description; EdocFormat.Description) - { - ApplicationArea = Basic, Suite; - } - field("Document Format"; EdocFormat."Document Format") - { - ApplicationArea = Basic, Suite; - } - field("Service Integration"; EdocFormat."Service Integration") - { - ApplicationArea = Basic, Suite; - } - - } - - group(SetupSendingProfiles) - { - Caption = ''; - Visible = SetupSendingProfilesStepVisible; - - field(UseWithDefaultDocSendingProfile; UseWithDefaultDocSendingProfile) - { - ApplicationArea = Basic, Suite; - Caption = 'Use with default Sending Profile'; - } - } - group(FinalPage) - { - Visible = FinalStepVisible; - group("That's it!") - { - Caption = 'That''s it!'; - - group(ChooseFinishGroup) - { - Caption = ''; - Visible = true; - field(ChooseFinish; ChooseFinishTxt) - { - ApplicationArea = Basic, Suite; - ShowCaption = false; - Editable = false; - MultiLine = true; - } - } - } - } - } - } +## Document Action - actions - { - area(processing) - { - action(ActionBack) - { - ApplicationArea = Basic, Suite; - Caption = 'Back'; - Enabled = BackActionEnabled; - Visible = BackActionEnabled; - Image = PreviousRecord; - InFooterBar = true; - - trigger OnAction() - begin - NextStep(true); - end; - } - action(ActionNext) - { - ApplicationArea = Basic, Suite; - Caption = 'Next'; - Enabled = NextActionEnabled; - Image = NextRecord; - InFooterBar = true; - - trigger OnAction() - begin - NextStep(false); - end; - } +### Key Features - action(ActionFinishAndEnable) - { - ApplicationArea = Basic, Suite; - Caption = 'Finish'; - Enabled = FinishActionEnabled; - Image = Approve; - InFooterBar = true; +The `IDocumentAction` interface defines a general-purpose method for performing various actions on E-Documents. It allows developers to: - trigger OnAction() - begin - FinishAndEnableAction(); - end; - } - } - } - - trigger OnInit() - begin - LoadTopBanners(); - end; +- **Perform Custom Actions**: Execute specified actions, such as resetting or updating the status of an E-Document. +- **Flexibly Integrate**: Use this interface to handle API requests and responses tailored to the specific action type. +- **Streamline Workflows**: Centralize action execution logic for consistent and maintainable integration. +- **Handles Logging and Error Handling**: When using an action using the interface, you get all the logging and error handling for free. All build directly in the framework. - trigger OnOpenPage() - begin - Step := Step::Start; - EnableControls(); +### How to Implement +To use the `IDocumentAction` interface, implement the `InvokeAction` method. This method executes a specified action by interacting with the external API and updates the E-Document status accordingly. Then extend the actions enum and call the `procedure InvokeAction(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; ActionType: Enum "Integration Action Type"; ActionContext: Codeunit ActionContext)` in the Integration Management codeunit to run the action. You can call this from your own action. - end; +### `InvokeAction` Method - local procedure FinishAndEnableAction() - var - EDocumentHelper: codeunit "E-Document Helper"; - begin - // Insert E-Document Services +#### Parameters - // Insert Document Sending Profile +- `EDocument`: Record of type "E-Document" representing the document on which the action is performed. +- `EDocumentService`: Record of type "E-Document Service" for interacting with the external API. +- `ActionContext`: Codeunit `ActionContext` for managing HTTP requests and responses. - // Insert WorkFlows - // You can find detailed examples in codeunit "E-Document Workflow Setup" +#### Example Implementation - // Enable EDocument Core extension to send http calls after getting user's consent - EDocumentHelper.AllowEDocumentCoreHttpCalls(); +```al +procedure InvokeAction(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; ActionContext: Codeunit ActionContext): Boolean +var + HttpClient: HttpClient; + HttpRequestMessage: HttpRequestMessage; + HttpResponseMessage: HttpResponseMessage; +begin + // Initialize the HTTP request + HttpRequestMessage.Method := 'POST'; + HttpRequestMessage.SetRequestUri('https://api.example.com/documents/reset'); + HttpRequestMessage.Content.WriteFromText('{"documentId": "' + EDocument."Document ID" + '"}'); - // Setup retention policy if needed - end; + // Send the HTTP request and receive the response + HttpClient.Send(HttpRequestMessage, HttpResponseMessage); - local procedure LoadTopBanners() - begin - if MediaRepositoryStandard.Get('AssistedSetup-NoText-400px.png', Format(ClientTypeManagement.GetCurrentClientType())) and - MediaRepositoryDone.Get('AssistedSetupDone-NoText-400px.png', Format(ClientTypeManagement.GetCurrentClientType())) - then - if MediaResourcesStandard.Get(MediaRepositoryStandard."Media Resources Ref") and - MediaResourcesDone.Get(MediaRepositoryDone."Media Resources Ref") - then - TopBannerVisible := MediaResourcesDone."Media Reference".HasValue; + // Process the response and set status + if HttpResponseMessage.IsSuccessStatusCode() then begin + ActionContext.SetStatus(Enum::"E-Document Service Status"::"MyStatus"); + exit(true); end; - local procedure NextStep(Backwards: Boolean) - begin - - if Backwards then - Step -= 1 - else - Step += 1; - - EnableControls(); - end; - - local procedure EnableControls() - begin - ResetControls(); - - case Step of - Step::Start: - ShowStartStep(); - Step::SetupService: - ShowSetupServiceStep(); - Step::SetupSendingProfiles: - ShowSetupSendingProfilesStep(); - Step::Finish: - ShowFinalStep(); - END; - end; - - local procedure ShowStartStep() - begin - FirstStepVisible := true; - BackActionEnabled := false; - end; - - local procedure ShowSetupServiceStep() - begin - FirstStepVisible := false; - SetupServiceStepVisible := true; - SetupSendingProfilesStepVisible := false; - FinalStepVisible := false; - - BackActionEnabled := true; - end; - - local procedure ShowSetupSendingProfilesStep() - begin - FirstStepVisible := false; - SetupServiceStepVisible := false; - SetupSendingProfilesStepVisible := true; - FinalStepVisible := false; - - BackActionEnabled := true; - end; - - local procedure ShowFinalStep() - begin - FirstStepVisible := false; - SetupServiceStepVisible := false; - SetupSendingProfilesStepVisible := false; - FinalStepVisible := true; - - FinishActionEnabled := true; - NextActionEnabled := false; - BackActionEnabled := true; - end; - - local procedure ResetControls() - begin - BackActionEnabled := true; - NextActionEnabled := true; - - FirstStepVisible := false; - SetupServiceStepVisible := false; - SetupSendingProfilesStepVisible := false; - FinalStepVisible := false; - end; - - var - MediaRepositoryStandard: Record "Media Repository"; - MediaRepositoryDone: Record "Media Repository"; - MediaResourcesStandard: Record "Media Resources"; - MediaResourcesDone: Record "Media Resources"; - EdocFormat: Record "E-Document Service" temporary; - ClientTypeManagement: Codeunit "Client Type Management"; - - Step: Option Start,SetupService,SetupSendingProfiles,Finish; - TopBannerVisible: Boolean; - BackActionEnabled, NextActionEnabled, FinishActionEnabled : Boolean; - FirstStepVisible, SetupServiceStepVisible, SetupSendingProfilesStepVisible, FinalStepVisible : Boolean; - UseWithDefaultDocSendingProfile: Boolean; - YouCanLearnMoreTxt: Label 'This wizard helps you to setup a connection to an electronic invoicing setup.'; - ChooseFinishTxt: Label 'Click ''Finish'' to insert the service connection. \You will still have to setup the settings for the endpoint and import/export mapping.'; -} + exit(false); +end; ``` -#### Helper Procedures +## Helper Procedures There is a set of EDocument Helper codeunit that consists of collection of utility methods that are highly recommended for building your localization app. These methods can assist you in various tasks, such as effortlessly logging any encountered error messages. @@ -701,6 +582,6 @@ procedure Create(EDocumentService: Record "E-Document Service"; var EDocument: R end; ``` -### Missing a feature +## Missing a feature If you believe there are any essential features that could enhance the ease of developing an e-document solution, kindly get in touch by generating an issue in this repository titled "E-document: < details >", and we will get back to you. diff --git a/Apps/W1/EDocument/app/src/Integration/EDocIntegrationManagement.Codeunit.al b/Apps/W1/EDocument/app/src/Integration/EDocIntegrationManagement.Codeunit.al index c161865070..b811856f2e 100644 --- a/Apps/W1/EDocument/app/src/Integration/EDocIntegrationManagement.Codeunit.al +++ b/Apps/W1/EDocument/app/src/Integration/EDocIntegrationManagement.Codeunit.al @@ -239,6 +239,13 @@ codeunit 6134 "E-Doc. Integration Management" #region Actions + /// + /// Invokes an IDocumentAction for the E-Document and E-Document Service. + /// + /// The record representing the E-Document to be used in the action. + /// The record representing the E-Document Service. + /// The action to be invoked. + /// The context for the action operation, providing access to resources and settings. procedure InvokeAction(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; ActionType: Enum "Integration Action Type"; ActionContext: Codeunit ActionContext) var ErrorCount: Integer; diff --git a/Apps/W1/EDocument/app/src/Integration/Interfaces/IDocumentSender.Interface.al b/Apps/W1/EDocument/app/src/Integration/Interfaces/IDocumentSender.Interface.al index 6841b3e950..1e828bace7 100644 --- a/Apps/W1/EDocument/app/src/Integration/Interfaces/IDocumentSender.Interface.al +++ b/Apps/W1/EDocument/app/src/Integration/Interfaces/IDocumentSender.Interface.al @@ -19,7 +19,8 @@ interface IDocumentSender /// The record representing the E-Document Service containing service configuration. /// The context for the send operation, providing access to resources and settings. /// - /// If the E-Document is sent asynchronously (IsAsync is true), a background job will automatically be queued to fetch the response using the procedure. + /// To support async sending, the implementation of this interface must also implement the IDocumentResponseHandler interface. + /// When batch sending is supported, the EDocument Record contains multiple E-Documents to be sent set by filters. /// If the HTTP request is populated within SendContext, the request content and headers will be automatically logged to communication logs. /// /// @@ -46,8 +47,6 @@ interface IDocumentSender /// // Send the HTTP request /// HttpClient.Send(HttpRequest, SendContext.Http().GetHttpResponseMessage()); /// - /// // Set IsAsync to true to enable asynchronous processing - /// SendContext.SetIsAsync(true); /// end; /// /// diff --git a/Apps/W1/EDocument/app/src/Processing/EDocumentProcessing.Codeunit.al b/Apps/W1/EDocument/app/src/Processing/EDocumentProcessing.Codeunit.al index 36c73e30b5..671f235690 100644 --- a/Apps/W1/EDocument/app/src/Processing/EDocumentProcessing.Codeunit.al +++ b/Apps/W1/EDocument/app/src/Processing/EDocumentProcessing.Codeunit.al @@ -81,7 +81,6 @@ codeunit 6108 "E-Document Processing" EDocumentServiceStatus.Status::"Approval Error"); if not EDocumentServiceStatus.IsEmpty() then begin - EDocument.Get(EDocument."Entry No"); EDocument.Validate(Status, EDocument.Status::Error); EDocument.Modify(true); exit; @@ -104,7 +103,6 @@ codeunit 6108 "E-Document Processing" // Example Service A and Service B // Service A -> Sent // Service B -> Exported - EDocument.Get(EDocument."Entry No"); if EDocumentServiceStatus.Count() = EDocServiceCount then EDocument.Validate(Status, EDocument.Status::Processed) else diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al index 01cdb168f8..7c58895d06 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al @@ -210,9 +210,9 @@ codeunit 6163 "E-Doc. PO Copilot Matching" if TempPurchaseLine.Get(Enum::"Purchase Document Type"::Order, TempAIProposalBuffer."Document Order No.", TempAIProposalBuffer."Document Line No.") then begin Clear(TempEDocMatchesThatWasMatched); EDocLineMatching.MatchOneToOne(TempEDocumentImportedLine, TempPurchaseLine, TempEDocMatchesThatWasMatched); - if (TempEDocMatchesThatWasMatched.Quantity > 0) then begin + if (TempEDocMatchesThatWasMatched."Precise Quantity" > 0) then begin - TempAIProposalBuffer."Matched Quantity" := TempEDocMatchesThatWasMatched.Quantity; + TempAIProposalBuffer."Matched Quantity" := TempEDocMatchesThatWasMatched."Precise Quantity"; TempAIProposalBuffer.Modify(); end else TempAIProposalBuffer.Delete(); diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotProp.Page.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotProp.Page.al index 3c6eac3422..817f306fdd 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotProp.Page.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/Copilot/EDocPOCopilotProp.Page.al @@ -158,6 +158,7 @@ page 6166 "E-Doc. PO Copilot Prop" AllLinesMatchedTxt: label 'All lines (100%) are matched. Review match proposals.'; SubsetOfLinesMatchedTxt: label '%1% of lines are matched. Review match proposals.', Comment = '%1 - a decimal between 0 and 100'; MultipleMatchTxt: Label 'Matched to multiple entries. Drill down to see more.'; + FullMatchAlreadyErr: Label 'E-Document line selection is already fully matched.'; trigger OnQueryClosePage(CloseAction: Action): Boolean var @@ -201,6 +202,9 @@ page 6166 "E-Doc. PO Copilot Prop" internal procedure SetData(InputEDocument: Record "E-Document"; var InputEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var InputPurchaseOrderLine: Record "Purchase Line" temporary) begin InputEDocumentImportedLine.SetRange("Fully Matched", false); + if InputEDocumentImportedLine.IsEmpty() then + Error(FullMatchAlreadyErr); + if InputEDocumentImportedLine.FindSet() then repeat TempEDocumentImportedLine.Copy(InputEDocumentImportedLine); @@ -237,7 +241,7 @@ page 6166 "E-Doc. PO Copilot Prop" RoundPrecision := EDocumentImportHelper.GetCurrencyRoundingPrecision(EDocument."Currency Code"); Discount := Round((EDocOrderMatches."E-Document Direct Unit Cost" * EDocOrderMatches."Line Discount %") / 100, RoundPrecision); DiscountedUnitCost := EDocOrderMatches."E-Document Direct Unit Cost" - Discount; - Sum += EDocOrderMatches.Quantity * DiscountedUnitCost; + Sum += EDocOrderMatches."Precise Quantity" * DiscountedUnitCost; until EDocOrderMatches.Next() = 0; end; @@ -246,7 +250,7 @@ page 6166 "E-Doc. PO Copilot Prop" TempAIProposalBuffer2: Record "E-Doc. PO Match Prop. Buffer" temporary; EDocLineNos: List of [Integer]; EDocLineNo: Integer; - Sum: Integer; + Sum: Decimal; begin if TempAIProposalBuffer.FindSet() then repeat diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocLineMatching.Codeunit.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocLineMatching.Codeunit.al index 0698945198..37da582480 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocLineMatching.Codeunit.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocLineMatching.Codeunit.al @@ -122,7 +122,7 @@ codeunit 6164 "E-Doc. Line Matching" UpdateMatchedQty(TempEDocumentImportedLine, -TempEDocumentImportedLine."Matched Quantity"); end; - procedure UpdateMatchedQty(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; Quantity: Integer) + procedure UpdateMatchedQty(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; Quantity: Decimal) begin TempEDocumentImportedLine.Validate("Matched Quantity", TempEDocumentImportedLine."Matched Quantity" + Quantity); TempEDocumentImportedLine.Modify(true); @@ -133,7 +133,7 @@ codeunit 6164 "E-Doc. Line Matching" UpdateQtyToInvoice(TempPurchaseLine, -TempPurchaseLine."Qty. to Invoice"); end; - procedure UpdateQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; Quantity: Integer) + procedure UpdateQtyToInvoice(var TempPurchaseLine: Record "Purchase Line" temporary; Quantity: Decimal) begin TempPurchaseLine.Validate("Qty. to Invoice", TempPurchaseLine."Qty. to Invoice" + Quantity); TempPurchaseLine.Modify(true); @@ -150,11 +150,11 @@ codeunit 6164 "E-Doc. Line Matching" repeat EDocOrderMatch.Copy(TempEDocMatchesThatWasMatched); PurchaseLine := EDocOrderMatch.GetPurchaseLine(); - PurchaseLine.Validate("Qty. to Invoice", PurchaseLine."Qty. to Invoice" + EDocOrderMatch.Quantity); + PurchaseLine.Validate("Qty. to Invoice", PurchaseLine."Qty. to Invoice" + EDocOrderMatch."Precise Quantity"); PurchaseLine.Modify(true); EDocImportedLine := EDocOrderMatch.GetImportedLine(); - EDocImportedLine.Validate("Matched Quantity", EDocImportedLine."Matched Quantity" + EDocOrderMatch.Quantity); + EDocImportedLine.Validate("Matched Quantity", EDocImportedLine."Matched Quantity" + EDocOrderMatch."Precise Quantity"); EDocImportedLine.Modify(true); if RemoveMatch then @@ -175,8 +175,8 @@ codeunit 6164 "E-Doc. Line Matching" repeat EDocOrderMatch.SetRange("Document Order No.", TempPurchaseLine."Document No."); EDocOrderMatch.SetRange("Document Line No.", TempPurchaseLine."Line No."); - EDocOrderMatch.CalcSums(Quantity); - TempPurchaseLine.Validate("Qty. to Invoice", EDocOrderMatch.Quantity); + EDocOrderMatch.CalcSums("Precise Quantity"); + TempPurchaseLine.Validate("Qty. to Invoice", EDocOrderMatch."Precise Quantity"); TempPurchaseLine.Modify(); until TempPurchaseLine.Next() = 0; end; @@ -220,7 +220,7 @@ codeunit 6164 "E-Doc. Line Matching" if EDocOrderMatch.FindSet() then repeat TempEDocMatchesThatWasRemoved := EDocOrderMatch; - TempEDocMatchesThatWasRemoved.Quantity *= -1; + TempEDocMatchesThatWasRemoved."Precise Quantity" *= -1; TempEDocMatchesThatWasRemoved.Insert(); until EDocOrderMatch.Next() = 0; until TempPurchaseLine.Next() = 0; @@ -368,7 +368,7 @@ codeunit 6164 "E-Doc. Line Matching" TempEDocumentImportedLine.Reset(); end; - procedure InsertOrderMatch(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var TempPurchaseLine: Record "Purchase Line" temporary; var TempEDocMatchesThatWasMatched: Record "E-Doc. Order Match" temporary; Quantity: Integer; FullMatch: Boolean) + procedure InsertOrderMatch(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var TempPurchaseLine: Record "Purchase Line" temporary; var TempEDocMatchesThatWasMatched: Record "E-Doc. Order Match" temporary; Quantity: Decimal; FullMatch: Boolean) begin TempEDocMatchesThatWasMatched.SetRange("Document Order No.", TempPurchaseLine."Document No."); TempEDocMatchesThatWasMatched.SetRange("Document Line No.", TempPurchaseLine."Line No."); @@ -382,7 +382,7 @@ codeunit 6164 "E-Doc. Line Matching" TempEDocMatchesThatWasMatched.Validate("Document Line No.", TempPurchaseLine."Line No."); TempEDocMatchesThatWasMatched.Validate("E-Document Entry No.", TempEDocumentImportedLine."E-Document Entry No."); TempEDocMatchesThatWasMatched.Validate("E-Document Line No.", TempEDocumentImportedLine."Line No."); - TempEDocMatchesThatWasMatched.Validate(Quantity, Quantity); + TempEDocMatchesThatWasMatched.Validate("Precise Quantity", Quantity); TempEDocMatchesThatWasMatched.Validate("E-Document Direct Unit Cost", TempEDocumentImportedLine."Direct Unit Cost"); TempEDocMatchesThatWasMatched.Validate("PO Direct Unit Cost", TempPurchaseLine."Direct Unit Cost"); TempEDocMatchesThatWasMatched.Validate("Line Discount %", TempEDocumentImportedLine."Line Discount %"); @@ -395,7 +395,7 @@ codeunit 6164 "E-Doc. Line Matching" procedure MatchOneToOne(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var TempPurchaseLine: Record "Purchase Line" temporary; var TempEDocMatchesThatWasMatched: Record "E-Doc. Order Match" temporary) var - RemaningQuantityToMatch, TotalThatCanBeInvoiced : Integer; + RemaningQuantityToMatch, TotalThatCanBeInvoiced : Decimal; FullMatch: Boolean; begin // Calculate the quantity that is available to match for purchase order line @@ -439,7 +439,7 @@ codeunit 6164 "E-Doc. Line Matching" procedure FilterOutFullyMatchedLines(var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var TempPurchaseLine: Record "Purchase Line" temporary) var - TotalThatCanBeInvoiced: Integer; + TotalThatCanBeInvoiced: Decimal; begin TempEDocumentImportedLine.SetRange("Fully Matched", false); diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderLineMatching.Page.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderLineMatching.Page.al index 808c06436c..24a56eae0e 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderLineMatching.Page.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderLineMatching.Page.al @@ -133,7 +133,6 @@ page 6167 "E-Doc. Order Line Matching" trigger OnAction() begin EDocMatchOrderLines.RemoveAllMatches(Rec); - if DiscountNotification.Recall() then; if CostNotification.Recall() then; SetUserInteractions(); end; @@ -223,10 +222,9 @@ page 6167 "E-Doc. Order Line Matching" var FeatureTelemetry: Codeunit "Feature Telemetry"; EDocMatchOrderLines: Codeunit "E-Doc. Line Matching"; - DiscountNotification, CostNotification : Notification; + CostNotification: Notification; CopilotActionVisible, AutoRunCopilot : Boolean; - LineDiscountVaryMatchMsg: Label 'Matched e-document lines (%1) has Line Discount % different from matched purchase order line. Please verify matches are correct.', Comment = '%1 - Line number'; - LineCostVaryMatchMsg: Label 'Matched e-document lines (%1) has Direct Unit Cost different from matched purchase order line. Please verify matches are correct.', Comment = '%1 - Line number'; + LineCostVaryMatchMsg: Label 'Matched e-document lines (%1) has cost different from matched purchase order line. Please verify matches are correct.', Comment = '%1 - Line number'; NoMatchesFoundMsg: Label 'Copilot could not find any line matches. Please review manually'; GlobalDataCaptionExpressionTxt: Label 'Purchase Order %1', Comment = '%1 - Purchase order number'; @@ -364,25 +362,23 @@ page 6167 "E-Doc. Order Line Matching" var EDocImportedLine: Record "E-Doc. Imported Line"; PurchaseLine: Record "Purchase Line"; - LineDiscountNos, DirectUnitCostNos : Text; + DiffCostNos: Text; + EDocLineAmount, PurchLineAmount : Decimal; begin if TempEDocMatches.FindSet() then repeat EDocImportedLine := TempEDocMatches.GetImportedLine(); PurchaseLine := TempEDocMatches.GetPurchaseLine(); - if EDocImportedLine."Line Discount %" <> PurchaseLine."Line Discount %" then - LineDiscountNos += Format(EDocImportedLine."Line No.") + ','; - if EDocImportedLine."Direct Unit Cost" <> PurchaseLine."Direct Unit Cost" then - DirectUnitCostNos += Format(EDocImportedLine."Line No.") + ','; + EDocLineAmount := ((100 - EDocImportedLine."Line Discount %") / 100) * EDocImportedLine."Direct Unit Cost"; + PurchLineAmount := ((100 - PurchaseLine."Line Discount %") / 100) * PurchaseLine."Direct Unit Cost"; + + if EDocLineAmount <> PurchLineAmount then + DiffCostNos += Format(EDocImportedLine."Line No.") + ','; // Add line number to the list until TempEDocMatches.Next() = 0; - if LineDiscountNos.EndsWith(',') then begin - LineDiscountNos := LineDiscountNos.Substring(1, StrLen(LineDiscountNos) - 1); - SendNotification(DiscountNotification, StrSubstNo(LineDiscountVaryMatchMsg, LineDiscountNos)); - end; - if DirectUnitCostNos.EndsWith(',') then begin - DirectUnitCostNos := DirectUnitCostNos.Substring(1, StrLen(DirectUnitCostNos) - 1); - SendNotification(CostNotification, StrSubstNo(LineCostVaryMatchMsg, DirectUnitCostNos)); + if DiffCostNos.EndsWith(',') then begin + DiffCostNos := DiffCostNos.Substring(1, StrLen(DiffCostNos) - 1); + SendNotification(CostNotification, StrSubstNo(LineCostVaryMatchMsg, DiffCostNos)); end; end; diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Page.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Page.al index e5ca544bb7..977511cdc0 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Page.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Page.al @@ -38,7 +38,7 @@ page 6164 "E-Doc. Order Match" Caption = 'Purchase order Description'; ToolTip = 'Specifies the description of matched Purchase Order Line.'; } - field("Matched Quantity"; Rec.Quantity) + field("Matched Quantity"; Rec."Precise Quantity") { Caption = 'Matched Quantity'; ToolTip = 'Specifies the quantity that was matched for the imported line to the purchase order line.'; diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Table.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Table.al index 15fb0efa17..811e597043 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Table.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocOrderMatch.Table.al @@ -31,10 +31,20 @@ table 6164 "E-Doc. Order Match" Caption = 'E-Document Imported Line No.'; TableRelation = "E-Doc. Imported Line"."Line No." where("E-Document Entry No." = field("E-Document Entry No.")); } +#if not CLEANSCHEMA29 field(5; Quantity; Integer) { Caption = 'Quantity'; + ObsoleteReason = 'This field has been replaced by the Precise Quantity field.'; +#if CLEAN26 + ObsoleteState = Removed; + ObsoleteTag = '29.0'; +#else + ObsoleteState = Pending; + ObsoleteTag = '26.0'; +#endif } +#endif #pragma warning disable AS0005, AS0125 field(6; "E-Document Direct Unit Cost"; Decimal) { @@ -65,6 +75,10 @@ table 6164 "E-Doc. Order Match" Caption = 'Fully Matched'; } #pragma warning restore AS0005, AS0125 + field(13; "Precise Quantity"; Decimal) + { + Caption = 'Quantity'; + } } keys @@ -75,7 +89,7 @@ table 6164 "E-Doc. Order Match" } key(Key2; "E-Document Entry No.", "E-Document Line No.", "Document Order No.") { - SumIndexFields = Quantity; + SumIndexFields = "Precise Quantity"; } } @@ -96,7 +110,7 @@ table 6164 "E-Doc. Order Match" TempEDocMatches.Validate("Document Line No.", TempAIProposalBuffer."Document Line No."); TempEDocMatches.Validate("E-Document Entry No.", TempAIProposalBuffer."E-Document Entry No."); TempEDocMatches.Validate("E-Document Line No.", TempAIProposalBuffer."E-Document Line No."); - TempEDocMatches.Validate(Quantity, TempAIProposalBuffer."Matched Quantity"); + TempEDocMatches.Validate("Precise Quantity", TempAIProposalBuffer."Matched Quantity"); TempEDocMatches.Validate("E-Document Direct Unit Cost", TempAIProposalBuffer."E-Document Direct Unit Cost"); TempEDocMatches.Validate("Line Discount %", TempAIProposalBuffer."E-Document Line Discount"); TempEDocMatches.Validate("PO Direct Unit Cost", TempAIProposalBuffer."PO Direct Unit Cost"); diff --git a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocPurchaseOrderSub.Page.al b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocPurchaseOrderSub.Page.al index 24a36af5f7..0c34b2a70c 100644 --- a/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocPurchaseOrderSub.Page.al +++ b/Apps/W1/EDocument/app/src/Processing/OrderMatching/EDocPurchaseOrderSub.Page.al @@ -52,14 +52,12 @@ page 6168 "E-Doc. Purchase Order Sub" field("Available Quantity"; Rec."Quantity Received" - Rec."Quantity Invoiced") { Caption = 'Available Quantity'; - DecimalPlaces = 0 : 0; StyleExpr = StyleTxt; Editable = false; ToolTip = 'Specifies the quantity that can be matched to this line.'; } field("Qty. to Invoice"; Rec."Qty. to Invoice") { - DecimalPlaces = 0 : 0; StyleExpr = StyleTxt; Editable = false; ToolTip = 'Specifies the quantity that is matched to this line. Matching imported lines to this line will increase its value with the quantity of the imported line.'; @@ -115,9 +113,9 @@ page 6168 "E-Doc. Purchase Order Sub" repeat EDocOrderMatch.SetRange("Document Order No.", TempPurchaseLine."Document No."); EDocOrderMatch.SetRange("Document Line No.", TempPurchaseLine."Line No."); - EDocOrderMatch.CalcSums(Quantity); + EDocOrderMatch.CalcSums("Precise Quantity"); PurchaseLine.Copy(TempPurchaseLine); - PurchaseLine.Validate("Qty. to Invoice", EDocOrderMatch.Quantity); + PurchaseLine.Validate("Qty. to Invoice", EDocOrderMatch."Precise Quantity"); PurchaseLine.Modify(); until TempPurchaseLine.Next() = 0; end; diff --git a/Apps/W1/EDocument/app/src/Service/EdocumentService.Page.al b/Apps/W1/EDocument/app/src/Service/EdocumentService.Page.al index e7f88e4b12..0403d53eb2 100644 --- a/Apps/W1/EDocument/app/src/Service/EdocumentService.Page.al +++ b/Apps/W1/EDocument/app/src/Service/EdocumentService.Page.al @@ -269,28 +269,25 @@ page 6133 "E-Document Service" var EDocumentIntegration: Interface "E-Document Integration"; SetupPage, SetupTable : Integer; + PageOpened: Boolean; begin - OnBeforeOpenServiceIntegrationSetupPage(Rec, SetupPage); - if SetupPage = 0 then begin + OnBeforeOpenServiceIntegrationSetupPage(Rec, PageOpened); + if not PageOpened then begin EDocumentIntegration := Rec."Service Integration"; EDocumentIntegration.GetIntegrationSetup(SetupPage, SetupTable); end; - if SetupPage = 0 then - Message(ServiceIntegrationSetupMsg) - else - Page.Run(SetupPage); + if not PageOpened then + Message(ServiceIntegrationSetupMsg); end; #else local procedure RunSetupServiceIntegration() var - SetupPage: Integer; + PageOpened: Boolean; begin - OnBeforeOpenServiceIntegrationSetupPage(Rec, SetupPage); - if SetupPage = 0 then - Message(ServiceIntegrationSetupMsg) - else - Page.Run(SetupPage); + OnBeforeOpenServiceIntegrationSetupPage(Rec, PageOpened); + if not PageOpened then + Message(ServiceIntegrationSetupMsg); end; #endif @@ -336,7 +333,7 @@ page 6133 "E-Document Service" [IntegrationEvent(false, false)] - local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var SetupPage: Integer) + local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var IsServiceIntegrationSetupRun: Boolean) begin end; diff --git a/Apps/W1/EDocument/demo data/1.Setup Data/CreateEDocumentSetup.Codeunit.al b/Apps/W1/EDocument/demo data/1.Setup Data/CreateEDocumentSetup.Codeunit.al index 24ab0011a1..0a9108cc8d 100644 --- a/Apps/W1/EDocument/demo data/1.Setup Data/CreateEDocumentSetup.Codeunit.al +++ b/Apps/W1/EDocument/demo data/1.Setup Data/CreateEDocumentSetup.Codeunit.al @@ -112,5 +112,5 @@ codeunit 5374 "Create E-Document Setup" var EDocCategoryTxt: Label 'EDOC', Locked = true; - ServiceCodeLbl: Label 'E-DOCUMENTS'; + ServiceCodeLbl: Label 'E-DOCUMENTS', MaxLength = 20; } \ No newline at end of file diff --git a/Apps/W1/EDocument/demo data/2.Master Data/CreateEDocumentMasterData.Codeunit.al b/Apps/W1/EDocument/demo data/2.Master Data/CreateEDocumentMasterData.Codeunit.al index 64a647e37e..a4bebb9778 100644 --- a/Apps/W1/EDocument/demo data/2.Master Data/CreateEDocumentMasterData.Codeunit.al +++ b/Apps/W1/EDocument/demo data/2.Master Data/CreateEDocumentMasterData.Codeunit.al @@ -11,11 +11,13 @@ codeunit 5375 "Create E-Document Master Data" local procedure SetVendorsToUseEDocOrder() var - CreateCommonCustomerVendor: Codeunit "Create Common Customer/Vendor"; + EDocumentModuleSetup: Record "E-Document Module Setup"; begin - UpdateVendor(CreateCommonCustomerVendor.DomesticVendor1()); - UpdateVendor(CreateCommonCustomerVendor.DomesticVendor2()); - UpdateVendor(CreateCommonCustomerVendor.DomesticVendor3()); + EDocumentModuleSetup.Get(); + + UpdateVendor(EDocumentModuleSetup."Vendor No. 1"); + UpdateVendor(EDocumentModuleSetup."Vendor No. 2"); + UpdateVendor(EDocumentModuleSetup."Vendor No. 3"); end; local procedure UpdateVendor(VendorNo: Code[20]) @@ -83,6 +85,6 @@ codeunit 5375 "Create E-Document Master Data" var ContosoUtilities: Codeunit "Contoso Utilities"; - BEANSTok: Label 'BEANS', MaxLength = 10; - BeansLbl: Label 'Beans', MaxLength = 10; + BEANSTok: Label 'BEANS', MaxLength = 20; + BeansLbl: Label 'Beans', MaxLength = 100; } \ No newline at end of file diff --git a/Apps/W1/EDocument/demo data/3.Transactions/CreateEDocumentTransactions.Codeunit.al b/Apps/W1/EDocument/demo data/3.Transactions/CreateEDocumentTransactions.Codeunit.al index 9420f4c20d..ff1ecf39e1 100644 --- a/Apps/W1/EDocument/demo data/3.Transactions/CreateEDocumentTransactions.Codeunit.al +++ b/Apps/W1/EDocument/demo data/3.Transactions/CreateEDocumentTransactions.Codeunit.al @@ -24,7 +24,7 @@ codeunit 5376 "Create E-Document Transactions" ContosoPurchase: Codeunit "Contoso Purchase"; CommonUoM: Codeunit "Create Common Unit Of Measure"; begin - if EDocumentModuleSetup.Get() then; + EDocumentModuleSetup.Get(); PurchaseHeader := CreateOrder(EDocumentModuleSetup."Vendor No. 1"); ContosoPurchase.InsertPurchaseLineWithItem(PurchaseHeader, 'WRB-1000', 50, CommonUoM.Piece(), 100); ContosoPurchase.InsertPurchaseLineWithItem(PurchaseHeader, 'WRB-1001', 50, CommonUoM.Piece(), 100); @@ -496,9 +496,12 @@ codeunit 5376 "Create E-Document Transactions" local procedure CreateOrder(VendorNo: Code[20]): Record "Purchase Header"; var + Vendor: Record Vendor; ContosoPurchase: Codeunit "Contoso Purchase"; begin - exit(ContosoPurchase.InsertPurchaseHeader(Enum::"Purchase Document Type"::Order, VendorNo, '', 20240301D, '')); + Vendor.Get(VendorNo); + + exit(ContosoPurchase.InsertPurchaseHeader(Enum::"Purchase Document Type"::Order, VendorNo, '', 20240301D, 20240301D, 0D, Vendor."Payment Terms Code", '', '', '', 20240301D, Vendor."Payment Method Code")); end; [EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post (Yes/No)", OnBeforeConfirmPost, '', false, false)] diff --git a/Apps/W1/EDocument/demo data/EDocumentContosoModule.Codeunit.al b/Apps/W1/EDocument/demo data/EDocumentContosoModule.Codeunit.al index 716c547589..75871c32ad 100644 --- a/Apps/W1/EDocument/demo data/EDocumentContosoModule.Codeunit.al +++ b/Apps/W1/EDocument/demo data/EDocumentContosoModule.Codeunit.al @@ -17,20 +17,20 @@ codeunit 5373 "E-Document Contoso Module" implements "Contoso Demo Data Module" procedure CreateSetupData() begin - // Codeunit.Run(Codeunit::"Create E-Document Setup"); + Codeunit.Run(Codeunit::"Create E-Document Setup"); end; procedure CreateMasterData() - // var - // EDocumentModuleSetup: Record "E-Document Module Setup"; + var + EDocumentModuleSetup: Record "E-Document Module Setup"; begin - // EDocumentModuleSetup.InitEDocumentModuleSetup(); - // Codeunit.Run(Codeunit::"Create E-Document Master Data"); + EDocumentModuleSetup.InitEDocumentModuleSetup(); + Codeunit.Run(Codeunit::"Create E-Document Master Data"); end; procedure CreateTransactionalData() begin - // Codeunit.Run(Codeunit::"Create E-Document Transactions"); + Codeunit.Run(Codeunit::"Create E-Document Transactions"); end; procedure CreateHistoricalData() diff --git a/Apps/W1/EDocument/demo data/EDocumentContosoModule.EnumExt.al b/Apps/W1/EDocument/demo data/EDocumentContosoModule.EnumExt.al index c86ee30820..afe70e5607 100644 --- a/Apps/W1/EDocument/demo data/EDocumentContosoModule.EnumExt.al +++ b/Apps/W1/EDocument/demo data/EDocumentContosoModule.EnumExt.al @@ -2,6 +2,7 @@ enumextension 5373 "E-Document Contoso Module" extends "Contoso Demo Data Module { value(5373; "E-Document Contoso Module") { + Caption = 'E-Document'; Implementation = "Contoso Demo Data Module" = "E-Document Contoso Module"; } } \ No newline at end of file diff --git a/Apps/W1/EDocument/demo data/EDocumentModuleSetup.Table.al b/Apps/W1/EDocument/demo data/EDocumentModuleSetup.Table.al index fc95b71be4..8f386485ee 100644 --- a/Apps/W1/EDocument/demo data/EDocumentModuleSetup.Table.al +++ b/Apps/W1/EDocument/demo data/EDocumentModuleSetup.Table.al @@ -51,36 +51,19 @@ table 5375 "E-Document Module Setup" procedure InitEDocumentModuleSetup() var - CreateContosoCustomerVendor: Codeunit "Create Common Customer/Vendor"; + CreateVendor: Codeunit "Create Vendor"; begin Rec.InitRecord(); if Rec."Vendor No. 1" = '' then - if IsDomesticVendor() then - Rec.Validate("Vendor No. 1", CreateContosoCustomerVendor.DomesticVendor1()) - else - Rec.Validate("Vendor No. 1", CreateContosoCustomerVendor.DomesticVendor2()); + Rec.Validate("Vendor No. 1", CreateVendor.DomesticFirstUp()); + if Rec."Vendor No. 2" = '' then - Rec.Validate("Vendor No. 2", CreateContosoCustomerVendor.DomesticVendor2()); + Rec.Validate("Vendor No. 2", CreateVendor.DomesticWorldImporter()); + if Rec."Vendor No. 3" = '' then - if IsDomesticVendor() then - Rec.Validate("Vendor No. 3", CreateContosoCustomerVendor.DomesticVendor3()) - else - Rec.Validate("Vendor No. 3", CreateContosoCustomerVendor.DomesticVendor2()); + Rec.Validate("Vendor No. 3", CreateVendor.DomesticNodPublisher()); Rec.Modify(); end; - - local procedure IsDomesticVendor(): Boolean - var - EnvironmentInformation: Codeunit "Environment Information"; - ApplicationFamily: Text; - begin - // Temporary address incorrect local vendors in these countries. - ApplicationFamily := EnvironmentInformation.GetApplicationFamily(); - if ApplicationFamily in ['NL', 'FR', 'BE'] then - exit(false); - - exit(true); - end; } \ No newline at end of file diff --git a/Apps/W1/EDocument/test/src/LibraryEDocument.Codeunit.al b/Apps/W1/EDocument/test/src/LibraryEDocument.Codeunit.al index ef05faa87b..f331edeb50 100644 --- a/Apps/W1/EDocument/test/src/LibraryEDocument.Codeunit.al +++ b/Apps/W1/EDocument/test/src/LibraryEDocument.Codeunit.al @@ -320,7 +320,7 @@ codeunit 139629 "Library - E-Document" LibrarySales.CreateSalesLine(SalesLine, SalesHeader, SalesLine.Type::Item, StandardItem."No.", 1); end; - procedure CreatePurchaseOrderWithLine(var Vendor: Record Vendor; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; Quantity: Integer) + procedure CreatePurchaseOrderWithLine(var Vendor: Record Vendor; var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; Quantity: Decimal) begin LibraryPurchase.CreatePurchHeader(PurchaseHeader, Enum::"Purchase Document Type"::Order, Vendor."No."); if StandardItem."No." = '' then diff --git a/Apps/W1/EDocument/test/src/Matching/EDocLineMatchingTest.Codeunit.al b/Apps/W1/EDocument/test/src/Matching/EDocLineMatchingTest.Codeunit.al index db294cab03..98279c80b9 100644 --- a/Apps/W1/EDocument/test/src/Matching/EDocLineMatchingTest.Codeunit.al +++ b/Apps/W1/EDocument/test/src/Matching/EDocLineMatchingTest.Codeunit.al @@ -75,7 +75,7 @@ codeunit 139659 "E-Doc. Line Matching Test" Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), ''); Assert.AreEqual('0', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), ''); // [THEN] we have qty 5 and qty to invoice 0 - Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); + Assert.AreEqual('5.00', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); Assert.AreEqual('0', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), ''); // [GIVEN] We click "Match Manually" action @@ -85,7 +85,7 @@ codeunit 139659 "E-Doc. Line Matching Test" Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), ''); Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), ''); // [THEN] we have qty 5 and qty to invoice 5 - Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); + Assert.AreEqual('5.00', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), ''); end; @@ -207,7 +207,7 @@ codeunit 139659 "E-Doc. Line Matching Test" EDocument.SetRecFilter(); end; - local procedure CreatePurchaseOrderWithLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; Quantity: Integer) + local procedure CreatePurchaseOrderWithLine(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; Quantity: Decimal) begin LibraryEdoc.CreatePurchaseOrderWithLine(Vendor, PurchaseHeader, PurchaseLine, Quantity); PurchaseLine.SetRange("Document No.", PurchaseHeader."No."); @@ -238,7 +238,7 @@ codeunit 139659 "E-Doc. Line Matching Test" TempEDocImportedLine.Insert(); end; - local procedure CreateImportedLine(EDocument: Record "E-Document"; LineNo: Integer; Quantity: Integer; Type: Enum "Purchase Line Type") + local procedure CreateImportedLine(EDocument: Record "E-Document"; LineNo: Integer; Quantity: Decimal; Type: Enum "Purchase Line Type") var EDocImportedLine: Record "E-Doc. Imported Line"; begin @@ -303,7 +303,7 @@ codeunit 139659 "E-Doc. Line Matching Test" Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), ''); Assert.AreEqual('0', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), ''); // [THEN] we have qty 5 and qty to invoice 0 - Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); + Assert.AreEqual('5.00', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); Assert.AreEqual('0', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), ''); // [GIVEN] We click "Match Manually" action @@ -313,11 +313,75 @@ codeunit 139659 "E-Doc. Line Matching Test" Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), ''); Assert.AreEqual('5', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), ''); // [THEN] we have qty 5 and qty to invoice 5 - Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); + Assert.AreEqual('5.00', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), ''); Assert.AreEqual('5', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), ''); end; #endif #pragma warning restore AS0018 + [Test] + procedure MatchDecimalQuantitySuccess() + var + EDocument: Record "E-Document"; + EDocImportedLine: Record "E-Doc. Imported Line"; + PurchaseHeader: Record "Purchase Header"; + PurchaseLine: Record "Purchase Line"; + EDocLineMatching: Codeunit "E-Doc. Line Matching"; + EDocLog: Codeunit "E-Document Log"; + EDocProcessing: Codeunit "E-Document Processing"; + EDocOrderLineMatchingPage: TestPage "E-Doc. Order Line Matching"; + begin + // [FEATURE] [E-Document] [Matching] + // [SCENARIO] Match imported line with decimal quantity to purchase order line with decimal quantity + + // Setup E-Document with link to purchase order + Initialize(Enum::"Service Integration"::Mock); + + // [GIVEN] We create a purchase order with a line of quantity 5.5 + CreatePurchaseOrderWithLine(PurchaseHeader, PurchaseLine, 5.5); + CreateEDocumentWithPOReference(EDocument, PurchaseHeader); + + // Receive + LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, false); + LibraryPurchase.ReopenPurchaseDocument(PurchaseHeader); + EDocument.FindLast(); + EDocLog.InsertLog(EDocument, EDocumentService, Enum::"E-Document Service Status"::"Order Linked"); + EDocProcessing.InsertServiceStatus(EDocument, EDocumentService, Enum::"E-Document Service Status"::"Order Linked"); + + // [GIVEN] We imported an item with quantity 5.5 + CreateImportedLine(EDocument, 10000, 5.5, Enum::"Purchase Line Type"::Item); + + // Verify counts + EDocImportedLine.SetRange("E-Document Entry No.", EDocument."Entry No"); + Assert.RecordCount(EDocImportedLine, 1); + PurchaseLine.SetRange("Document No.", PurchaseHeader."No."); + Assert.RecordCount(PurchaseLine, 1); + + // [WHEN] Open Matching page and select first entry + Commit(); + LibraryPermission.SetTeamMember(); + + EDocOrderLineMatchingPage.Trap(); + EDocLineMatching.RunMatching(EDocument); + + EDocOrderLineMatchingPage.ImportedLines.First(); + EDocOrderLineMatchingPage.OrderLines.First(); + + // [THEN] Verify quantities before matching + Assert.AreEqual('5.5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), 'Incorrect imported line quantity.'); + Assert.AreEqual('0', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), 'Imported line should not be matched yet.'); + Assert.AreEqual('5.50', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), 'Incorrect order line available quantity.'); + Assert.AreEqual('0', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), 'Order line should not have quantity to invoice yet.'); + + // [GIVEN] We click "Match Manually" action + EDocOrderLineMatchingPage.MatchManual_Promoted.Invoke(); + + // [THEN] Verify quantities after matching + Assert.AreEqual('5.5', EDocOrderLineMatchingPage.ImportedLines.Quantity.Value(), 'Incorrect imported line quantity after matching.'); + Assert.AreEqual('5.5', EDocOrderLineMatchingPage.ImportedLines."Matched Quantity".Value(), 'Imported line should be fully matched.'); + Assert.AreEqual('5.50', EDocOrderLineMatchingPage.OrderLines."Available Quantity".Value(), 'Incorrect order line available quantity after matching.'); + Assert.AreEqual('5.5', EDocOrderLineMatchingPage.OrderLines."Qty. to Invoice".Value(), 'Order line should have quantity to invoice after matching.'); + end; + } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Avalara/app/src/IntegrationImpl.Codeunit.al b/Apps/W1/EDocumentConnectors/Avalara/app/src/IntegrationImpl.Codeunit.al index 10e63fb787..3664ffbc80 100644 --- a/Apps/W1/EDocumentConnectors/Avalara/app/src/IntegrationImpl.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Avalara/app/src/IntegrationImpl.Codeunit.al @@ -35,10 +35,15 @@ codeunit 6372 "Integration Impl." implements IDocumentSender, IDocumentResponseH end; [EventSubscriber(ObjectType::Page, Page::"E-Document Service", OnBeforeOpenServiceIntegrationSetupPage, '', false, false)] - local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var SetupPage: Integer) + local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var IsServiceIntegrationSetupRun: Boolean) + var + ConnectionSetupCard: Page "Connection Setup Card"; begin - if EDocumentService."Service Integration V2" = EDocumentService."Service Integration V2"::Avalara then - SetupPage := Page::"Connection Setup Card"; + if EDocumentService."Service Integration V2" <> EDocumentService."Service Integration V2"::Avalara then + exit; + + ConnectionSetupCard.RunModal(); + IsServiceIntegrationSetupRun := true; end; diff --git a/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroIntegrationImpl.Codeunit.al b/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroIntegrationImpl.Codeunit.al index c86fc051e1..d1fc2bc329 100644 --- a/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroIntegrationImpl.Codeunit.al +++ b/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroIntegrationImpl.Codeunit.al @@ -73,10 +73,15 @@ codeunit 6362 "Pagero Integration Impl." implements IDocumentSender, IDocumentRe end; [EventSubscriber(ObjectType::Page, Page::"E-Document Service", OnBeforeOpenServiceIntegrationSetupPage, '', false, false)] - local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var SetupPage: Integer) + local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var IsServiceIntegrationSetupRun: Boolean) + var + EDocExtConnectionSetupCard: Page "EDoc Ext Connection Setup Card"; begin - if EDocumentService."Service Integration V2" = EDocumentService."Service Integration V2"::Pagero then - SetupPage := Page::"EDoc Ext Connection Setup Card"; + if EDocumentService."Service Integration V2" <> EDocumentService."Service Integration V2"::Pagero then + exit; + + EDocExtConnectionSetupCard.RunModal(); + IsServiceIntegrationSetupRun := true; end; var diff --git a/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroProcessing.Codeunit.al b/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroProcessing.Codeunit.al index 84483b8503..4833c2dbe3 100644 --- a/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroProcessing.Codeunit.al +++ b/Apps/W1/EDocumentsConnector/app/src/Pagero/PageroProcessing.Codeunit.al @@ -202,7 +202,7 @@ codeunit 6369 "Pagero Processing" for I := 1 to Items.Count() do begin Clear(TempBlob); TempBlob.CreateOutStream(OutStream, TextEncoding::UTF8); - ItemMetaData := Items.GetObject(I); + ItemMetaData := Items.GetObject(I - 1); // JSON arrays are 0 based ItemMetaData.WriteTo(Item); OutStream.Write(Item); Documents.Add(TempBlob); diff --git a/Apps/W1/Email - SMTP Connector/app/src/SMTPAccount.table.al b/Apps/W1/Email - SMTP Connector/app/src/SMTPAccount.table.al index 4d76ac29ab..cbccd348d2 100644 --- a/Apps/W1/Email - SMTP Connector/app/src/SMTPAccount.table.al +++ b/Apps/W1/Email - SMTP Connector/app/src/SMTPAccount.table.al @@ -33,15 +33,6 @@ table 4511 "SMTP Account" DataClassification = CustomerContent; } -#if not CLEANSCHEMA23 - field(4; Authentication; Enum "SMTP Authentication") - { - DataClassification = CustomerContent; - ObsoleteReason = 'Replaced by "Authentication Types" as the enum is moving to SMTP API app.'; - ObsoleteState = Removed; - ObsoleteTag = '23.0'; - } -#endif field(5; "User Name"; Text[250]) { DataClassification = CustomerContent; diff --git a/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorInstall.Codeunit.al b/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorInstall.Codeunit.al index 3a7f26e8bf..ed398aa8ba 100644 --- a/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorInstall.Codeunit.al +++ b/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorInstall.Codeunit.al @@ -33,6 +33,5 @@ codeunit 4515 "SMTP Connector Install" DataClassificationMgt.SetFieldToNormal(Database::"SMTP Account", Account.FieldNo("Secure Connection")); DataClassificationMgt.SetFieldToNormal(Database::"SMTP Account", Account.FieldNo(Server)); DataClassificationMgt.SetFieldToNormal(Database::"SMTP Account", Account.FieldNo("Server Port")); - DataClassificationMgt.SetFieldToNormal(Database::"SMTP Account", Account.FieldNo(Authentication)); end; } \ No newline at end of file diff --git a/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorUpgrade.Codeunit.al b/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorUpgrade.Codeunit.al index 8e2aa9abce..f335261fee 100644 --- a/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorUpgrade.Codeunit.al +++ b/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorUpgrade.Codeunit.al @@ -12,28 +12,6 @@ codeunit 104066 "SMTP Connector - Upgrade" Subtype = Upgrade; Permissions = tabledata "SMTP Account" = rm; - trigger OnUpgradePerCompany() - begin - SetAuthTypeFromAuthentication(); - end; - - local procedure SetAuthTypeFromAuthentication() - var - SMTPAccount: Record "SMTP Account"; - UpgradeTag: Codeunit "Upgrade Tag"; - begin - if UpgradeTag.HasUpgradeTag(GetSMTPAccountAuthTypeUpgradeTag()) then - exit; - - if SMTPAccount.FindSet() then - repeat - SMTPAccount."Authentication Type" := "SMTP Authentication Types".FromInteger(SMTPAccount.Authentication.AsInteger()); - SMTPAccount.Modify(); - until SMTPAccount.Next() = 0; - - UpgradeTag.SetUpgradeTag(GetSMTPAccountAuthTypeUpgradeTag()); - end; - internal procedure GetSMTPAccountAuthTypeUpgradeTag(): Code[250] begin exit('MS-387128-GetSMTPAccountAuthTypeUpgradeTag-20220107'); diff --git a/Apps/W1/FieldServiceIntegration/app/src/Codeunits/FSIntTableSubscriber.Codeunit.al b/Apps/W1/FieldServiceIntegration/app/src/Codeunits/FSIntTableSubscriber.Codeunit.al index 8e9e287ba9..515f7f63f1 100644 --- a/Apps/W1/FieldServiceIntegration/app/src/Codeunits/FSIntTableSubscriber.Codeunit.al +++ b/Apps/W1/FieldServiceIntegration/app/src/Codeunits/FSIntTableSubscriber.Codeunit.al @@ -7,6 +7,7 @@ namespace Microsoft.Integration.DynamicsFieldService; using Microsoft.Integration.Dataverse; using Microsoft.Projects.Project.Job; using Microsoft.Foundation.NoSeries; +using Microsoft.Foundation.UOM; using Microsoft.Projects.Project.Setup; using Microsoft.Integration.SyncEngine; using Microsoft.Inventory.Setup; @@ -973,12 +974,14 @@ codeunit 6610 "FS Int. Table Subscriber" CRMProduct: Record "CRM Product"; BudgetJobJournalLine: Record "Job Journal Line"; CRMProductName: Codeunit "CRM Product Name"; + UOMMgt: Codeunit "Unit of Measure Management"; BookableResourceCoupled: Boolean; BookableResourceCoupledToDeleted: Boolean; FSQuantity: Decimal; FSQuantityToBill: Decimal; QuantityCurrentlyConsumed: Decimal; QuantityCurrentlyInvoiced: Decimal; + RoundedQtyToInvoice: Decimal; begin SetCurrentProjectPlanningQuantities(SourceRecordRef, QuantityCurrentlyConsumed, QuantityCurrentlyInvoiced); case SourceRecordRef.Number of @@ -1082,7 +1085,8 @@ codeunit 6610 "FS Int. Table Subscriber" JobJournalLine.Validate("Unit Cost", Item."Unit Cost"); JobJournalLine.Validate(Quantity, FSQuantity - QuantityCurrentlyConsumed); JobJournalLine.Validate("Unit Price", Item."Unit Price"); - JobJournalLine.Validate("Qty. to Transfer to Invoice", FSQuantityToBill - QuantityCurrentlyInvoiced); + RoundedQtyToInvoice := UOMMgt.RoundAndValidateQty(FSQuantityToBill - QuantityCurrentlyInvoiced, JobJournalLine."Qty. Rounding Precision", JobJournalLine.FieldCaption("Qty. to Transfer to Invoice")); + JobJournalLine.Validate("Qty. to Transfer to Invoice", RoundedQtyToInvoice); end; end; end; diff --git a/Apps/W1/FieldServiceIntegration/app/src/Tables/FSWorkOrder.Table.al b/Apps/W1/FieldServiceIntegration/app/src/Tables/FSWorkOrder.Table.al index fa94ea702b..f9dbed9ba5 100644 --- a/Apps/W1/FieldServiceIntegration/app/src/Tables/FSWorkOrder.Table.al +++ b/Apps/W1/FieldServiceIntegration/app/src/Tables/FSWorkOrder.Table.al @@ -17,7 +17,7 @@ table 6617 "FS Work Order" { field(1; WorkOrderId; GUID) { - ExternalName = 'msdyn_workorderId'; + ExternalName = 'msdyn_workorderid'; ExternalType = 'Uniqueidentifier'; ExternalAccess = Insert; Description = 'Shows the entity instances.'; diff --git a/Apps/W1/LatePaymentPredictor/app/.resources/LatePaymentStandardModel.txt b/Apps/W1/LatePaymentPredictor/app/.resources/LatePaymentStandardModel.txt new file mode 100644 index 0000000000..b9548be8e4 --- /dev/null +++ b/Apps/W1/LatePaymentPredictor/app/.resources/LatePaymentStandardModel.txt @@ -0,0 +1 @@ +WAoAAAACAAMBAAACAwAAAAMTAAAADgAAAxMAAAAJAAADDQAAABkAAAAHAAAABQAAAAYAAAABAAAABAAAAAEAAAABAAAABAAAAAIAAAABAAAACAAAAAEAAAABAAAAAQAAAAUAAAAHAAAAAwAAAAIAAAABAAAAAQAAAAEAAAACAAAAAQAAAAEAAAABAAAEAgAAAAEABAAJAAAABmxldmVscwAAABAAAAAIAAQACQAAAAY8bGVhZj4ABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAlmZWF0dXJlMTcABAAJAAAACGZlYXR1cmUzAAQACQAAAAhmZWF0dXJlNAAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU4AAAEAgAAAAEABAAJAAAABWNsYXNzAAAAEAAAAAEABAAJAAAABmZhY3RvcgAAAP4AAAANAAAAGQAAB7YAAAVNAAAEPwAAA8IAAAB9AAAAaAAAABUAAAEOAAAAxAAAAIgAAAA8AAAACwAAADEAAABKAAACaQAAAaMAAACrAAAAoQAAAHUAAAAsAAAACgAAAPgAAAAOAAAA6gAAAMYAAAAOAAAAGUCe2AAAAAAAQJU0AAAAAABAkPwAAAAAAECOEAAAAAAAQF9AAAAAAABAWgAAAAAAAEA1AAAAAAAAQHDgAAAAAABAaIAAAAAAAEBhAAAAAAAAQE4AAAAAAABAJgAAAAAAAEBIgAAAAAAAQFKAAAAAAABAg0gAAAAAAEB6MAAAAAAAQGVgAAAAAABAZCAAAAAAAEBdQAAAAAAAQEYAAAAAAABAJAAAAAAAAEBvAAAAAAAAQCwAAAAAAABAbUAAAAAAAEBowAAAAAAAAAAADgAAABlAhfAAAAAAAEBwIAAAAAAAQF2AAAAAAABAUAAAAAAAAEBLAAAAAAAAQECAAAAAAAAAAAAAAAAAAEBgQAAAAAAAQFPAAAAAAABAQ4AAAAAAAEA0AAAAAAAAP/AAAAAAAABAJAAAAAAAAEAqAAAAAAAAQGWgAAAAAABAY2AAAAAAAEBTAAAAAAAAQFCAAAAAAABAQwAAAAAAAEAwAAAAAAAAAAAAAAAAAABATgAAAAAAAAAAAAAAAAAAQEcAAAAAAABAMgAAAAAAAAAAAA4AAAAZP/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAQAAAAAAAAABAAAAAAAAAAD/wAAAAAAAAP/AAAAAAAABAAAAAAAAAAD/wAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAA/8AAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAOAAAAGT/YtOCjX4tOP6GBGBGBGBI/jqHqHqHqHwAAAAAAAAAAP46h6h6h6h8/cYEYEYEYEj+EeuFHrhR8P6GBGBGBGBI/nSx9coHSyD9XVsrCAXVtP4pBpBpBpBs/hHrhR64UfD9XVsrCAXVtAAAAAAAAAAA/i7cQxmG7cT+LtxDGYbtxP4u3EMZhu3E/i7cQxmG7cQAAAAAAAAAAAAAAAAAAAAA/hHrhR64UfD+LtxDGYbtxP4R64UeuFHwAAAAAAAAAAAAAAAAAAAAAAAAADQAAABkAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADQAAABkAAAAFAAAAAgAAAAIAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAUAAAAFAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACDgAAAJY/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAABAAAAAAAAAAEAAAAAAAAAAP/AAAAAAAAA/8AAAAAAAAEAAAAAAAAAAP/AAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAD/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAD/wAAAAAAAAQAAAAAAAAABAAAAAAAAAAECT4AAAAAAAQJEsAAAAAABAjkgAAAAAAECMEAAAAAAAQFHAAAAAAABAUcAAAAAAAAAAAAAAAAAAQGBAAAAAAABAXUAAAAAAAEBYQAAAAAAAQDQAAAAAAABAJAAAAAAAAEAkAAAAAAAAQCoAAAAAAABAZaAAAAAAAEBjYAAAAAAAQFfAAAAAAABAV8AAAAAAAEBTwAAAAAAAQDAAAAAAAAAAAAAAAAAAAEBOAAAAAAAAQCwAAAAAAABARwAAAAAAAEAyAAAAAAAAQIXwAAAAAABAcCAAAAAAAEBdgAAAAAAAQFAAAAAAAABASwAAAAAAAEBAgAAAAAAAQDUAAAAAAABAYYAAAAAAAEBTwAAAAAAAQEOAAAAAAABARAAAAAAAAD/wAAAAAAAAQEOAAAAAAABAToAAAAAAAEB7wAAAAAAAQHCAAAAAAABAUwAAAAAAAEBQgAAAAAAAQEMAAAAAAABAPAAAAAAAAEAkAAAAAAAAQGeAAAAAAAAAAAAAAAAAAEBngAAAAAAAQGaAAAAAAAA/5J68Tc/BwT/p6n5lfpXKP+yGtkkCHp4/7d8AiD/d8D/iLQ5WBBiTP+XYnYnYnYoAAAAAAAAAAD/e0Je0Je0KP+MaH1jQ+sY/5tLS0tLS0z/VVVVVVVVVP+0XRdF0XRc/yh9Y0PrGiD/GfIpg3WfJP9Hx5J2qh0Q/16zoK/2OWz/hxxxxxxxyP+LhyfAZcOU/5ZtZtZtZtT/XRdF0XRdGAAAAAAAAAAA/zve973ve+D/wAAAAAAAAP8kpkpkpkpg/t0XRdF0XRj/WwodkYHyAP8hWBmoFqNc/u8pNt+8LEj+xB/u+ARB/P9ul41P3ztk/1E7E7E7E7T/wAAAAAAAAP+CXtCXtCXw/2cvBTl4Kcz/SWlpaWlpbP+VVVVVVVVU/t0XRdF0XRj/peCnLwU5fP+pg3WfIpg4/5wcNsSq8Xz/kKYvqATjSP9xxxxxxxx0/2jxsH80eNj/UyUyUyUyUP+RdF0XRdF0/8AAAAAAAAD/oQhCEIQhDAAAAAAAAAAA/6bWbWbWbWT/tF0XRdF0XP/AAAAAAAAA/5f97M51wTz/hnv60AQmZP98wgKX/ezQ/sDXzCApf+D+q+YQFL/vaP4XJiCuTEFc/wYHx/nGa2D+5ax7dgOhmP7GjJRcVhyI/nx/nGa2FDz920yDwsnKkP5lrHt2A6GY/ozGKPsSalj/UAQmYxR9iP8srUKol3kg/ti0hdX7VND+04SJ/F5pUP65YtIXV+1U/ltMg8LJypD90v+9mc64KP8AUv+9mc64/fQy1j27AdD++WLSF1ftVP7mthQ7IwPkAAAQCAAAAAQAEAAkAAAADZGltAAAADQAAAAIAAAAZAAAABgAABAIAAAABAAQACQAAAAhkaW1uYW1lcwAAABMAAAACAAAA/gAAABAAAAAGAAQACQAAAAAABAAJAAAAAAAEAAkAAAAAAAQACQAAAAAABAAJAAAAAAAEAAkAAAAIbm9kZXByb2IAAAD+AAAEAgAAAAEABAAJAAAABW5hbWVzAAAAEAAAAAkABAAJAAAAA3ZhcgAEAAkAAAABbgAEAAkAAAACd3QABAAJAAAAA2RldgAEAAkAAAAEeXZhbAAEAAkAAAAKY29tcGxleGl0eQAEAAkAAAAIbmNvbXBldGUABAAJAAAACm5zdXJyb2dhdGUABAAJAAAABXl2YWwyAAAEAgAAAAEABAAJAAAACXJvdy5uYW1lcwAAAA0AAAAZAAAAAQAAAAIAAAAEAAAACAAAAAkAAAASAAAAEwAAAAUAAAAKAAAAFAAAABUAAAAqAAAAKwAAAAsAAAADAAAABgAAAAwAAAAYAAAAMAAAADEAAAAZAAAADQAAABoAAAAbAAAABwAABAIAAAL/AAAAEAAAAAEABAAJAAAACmRhdGEuZnJhbWUAAAD+AAACDQAAB7YAAAAEAAAABAAAAAoAAAAEAAAACgAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAFwAAAAQAAAAEAAAAGAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAZAAAACgAAAAQAAAAEAAAABAAAAA4AAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAACgAAAAQAAAAKAAAABAAAAAQAAAAEAAAAFAAAAAQAAAAEAAAABAAAAAQAAAAKAAAACgAAAAQAAAAEAAAABAAAAAQAAAAEAAAADAAAAAYAAAAKAAAAEwAAAAQAAAATAAAABAAAAAQAAAAMAAAABAAAABMAAAAOAAAABAAAAAwAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAGAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAoAAAAGAAAABAAAAAQAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAGAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABgAAAAQAAAAEAAAABAAAABMAAAAEAAAABAAAABMAAAAKAAAAEwAAAAQAAAAEAAAABAAAABgAAAAEAAAAGAAAABgAAAAEAAAAGAAAAAoAAAAEAAAABAAAAAQAAAATAAAAEwAAAAQAAAAEAAAACgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAYAAAATAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAZAAAABAAAABkAAAAGAAAABAAAAAYAAAAEAAAABAAAAAYAAAAKAAAABAAAAAYAAAAEAAAADQAAAAQAAAAGAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAMAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAGAAAABkAAAAYAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAZAAAAGAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABgAAAAEAAAABAAAAAQAAAAEAAAAFwAAAAQAAAAEAAAABAAAAAQAAAAEAAAAGAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAYAAAAOAAAABAAAABMAAAAEAAAABgAAAAQAAAAEAAAACgAAAAQAAAAYAAAABAAAAAQAAAAGAAAAEwAAAAQAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAYAAAABAAAABgAAAAEAAAABAAAAAYAAAAEAAAAEwAAAAQAAAAKAAAABAAAAAoAAAAEAAAAGAAAABMAAAAEAAAABAAAAAQAAAAEAAAACgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABgAAAAQAAAAYAAAABAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAADQAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABgAAAAQAAAAYAAAABAAAAAoAAAATAAAAGQAAAAQAAAAEAAAAGAAAAAQAAAAKAAAABAAAAAoAAAAEAAAACgAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABgAAAAEAAAABAAAAAQAAAAZAAAABAAAABMAAAAGAAAACgAAAAoAAAAGAAAABAAAAAQAAAAEAAAAEwAAABMAAAAEAAAACgAAABMAAAAYAAAAGAAAAAwAAAAEAAAAGAAAAAQAAAAEAAAABAAAAAQAAAAKAAAAEwAAABMAAAAUAAAABAAAABQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAEwAAAAoAAAAEAAAABAAAAAQAAAAEAAAAGAAAAAQAAAATAAAABAAAAAQAAAAGAAAABAAAAAQAAAAEAAAAGAAAAAQAAAAGAAAABAAAAAQAAAAKAAAABAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAGAAAAEwAAAAQAAAAGAAAABAAAAAQAAAAEAAAADgAAAAQAAAAEAAAAGAAAAAQAAAAEAAAABAAAAAQAAAAGAAAAEwAAAAQAAAATAAAAFwAAAAQAAAAEAAAACgAAAAoAAAAEAAAABAAAAAYAAAAEAAAABAAAAAYAAAATAAAABAAAAAQAAAAYAAAACgAAAAoAAAATAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABgAAAAYAAAAEAAAAGAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAGAAAAGAAAAAQAAAAEAAAAFAAAAAQAAAAEAAAABAAAABcAAAAEAAAABAAAAAQAAAAMAAAACgAAAAQAAAAEAAAABAAAAAQAAAAEAAAAGAAAABkAAAAXAAAABAAAAAQAAAANAAAABAAAAAQAAAATAAAABAAAABcAAAAEAAAACgAAABMAAAAEAAAABAAAAAQAAAAEAAAACgAAAAQAAAAEAAAABAAAAAQAAAATAAAABAAAABQAAAAEAAAABAAAAAQAAAAEAAAABAAAAA4AAAAGAAAABAAAAAQAAAAUAAAABAAAABcAAAAEAAAABAAAAAQAAAANAAAABAAAAAQAAAAEAAAABAAAAAQAAAAGAAAABgAAAAYAAAAXAAAAGAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAYAAAAGAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAYAAAAEAAAABAAAAAQAAAAEAAAABAAAAAYAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABMAAAATAAAABAAAAAQAAAAEAAAACgAAAAYAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAGAAAAAQAAAAEAAAABAAAABkAAAAEAAAABgAAAAQAAAAEAAAABAAAAA4AAAAZAAAAEwAAAAQAAAATAAAACgAAABMAAAAEAAAABAAAAAQAAAAZAAAABAAAAAQAAAAEAAAABAAAABcAAAAEAAAAGQAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAAGAAAACgAAAAQAAAAEAAAABAAAAAQAAAAGAAAABAAAAAQAAAAGAAAABAAAAAYAAAATAAAABAAAAAQAAAAEAAAAGQAAAAQAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAEAAAABAAAAAoAAAAGAAAABAAAAAQAAAAGAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAADgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABkAAAAEAAAAEwAAAAQAAAAEAAAABgAAABMAAAAEAAAAEwAAAAQAAAAEAAAAEwAAAAQAAAAEAAAABgAAAAQAAAAEAAAAFwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAABQAAAAKAAAABAAAAAQAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAAGAAAAGAAAAAQAAAAEAAAABgAAAAQAAAAEAAAABAAAAAoAAAAEAAAACgAAAAQAAAAEAAAAGAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAA0AAAAEAAAABgAAAAoAAAAEAAAABAAAABMAAAAEAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAEwAAAAQAAAAMAAAABgAAAAQAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAEAAAABAAAAAQAAAAXAAAACgAAAAQAAAAEAAAABAAAAA0AAAAEAAAABAAAAAQAAAAEAAAAEwAAABgAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAYAAAABAAAAAQAAAAEAAAAEwAAAAQAAAAYAAAABAAAAAQAAAAEAAAAFAAAAAQAAAAEAAAAEwAAAAQAAAAUAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAOAAAAEwAAAAQAAAAEAAAABgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAUAAAAEwAAAAQAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAUAAAABAAAAAQAAAAKAAAABAAAABgAAAAEAAAABAAAAAQAAAAEAAAABAAAABgAAAAEAAAABgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAANAAAADQAAAAQAAAAGAAAAEwAAAAQAAAAZAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAKAAAADQAAABgAAAAEAAAAGAAAABkAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAoAAAAKAAAABAAAAAYAAAAEAAAABAAAAAoAAAAEAAAABAAAAAYAAAAKAAAACgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAYAAAABAAAAAQAAAAEAAAACgAAABMAAAAKAAAACgAAAAQAAAAEAAAAGQAAABgAAAAEAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAADAAAABQAAAAEAAAABgAAAAQAAAAEAAAABAAAAA4AAAATAAAACgAAAA4AAAAMAAAAEwAAABgAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAGAAAABAAAAAQAAAAKAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAEwAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAXAAAABAAAAAQAAAAKAAAABAAAAAoAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABgAAAAQAAAAEAAAABAAAABgAAAAXAAAABAAAAAQAAAAEAAAABAAAAAQAAAAKAAAACgAAAAQAAAAGAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABgAAAAQAAAATAAAABAAAAAQAAAAKAAAABgAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAA0AAAAEAAAAGQAAAAYAAAAMAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAOAAAABgAAAAQAAAAEAAAABAAAAA4AAAAKAAAACgAAAAQAAAAEAAAABAAAAAQAAAAKAAAABgAAAAQAAAAEAAAABAAAAAQAAAAEAAAAGAAAAAQAAAAEAAAABgAAAAQAAAAEAAAABAAAAAYAAAAKAAAABAAAAAoAAAAEAAAAEwAAAAQAAAAKAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAA4AAAAEAAAABAAAAAQAAAAEAAAAEwAAAAoAAAAEAAAABAAAAAQAAAATAAAABAAAAAQAAAAEAAAABgAAABQAAAAEAAAABAAAABgAAAAEAAAABAAAABMAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAACgAAAAQAAAAEAAAABAAAABMAAAAGAAAABAAAAAQAAAAEAAAABAAAAAQAAAAKAAAACgAAAAQAAAAUAAAABAAAAAQAAAAEAAAABAAAAAoAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABgAAAAYAAAAEAAAABAAAAAQAAAAEAAAABAAAABgAAAAEAAAABAAAAAoAAAAKAAAABAAAABcAAAAEAAAAFAAAAAQAAAAKAAAAGQAAAAQAAAAEAAAAFAAAAA4AAAAZAAAAGQAAAA0AAAAEAAAAGAAAABQAAAANAAAAGAAAAAoAAAAYAAAABwAAABgAAAAKAAAADgAAABkAAAAOAAAABAAAABkAAAAZAAAAGAAAABkAAAAYAAAAGQAAABkAAAAOAAAAEwAAABgAAAAYAAAAFAAAAAQAAAAGAAAAGAAAABgAAAAHAAAAGQAAAAYAAAANAAAAFAAAABgAAAAZAAAABAAAABkAAAAHAAAABgAAAAQAAAAYAAAAGAAAABQAAAAZAAAADQAAAA4AAAAEAAAABwAAABkAAAAYAAAAGQAAABQAAAAYAAAACgAAABQAAAAHAAAAFAAAABUAAAAOAAAAGQAAABkAAAAYAAAAGQAAABQAAAAUAAAABgAAABkAAAAZAAAAGAAAABUAAAAKAAAAGAAAABgAAAAUAAAAFAAAABkAAAAOAAAAGAAAABkAAAAGAAAABAAAABgAAAAZAAAAGQAAAAcAAAAYAAAAGAAAABkAAAAZAAAAGAAAAAQAAAAYAAAAGQAAAAQAAAAYAAAAGAAAAA4AAAATAAAAGQAAABMAAAAYAAAAGQAAAAYAAAAEAAAABgAAABkAAAAYAAAADgAAAAcAAAAZAAAABAAAABgAAAAYAAAABAAAAA4AAAATAAAABAAAAA4AAAAZAAAAGAAAABkAAAAYAAAABwAAABgAAAAGAAAABAAAABkAAAAOAAAAEwAAABgAAAAEAAAAGAAAABkAAAAYAAAAGQAAAAYAAAAEAAAAGQAAABgAAAAHAAAAGAAAABkAAAAGAAAABAAAABkAAAAOAAAADQAAABgAAAAKAAAAGQAAAAoAAAAYAAAABwAAABgAAAATAAAADQAAABgAAAAZAAAAFAAAABkAAAAUAAAAGAAAAAoAAAAHAAAAGAAAABgAAAAVAAAADQAAABgAAAAZAAAABAAAABMAAAAYAAAADgAAABkAAAAOAAAABAAAABkAAAANAAAABAAAAAQAAAAYAAAAGAAAAAoAAAAZAAAAGAAAAA4AAAAEAAAACgAAABkAAAAZAAAAGQAAABkAAAAYAAAAGAAAABkAAAAYAAAAGAAAABkAAAAEAAAAEwAAAAoAAAAYAAAAGQAAAAYAAAAUAAAAGQAAABkAAAAYAAAAGQAAAAQAAAAZAAAACgAAABkAAAANAAAAGQAAABgAAAAZAAAABwAAAAoAAAAZAAAAGQAAAAQAAAANAAAAGAAAABQAAAAZAAAABgAAABkAAAAHAAAADQAAABkAAAAOAAAABgAAABkAAAAEAAAADgAAABgAAAAYAAAAGQAAAA4AAAAEAAAAGAAAABkAAAAEAAAAEwAAAAQAAAAKAAAAGQAAABgAAAAYAAAAGAAAABgAAAAOAAAADgAAABgAAAAZAAAAGAAAAA0AAAAYAAAAGAAAABkAAAAZAAAAGAAAABkAAAAKAAAAFAAAABgAAAAKAAAAEwAAABkAAAAYAAAAFAAAABkAAAAZAAAADgAAAAYAAAAOAAAAGAAAAAYAAAAYAAAAGAAAAAoAAAAOAAAAGAAAABkAAAAYAAAABwAAABkAAAAZAAAADQAAABkAAAAZAAAADgAAAA4AAAAYAAAAGAAAABQAAAATAAAAGAAAABgAAAANAAAAGQAAAAQAAAAVAAAADgAAABUAAAAYAAAABAAAAA0AAAAOAAAAGQAAABgAAAATAAAAGQAAAA4AAAAZAAAAGAAAABgAAAAEAAAACgAAABgAAAAEAAAAGAAAABgAAAAOAAAAGQAAABkAAAAGAAAAGAAAABkAAAATAAAAGAAAABMAAAAZAAAAGQAAABgAAAAEAAAAGQAAABgAAAANAAAADgAAAAQAAAAEAAAAGQAAAAcAAAANAAAAGQAAABkAAAAGAAAAGAAAAA4AAAAZAAAAGAAAABgAAAAYAAAABgAAAA4AAAAZAAAAGQAAABkAAAAYAAAAGAAAABgAAAATAAAAGAAAABkAAAATAAAAEwAAABkAAAAVAAAACgAAABkAAAAKAAAAGQAAAA4AAAAZAAAABgAAABgAAAAGAAAAGAAAABQAAAANAAAAGQAAABQAAAAGAAAAGAAAABkAAAAKAAAAGQAAAAYAAAAEAAAADgAAAA4AAAAOAAAAGQAAAAQAAAAKAAAADgAAABgAAAAYAAAAGQAAABgAAAAYAAAAGQAAABkAAAAVAAAABAAAABgAAAAZAAAAGQAAAA4AAAAZAAAABgAAABkAAAAOAAAAGAAAABkAAAATAAAAGAAAAAYAAAAVAAAAGQAAABgAAAAYAAAABgAAABkAAAANAAAABgAAABkAAAAUAAAADQAAABgAAAAZAAAAGAAAABkAAAANAAAADgAAABgAAAATAAAAEwAAABMAAAAZAAAABAAAABMAAAAGAAAAGQAAABUAAAAHAAAACgAAABgAAAAYAAAAGQAAABgAAAAKAAAABAAAABgAAAAUAAAADgAAABgAAAAYAAAAGQAAAAQAAAAZAAAAGQAAABQAAAAUAAAAGQAAABgAAAAKAAAAGAAAAA4AAAAZAAAADQAAAAQAAAAHAAAADQAAABgAAAAYAAAADgAAAA0AAAAKAAAAGAAAABgAAAAYAAAABwAAAAQAAAATAAAABAAAABkAAAAZAAAAFQAAAAQAAAAZAAAAGQAAABgAAAAOAAAAGAAAAA0AAAAYAAAABwAAAA4AAAATAAAADgAAABkAAAAUAAAAGAAAABgAAAAKAAAAGAAAABkAAAAUAAAAGQAAAAoAAAAZAAAAGQAAAAoAAAAYAAAAGQAAABkAAAAYAAAABAAAABgAAAAHAAAAGAAAAAoAAAAYAAAAGAAAABkAAAAUAAAADQAAABkAAAANAAAADgAAABkAAAATAAAADgAAAAQAAAAYAAAABgAAABgAAAAZAAAAGAAAABgAAAANAAAADAAAABkAAAAYAAAAGAAAABMAAAAOAAAACgAAABMAAAAZAAAAGAAAABkAAAANAAAAGQAAABkAAAAZAAAADgAAABgAAAAEAAAAGQAAAAQAAAAYAAAAGAAAAA0AAAATAAAADgAAAAoAAAAZAAAAGQAAAA0AAAANAAAAEwAAABgAAAANAAAABAAAABkAAAAZAAAAGQAAABgAAAAKAAAAEwAAABgAAAAZAAAAGQAAABMAAAAZAAAAGAAAABkAAAAYAAAAGQAAABkAAAAYAAAABgAAABkAAAAYAAAAEwAAABgAAAANAAAABAAAABMAAAATAAAAGQAAAA0AAAAZAAAAGAAAABkAAAAKAAAADgAAABkAAAAYAAAAGQAAABMAAAAYAAAADgAAABkAAAAEAAAAGAAAABgAAAAKAAAAGAAAAA0AAAAZAAAAGAAAAAYAAAAZAAAADgAAAAYAAAAZAAAAGAAAABgAAAAYAAAAGAAAABkAAAAYAAAAGAAAABkAAAAYAAAABAAAAA4AAAANAAAAGAAAAAYAAAATAAAABAAAABMAAAAZAAAABAAAAAYAAAAZAAAADgAAABgAAAAYAAAAGAAAABgAAAAEAAAABAAAABgAAAANAAAAGAAAABkAAAAKAAAAGAAAAAQAAAAYAAAAGQAAAA4AAAAOAAAAGAAAAAcAAAAYAAAACgAAABMAAAAKAAAAGAAAABkAAAAZAAAADgAAABkAAAAYAAAADgAAAAoAAAAEAAAABAAAAAQAAAAYAAAAGAAAAA0AAAQCAAAF/wAAABAAAAe2AAQACQAAAAExAAQACQAAAAEzAAQACQAAAAE2AAQACQAAAAE5AAQACQAAAAIxMAAEAAkAAAACMTMABAAJAAAAAjE1AAQACQAAAAIxNgAEAAkAAAACMTgABAAJAAAAAjIyAAQACQAAAAIyNAAEAAkAAAACMjUABAAJAAAAAjI2AAQACQAAAAIyNwAEAAkAAAACMjkABAAJAAAAAjMyAAQACQAAAAIzNAAEAAkAAAACMzYABAAJAAAAAjM3AAQACQAAAAI0MAAEAAkAAAACNDIABAAJAAAAAjQzAAQACQAAAAI0NAAEAAkAAAACNDYABAAJAAAAAjUwAAQACQAAAAI1MgAEAAkAAAACNTMABAAJAAAAAjU1AAQACQAAAAI1NwAEAAkAAAACNjAABAAJAAAAAjYxAAQACQAAAAI2NAAEAAkAAAACNjYABAAJAAAAAjY4AAQACQAAAAI2OQAEAAkAAAACNzQABAAJAAAAAjc1AAQACQAAAAI3NwAEAAkAAAACNzkABAAJAAAAAjgwAAQACQAAAAI4NAAEAAkAAAACODUABAAJAAAAAjg2AAQACQAAAAI5MQAEAAkAAAACOTIABAAJAAAAAjkzAAQACQAAAAI5NQAEAAkAAAACOTgABAAJAAAAAzEwMAAEAAkAAAADMTAyAAQACQAAAAMxMDQABAAJAAAAAzEwNgAEAAkAAAADMTEyAAQACQAAAAMxMTMABAAJAAAAAzExNAAEAAkAAAADMTE1AAQACQAAAAMxMTgABAAJAAAAAzExOQAEAAkAAAADMTIwAAQACQAAAAMxMjEABAAJAAAAAzEyMgAEAAkAAAADMTI0AAQACQAAAAMxMjUABAAJAAAAAzEyNgAEAAkAAAADMTI3AAQACQAAAAMxMjgABAAJAAAAAzEzMgAEAAkAAAADMTM0AAQACQAAAAMxMzUABAAJAAAAAzEzNgAEAAkAAAADMTM4AAQACQAAAAMxNDAABAAJAAAAAzE0MQAEAAkAAAADMTQ2AAQACQAAAAMxNDcABAAJAAAAAzE1MgAEAAkAAAADMTUzAAQACQAAAAMxNTkABAAJAAAAAzE2MQAEAAkAAAADMTYyAAQACQAAAAMxNjUABAAJAAAAAzE2NgAEAAkAAAADMTY5AAQACQAAAAMxNzAABAAJAAAAAzE3MgAEAAkAAAADMTczAAQACQAAAAMxNzQABAAJAAAAAzE3OAAEAAkAAAADMTgwAAQACQAAAAMxODEABAAJAAAAAzE4MwAEAAkAAAADMTg0AAQACQAAAAMxODUABAAJAAAAAzE4NwAEAAkAAAADMTg4AAQACQAAAAMxODkABAAJAAAAAzE5MgAEAAkAAAADMTk0AAQACQAAAAMxOTYABAAJAAAAAzE5NwAEAAkAAAADMTk4AAQACQAAAAMxOTkABAAJAAAAAzIwMAAEAAkAAAADMjAyAAQACQAAAAMyMDUABAAJAAAAAzIwNgAEAAkAAAADMjA3AAQACQAAAAMyMDkABAAJAAAAAzIxMQAEAAkAAAADMjEzAAQACQAAAAMyMTUABAAJAAAAAzIxNgAEAAkAAAADMjE3AAQACQAAAAMyMjAABAAJAAAAAzIyMgAEAAkAAAADMjI0AAQACQAAAAMyMjYABAAJAAAAAzIyNwAEAAkAAAADMjI4AAQACQAAAAMyMzEABAAJAAAAAzIzMwAEAAkAAAADMjM0AAQACQAAAAMyMzYABAAJAAAAAzIzOAAEAAkAAAADMjQzAAQACQAAAAMyNDQABAAJAAAAAzI0NQAEAAkAAAADMjQ2AAQACQAAAAMyNDcABAAJAAAAAzI0OQAEAAkAAAADMjUwAAQACQAAAAMyNTEABAAJAAAAAzI1MgAEAAkAAAADMjUzAAQACQAAAAMyNTcABAAJAAAAAzI1OAAEAAkAAAADMjYwAAQACQAAAAMyNjEABAAJAAAAAzI2MwAEAAkAAAADMjY1AAQACQAAAAMyNjYABAAJAAAAAzI2OAAEAAkAAAADMjcwAAQACQAAAAMyNzIABAAJAAAAAzI3MwAEAAkAAAADMjc0AAQACQAAAAMyNzYABAAJAAAAAzI3NwAEAAkAAAADMjgwAAQACQAAAAMyODEABAAJAAAAAzI4MgAEAAkAAAADMjgzAAQACQAAAAMyODQABAAJAAAAAzI4OAAEAAkAAAADMjkwAAQACQAAAAMyOTEABAAJAAAAAzI5MwAEAAkAAAADMjk3AAQACQAAAAMyOTgABAAJAAAAAzMwMQAEAAkAAAADMzA0AAQACQAAAAMzMDYABAAJAAAAAzMwNwAEAAkAAAADMzA4AAQACQAAAAMzMDkABAAJAAAAAzMxMAAEAAkAAAADMzExAAQACQAAAAMzMTQABAAJAAAAAzMxNQAEAAkAAAADMzE2AAQACQAAAAMzMTkABAAJAAAAAzMyMAAEAAkAAAADMzIxAAQACQAAAAMzMjIABAAJAAAAAzMyMwAEAAkAAAADMzI0AAQACQAAAAMzMjYABAAJAAAAAzMyNwAEAAkAAAADMzI5AAQACQAAAAMzMzAABAAJAAAAAzMzMQAEAAkAAAADMzMyAAQACQAAAAMzMzQABAAJAAAAAzMzOAAEAAkAAAADMzQwAAQACQAAAAMzNDEABAAJAAAAAzM0MwAEAAkAAAADMzQ0AAQACQAAAAMzNDcABAAJAAAAAzM1MAAEAAkAAAADMzUxAAQACQAAAAMzNTUABAAJAAAAAzM1NwAEAAkAAAADMzU4AAQACQAAAAMzNjIABAAJAAAAAzM2MwAEAAkAAAADMzY2AAQACQAAAAMzNjgABAAJAAAAAzM3MAAEAAkAAAADMzczAAQACQAAAAMzNzUABAAJAAAAAzM3OAAEAAkAAAADMzgxAAQACQAAAAMzODIABAAJAAAAAzM4NAAEAAkAAAADMzg1AAQACQAAAAMzODcABAAJAAAAAzM5MAAEAAkAAAADMzk0AAQACQAAAAMzOTYABAAJAAAAAzM5NwAEAAkAAAADMzk4AAQACQAAAAMzOTkABAAJAAAAAzQwMQAEAAkAAAADNDAyAAQACQAAAAM0MDMABAAJAAAAAzQwNAAEAAkAAAADNDA4AAQACQAAAAM0MDkABAAJAAAAAzQxMgAEAAkAAAADNDEzAAQACQAAAAM0MTYABAAJAAAAAzQxOQAEAAkAAAADNDIwAAQACQAAAAM0MjEABAAJAAAAAzQyMwAEAAkAAAADNDI1AAQACQAAAAM0MjcABAAJAAAAAzQyOAAEAAkAAAADNDMyAAQACQAAAAM0MzMABAAJAAAAAzQzOQAEAAkAAAADNDQxAAQACQAAAAM0NDIABAAJAAAAAzQ0MwAEAAkAAAADNDQ1AAQACQAAAAM0NDcABAAJAAAAAzQ0OAAEAAkAAAADNDUwAAQACQAAAAM0NTQABAAJAAAAAzQ1NQAEAAkAAAADNDU2AAQACQAAAAM0NTcABAAJAAAAAzQ1OQAEAAkAAAADNDY1AAQACQAAAAM0NjcABAAJAAAAAzQ2OAAEAAkAAAADNDcwAAQACQAAAAM0NzEABAAJAAAAAzQ3MgAEAAkAAAADNDczAAQACQAAAAM0NzUABAAJAAAAAzQ3NgAEAAkAAAADNDc3AAQACQAAAAM0ODAABAAJAAAAAzQ4MQAEAAkAAAADNDgyAAQACQAAAAM0ODgABAAJAAAAAzQ5MQAEAAkAAAADNDkzAAQACQAAAAM0OTkABAAJAAAAAzUwNAAEAAkAAAADNTA1AAQACQAAAAM1MDkABAAJAAAAAzUxMwAEAAkAAAADNTE0AAQACQAAAAM1MTYABAAJAAAAAzUxOAAEAAkAAAADNTIwAAQACQAAAAM1MjMABAAJAAAAAzUyNAAEAAkAAAADNTI4AAQACQAAAAM1MzIABAAJAAAAAzUzMwAEAAkAAAADNTM0AAQACQAAAAM1MzcABAAJAAAAAzU0MAAEAAkAAAADNTQxAAQACQAAAAM1NDIABAAJAAAAAzU0MwAEAAkAAAADNTQ5AAQACQAAAAM1NTAABAAJAAAAAzU1MwAEAAkAAAADNTU0AAQACQAAAAM1NTUABAAJAAAAAzU1NgAEAAkAAAADNTU4AAQACQAAAAM1NjAABAAJAAAAAzU2MgAEAAkAAAADNTYzAAQACQAAAAM1NjcABAAJAAAAAzU2OAAEAAkAAAADNTcwAAQACQAAAAM1NzEABAAJAAAAAzU3MgAEAAkAAAADNTczAAQACQAAAAM1NzQABAAJAAAAAzU3NQAEAAkAAAADNTc2AAQACQAAAAM1NzcABAAJAAAAAzU3OAAEAAkAAAADNTc5AAQACQAAAAM1ODAABAAJAAAAAzU4MgAEAAkAAAADNTg0AAQACQAAAAM1ODUABAAJAAAAAzU4NgAEAAkAAAADNTg3AAQACQAAAAM1OTAABAAJAAAAAzU5MwAEAAkAAAADNTk4AAQACQAAAAM1OTkABAAJAAAAAzYwMgAEAAkAAAADNjA0AAQACQAAAAM2MDUABAAJAAAAAzYwNgAEAAkAAAADNjA5AAQACQAAAAM2MTYABAAJAAAAAzYxOAAEAAkAAAADNjE5AAQACQAAAAM2MjAABAAJAAAAAzYyMQAEAAkAAAADNjIzAAQACQAAAAM2MjQABAAJAAAAAzYyNwAEAAkAAAADNjI4AAQACQAAAAM2MzEABAAJAAAAAzYzMgAEAAkAAAADNjMzAAQACQAAAAM2MzQABAAJAAAAAzYzNQAEAAkAAAADNjM2AAQACQAAAAM2NDEABAAJAAAAAzY0MgAEAAkAAAADNjQzAAQACQAAAAM2NDUABAAJAAAAAzY0NwAEAAkAAAADNjQ5AAQACQAAAAM2NTAABAAJAAAAAzY1MQAEAAkAAAADNjUyAAQACQAAAAM2NTMABAAJAAAAAzY1NAAEAAkAAAADNjU1AAQACQAAAAM2NTcABAAJAAAAAzY1OAAEAAkAAAADNjYxAAQACQAAAAM2NjIABAAJAAAAAzY2NAAEAAkAAAADNjY1AAQACQAAAAM2NjYABAAJAAAAAzY2OAAEAAkAAAADNjY5AAQACQAAAAM2NzUABAAJAAAAAzY3NwAEAAkAAAADNjgwAAQACQAAAAM2ODEABAAJAAAAAzY4NAAEAAkAAAADNjg1AAQACQAAAAM2ODYABAAJAAAAAzY4NwAEAAkAAAADNjg4AAQACQAAAAM2ODkABAAJAAAAAzY5MAAEAAkAAAADNjk2AAQACQAAAAM3MDQABAAJAAAAAzcwNQAEAAkAAAADNzA2AAQACQAAAAM3MDcABAAJAAAAAzcwOAAEAAkAAAADNzA5AAQACQAAAAM3MTAABAAJAAAAAzcxMQAEAAkAAAADNzEyAAQACQAAAAM3MTMABAAJAAAAAzcxOAAEAAkAAAADNzIxAAQACQAAAAM3MjIABAAJAAAAAzcyMwAEAAkAAAADNzI1AAQACQAAAAM3MjYABAAJAAAAAzcyNwAEAAkAAAADNzI5AAQACQAAAAM3MzAABAAJAAAAAzczMgAEAAkAAAADNzMzAAQACQAAAAM3MzQABAAJAAAAAzczNQAEAAkAAAADNzM3AAQACQAAAAM3MzkABAAJAAAAAzc0MgAEAAkAAAADNzQzAAQACQAAAAM3NDQABAAJAAAAAzc0NwAEAAkAAAADNzQ4AAQACQAAAAM3NTAABAAJAAAAAzc1MgAEAAkAAAADNzUzAAQACQAAAAM3NTYABAAJAAAAAzc1NwAEAAkAAAADNzU4AAQACQAAAAM3NTkABAAJAAAAAzc2MAAEAAkAAAADNzYzAAQACQAAAAM3NjQABAAJAAAAAzc2OAAEAAkAAAADNzcyAAQACQAAAAM3NzYABAAJAAAAAzc3NwAEAAkAAAADNzgxAAQACQAAAAM3ODMABAAJAAAAAzc4NAAEAAkAAAADNzg1AAQACQAAAAM3ODYABAAJAAAAAzc4NwAEAAkAAAADNzg4AAQACQAAAAM3OTAABAAJAAAAAzc5MwAEAAkAAAADNzk0AAQACQAAAAM3OTUABAAJAAAAAzc5NgAEAAkAAAADNzk4AAQACQAAAAM4MDAABAAJAAAAAzgwMQAEAAkAAAADODAzAAQACQAAAAM4MDQABAAJAAAAAzgwNQAEAAkAAAADODA2AAQACQAAAAM4MDkABAAJAAAAAzgxMAAEAAkAAAADODEzAAQACQAAAAM4MTQABAAJAAAAAzgxNQAEAAkAAAADODE2AAQACQAAAAM4MTcABAAJAAAAAzgyMAAEAAkAAAADODIyAAQACQAAAAM4MjMABAAJAAAAAzgyNAAEAAkAAAADODI1AAQACQAAAAM4MjcABAAJAAAAAzgzMAAEAAkAAAADODM0AAQACQAAAAM4MzUABAAJAAAAAzgzNwAEAAkAAAADODM4AAQACQAAAAM4NDAABAAJAAAAAzg0MQAEAAkAAAADODQ0AAQACQAAAAM4NDYABAAJAAAAAzg0NwAEAAkAAAADODQ4AAQACQAAAAM4NDkABAAJAAAAAzg1MQAEAAkAAAADODUyAAQACQAAAAM4NTQABAAJAAAAAzg1NQAEAAkAAAADODU2AAQACQAAAAM4NjAABAAJAAAAAzg2MQAEAAkAAAADODYyAAQACQAAAAM4NjMABAAJAAAAAzg2NQAEAAkAAAADODcxAAQACQAAAAM4NzIABAAJAAAAAzg3MwAEAAkAAAADODc0AAQACQAAAAM4NzUABAAJAAAAAzg3NgAEAAkAAAADODc3AAQACQAAAAM4NzgABAAJAAAAAzg4MAAEAAkAAAADODgxAAQACQAAAAM4ODIABAAJAAAAAzg4NgAEAAkAAAADODg5AAQACQAAAAM4OTEABAAJAAAAAzg5MgAEAAkAAAADODkzAAQACQAAAAM4OTQABAAJAAAAAzkwMAAEAAkAAAADOTAxAAQACQAAAAM5MDIABAAJAAAAAzkwNQAEAAkAAAADOTA2AAQACQAAAAM5MDcABAAJAAAAAzkwOQAEAAkAAAADOTEwAAQACQAAAAM5MTMABAAJAAAAAzkxNAAEAAkAAAADOTE2AAQACQAAAAM5MjEABAAJAAAAAzkyMgAEAAkAAAADOTIzAAQACQAAAAM5MjUABAAJAAAAAzkyOAAEAAkAAAADOTMxAAQACQAAAAM5MzMABAAJAAAAAzkzNQAEAAkAAAADOTM2AAQACQAAAAM5MzcABAAJAAAAAzkzOAAEAAkAAAADOTQxAAQACQAAAAM5NDIABAAJAAAAAzk0NAAEAAkAAAADOTQ1AAQACQAAAAM5NDYABAAJAAAAAzk0NwAEAAkAAAADOTQ4AAQACQAAAAM5NTQABAAJAAAAAzk1NwAEAAkAAAADOTU5AAQACQAAAAM5NjAABAAJAAAAAzk2NgAEAAkAAAADOTY4AAQACQAAAAM5NjkABAAJAAAAAzk3MAAEAAkAAAADOTcyAAQACQAAAAM5NzMABAAJAAAAAzk3NwAEAAkAAAADOTc4AAQACQAAAAM5NzkABAAJAAAAAzk4MQAEAAkAAAADOTg0AAQACQAAAAM5ODYABAAJAAAAAzk4OQAEAAkAAAADOTkxAAQACQAAAAM5OTIABAAJAAAAAzk5NAAEAAkAAAADOTk1AAQACQAAAAM5OTYABAAJAAAAAzk5NwAEAAkAAAAEMTAwMQAEAAkAAAAEMTAwMwAEAAkAAAAEMTAwNAAEAAkAAAAEMTAwNQAEAAkAAAAEMTAwNgAEAAkAAAAEMTAwNwAEAAkAAAAEMTAwOAAEAAkAAAAEMTAwOQAEAAkAAAAEMTAxMAAEAAkAAAAEMTAxMQAEAAkAAAAEMTAxMgAEAAkAAAAEMTAxMwAEAAkAAAAEMTAxNAAEAAkAAAAEMTAxNQAEAAkAAAAEMTAxNgAEAAkAAAAEMTAxOAAEAAkAAAAEMTAxOQAEAAkAAAAEMTAyMAAEAAkAAAAEMTAyMQAEAAkAAAAEMTAyMgAEAAkAAAAEMTAyNAAEAAkAAAAEMTAyOQAEAAkAAAAEMTAzMAAEAAkAAAAEMTAzMQAEAAkAAAAEMTAzMwAEAAkAAAAEMTAzNQAEAAkAAAAEMTA0MwAEAAkAAAAEMTA0OAAEAAkAAAAEMTA0OQAEAAkAAAAEMTA1MAAEAAkAAAAEMTA1MQAEAAkAAAAEMTA1MgAEAAkAAAAEMTA1MwAEAAkAAAAEMTA1NAAEAAkAAAAEMTA1NgAEAAkAAAAEMTA2MQAEAAkAAAAEMTA2MgAEAAkAAAAEMTA2NAAEAAkAAAAEMTA3MAAEAAkAAAAEMTA3NQAEAAkAAAAEMTA3NgAEAAkAAAAEMTA3OAAEAAkAAAAEMTA4MAAEAAkAAAAEMTA4MQAEAAkAAAAEMTA4MgAEAAkAAAAEMTA4NAAEAAkAAAAEMTA4NgAEAAkAAAAEMTA4NwAEAAkAAAAEMTA4OAAEAAkAAAAEMTA5MwAEAAkAAAAEMTA5NAAEAAkAAAAEMTA5NgAEAAkAAAAEMTA5OAAEAAkAAAAEMTA5OQAEAAkAAAAEMTEwMQAEAAkAAAAEMTEwMwAEAAkAAAAEMTEwNQAEAAkAAAAEMTEwNgAEAAkAAAAEMTEwNwAEAAkAAAAEMTEwOAAEAAkAAAAEMTEwOQAEAAkAAAAEMTExMAAEAAkAAAAEMTExMQAEAAkAAAAEMTExNAAEAAkAAAAEMTExNwAEAAkAAAAEMTExOAAEAAkAAAAEMTExOQAEAAkAAAAEMTEyMAAEAAkAAAAEMTEyNgAEAAkAAAAEMTEyOAAEAAkAAAAEMTEyOQAEAAkAAAAEMTEzMAAEAAkAAAAEMTEzMgAEAAkAAAAEMTEzNgAEAAkAAAAEMTEzOQAEAAkAAAAEMTE0MAAEAAkAAAAEMTE0MgAEAAkAAAAEMTE0MwAEAAkAAAAEMTE0NAAEAAkAAAAEMTE1MQAEAAkAAAAEMTE1MgAEAAkAAAAEMTE1MwAEAAkAAAAEMTE1NgAEAAkAAAAEMTE1NwAEAAkAAAAEMTE1OAAEAAkAAAAEMTE2MQAEAAkAAAAEMTE2MwAEAAkAAAAEMTE2NAAEAAkAAAAEMTE2NQAEAAkAAAAEMTE2NgAEAAkAAAAEMTE2NwAEAAkAAAAEMTE2OQAEAAkAAAAEMTE3MgAEAAkAAAAEMTE3MwAEAAkAAAAEMTE3NAAEAAkAAAAEMTE3NQAEAAkAAAAEMTE3OQAEAAkAAAAEMTE4MAAEAAkAAAAEMTE4MgAEAAkAAAAEMTE4NQAEAAkAAAAEMTE4NwAEAAkAAAAEMTE4OAAEAAkAAAAEMTE5MQAEAAkAAAAEMTE5MgAEAAkAAAAEMTE5NAAEAAkAAAAEMTIwMAAEAAkAAAAEMTIwMgAEAAkAAAAEMTIwNQAEAAkAAAAEMTIxMwAEAAkAAAAEMTIxNQAEAAkAAAAEMTIxNgAEAAkAAAAEMTIxNwAEAAkAAAAEMTIxOQAEAAkAAAAEMTIyMAAEAAkAAAAEMTIyMQAEAAkAAAAEMTIyNwAEAAkAAAAEMTIyOAAEAAkAAAAEMTIyOQAEAAkAAAAEMTIzMgAEAAkAAAAEMTIzMwAEAAkAAAAEMTIzNgAEAAkAAAAEMTI0MAAEAAkAAAAEMTI0NQAEAAkAAAAEMTI1MgAEAAkAAAAEMTI1MwAEAAkAAAAEMTI1NwAEAAkAAAAEMTI1OQAEAAkAAAAEMTI2MAAEAAkAAAAEMTI2MQAEAAkAAAAEMTI2MwAEAAkAAAAEMTI2NAAEAAkAAAAEMTI2NQAEAAkAAAAEMTI2NwAEAAkAAAAEMTI2OAAEAAkAAAAEMTI2OQAEAAkAAAAEMTI3MQAEAAkAAAAEMTI3MgAEAAkAAAAEMTI3MwAEAAkAAAAEMTI3NAAEAAkAAAAEMTI3NQAEAAkAAAAEMTI3NgAEAAkAAAAEMTI3OAAEAAkAAAAEMTI4MAAEAAkAAAAEMTI4MQAEAAkAAAAEMTI4MgAEAAkAAAAEMTI4MwAEAAkAAAAEMTI4NQAEAAkAAAAEMTI4NwAEAAkAAAAEMTI4OQAEAAkAAAAEMTI5MQAEAAkAAAAEMTI5MgAEAAkAAAAEMTI5MwAEAAkAAAAEMTI5NAAEAAkAAAAEMTI5NwAEAAkAAAAEMTI5OAAEAAkAAAAEMTMwMgAEAAkAAAAEMTMwNAAEAAkAAAAEMTMwOAAEAAkAAAAEMTMxMgAEAAkAAAAEMTMxNQAEAAkAAAAEMTMxNgAEAAkAAAAEMTMxNwAEAAkAAAAEMTMxOAAEAAkAAAAEMTMxOQAEAAkAAAAEMTMyMAAEAAkAAAAEMTMyMQAEAAkAAAAEMTMyMgAEAAkAAAAEMTMyNAAEAAkAAAAEMTMyNgAEAAkAAAAEMTMyOQAEAAkAAAAEMTMzMQAEAAkAAAAEMTMzMgAEAAkAAAAEMTMzMwAEAAkAAAAEMTMzNAAEAAkAAAAEMTMzNQAEAAkAAAAEMTMzNgAEAAkAAAAEMTMzOAAEAAkAAAAEMTMzOQAEAAkAAAAEMTM0MgAEAAkAAAAEMTM0MwAEAAkAAAAEMTM0NgAEAAkAAAAEMTM1MAAEAAkAAAAEMTM1MQAEAAkAAAAEMTM1MgAEAAkAAAAEMTM1NAAEAAkAAAAEMTM1NgAEAAkAAAAEMTM1OAAEAAkAAAAEMTM2MAAEAAkAAAAEMTM2MQAEAAkAAAAEMTM2NQAEAAkAAAAEMTM2NgAEAAkAAAAEMTM2OAAEAAkAAAAEMTM2OQAEAAkAAAAEMTM3MQAEAAkAAAAEMTM3NQAEAAkAAAAEMTM3NgAEAAkAAAAEMTM3NwAEAAkAAAAEMTM3OAAEAAkAAAAEMTM4MgAEAAkAAAAEMTM4MwAEAAkAAAAEMTM4NAAEAAkAAAAEMTM4NQAEAAkAAAAEMTM4NgAEAAkAAAAEMTM4OQAEAAkAAAAEMTM5MQAEAAkAAAAEMTM5MwAEAAkAAAAEMTM5NQAEAAkAAAAEMTM5NgAEAAkAAAAEMTQwMAAEAAkAAAAEMTQwMQAEAAkAAAAEMTQwMgAEAAkAAAAEMTQwMwAEAAkAAAAEMTQwNAAEAAkAAAAEMTQwNgAEAAkAAAAEMTQwNwAEAAkAAAAEMTQwOAAEAAkAAAAEMTQxMAAEAAkAAAAEMTQxMgAEAAkAAAAEMTQxNAAEAAkAAAAEMTQxNQAEAAkAAAAEMTQyMAAEAAkAAAAEMTQyMgAEAAkAAAAEMTQyMwAEAAkAAAAEMTQyNAAEAAkAAAAEMTQyNQAEAAkAAAAEMTQyNgAEAAkAAAAEMTQzMQAEAAkAAAAEMTQzMgAEAAkAAAAEMTQzMwAEAAkAAAAEMTQzNAAEAAkAAAAEMTQzNgAEAAkAAAAEMTQzNwAEAAkAAAAEMTQ0MgAEAAkAAAAEMTQ0MwAEAAkAAAAEMTQ0NQAEAAkAAAAEMTQ0NgAEAAkAAAAEMTQ0OQAEAAkAAAAEMTQ1MAAEAAkAAAAEMTQ1MQAEAAkAAAAEMTQ1MgAEAAkAAAAEMTQ1MwAEAAkAAAAEMTQ1NAAEAAkAAAAEMTQ1NQAEAAkAAAAEMTQ1OAAEAAkAAAAEMTQ2MAAEAAkAAAAEMTQ2MQAEAAkAAAAEMTQ2MgAEAAkAAAAEMTQ2MwAEAAkAAAAEMTQ2NQAEAAkAAAAEMTQ2NwAEAAkAAAAEMTQ2OAAEAAkAAAAEMTQ2OQAEAAkAAAAEMTQ3MgAEAAkAAAAEMTQ3NAAEAAkAAAAEMTQ3NQAEAAkAAAAEMTQ3NgAEAAkAAAAEMTQ3NwAEAAkAAAAEMTQ3OQAEAAkAAAAEMTQ4MAAEAAkAAAAEMTQ4MwAEAAkAAAAEMTQ4NgAEAAkAAAAEMTQ4OQAEAAkAAAAEMTQ5MAAEAAkAAAAEMTQ5MQAEAAkAAAAEMTQ5MgAEAAkAAAAEMTQ5MwAEAAkAAAAEMTQ5NAAEAAkAAAAEMTQ5NQAEAAkAAAAEMTQ5NgAEAAkAAAAEMTQ5NwAEAAkAAAAEMTQ5OAAEAAkAAAAEMTUwMQAEAAkAAAAEMTUwMgAEAAkAAAAEMTUwMwAEAAkAAAAEMTUwNAAEAAkAAAAEMTUwNQAEAAkAAAAEMTUwNwAEAAkAAAAEMTUwOAAEAAkAAAAEMTUxMAAEAAkAAAAEMTUxMwAEAAkAAAAEMTUxNAAEAAkAAAAEMTUxNgAEAAkAAAAEMTUxNwAEAAkAAAAEMTUxOQAEAAkAAAAEMTUyMAAEAAkAAAAEMTUyMgAEAAkAAAAEMTUyMwAEAAkAAAAEMTUyNAAEAAkAAAAEMTUyNwAEAAkAAAAEMTUyOAAEAAkAAAAEMTUzMQAEAAkAAAAEMTUzNAAEAAkAAAAEMTUzNwAEAAkAAAAEMTUzOAAEAAkAAAAEMTU0MAAEAAkAAAAEMTU0MgAEAAkAAAAEMTU0NAAEAAkAAAAEMTU0NwAEAAkAAAAEMTU0OAAEAAkAAAAEMTU1MgAEAAkAAAAEMTU1NQAEAAkAAAAEMTU1NgAEAAkAAAAEMTU1OQAEAAkAAAAEMTU2MAAEAAkAAAAEMTU2MQAEAAkAAAAEMTU2MgAEAAkAAAAEMTU2NAAEAAkAAAAEMTU2NQAEAAkAAAAEMTU2OAAEAAkAAAAEMTU3MwAEAAkAAAAEMTU3NgAEAAkAAAAEMTU4MQAEAAkAAAAEMTU4NAAEAAkAAAAEMTU4NQAEAAkAAAAEMTU4OQAEAAkAAAAEMTU5MAAEAAkAAAAEMTU5MQAEAAkAAAAEMTU5MgAEAAkAAAAEMTU5OAAEAAkAAAAEMTYwMgAEAAkAAAAEMTYwNgAEAAkAAAAEMTYwNwAEAAkAAAAEMTYwOAAEAAkAAAAEMTYwOQAEAAkAAAAEMTYxNwAEAAkAAAAEMTYxOAAEAAkAAAAEMTYxOQAEAAkAAAAEMTYyMwAEAAkAAAAEMTYyNAAEAAkAAAAEMTYyNQAEAAkAAAAEMTYyOAAEAAkAAAAEMTYyOQAEAAkAAAAEMTYzMAAEAAkAAAAEMTYzMQAEAAkAAAAEMTYzMgAEAAkAAAAEMTYzNAAEAAkAAAAEMTYzNwAEAAkAAAAEMTYzOAAEAAkAAAAEMTY0MQAEAAkAAAAEMTY0MgAEAAkAAAAEMTY0NgAEAAkAAAAEMTY0OAAEAAkAAAAEMTY1NgAEAAkAAAAEMTY1OAAEAAkAAAAEMTY2MAAEAAkAAAAEMTY2MgAEAAkAAAAEMTY2MwAEAAkAAAAEMTY2NgAEAAkAAAAEMTY2NwAEAAkAAAAEMTY2OQAEAAkAAAAEMTY3MAAEAAkAAAAEMTY3MgAEAAkAAAAEMTY3NAAEAAkAAAAEMTY3NgAEAAkAAAAEMTY4MgAEAAkAAAAEMTY4MwAEAAkAAAAEMTY4NAAEAAkAAAAEMTY4NwAEAAkAAAAEMTY4OAAEAAkAAAAEMTY5MQAEAAkAAAAEMTY5MwAEAAkAAAAEMTY5NQAEAAkAAAAEMTY5NgAEAAkAAAAEMTY5NwAEAAkAAAAEMTcwNQAEAAkAAAAEMTcwNgAEAAkAAAAEMTcwOAAEAAkAAAAEMTcxNAAEAAkAAAAEMTcxNwAEAAkAAAAEMTcxOQAEAAkAAAAEMTcyMgAEAAkAAAAEMTcyNgAEAAkAAAAEMTcyNwAEAAkAAAAEMTcyOAAEAAkAAAAEMTcyOQAEAAkAAAAEMTczMgAEAAkAAAAEMTczOQAEAAkAAAAEMTc0MAAEAAkAAAAEMTc0MQAEAAkAAAAEMTc0MwAEAAkAAAAEMTc0NQAEAAkAAAAEMTc0NwAEAAkAAAAEMTc0OAAEAAkAAAAEMTc1MAAEAAkAAAAEMTc1MQAEAAkAAAAEMTc1MgAEAAkAAAAEMTc1NAAEAAkAAAAEMTc1NgAEAAkAAAAEMTc1OAAEAAkAAAAEMTc1OQAEAAkAAAAEMTc2MAAEAAkAAAAEMTc2MQAEAAkAAAAEMTc2MgAEAAkAAAAEMTc2MwAEAAkAAAAEMTc2NQAEAAkAAAAEMTc3MwAEAAkAAAAEMTc3NgAEAAkAAAAEMTc3NwAEAAkAAAAEMTc3OQAEAAkAAAAEMTc4NgAEAAkAAAAEMTc4NwAEAAkAAAAEMTc4OAAEAAkAAAAEMTc4OQAEAAkAAAAEMTc5MwAEAAkAAAAEMTc5NAAEAAkAAAAEMTc5NQAEAAkAAAAEMTc5NwAEAAkAAAAEMTc5OAAEAAkAAAAEMTc5OQAEAAkAAAAEMTgwMgAEAAkAAAAEMTgwMwAEAAkAAAAEMTgwNAAEAAkAAAAEMTgwNQAEAAkAAAAEMTgwNgAEAAkAAAAEMTgwOAAEAAkAAAAEMTgwOQAEAAkAAAAEMTgxMQAEAAkAAAAEMTgxMwAEAAkAAAAEMTgxNQAEAAkAAAAEMTgyMgAEAAkAAAAEMTgyMwAEAAkAAAAEMTgyNwAEAAkAAAAEMTgyOAAEAAkAAAAEMTgyOQAEAAkAAAAEMTgzMAAEAAkAAAAEMTgzMQAEAAkAAAAEMTgzMgAEAAkAAAAEMTgzMwAEAAkAAAAEMTgzNwAEAAkAAAAEMTgzOAAEAAkAAAAEMTg0MAAEAAkAAAAEMTg0MQAEAAkAAAAEMTg0MgAEAAkAAAAEMTg0NAAEAAkAAAAEMTg0NgAEAAkAAAAEMTg1MgAEAAkAAAAEMTg1NwAEAAkAAAAEMTg1OAAEAAkAAAAEMTg2MAAEAAkAAAAEMTg2NAAEAAkAAAAEMTg2NQAEAAkAAAAEMTg2NgAEAAkAAAAEMTg2NwAEAAkAAAAEMTg3MwAEAAkAAAAEMTg3NAAEAAkAAAAEMTg3NQAEAAkAAAAEMTg4MAAEAAkAAAAEMTg4MQAEAAkAAAAEMTg4MgAEAAkAAAAEMTg4NQAEAAkAAAAEMTg4NwAEAAkAAAAEMTg4OAAEAAkAAAAEMTg5MAAEAAkAAAAEMTg5MQAEAAkAAAAEMTg5NQAEAAkAAAAEMTkwMAAEAAkAAAAEMTkwMgAEAAkAAAAEMTkwMwAEAAkAAAAEMTkwNgAEAAkAAAAEMTkxMQAEAAkAAAAEMTkxMgAEAAkAAAAEMTkxMwAEAAkAAAAEMTkxNQAEAAkAAAAEMTkxNgAEAAkAAAAEMTkxOAAEAAkAAAAEMTkyMAAEAAkAAAAEMTkyNgAEAAkAAAAEMTkyOAAEAAkAAAAEMTkzMQAEAAkAAAAEMTkzMgAEAAkAAAAEMTkzMwAEAAkAAAAEMTkzNAAEAAkAAAAEMTkzOAAEAAkAAAAEMTk0NgAEAAkAAAAEMTk0NwAEAAkAAAAEMTk0OAAEAAkAAAAEMTk1MQAEAAkAAAAEMTk1MgAEAAkAAAAEMTk1NAAEAAkAAAAEMTk1NQAEAAkAAAAEMTk1OAAEAAkAAAAEMTk2MQAEAAkAAAAEMTk2MgAEAAkAAAAEMTk2MwAEAAkAAAAEMTk2NAAEAAkAAAAEMTk2NQAEAAkAAAAEMTk2NgAEAAkAAAAEMTk3MAAEAAkAAAAEMTk3MQAEAAkAAAAEMTk3MwAEAAkAAAAEMTk3NQAEAAkAAAAEMTk4OAAEAAkAAAAEMTk5MAAEAAkAAAAEMTk5MwAEAAkAAAAEMTk5NAAEAAkAAAAEMTk5NQAEAAkAAAAEMTk5NwAEAAkAAAAEMTk5OAAEAAkAAAAEMjAwMQAEAAkAAAAEMjAwMgAEAAkAAAAEMjAwMwAEAAkAAAAEMjAwNAAEAAkAAAAEMjAwNgAEAAkAAAAEMjAwOAAEAAkAAAAEMjAxMAAEAAkAAAAEMjAxNAAEAAkAAAAEMjAxNgAEAAkAAAAEMjAyMAAEAAkAAAAEMjAyMwAEAAkAAAAEMjAyNQAEAAkAAAAEMjAyOAAEAAkAAAAEMjAyOQAEAAkAAAAEMjAzMAAEAAkAAAAEMjAzNAAEAAkAAAAEMjAzNQAEAAkAAAAEMjAzNgAEAAkAAAAEMjAzNwAEAAkAAAAEMjAzOAAEAAkAAAAEMjA0MQAEAAkAAAAEMjA0MgAEAAkAAAAEMjA0MwAEAAkAAAAEMjA0NAAEAAkAAAAEMjA0NQAEAAkAAAAEMjA0OAAEAAkAAAAEMjA0OQAEAAkAAAAEMjA1MAAEAAkAAAAEMjA1MgAEAAkAAAAEMjA1NQAEAAkAAAAEMjA1OAAEAAkAAAAEMjA2MAAEAAkAAAAEMjA2MQAEAAkAAAAEMjA2NAAEAAkAAAAEMjA2NQAEAAkAAAAEMjA2NwAEAAkAAAAEMjA2OQAEAAkAAAAEMjA3MAAEAAkAAAAEMjA3NAAEAAkAAAAEMjA3NQAEAAkAAAAEMjA3NwAEAAkAAAAEMjA3OQAEAAkAAAAEMjA4MAAEAAkAAAAEMjA4MQAEAAkAAAAEMjA4MgAEAAkAAAAEMjA4NwAEAAkAAAAEMjA4OAAEAAkAAAAEMjA4OQAEAAkAAAAEMjA5MgAEAAkAAAAEMjA5NgAEAAkAAAAEMjA5NwAEAAkAAAAEMjEwMgAEAAkAAAAEMjEwMwAEAAkAAAAEMjEwNgAEAAkAAAAEMjEwOAAEAAkAAAAEMjExMQAEAAkAAAAEMjExMgAEAAkAAAAEMjExNAAEAAkAAAAEMjExNgAEAAkAAAAEMjExNwAEAAkAAAAEMjExOAAEAAkAAAAEMjExOQAEAAkAAAAEMjEyMwAEAAkAAAAEMjEyNQAEAAkAAAAEMjEyNgAEAAkAAAAEMjEyNwAEAAkAAAAEMjEyOAAEAAkAAAAEMjEzMAAEAAkAAAAEMjEzMQAEAAkAAAAEMjEzMgAEAAkAAAAEMjE0MAAEAAkAAAAEMjE0MgAEAAkAAAAEMjE0NAAEAAkAAAAEMjE0NgAEAAkAAAAEMjE0OAAEAAkAAAAEMjE1MAAEAAkAAAAEMjE1MQAEAAkAAAAEMjE1MwAEAAkAAAAEMjE1OAAEAAkAAAAEMjE1OQAEAAkAAAAEMjE2MgAEAAkAAAAEMjE2NAAEAAkAAAAEMjE2NQAEAAkAAAAEMjE2NwAEAAkAAAAEMjE2OAAEAAkAAAAEMjE2OQAEAAkAAAAEMjE3MAAEAAkAAAAEMjE3MQAEAAkAAAAEMjE3NQAEAAkAAAAEMjE3NwAEAAkAAAAEMjE3OAAEAAkAAAAEMjE4MAAEAAkAAAAEMjE4MgAEAAkAAAAEMjE4MwAEAAkAAAAEMjE4OQAEAAkAAAAEMjE5MQAEAAkAAAAEMjE5MgAEAAkAAAAEMjE5MwAEAAkAAAAEMjE5NAAEAAkAAAAEMjE5NQAEAAkAAAAEMjE5NgAEAAkAAAAEMjE5OAAEAAkAAAAEMjE5OQAEAAkAAAAEMjIwMgAEAAkAAAAEMjIwMwAEAAkAAAAEMjIwNAAEAAkAAAAEMjIwNQAEAAkAAAAEMjIwNgAEAAkAAAAEMjIwOAAEAAkAAAAEMjIxMAAEAAkAAAAEMjIxMQAEAAkAAAAEMjIxMgAEAAkAAAAEMjIxMwAEAAkAAAAEMjIxNAAEAAkAAAAEMjIxNQAEAAkAAAAEMjIxOQAEAAkAAAAEMjIyMAAEAAkAAAAEMjIyMQAEAAkAAAAEMjIyMgAEAAkAAAAEMjIyNQAEAAkAAAAEMjIyNgAEAAkAAAAEMjIyNwAEAAkAAAAEMjIyOAAEAAkAAAAEMjIzMQAEAAkAAAAEMjIzMgAEAAkAAAAEMjIzMwAEAAkAAAAEMjIzNQAEAAkAAAAEMjI0MgAEAAkAAAAEMjI0MwAEAAkAAAAEMjI0OAAEAAkAAAAEMjI1MAAEAAkAAAAEMjI1NQAEAAkAAAAEMjI1NwAEAAkAAAAEMjI2MAAEAAkAAAAEMjI2MQAEAAkAAAAEMjI2MgAEAAkAAAAEMjI2NAAEAAkAAAAEMjI2NQAEAAkAAAAEMjI2NwAEAAkAAAAEMjI2OAAEAAkAAAAEMjI3MAAEAAkAAAAEMjI3MQAEAAkAAAAEMjI3MgAEAAkAAAAEMjI3MwAEAAkAAAAEMjI3NgAEAAkAAAAEMjI3NwAEAAkAAAAEMjI3OAAEAAkAAAAEMjI4MgAEAAkAAAAEMjI4NAAEAAkAAAAEMjI4NgAEAAkAAAAEMjI4OQAEAAkAAAAEMjI5MQAEAAkAAAAEMjI5MgAEAAkAAAAEMjI5MwAEAAkAAAAEMjI5NgAEAAkAAAAEMjI5NwAEAAkAAAAEMjI5OAAEAAkAAAAEMjMwMAAEAAkAAAAEMjMwMQAEAAkAAAAEMjMwMwAEAAkAAAAEMjMwNAAEAAkAAAAEMjMwNgAEAAkAAAAEMjMwNwAEAAkAAAAEMjMxMwAEAAkAAAAEMjMxNAAEAAkAAAAEMjMxNgAEAAkAAAAEMjMxOAAEAAkAAAAEMjMxOQAEAAkAAAAEMjMyMAAEAAkAAAAEMjMyMgAEAAkAAAAEMjMyMwAEAAkAAAAEMjMyNQAEAAkAAAAEMjMyNwAEAAkAAAAEMjMyOQAEAAkAAAAEMjMzMAAEAAkAAAAEMjMzMgAEAAkAAAAEMjMzNAAEAAkAAAAEMjMzNgAEAAkAAAAEMjMzOAAEAAkAAAAEMjMzOQAEAAkAAAAEMjM0MAAEAAkAAAAEMjM0MQAEAAkAAAAEMjM0NgAEAAkAAAAEMjM0NwAEAAkAAAAEMjM0OAAEAAkAAAAEMjM1MgAEAAkAAAAEMjM1MwAEAAkAAAAEMjM1NAAEAAkAAAAEMjM1NgAEAAkAAAAEMjM1NwAEAAkAAAAEMjM1OAAEAAkAAAAEMjM1OQAEAAkAAAAEMjM2MAAEAAkAAAAEMjM2MQAEAAkAAAAEMjM2MwAEAAkAAAAEMjM2NAAEAAkAAAAEMjM2NgAEAAkAAAAEMjM2NwAEAAkAAAAEMjM2OQAEAAkAAAAEMjM3MAAEAAkAAAAEMjM3MgAEAAkAAAAEMjM3NQAEAAkAAAAEMjM3NwAEAAkAAAAEMjM3OQAEAAkAAAAEMjM4MAAEAAkAAAAEMjM4MQAEAAkAAAAEMjM4MwAEAAkAAAAEMjM4NAAEAAkAAAAEMjM4NgAEAAkAAAAEMjM4NwAEAAkAAAAEMjM4OQAEAAkAAAAEMjM5NAAEAAkAAAAEMjM5OAAEAAkAAAAEMjQwMAAEAAkAAAAEMjQwOQAEAAkAAAAEMjQxMAAEAAkAAAAEMjQxNQAEAAkAAAAEMjQxNwAEAAkAAAAEMjQxOQAEAAkAAAAEMjQyMwAEAAkAAAAEMjQyNgAEAAkAAAAEMjQyOAAEAAkAAAAEMjQyOQAEAAkAAAAEMjQzMAAEAAkAAAAEMjQzMQAEAAkAAAAEMjQzNAAEAAkAAAAEMjQzOQAEAAkAAAAEMjQ0NAAEAAkAAAAEMjQ0NQAEAAkAAAAEMjQ0NwAEAAkAAAAEMjQ0OAAEAAkAAAAEMjQ0OQAEAAkAAAAEMjQ1MgAEAAkAAAAEMjQ1NAAEAAkAAAAEMjQ1NQAEAAkAAAAEMjQ1NgAEAAkAAAAEMjQ1OAAEAAkAAAAEMjQ1OQAEAAkAAAAEMjQ2MQAEAAkAAAAEMjQ2MwAEAAkAAAAEMjQ2NQAEAAkAAAAEMjQ2NgAEAAkAAAABNwAEAAkAAAACMTEABAAJAAAAAjE3AAQACQAAAAIxOQAEAAkAAAACMjAABAAJAAAAAjIxAAQACQAAAAIyOAAEAAkAAAACMzAABAAJAAAAAjMxAAQACQAAAAIzNQAEAAkAAAACNDUABAAJAAAAAjQ4AAQACQAAAAI1NAAEAAkAAAACNjIABAAJAAAAAjYzAAQACQAAAAI3MgAEAAkAAAACNzMABAAJAAAAAjc4AAQACQAAAAI4MwAEAAkAAAACODcABAAJAAAAAjg5AAQACQAAAAI5NgAEAAkAAAACOTcABAAJAAAAAzEwMQAEAAkAAAADMTA1AAQACQAAAAMxMDgABAAJAAAAAzEwOQAEAAkAAAADMTEwAAQACQAAAAMxMTEABAAJAAAAAzExNgAEAAkAAAADMTE3AAQACQAAAAMxMjkABAAJAAAAAzEzMQAEAAkAAAADMTMzAAQACQAAAAMxMzkABAAJAAAAAzE0MgAEAAkAAAADMTQzAAQACQAAAAMxNDQABAAJAAAAAzE0NQAEAAkAAAADMTQ4AAQACQAAAAMxNTEABAAJAAAAAzE1NgAEAAkAAAADMTU3AAQACQAAAAMxNjAABAAJAAAAAzE2MwAEAAkAAAADMTY0AAQACQAAAAMxNjcABAAJAAAAAzE3MQAEAAkAAAADMTc2AAQACQAAAAMxODIABAAJAAAAAzIwNAAEAAkAAAADMjEwAAQACQAAAAMyMTIABAAJAAAAAzIxOQAEAAkAAAADMjIxAAQACQAAAAMyMjUABAAJAAAAAzIyOQAEAAkAAAADMjM1AAQACQAAAAMyMzcABAAJAAAAAzI0MAAEAAkAAAADMjQxAAQACQAAAAMyNDIABAAJAAAAAzI0OAAEAAkAAAADMjU2AAQACQAAAAMyNTkABAAJAAAAAzI2NAAEAAkAAAADMjY3AAQACQAAAAMyNjkABAAJAAAAAzI3NQAEAAkAAAADMjc5AAQACQAAAAMyODUABAAJAAAAAzI4NwAEAAkAAAADMjk1AAQACQAAAAMyOTkABAAJAAAAAzMwMwAEAAkAAAADMzEyAAQACQAAAAMzMTMABAAJAAAAAzMxNwAEAAkAAAADMzE4AAQACQAAAAMzMjUABAAJAAAAAzMyOAAEAAkAAAADMzMzAAQACQAAAAMzMzUABAAJAAAAAzMzNgAEAAkAAAADMzM3AAQACQAAAAMzNDIABAAJAAAAAzM0NQAEAAkAAAADMzQ2AAQACQAAAAMzNDkABAAJAAAAAzM1MgAEAAkAAAADMzU0AAQACQAAAAMzNTkABAAJAAAAAzM2MQAEAAkAAAADMzY0AAQACQAAAAMzNjcABAAJAAAAAzM3MQAEAAkAAAADMzc0AAQACQAAAAMzNzcABAAJAAAAAzM3OQAEAAkAAAADMzgwAAQACQAAAAMzODYABAAJAAAAAzM4OAAEAAkAAAADMzg5AAQACQAAAAMzOTEABAAJAAAAAzM5MwAEAAkAAAADNDAwAAQACQAAAAM0MDUABAAJAAAAAzQwNwAEAAkAAAADNDEwAAQACQAAAAM0MTEABAAJAAAAAzQxNAAEAAkAAAADNDE1AAQACQAAAAM0MTcABAAJAAAAAzQxOAAEAAkAAAADNDIyAAQACQAAAAM0MjQABAAJAAAAAzQyOQAEAAkAAAADNDM0AAQACQAAAAM0MzUABAAJAAAAAzQzNgAEAAkAAAADNDQ0AAQACQAAAAM0NTEABAAJAAAAAzQ1MgAEAAkAAAADNDUzAAQACQAAAAM0NTgABAAJAAAAAzQ2MAAEAAkAAAADNDYxAAQACQAAAAM0NjIABAAJAAAAAzQ2NAAEAAkAAAADNDY2AAQACQAAAAM0NjkABAAJAAAAAzQ3OAAEAAkAAAADNDc5AAQACQAAAAM0ODMABAAJAAAAAzQ4NAAEAAkAAAADNDg1AAQACQAAAAM0OTAABAAJAAAAAzQ5MgAEAAkAAAADNDk0AAQACQAAAAM0OTYABAAJAAAAAzQ5NwAEAAkAAAADNTAwAAQACQAAAAM1MDIABAAJAAAAAzUwMwAEAAkAAAADNTA2AAQACQAAAAM1MDgABAAJAAAAAzUxNQAEAAkAAAADNTE5AAQACQAAAAM1MjIABAAJAAAAAzUyNQAEAAkAAAADNTI5AAQACQAAAAM1MzAABAAJAAAAAzUzMQAEAAkAAAADNTM1AAQACQAAAAM1MzYABAAJAAAAAzUzOQAEAAkAAAADNTQ0AAQACQAAAAM1NDYABAAJAAAAAzU0NwAEAAkAAAADNTUyAAQACQAAAAM1NTkABAAJAAAAAzU2MQAEAAkAAAADNTY0AAQACQAAAAM1NjYABAAJAAAAAzU2OQAEAAkAAAADNTgxAAQACQAAAAM1ODMABAAJAAAAAzU4OAAEAAkAAAADNTg5AAQACQAAAAM1OTEABAAJAAAAAzU5MgAEAAkAAAADNTk0AAQACQAAAAM1OTUABAAJAAAAAzU5NgAEAAkAAAADNTk3AAQACQAAAAM2MDcABAAJAAAAAzYxMAAEAAkAAAADNjExAAQACQAAAAM2MTIABAAJAAAAAzYxNQAEAAkAAAADNjE3AAQACQAAAAM2MjIABAAJAAAAAzYyNQAEAAkAAAADNjI5AAQACQAAAAM2MzAABAAJAAAAAzY0NAAEAAkAAAADNjQ2AAQACQAAAAM2NTkABAAJAAAAAzY2MAAEAAkAAAADNjYzAAQACQAAAAM2NzAABAAJAAAAAzY3MQAEAAkAAAADNjcyAAQACQAAAAM2NzMABAAJAAAAAzY3OAAEAAkAAAADNjgyAAQACQAAAAM2ODMABAAJAAAAAzY5MgAEAAkAAAADNjk0AAQACQAAAAM2OTcABAAJAAAAAzY5OAAEAAkAAAADNjk5AAQACQAAAAM3MDAABAAJAAAAAzcwMQAEAAkAAAADNzAyAAQACQAAAAM3MDMABAAJAAAAAzcxNgAEAAkAAAADNzIwAAQACQAAAAM3NDAABAAJAAAAAzc0NQAEAAkAAAADNzQ5AAQACQAAAAM3NTEABAAJAAAAAzc1NAAEAAkAAAADNzYxAAQACQAAAAM3NjYABAAJAAAAAzc2NwAEAAkAAAADNzcwAAQACQAAAAM3NzQABAAJAAAAAzc3NQAEAAkAAAADNzc5AAQACQAAAAM3ODAABAAJAAAAAzc5MQAEAAkAAAADNzk3AAQACQAAAAM4MDIABAAJAAAAAzgwOAAEAAkAAAADODE4AAQACQAAAAM4MjEABAAJAAAAAzgyOAAEAAkAAAADODI5AAQACQAAAAM4MzEABAAJAAAAAzgzMgAEAAkAAAADODQzAAQACQAAAAM4NDUABAAJAAAAAzg1MAAEAAkAAAADODUzAAQACQAAAAM4NTcABAAJAAAAAzg1OQAEAAkAAAADODY0AAQACQAAAAM4NjcABAAJAAAAAzg2OQAEAAkAAAADODcwAAQACQAAAAM4NzkABAAJAAAAAzg4MwAEAAkAAAADODg0AAQACQAAAAM4ODgABAAJAAAAAzg5MAAEAAkAAAADODk1AAQACQAAAAM4OTYABAAJAAAAAzkxMQAEAAkAAAADOTEyAAQACQAAAAM5MTUABAAJAAAAAzkxNwAEAAkAAAADOTIwAAQACQAAAAM5MjQABAAJAAAAAzkyNgAEAAkAAAADOTI3AAQACQAAAAM5MzAABAAJAAAAAzkzNAAEAAkAAAADOTM5AAQACQAAAAM5NDkABAAJAAAAAzk1MAAEAAkAAAADOTUxAAQACQAAAAM5NTIABAAJAAAAAzk1MwAEAAkAAAADOTU4AAQACQAAAAM5NjEABAAJAAAAAzk2MgAEAAkAAAADOTYzAAQACQAAAAM5NjQABAAJAAAAAzk3MQAEAAkAAAADOTc0AAQACQAAAAM5NzUABAAJAAAAAzk3NgAEAAkAAAADOTgwAAQACQAAAAM5ODIABAAJAAAAAzk4MwAEAAkAAAADOTg3AAQACQAAAAM5ODgABAAJAAAAAzk5MAAEAAkAAAADOTkzAAQACQAAAAM5OTgABAAJAAAABDEwMDIABAAJAAAABDEwMjMABAAJAAAABDEwMjYABAAJAAAABDEwMjcABAAJAAAABDEwMjgABAAJAAAABDEwMzYABAAJAAAABDEwMzgABAAJAAAABDEwMzkABAAJAAAABDEwNDAABAAJAAAABDEwNDEABAAJAAAABDEwNDQABAAJAAAABDEwNDUABAAJAAAABDEwNDcABAAJAAAABDEwNTUABAAJAAAABDEwNTcABAAJAAAABDEwNTgABAAJAAAABDEwNTkABAAJAAAABDEwNjAABAAJAAAABDEwNjMABAAJAAAABDEwNjUABAAJAAAABDEwNjgABAAJAAAABDEwNjkABAAJAAAABDEwNzEABAAJAAAABDEwNzMABAAJAAAABDEwNzQABAAJAAAABDEwODUABAAJAAAABDEwOTAABAAJAAAABDEwOTEABAAJAAAABDEwOTUABAAJAAAABDExMDAABAAJAAAABDExMDIABAAJAAAABDExMTIABAAJAAAABDExMjQABAAJAAAABDExMjUABAAJAAAABDExMjcABAAJAAAABDExMzEABAAJAAAABDExMzMABAAJAAAABDExMzQABAAJAAAABDExMzcABAAJAAAABDExNDUABAAJAAAABDExNDYABAAJAAAABDExNDcABAAJAAAABDExNDkABAAJAAAABDExNTAABAAJAAAABDExNTUABAAJAAAABDExNTkABAAJAAAABDExNjgABAAJAAAABDExNzAABAAJAAAABDExNzEABAAJAAAABDExNzYABAAJAAAABDExODEABAAJAAAABDExODMABAAJAAAABDExODQABAAJAAAABDExOTAABAAJAAAABDExOTMABAAJAAAABDExOTUABAAJAAAABDExOTcABAAJAAAABDEyMDEABAAJAAAABDEyMDQABAAJAAAABDEyMDYABAAJAAAABDEyMDcABAAJAAAABDEyMDkABAAJAAAABDEyMTAABAAJAAAABDEyMTIABAAJAAAABDEyMTQABAAJAAAABDEyMTgABAAJAAAABDEyMjIABAAJAAAABDEyMjMABAAJAAAABDEyMjQABAAJAAAABDEyMjUABAAJAAAABDEyMjYABAAJAAAABDEyMzAABAAJAAAABDEyMzQABAAJAAAABDEyMzcABAAJAAAABDEyMzkABAAJAAAABDEyNDEABAAJAAAABDEyNDIABAAJAAAABDEyNDcABAAJAAAABDEyNDgABAAJAAAABDEyNTAABAAJAAAABDEyNTEABAAJAAAABDEyNTUABAAJAAAABDEyNTYABAAJAAAABDEyNjIABAAJAAAABDEyNzkABAAJAAAABDEyODQABAAJAAAABDEyODYABAAJAAAABDEyODgABAAJAAAABDEyOTAABAAJAAAABDEyOTYABAAJAAAABDEzMDMABAAJAAAABDEzMDUABAAJAAAABDEzMDcABAAJAAAABDEzMTEABAAJAAAABDEzMTQABAAJAAAABDEzMjUABAAJAAAABDEzMjcABAAJAAAABDEzNDAABAAJAAAABDEzNDQABAAJAAAABDEzNDcABAAJAAAABDEzNDgABAAJAAAABDEzNTkABAAJAAAABDEzNjIABAAJAAAABDEzNjMABAAJAAAABDEzNjcABAAJAAAABDEzNzAABAAJAAAABDEzNzIABAAJAAAABDEzNzkABAAJAAAABDEzODEABAAJAAAABDEzOTIABAAJAAAABDEzOTQABAAJAAAABDEzOTcABAAJAAAABDE0MDUABAAJAAAABDE0MDkABAAJAAAABDE0MTEABAAJAAAABDE0MTYABAAJAAAABDE0MjEABAAJAAAABDE0MjcABAAJAAAABDE0MjgABAAJAAAABDE0MjkABAAJAAAABDE0MzgABAAJAAAABDE0MzkABAAJAAAABDE0NDEABAAJAAAABDE0NDQABAAJAAAABDE0NDgABAAJAAAABDE0NTYABAAJAAAABDE0NTkABAAJAAAABDE0NjYABAAJAAAABDE0NzAABAAJAAAABDE0NzEABAAJAAAABDE0NzMABAAJAAAABDE0ODEABAAJAAAABDE0ODIABAAJAAAABDE0ODQABAAJAAAABDE0ODgABAAJAAAABDE1MDAABAAJAAAABDE1MDYABAAJAAAABDE1MDkABAAJAAAABDE1MTIABAAJAAAABDE1MTUABAAJAAAABDE1MTgABAAJAAAABDE1MjUABAAJAAAABDE1MjYABAAJAAAABDE1MzIABAAJAAAABDE1MzMABAAJAAAABDE1MzUABAAJAAAABDE1MzkABAAJAAAABDE1NDEABAAJAAAABDE1NDMABAAJAAAABDE1NDUABAAJAAAABDE1NDYABAAJAAAABDE1NDkABAAJAAAABDE1NTMABAAJAAAABDE1NTQABAAJAAAABDE1NTcABAAJAAAABDE1NTgABAAJAAAABDE1NjcABAAJAAAABDE1NzEABAAJAAAABDE1NzIABAAJAAAABDE1NzUABAAJAAAABDE1NzcABAAJAAAABDE1NzgABAAJAAAABDE1ODIABAAJAAAABDE1ODMABAAJAAAABDE1ODYABAAJAAAABDE1OTQABAAJAAAABDE1OTUABAAJAAAABDE1OTYABAAJAAAABDE1OTkABAAJAAAABDE2MDEABAAJAAAABDE2MTEABAAJAAAABDE2MTIABAAJAAAABDE2MTMABAAJAAAABDE2MTQABAAJAAAABDE2MTYABAAJAAAABDE2MjAABAAJAAAABDE2MjEABAAJAAAABDE2MjcABAAJAAAABDE2MzUABAAJAAAABDE2MzYABAAJAAAABDE2MzkABAAJAAAABDE2NDAABAAJAAAABDE2NDcABAAJAAAABDE2NTAABAAJAAAABDE2NTEABAAJAAAABDE2NTIABAAJAAAABDE2NTMABAAJAAAABDE2NTQABAAJAAAABDE2NTUABAAJAAAABDE2NTcABAAJAAAABDE2NjEABAAJAAAABDE2NjUABAAJAAAABDE2NzEABAAJAAAABDE2NzMABAAJAAAABDE2NzUABAAJAAAABDE2NzgABAAJAAAABDE2NzkABAAJAAAABDE2ODUABAAJAAAABDE2OTAABAAJAAAABDE2OTIABAAJAAAABDE2OTQABAAJAAAABDE2OTgABAAJAAAABDE2OTkABAAJAAAABDE3MDEABAAJAAAABDE3MDQABAAJAAAABDE3MDkABAAJAAAABDE3MTEABAAJAAAABDE3MTIABAAJAAAABDE3MTUABAAJAAAABDE3MjMABAAJAAAABDE3MjQABAAJAAAABDE3MjUABAAJAAAABDE3MzMABAAJAAAABDE3MzQABAAJAAAABDE3MzYABAAJAAAABDE3MzcABAAJAAAABDE3NDIABAAJAAAABDE3NDQABAAJAAAABDE3NDYABAAJAAAABDE3NDkABAAJAAAABDE3NzAABAAJAAAABDE3NzQABAAJAAAABDE3ODAABAAJAAAABDE3ODMABAAJAAAABDE3ODUABAAJAAAABDE3OTAABAAJAAAABDE3OTIABAAJAAAABDE4MDAABAAJAAAABDE4MDEABAAJAAAABDE4MTQABAAJAAAABDE4MTYABAAJAAAABDE4MTkABAAJAAAABDE4MjEABAAJAAAABDE4MzYABAAJAAAABDE4NDMABAAJAAAABDE4NDUABAAJAAAABDE4NDcABAAJAAAABDE4NDgABAAJAAAABDE4NDkABAAJAAAABDE4NTAABAAJAAAABDE4NTQABAAJAAAABDE4NTUABAAJAAAABDE4NTkABAAJAAAABDE4NjIABAAJAAAABDE4NjgABAAJAAAABDE4NjkABAAJAAAABDE4NzAABAAJAAAABDE4NzYABAAJAAAABDE4NzcABAAJAAAABDE4ODMABAAJAAAABDE4ODYABAAJAAAABDE4ODkABAAJAAAABDE4OTIABAAJAAAABDE4OTMABAAJAAAABDE4OTYABAAJAAAABDE4OTcABAAJAAAABDE4OTkABAAJAAAABDE5MDEABAAJAAAABDE5MTAABAAJAAAABDE5MTQABAAJAAAABDE5MTkABAAJAAAABDE5MjEABAAJAAAABDE5MjIABAAJAAAABDE5MjMABAAJAAAABDE5MjQABAAJAAAABDE5MjUABAAJAAAABDE5MjkABAAJAAAABDE5MzAABAAJAAAABDE5MzcABAAJAAAABDE5MzkABAAJAAAABDE5NDAABAAJAAAABDE5NDEABAAJAAAABDE5NDMABAAJAAAABDE5NDkABAAJAAAABDE5NTMABAAJAAAABDE5NTcABAAJAAAABDE5NTkABAAJAAAABDE5NjcABAAJAAAABDE5NzIABAAJAAAABDE5NzQABAAJAAAABDE5NzYABAAJAAAABDE5NzcABAAJAAAABDE5NzkABAAJAAAABDE5ODAABAAJAAAABDE5ODEABAAJAAAABDE5ODIABAAJAAAABDE5ODMABAAJAAAABDE5ODYABAAJAAAABDE5ODkABAAJAAAABDE5OTEABAAJAAAABDE5OTIABAAJAAAABDIwMDAABAAJAAAABDIwMDUABAAJAAAABDIwMDcABAAJAAAABDIwMDkABAAJAAAABDIwMTIABAAJAAAABDIwMTUABAAJAAAABDIwMTcABAAJAAAABDIwMjIABAAJAAAABDIwMjQABAAJAAAABDIwMjYABAAJAAAABDIwMzMABAAJAAAABDIwNDAABAAJAAAABDIwNDYABAAJAAAABDIwNDcABAAJAAAABDIwNTMABAAJAAAABDIwNTQABAAJAAAABDIwNTYABAAJAAAABDIwNTcABAAJAAAABDIwNTkABAAJAAAABDIwNjIABAAJAAAABDIwNjMABAAJAAAABDIwNjYABAAJAAAABDIwNjgABAAJAAAABDIwNzEABAAJAAAABDIwNzIABAAJAAAABDIwNzMABAAJAAAABDIwNzYABAAJAAAABDIwNzgABAAJAAAABDIwODUABAAJAAAABDIwODYABAAJAAAABDIwOTQABAAJAAAABDIwOTgABAAJAAAABDIxMDAABAAJAAAABDIxMDEABAAJAAAABDIxMDQABAAJAAAABDIxMDkABAAJAAAABDIxMjAABAAJAAAABDIxMjEABAAJAAAABDIxMjIABAAJAAAABDIxMjQABAAJAAAABDIxMjkABAAJAAAABDIxMzMABAAJAAAABDIxMzUABAAJAAAABDIxMzYABAAJAAAABDIxMzcABAAJAAAABDIxNDUABAAJAAAABDIxNDcABAAJAAAABDIxNTIABAAJAAAABDIxNTUABAAJAAAABDIxNTcABAAJAAAABDIxNjMABAAJAAAABDIxNzIABAAJAAAABDIxNzMABAAJAAAABDIxNzQABAAJAAAABDIxNzYABAAJAAAABDIxODQABAAJAAAABDIxODUABAAJAAAABDIxODcABAAJAAAABDIxODgABAAJAAAABDIyMTYABAAJAAAABDIyMTcABAAJAAAABDIyMjMABAAJAAAABDIyMzAABAAJAAAABDIyMzYABAAJAAAABDIyMzgABAAJAAAABDIyMzkABAAJAAAABDIyNDQABAAJAAAABDIyNDUABAAJAAAABDIyNDkABAAJAAAABDIyNTMABAAJAAAABDIyNTgABAAJAAAABDIyNTkABAAJAAAABDIyNzQABAAJAAAABDIyNzUABAAJAAAABDIyODAABAAJAAAABDIyODUABAAJAAAABDIyODcABAAJAAAABDIyODgABAAJAAAABDIyOTAABAAJAAAABDIyOTkABAAJAAAABDIzMDIABAAJAAAABDIzMDgABAAJAAAABDIzMTIABAAJAAAABDIzMjQABAAJAAAABDIzMjYABAAJAAAABDIzMjgABAAJAAAABDIzMzEABAAJAAAABDIzMzMABAAJAAAABDIzMzUABAAJAAAABDIzMzcABAAJAAAABDIzNDQABAAJAAAABDIzNDUABAAJAAAABDIzNDkABAAJAAAABDIzNTEABAAJAAAABDIzNTUABAAJAAAABDIzNjIABAAJAAAABDIzNzEABAAJAAAABDIzNzMABAAJAAAABDIzNzgABAAJAAAABDIzODUABAAJAAAABDIzOTAABAAJAAAABDIzOTEABAAJAAAABDIzOTIABAAJAAAABDIzOTUABAAJAAAABDIzOTYABAAJAAAABDIzOTcABAAJAAAABDIzOTkABAAJAAAABDI0MDEABAAJAAAABDI0MDIABAAJAAAABDI0MDQABAAJAAAABDI0MDUABAAJAAAABDI0MDgABAAJAAAABDI0MTEABAAJAAAABDI0MTMABAAJAAAABDI0MTgABAAJAAAABDI0MjAABAAJAAAABDI0MjIABAAJAAAABDI0MjQABAAJAAAABDI0MjUABAAJAAAABDI0MzMABAAJAAAABDI0MzUABAAJAAAABDI0MzYABAAJAAAABDI0MzgABAAJAAAABDI0NDAABAAJAAAABDI0NDEABAAJAAAABDI0NDYABAAJAAAABDI0NTMABAAJAAAABDI0NTcABAAJAAAABDI0NjAABAAJAAAABDI0NjIAAAD+AAAABgAAAAEABAAJAAAABXJwYXJ0AAAEAgAAAAEABAAJAAAAB2Zvcm11bGEAAAj/AAAEAgAAAAEABAAJAAAABGRhdGEAAAABAAQACQAAAApkYXRhLnRyYWluAAAEAgAAAAEABAAJAAAABm1ldGhvZAAAABAAAAABAAQACQAAAAVjbGFzcwAAAP4AAAMGAAAEAgAAAAEABAAJAAAACXZhcmlhYmxlcwAAAAYAAAABAAQACQAAAARsaXN0AAAAAgAAAAEABAAJAAAABWxhYmVsAAAAAgAAAAEABAAJAAAACGZlYXR1cmUxAAAAAgAAAAEABAAJAAAACGZlYXR1cmUyAAAAAgAAAAEABAAJAAAACGZlYXR1cmUzAAAAAgAAAAEABAAJAAAACGZlYXR1cmU0AAAAAgAAAAEABAAJAAAACGZlYXR1cmU1AAAAAgAAAAEABAAJAAAACGZlYXR1cmU2AAAAAgAAAAEABAAJAAAACGZlYXR1cmU3AAAAAgAAAAEABAAJAAAACGZlYXR1cmU4AAAAAgAAAAEABAAJAAAACGZlYXR1cmU5AAAAAgAAAAEABAAJAAAACWZlYXR1cmUxMAAAAAIAAAABAAQACQAAAAlmZWF0dXJlMTEAAAACAAAAAQAEAAkAAAAJZmVhdHVyZTEyAAAAAgAAAAEABAAJAAAACWZlYXR1cmUxMwAAAAIAAAABAAQACQAAAAlmZWF0dXJlMTQAAAACAAAAAQAEAAkAAAAJZmVhdHVyZTE1AAAAAgAAAAEABAAJAAAACWZlYXR1cmUxNgAAAAIAAAABAAQACQAAAAlmZWF0dXJlMTcAAAD+AAAEAgAAAAEABAAJAAAAB2ZhY3RvcnMAAAINAAABMgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAABAIAAAP/AAAADQAAAAIAAAASAAAAEQAABAIAAAT/AAAAEwAAAAIAAAAQAAAAEgAEAAkAAAAFbGFiZWwABAAJAAAACGZlYXR1cmUxAAQACQAAAAhmZWF0dXJlMgAEAAkAAAAIZmVhdHVyZTMABAAJAAAACGZlYXR1cmU0AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU3AAQACQAAAAhmZWF0dXJlOAAEAAkAAAAIZmVhdHVyZTkABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAJZmVhdHVyZTExAAQACQAAAAlmZWF0dXJlMTIABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxNgAEAAkAAAAJZmVhdHVyZTE3AAAAEAAAABEABAAJAAAACGZlYXR1cmUxAAQACQAAAAhmZWF0dXJlMgAEAAkAAAAIZmVhdHVyZTMABAAJAAAACGZlYXR1cmU0AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU3AAQACQAAAAhmZWF0dXJlOAAEAAkAAAAIZmVhdHVyZTkABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAJZmVhdHVyZTExAAQACQAAAAlmZWF0dXJlMTIABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxNgAEAAkAAAAJZmVhdHVyZTE3AAAA/gAABAIAAAABAAQACQAAAAt0ZXJtLmxhYmVscwAAABAAAAARAAQACQAAAAhmZWF0dXJlMQAEAAkAAAAIZmVhdHVyZTIABAAJAAAACGZlYXR1cmUzAAQACQAAAAhmZWF0dXJlNAAEAAkAAAAIZmVhdHVyZTUABAAJAAAACGZlYXR1cmU2AAQACQAAAAhmZWF0dXJlNwAEAAkAAAAIZmVhdHVyZTgABAAJAAAACGZlYXR1cmU5AAQACQAAAAlmZWF0dXJlMTAABAAJAAAACWZlYXR1cmUxMQAEAAkAAAAJZmVhdHVyZTEyAAQACQAAAAlmZWF0dXJlMTMABAAJAAAACWZlYXR1cmUxNAAEAAkAAAAJZmVhdHVyZTE1AAQACQAAAAlmZWF0dXJlMTYABAAJAAAACWZlYXR1cmUxNwAABAIAAAABAAQACQAAAAVvcmRlcgAAAA0AAAARAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAQCAAAAAQAEAAkAAAAJaW50ZXJjZXB0AAAADQAAAAEAAAABAAAEAgAAAAEABAAJAAAACHJlc3BvbnNlAAAADQAAAAEAAAABAAAEAgAAAv8AAAAQAAAAAgAEAAkAAAAFdGVybXMABAAJAAAAB2Zvcm11bGEAAAQCAAAAAQAEAAkAAAAIcHJlZHZhcnMAAAAGAAAN/wAAAAIAAA7/AAAAAgAAD/8AAAACAAAQ/wAAAAIAABH/AAAAAgAAEv8AAAACAAAT/wAAAAIAABT/AAAAAgAAFf8AAAACAAAW/wAAAAIAABf/AAAAAgAAGP8AAAACAAAZ/wAAAAIAABr/AAAAAgAAG/8AAAACAAAc/wAAAAIAAB3/AAAAAgAAHv8AAAACAAAf/wAAAP4AAAQCAAAAAQAEAAkAAAALZGF0YUNsYXNzZXMAAAIQAAAAEgAEAAkAAAAHbG9naWNhbAAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbG9naWNhbAAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAEAAkAAAAHbnVtZXJpYwAABAIAAAX/AAAAEAAAABIABAAJAAAABWxhYmVsAAQACQAAAAhmZWF0dXJlMQAEAAkAAAAIZmVhdHVyZTIABAAJAAAACGZlYXR1cmUzAAQACQAAAAhmZWF0dXJlNAAEAAkAAAAIZmVhdHVyZTUABAAJAAAACGZlYXR1cmU2AAQACQAAAAhmZWF0dXJlNwAEAAkAAAAIZmVhdHVyZTgABAAJAAAACGZlYXR1cmU5AAQACQAAAAlmZWF0dXJlMTAABAAJAAAACWZlYXR1cmUxMQAEAAkAAAAJZmVhdHVyZTEyAAQACQAAAAlmZWF0dXJlMTMABAAJAAAACWZlYXR1cmUxNAAEAAkAAAAJZmVhdHVyZTE1AAQACQAAAAlmZWF0dXJlMTYABAAJAAAACWZlYXR1cmUxNwAAAP4AAAD+AAAAAQAEAAkAAAABfgAAAAIAAA7/AAAAAgAAAAYAAAABAAQACQAAAAErAAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAAAYAACj/AAAAAgAAD/8AAAACAAAQ/wAAAP4AAAACAAAR/wAAAP4AAAACAAAS/wAAAP4AAAACAAAT/wAAAP4AAAACAAAU/wAAAP4AAAACAAAV/wAAAP4AAAACAAAW/wAAAP4AAAACAAAX/wAAAP4AAAACAAAY/wAAAP4AAAACAAAZ/wAAAP4AAAACAAAa/wAAAP4AAAACAAAb/wAAAP4AAAACAAAc/wAAAP4AAAACAAAd/wAAAP4AAAACAAAe/wAAAP4AAAACAAAf/wAAAP4AAAD+AAACDgAAACM/2LTgo1+LTj+hgRgRgRgSP50sfXKB0sg/jqHqHqHqHz+LtxDGYbtxP4pBpBpBpBs/hHrhR64UfAAAAAAAAAAAP/AAAAAAAABACAAAAAAAAEAQAAAAAAAAQBgAAAAAAABAJgAAAAAAAEAoAAAAAAAAP/AAAAAAAAA/46WPrlA6WT/hdWysIBdXP+CMCMCMCME/3y3y3y3y4D/aKk1Pf6KlP9lYQC6tlYQ/8AAAAAAAAD/jvOZ5EjvPP+Ikd5zPIkg/4WnBRr8WnD/fufufufugP99z9z9z90A/3aEvaEvaEz+fBjWsKmt0P5rRiW+zXDI/mgCLix4wKD+ZmmR+v3Q4P5iyW9A5R+w/mJzaSRRlwD+YCOtuZAMjAAAEAgAAA/8AAAANAAAAAgAAAAcAAAAFAAAEAgAABP8AAAATAAAAAgAAABAAAAAHAAQACQAAAAExAAQACQAAAAEyAAQACQAAAAEzAAQACQAAAAE0AAQACQAAAAE1AAQACQAAAAE2AAQACQAAAAE3AAAAEAAAAAUABAAJAAAAAkNQAAQACQAAAAZuc3BsaXQABAAJAAAACXJlbCBlcnJvcgAEAAkAAAAGeGVycm9yAAQACQAAAAR4c3RkAAAA/gAAABAAAAABAAQACQAAAAVjbGFzcwAAAhMAAAADAAACDgAAAAI/5J68Tc/BwD/WwodkYHyAAAAEAgAAA/8AAAANAAAAAQAAAAIAAAQCAAAE/wAAABMAAAABAAAAEAAAAAIABAAJAAAAATEABAAJAAAAATIAAAD+AAACDgAAAAQAAAAAAAAAAD/wAAAAAAAAP/AAAAAAAAAAAAAAAAAAAAAABAIAAAP/AAAADQAAAAIAAAACAAAAAgAAAP4AAAAOAAAAAT/wAAAAAAAAAAAEAgAABf8AAAAQAAAAAwAEAAkAAAAFcHJpb3IABAAJAAAABGxvc3MABAAJAAAABXNwbGl0AAAA/gAAAhMAAAAJAAAADQAAAAEAAAAUAAAADgAAAAFAHAAAAAAAAAAAAA4AAAABP4R64UeuFHsAAAANAAAAAQAAAAQAAAANAAAAAQAAAAUAAAANAAAAAQAAAAIAAAANAAAAAQAAAAAAAAANAAAAAQAAAB4AAAANAAAAAQAAAAoAAAQCAAAF/wAAABAAAAAJAAQACQAAAAhtaW5zcGxpdAAEAAkAAAAJbWluYnVja2V0AAQACQAAAAJjcAAEAAkAAAAKbWF4Y29tcGV0ZQAEAAkAAAAMbWF4c3Vycm9nYXRlAAQACQAAAAx1c2VzdXJyb2dhdGUABAAJAAAADnN1cnJvZ2F0ZXN0eWxlAAQACQAAAAhtYXhkZXB0aAAEAAkAAAAEeHZhbAAAAP4AAAITAAAAAwAABAMAAAD5AAAAAAAAAAIABAAJAAAABXJwYXJ0AAQACQAAAAU0LjEtOAAABAIAAAABAAQACQAAAAR5dmFsAAAA+wAABAIAAAABAAQACQAAAANkZXYAAAD7AAAEAgAAAAEABAAJAAAAAnd0AAAA+wAABAIAAAABAAQACQAAAAZ5bGV2ZWwAAAD7AAAEAgAAAAEABAAJAAAABmRpZ2l0cwAAAPsAAAD+AAAABgAAAAEABAAJAAAAAXsAAAACAAAABgAAAAEABAAJAAAAAjwtAAAAAgAAAAEABAAJAAAABm5jbGFzcwAAAAIAAAAGAAAAAQAEAAkAAAABLwAAAAIAAAAGAAAAAQAEAAkAAAABKAAAAAIAAAAGAAAAAQAEAAkAAAABLQAAAAIAAAAGAAAAAQAEAAkAAAAEbmNvbAAAAAIAACr/AAAA/gAAAAIAAAANAAAAAQAAAAIAAAD+AAAA/gAAAAIAAAANAAAAAQAAAAIAAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAAABAAQACQAAAAVncm91cAAAAAIAAAAGAAAAAQAEAAkAAAABWwAAAAIAACr/AAAAAgAAAPsAAAACAAAADQAAAAEAAAABAAAA/gAAAP4AAAACAAAABgAAMP8AAAACAAAAAQAEAAkAAAAGY291bnRzAAAAAgAAAAYAADf/AAAAAgAAKv8AAAACAAAA+wAAAAIAAAAGAAAo/wAAAAIAAAANAAAAAQAAAAEAAAACAAAABgAAM/8AAAACAAAABgAAAAEABAAJAAAAAToAAAACAAAADQAAAAEAAAABAAAAAgAAMf8AAAD+AAAA/gAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAAABAAQACQAAAAV5cHJvYgAAAAIAAAAGAAA3/wAAAAIAACr/AAAAAgAAAPsAAAACAAAABgAAKP8AAAACAAAABgAAKP8AAAACAAAADQAAAAEAAAABAAAAAgAAMf8AAAD+AAAAAgAAAAYAADn/AAAAAgAAAA0AAAABAAAAAQAAAAIAADH/AAAA/gAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAAABAAQACQAAAAhub2RlcHJvYgAAAAIAAAAGAAA3/wAAAAIAACr/AAAAAgAAAPsAAAACAAAABgAAKP8AAAACAAAABgAAAAEABAAJAAAAASoAAAACAAAADQAAAAEAAAACAAAAAgAAMf8AAAD+AAAAAgAAAA0AAAABAAAAAgAAAP4AAAD+AAAA/gAAAAIAAAAGAAAAAQAEAAkAAAACaWYAAAACAAAABgAAAAEABAAJAAAAASEAAAACAAAABgAAAAEABAAJAAAAB2lzLm51bGwAAAACAAAt/wAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAANv8AAAACAAAABgAAN/8AAAACAAAt/wAAAAIAADb/AAAA/gAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAAAAEABAAJAAAABXRlbXAxAAAAAgAAAAYAAAABAAQACQAAAAdmb3JtYXRnAAAAAgAAOP8AAAQCAAAAAQAEAAkAAAAGZm9ybWF0AAAAEAAAAAEABAAJAAAAAyU1ZwAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAAAAEABAAJAAAABXRlbXAyAAAAAgAAAAYAAEH/AAAAAgAAOv8AAAQCAABC/wAAABAAAAABAAQACQAAAAUlNS4zZgAAAP4AAAD+AAAAAgAAAAYAAD3/AAAAAgAAAAYAAAABAAQACQAAAAE+AAAAAgAAMf8AAAACAAAADgAAAAE/8AAAAAAAAAAAAP4AAAACAAAABgAAL/8AAAACAAAABgAAMP8AAAACAABA/wAAAAIAAAAGAAAAAQAEAAkAAAAFYXBwbHkAAAACAAAABgAAAAEABAAJAAAABm1hdHJpeAAAAAIAAED/AAAEAgAANf8AADH/AAAA/gAAAAIAAAANAAAAAQAAAAEAAAACAAAAAQAEAAkAAAAFcGFzdGUAAAQCAAAAAQAEAAkAAAAIY29sbGFwc2UAAAAQAAAAAQAEAAkAAAABIAAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAAQ/8AAAACAAAABgAARf8AAAACAAAABgAARv8AAAACAABD/wAABAIAADX/AAAx/wAAAP4AAAACAAAADQAAAAEAAAABAAAAAgAAR/8AAAQCAABI/wAAABAAAAABAAQACQAAAAEgAAAA/gAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAACv/AAAAAgAAAAYAADL/AAAAAgAAK/8AAAACAAAABgAAM/8AAAACAAAABgAAPP8AAAACAAAABgAAN/8AAAACAAAs/wAAAAIAAAANAAAAAQAAAAEAAAD+AAAAAgAAO/8AAAD+AAAA/gAAAP4AAAD+AAAAAgAAAAYAAAABAAQACQAAAAZwYXN0ZTAAAAACAAAAEAAAAAEABAAJAAAAEiAgcHJlZGljdGVkIGNsYXNzPQAAAAIAAAAGAABC/wAAAAIAADb/AAAEAgAAAAEABAAJAAAAB2p1c3RpZnkAAAAQAAAAAQAEAAkAAAAEbGVmdAAAAP4AAAACAAAAEAAAAAEABAAJAAAAECAgZXhwZWN0ZWQgbG9zcz0AAAACAAAABgAAQf8AAAACAAAr/wAAAAIAAC7/AAAA/gAAAAIAAAAQAAAAAQAEAAkAAAALICBQKG5vZGUpID0AAAACAAAABgAAQf8AAAACAAA7/wAAAAIAAC7/AAAA/gAAAAIAAAAQAAAAAQAEAAkAAAABCgAAAAIAAAAQAAAAAQAEAAkAAAASICAgIGNsYXNzIGNvdW50czogAAAAAgAAQP8AAAACAAAAEAAAAAEABAAJAAAAAQoAAAACAAAAEAAAAAEABAAJAAAAEiAgIHByb2JhYmlsaXRpZXM6IAAAAAIAAEP/AAAA/gAAAP4AAAQDAAAp/wAABAIAACr/AAAA+wAABAIAAC3/AAAA+wAABAIAAC7/AAAA+wAAAP4AAAAGAAAv/wAAAAIAAAAGAAAw/wAAAAIAAAABAAQACQAAAAR0ZW1wAAAAAgAAAAYAAD3/AAAAAgAAAAYAAD//AAAAAgAALf8AAAD+AAAAAgAAAAYAAAABAAQACQAAAAxhcy5jaGFyYWN0ZXIAAAACAAAABgAAN/8AAAACAAAq/wAAAAIAAAD7AAAAAgAAAA0AAAABAAAAAQAAAP4AAAD+AAAAAgAAAAYAADf/AAAAAgAALf8AAAACAAAABgAAN/8AAAACAAAq/wAAAAIAAAD7AAAAAgAAAA0AAAABAAAAAQAAAP4AAAD+AAAA/gAAAP4AAAACAAAABgAAMP8AAAACAAAx/wAAAAIAAAAGAAAy/wAAAAIAAAAGAAAz/wAAAAIAAAAGAAA0/wAAAAIAAAAGAAA1/wAAAAIAACr/AAAA/gAAAAIAAAANAAAAAQAAAAIAAAD+AAAA/gAAAAIAAAANAAAAAQAAAAIAAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAADr/AAAAAgAAAAYAAD3/AAAAAgAAAAYAAAABAAQACQAAAAE8AAAAAgAAMf8AAAACAAAADQAAAAEAAAAFAAAA/gAAAAIAAAAGAABC/wAAAAIAAAAGAAA3/wAAAAIAACr/AAAAAgAAAPsAAAACAAAABgAAKP8AAAACAAAABgAAKP8AAAACAAAADQAAAAEAAAABAAAAAgAAMf8AAAD+AAAAAgAAAAYAADn/AAAAAgAAAA0AAAABAAAAAQAAAAIAADH/AAAA/gAAAP4AAAD+AAAEAgAALv8AAC7/AAAEAgAAAAEABAAJAAAABm5zbWFsbAAALv8AAAD+AAAAAgAAAAYAAEH/AAAAAgAAAAYAADf/AAAAAgAAKv8AAAACAAAA+wAAAAIAAAAGAAAo/wAAAAIAAAAGAAAo/wAAAAIAAAANAAAAAQAAAAEAAAACAAAx/wAAAP4AAAACAAAABgAAOf8AAAACAAAADQAAAAEAAAABAAAAAgAAMf8AAAD+AAAA/gAAAP4AAAQCAAAu/wAAAA0AAAABAAAAAgAAAP4AAAD+AAAA/gAAAAIAAAAGAAA9/wAAAAIAAAAGAAA+/wAAAAIAAAAGAAAAAQAEAAkAAAAJaXMubWF0cml4AAAAAgAAOv8AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAADr/AAAAAgAAAAYAAEb/AAAAAgAAOv8AAAQCAAAAAQAEAAkAAAAEbnJvdwAAAA0AAAABAAAAAQAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAEv/AAAAAgAAAAYAAEn/AAAAAgAAS/8AAAACAAAAEAAAAAEABAAJAAAAAiAoAAAAAgAAAAYAADf/AAAAAgAAOv8AAAACAAAA+wAAAAIAAAANAAAAAQAAAAEAAAD+AAAA/gAAAP4AAAACAAAABgAAAAEABAAJAAAAA2ZvcgAAAAIAAAABAAQACQAAAAFpAAAAAgAAAAYAADn/AAAAAgAAAA0AAAABAAAAAgAAAAIAAAAGAAA1/wAAAAIAADr/AAAA/gAAAP4AAAACAAAABgAAMP8AAAACAABL/wAAAAIAAAAGAABH/wAAAAIAAEv/AAAAAgAAAAYAADf/AAAAAgAAOv8AAAACAAAA+wAAAAIAAFL/AAAA/gAABAIAAAABAAQACQAAAANzZXAAAAAQAAAAAQAEAAkAAAABIAAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAEv/AAAAAgAAAAYAAEn/AAAAAgAAS/8AAAACAAAAEAAAAAEABAAJAAAAASkAAAD+AAAA/gAAAAIAAEv/AAAA/gAABAMAACn/AAAEAgAAKv8AAAD7AAAEAgAAK/8AAAD7AAAEAgAALP8AAAD7AAAEAgAALf8AAAD7AAAEAgAALv8AAAD7AAAEAgAAAAEABAAJAAAAAW4AAAD7AAAEAgAAAAEABAAJAAAABXVzZS5uAAAA+wAAAP4AAAAGAAAv/wAAAAIAAAAGAAAw/wAAAAIAADH/AAAAAgAAAAYAADL/AAAAAgAAAAYAADP/AAAAAgAAAAYAADT/AAAAAgAAAAYAADX/AAAAAgAAKv8AAAD+AAAAAgAAAA0AAAABAAAAAgAAAP4AAAD+AAAAAgAAAA0AAAABAAAAAgAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAANv8AAAACAAAABgAAN/8AAAACAAAq/wAAAAIAAAD7AAAAAgAAAA0AAAABAAAAAQAAAP4AAAD+AAAAAgAAAAYAADD/AAAAAgAAOP8AAAACAAAABgAAN/8AAAACAAAq/wAAAAIAAAD7AAAAAgAAAAYAACj/AAAAAgAAAA0AAAABAAAAAQAAAAIAAAAGAAAz/wAAAAIAAAAGAAA5/wAAAAIAAAANAAAAAQAAAAEAAAACAAAx/wAAAP4AAAD+AAAA/gAAAP4AAAD+AAAAAgAAAAYAAD3/AAAAAgAAAAYAAD7/AAAAAgAAAAYAAD//AAAAAgAALf8AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAADb/AAAAAgAAAAYAADf/AAAAAgAALf8AAAACAAA2/wAAAP4AAAD+AAAA/gAAAAIAAAAGAAAw/wAAAAIAAED/AAAAAgAAAAYAAEH/AAAAAgAAOP8AAAACAAAu/wAAAP4AAAD+AAAAAgAAAAYAAD3/AAAAAgAAAAYAAET/AAAAAgAAMf8AAAACAAAADQAAAAEAAAABAAAA/gAAAAIAAAAGAAAw/wAAAAIAAED/AAAAAgAAAAYAAEX/AAAAAgAAAAYAAEb/AAAAAgAAQP8AAAQCAAA1/wAAMf8AAAD+AAAAAgAAAA0AAAABAAAAAQAAAAIAAEf/AAAEAgAASP8AAAAQAAAAAQAEAAkAAAABLwAAAP4AAAD+AAAA/gAAAAIAAAAGAAA9/wAAAAIAAFX/AAAAAgAAAAYAAEn/AAAAAgAAAAYAAEL/AAAAAgAANv8AAAQCAABK/wAAABAAAAABAAQACQAAAARsZWZ0AAAA/gAAAAIAAAAQAAAAAQAEAAkAAAABCgAAAAIAAED/AAAA/gAAAAIAAAAGAABC/wAAAAIAADb/AAAEAgAASv8AAAAQAAAAAQAEAAkAAAAEbGVmdAAAAP4AAAD+AAAA/gAABAIAAAX/AAAAEAAAAAMABAAJAAAAB3N1bW1hcnkABAAJAAAABXByaW50AAQACQAAAAR0ZXh0AAAA/gAAAA0AAAABAAAABAAAAg4AAAISQJ7YAAAAAABAntgAAAAAAECe2AAAAAAAQJ7YAAAAAABAntgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAlTQAAAAAAECVNAAAAAAAQJU0AAAAAABAlTQAAAAAAECVNAAAAAAAAAAAAAAAAAAAAAAAAAAAAECQ/AAAAAAAQJD8AAAAAABAkPwAAAAAAECQ/AAAAAAAQJD8AAAAAAAAAAAAAAAAAAAAAAAAAAAAQF9AAAAAAABAX0AAAAAAAEBfQAAAAAAAQF9AAAAAAABAX0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAcOAAAAAAAEBw4AAAAAAAQHDgAAAAAABAcOAAAAAAAEBw4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBogAAAAAAAQGiAAAAAAABAaIAAAAAAAEBogAAAAAAAQGiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQE4AAAAAAABATgAAAAAAAEBOAAAAAAAAQE4AAAAAAABATgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQINIAAAAAABAg0gAAAAAAECDSAAAAAAAQINIAAAAAABAg0gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAejAAAAAAAEB6MAAAAAAAQHowAAAAAABAejAAAAAAAEB6MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBlYAAAAAAAQGVgAAAAAABAZWAAAAAAAEBlYAAAAAAAQGVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAZCAAAAAAAEBkIAAAAAAAQGQgAAAAAABAZCAAAAAAAEBkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBvAAAAAAAAQG8AAAAAAABAbwAAAAAAAEBvAAAAAAAAQG8AAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAD/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAP/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAP/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAP/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAA/8AAAAAAAAD/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAD/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAL/wAAAAAAAAv/AAAAAAAAC/8AAAAAAAAEBtumF0uIIUQG091wsG3YBAZQNlc1EvCEBkc9tdMNmgQGRzCRLeQAg/75QZ7+tAET/rGrcd0+gjP+qaER5YtIY/6nS3oqBKsz/o1bjun0EaQFIsx4WA6CRARBnZP46nAEBDudwbTc74QENJG8q+6aBAQuKJOQjo8D/pujLvllruP+m0KYDZU5NAPY1t1yJXGEA9jW3XIlcYQC8PjgucGeBAKtjKYbCFcEApJ5/G04SQP/AAAAAAAAA/7HAaYI8wwEAwSUt1/w4GQCtGh7rxviRAK0aHuvG+JEArRoe68b4kQCtGh7rxviQ/7jU/fO2RaD/tsi0OVgQZP+2yLQ5WBBk/7XCj1wo9cT/r52yLQ5WBQDMQ6QlLD/RAL7CThRoB6EAvrRhmyUxwQC+tGGbJTHBAL60YZslMcD/vaEvaEvaFP+9oS9oS9oU/72hL2hL2hT/vaEvaEvaFP+k+k+k+k+lAKAjcc/aTUEAlQu4IUOAQQCSVMj+95uBAJJUyP73m4EAjxxuh46+IP+222222224/7Tl4KcvBTj/tOXgpy8FOP+0PrGh9Y0Q/5y8FOXgpzEAh3DhcdSe8QBlUszdAwIRACKkIScbMyEAGwWwWwWwYQARkZGRkZGg/7d3d3d3d3j/sREREREREP+u7u7u7u7w/6zMzMzMzM0A075oVD1WIQDHL6ISdExhAL9Lyxc5yMEAq4Y/xirCQQClFQXXhUTA/5nUBPqbLTj/mCsmljKegP+XVrdj/lcg/5dWt2P+VyD/l1a3Y/5XIQDPo9l7+MGBAMODfA9IQAEAvPptM9wMgQC7VC9EIxwBALEfwjrm5ID/u2rr1nQWAP+WdBX+xy3U/43mVsJKihT/jUntq69Z0P+MX1AJxpFpAGjmYeCNVsEAVuThncuBAQBTG4M/imSBAEaI4v19wYEANvmg6fFQgP+9wR9wR9wQ/7uCPuCPuCT/u4I+4I+4JQBjVUqUaIRBACfS3QD/BAEAH9XwA7s5gQAd/Y45Wk+BABF0LK6G3QD/ocnwGXDk+P+gMuHJ8Blw/59nWqIvs6z/n2daoi+zrP+fZ1qiL7OtAMQ2fTZHAWEAcPEtY1OlgQBvctEIS2kBAGtC4FvwuwEAYzf8il1ewP+C6kTnFsp4/4iNVpIY6BUAKAAAAAAAAP9d3d3d3d3g/4Ot4kpv79T/hPXOp52S9QBYAAAAAAABAHCdidididkB3FYUeuFHsP+Kqqqqqqqo/4AAAAAAAAD/czMzMzMzNP9UOtPnCYfJACgAAAAAAAD/gAAAAAAAAQFph64UeuFI/4FkLIWQshj/gAAAAAAAAQAm4UeuFHrhAKIAAAAAAAD/h3bZHOSNwP+qqqqqqqqpACbhR64UeuEAxwAAAAAAAQCCAAAAAAAA/4AAAAAAAAD/QAAAAAAAAQB/64UeuFHs/yAPi2piIA0BPwo9cKPXCP+Kqqqqqqqo/4hVl2UySDj/gAAAAAAAAQFwtwo9cKPY/+AAAAAAAAD/aqqqqqqqqP+AAAAAAAABAHeFHrhR64T/CLkyQF30CP+AAAAAAAAA/uZmZmZmZmkAd4UeuFHrhP8IuTJAXfQI/+AAAAAAAAEARmZmZmZmaP8b/q5yh5edABAAAAAAAAEBkAR64UeuGP8X19fX19fY/xv+rnKHl5z/Dzzzzzzz0QGM/Cj1wo9hABAAAAAAAAECSIhmZmZmaQIDpHrhR64ZAHgAAAAAAAEA0gAAAAAAAP9l5LfOnZ9pAkYKZmZmZmkAeAAAAAAAAQJ1ZMzMzMzQ/4FkLIWQshj/eJL3k45mWP+AAAAAAAABAI9hhhhhhhj/p/Up/Up/UP+YZZlcs1vxAGaqqqqqqqj/hnbzEhnbzQJo0o9cKPXBAXOZmZmZmZj/gTQDCoAaTQHHmAAAAAAA/6f1Kf1Kf1D/mGWZXLNb8QEPfXCj1wo8/+AAAAAAAAD/iqqqqqqqqP+nbG8s8+9JAHei6Loui6EA0Y9cKPXCkQDSAAAAAAABAmuI4UeuFHkBmFeuFHrhSQCSjPxKM/EpAYGgo9cKPXEAaqqqqqqqqP+KqqqqqqqpAZe+uFHrhSECaibhR64UeQJTDlHrhR65AJKM/Eoz8SkAwgAAAAAAAP+YZZlcs1vxAKwAAAAAAAD/lBQUFBQUFQCdVVVVVVVZABAAAAAAAAD/roehtKGqSQAQAAAAAAABAVwnrhR64UkAXgAAAAAAAQAQAAAAAAAA/4sCrcA0a7EBEQ9cKPXCkP+KqqqqqqqoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+6my05rDAo/4FZNLGU8/T/ddWt2P+VzP9yGbl3FFSk/0icAajeZGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/jlc6yQHleD+GwWwWwWy7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/wAAAAAAAAP6BiTdLxqhMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+VVVVVVVVM/4kkkkkkklj/iSSSSSSSWP+DDDDDDDDQ/znnnnnnnpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/7dZ8imDdaT/t1nyKYN1pP+3WfIpg3Wk/7dZ8imDdaT/NZ8imDdZ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/oiIiIiIiKP+bu7u7u7u4/5u7u7u7u7j/mZmZmZmZnP7mZmZmZmaEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+RdF0XRdF4/10XRdF0XRD/RdF0XRdF4P8dF0XRdF0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7IZ28xIZ18/nwfB8HwfCD+Er9agUr7WP4Sv1qBSvtY/hK/WoFK+1gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/7TFnTFnTFz/KMuaMuaM0P6T1hT1hT10/nfEHfEHfIj+H9AX9AX8vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/mZmZmZmZeP9mZmZmZmZo/2ZmZmZmZmgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wXRdF0XRcD+3RdF0XRc2P7F0XRdF0WE/sXRdF0XRYT+xdF0XRdFhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAIAAAP/AAAADQAAAAIAAABqAAAABQAABAIAAAT/AAAAEwAAAAIAAAAQAAAAagAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU5AAQACQAAAAlmZWF0dXJlMTcABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE2AAQACQAAAAhmZWF0dXJlOQAEAAkAAAAIZmVhdHVyZTUABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAIZmVhdHVyZTgABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAIZmVhdHVyZTMABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE2AAQACQAAAAlmZWF0dXJlMTcABAAJAAAACWZlYXR1cmUxMgAEAAkAAAAIZmVhdHVyZTEABAAJAAAACGZlYXR1cmU2AAQACQAAAAhmZWF0dXJlNAAEAAkAAAAIZmVhdHVyZTcABAAJAAAACWZlYXR1cmUxNwAEAAkAAAAJZmVhdHVyZTE2AAQACQAAAAlmZWF0dXJlMTMABAAJAAAACGZlYXR1cmU3AAQACQAAAAlmZWF0dXJlMTcABAAJAAAACWZlYXR1cmUxNwAEAAkAAAAJZmVhdHVyZTEyAAQACQAAAAlmZWF0dXJlMTMABAAJAAAACWZlYXR1cmUxNQAEAAkAAAAJZmVhdHVyZTE2AAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE2AAQACQAAAAlmZWF0dXJlMTIABAAJAAAACWZlYXR1cmUxNAAEAAkAAAAJZmVhdHVyZTE3AAQACQAAAAlmZWF0dXJlMTMABAAJAAAACWZlYXR1cmUxMgAEAAkAAAAJZmVhdHVyZTE1AAQACQAAAAlmZWF0dXJlMTYABAAJAAAACWZlYXR1cmUxMgAEAAkAAAAJZmVhdHVyZTEzAAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxNgAEAAkAAAAJZmVhdHVyZTExAAQACQAAAAlmZWF0dXJlMTAABAAJAAAACGZlYXR1cmU5AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTgABAAJAAAACGZlYXR1cmU2AAQACQAAAAhmZWF0dXJlOQAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU4AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTcABAAJAAAACGZlYXR1cmU4AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTQABAAJAAAACGZlYXR1cmU5AAQACQAAAAhmZWF0dXJlNwAEAAkAAAAIZmVhdHVyZTUABAAJAAAACGZlYXR1cmU3AAQACQAAAAhmZWF0dXJlNgAEAAkAAAAIZmVhdHVyZTkABAAJAAAACGZlYXR1cmUzAAQACQAAAAlmZWF0dXJlMTAABAAJAAAACGZlYXR1cmU2AAQACQAAAAhmZWF0dXJlOQAEAAkAAAAJZmVhdHVyZTE3AAQACQAAAAhmZWF0dXJlNgAEAAkAAAAIZmVhdHVyZTcABAAJAAAACGZlYXR1cmUxAAQACQAAAAhmZWF0dXJlOQAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAhmZWF0dXJlNgAEAAkAAAAIZmVhdHVyZTkABAAJAAAACWZlYXR1cmUxNQAEAAkAAAAJZmVhdHVyZTE3AAQACQAAAAlmZWF0dXJlMTMABAAJAAAACGZlYXR1cmU5AAQACQAAAAlmZWF0dXJlMTAABAAJAAAACGZlYXR1cmUxAAQACQAAAAhmZWF0dXJlNAAEAAkAAAAIZmVhdHVyZTcABAAJAAAACWZlYXR1cmUxNAAEAAkAAAAJZmVhdHVyZTEwAAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxNwAEAAkAAAAJZmVhdHVyZTEzAAQACQAAAAlmZWF0dXJlMTUABAAJAAAACGZlYXR1cmU3AAQACQAAAAhmZWF0dXJlOAAEAAkAAAAJZmVhdHVyZTEwAAQACQAAAAlmZWF0dXJlMTcABAAJAAAACGZlYXR1cmU5AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTYABAAJAAAACWZlYXR1cmUxNwAEAAkAAAAJZmVhdHVyZTEyAAQACQAAAAhmZWF0dXJlOQAEAAkAAAAJZmVhdHVyZTExAAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAJZmVhdHVyZTE3AAQACQAAAAlmZWF0dXJlMTYABAAJAAAACWZlYXR1cmUxNQAEAAkAAAAJZmVhdHVyZTEzAAAAEAAAAAUABAAJAAAABWNvdW50AAQACQAAAARuY2F0AAQACQAAAAdpbXByb3ZlAAQACQAAAAVpbmRleAAEAAkAAAADYWRqAAAA/gAAAg4AAAAQQHDxIFByBltAcBcBX8UYrkBimlKwsJMTQGDwZuElV8RAX4qH8iwgaEBXoncKq1OXQFdorgrEvYZAQr7iljkpFUBCkoNKiEyYQEDS8h+yASZAPiJ2ipESJkA7FZK+QQCoQDrfhR1baFxAJUpzd0Tf8UATNp1ZTOPqQADUCrjkMiIAAAQCAAAF/wAAABAAAAAQAAQACQAAAAhmZWF0dXJlNgAEAAkAAAAIZmVhdHVyZTkABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAIZmVhdHVyZTUABAAJAAAACGZlYXR1cmU4AAQACQAAAAlmZWF0dXJlMTMABAAJAAAACGZlYXR1cmUzAAQACQAAAAhmZWF0dXJlNwAEAAkAAAAJZmVhdHVyZTE3AAQACQAAAAlmZWF0dXJlMTUABAAJAAAACGZlYXR1cmU0AAQACQAAAAlmZWF0dXJlMTYABAAJAAAACWZlYXR1cmUxMgAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAlmZWF0dXJlMTEABAAJAAAACGZlYXR1cmUxAAAA/gAAAA0AAAe2AAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAACCgAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAIAAAX/AAAAEAAAABEABAAJAAAACGZlYXR1cmUxAAQACQAAAAhmZWF0dXJlMgAEAAkAAAAIZmVhdHVyZTMABAAJAAAACGZlYXR1cmU0AAQACQAAAAhmZWF0dXJlNQAEAAkAAAAIZmVhdHVyZTYABAAJAAAACGZlYXR1cmU3AAQACQAAAAhmZWF0dXJlOAAEAAkAAAAIZmVhdHVyZTkABAAJAAAACWZlYXR1cmUxMAAEAAkAAAAJZmVhdHVyZTExAAQACQAAAAlmZWF0dXJlMTIABAAJAAAACWZlYXR1cmUxMwAEAAkAAAAJZmVhdHVyZTE0AAQACQAAAAlmZWF0dXJlMTUABAAJAAAACWZlYXR1cmUxNgAEAAkAAAAJZmVhdHVyZTE3AAAA/gAABAIAAAX/AAAAEAAAAA4ABAAJAAAABWZyYW1lAAQACQAAAAV3aGVyZQAEAAkAAAAEY2FsbAAEAAkAAAAFdGVybXMABAAJAAAAB2NwdGFibGUABAAJAAAABm1ldGhvZAAEAAkAAAAFcGFybXMABAAJAAAAB2NvbnRyb2wABAAJAAAACWZ1bmN0aW9ucwAEAAkAAAAHbnVtcmVzcAAEAAkAAAAGc3BsaXRzAAQACQAAABN2YXJpYWJsZS5pbXBvcnRhbmNlAAQACQAAAAF5AAQACQAAAAdvcmRlcmVkAAAEAgAAAAEABAAJAAAAB3hsZXZlbHMAAAITAAAAAAAABAIAAAX/AAAAEAAAAAAAAAD+AAAEAgAAAAEABAAJAAAAB3lsZXZlbHMAAAAQAAAAAgAEAAkAAAAFRkFMU0UABAAJAAAABFRSVUUAAAQCAAAC/wAAABAAAAABAAQACQAAAAVycGFydAAAAP4= \ No newline at end of file diff --git a/Apps/W1/LatePaymentPredictor/app/app.json b/Apps/W1/LatePaymentPredictor/app/app.json index cfb78725ae..ec5055ff54 100644 --- a/Apps/W1/LatePaymentPredictor/app/app.json +++ b/Apps/W1/LatePaymentPredictor/app/app.json @@ -20,11 +20,14 @@ "to": 49999 } ], + "resourceFolders": [ + ".resources" + ], "target": "OnPrem", "resourceExposurePolicy": { "allowDebugging": false, - "allowDownloadingSource": true, - "includeSourceInSymbolFile": true + "allowDownloadingSource": false, + "includeSourceInSymbolFile": false }, "application": "26.0.0.0" } \ No newline at end of file diff --git a/Apps/W1/LatePaymentPredictor/app/src/LPMachineLearningSetup.Table.al b/Apps/W1/LatePaymentPredictor/app/src/LPMachineLearningSetup.Table.al index 2c667b8f2d..936e1171e8 100644 --- a/Apps/W1/LatePaymentPredictor/app/src/LPMachineLearningSetup.Table.al +++ b/Apps/W1/LatePaymentPredictor/app/src/LPMachineLearningSetup.Table.al @@ -1,7 +1,6 @@ namespace Microsoft.Finance.Latepayment; using System.AI; -using System.Environment; using System.Utilities; using System.Privacy; table 1950 "LP Machine Learning Setup" @@ -159,16 +158,15 @@ table 1950 "LP Machine Learning Setup" procedure GetModelAsText(ForModel: Option) Content: Text var - MediaResources: Record "Media Resources"; TempBlob: Codeunit "Temp Blob"; InStream: InStream; begin case ForModel of "Selected Model"::Standard: begin - if not MediaResources.Get('LatePaymentStandardModel.txt') then - exit; - TempBlob.FromRecord(MediaResources, MediaResources.FieldNo(Blob)); + NavApp.GetResource('LatePaymentStandardModel.txt', InStream); + InStream.Read(Content); + exit; end; "Selected Model"::My: TempBlob.FromRecord(Rec, FieldNo("My Model")); diff --git a/Apps/W1/LatePaymentPredictor/test/src/LPPredictionTest.Codeunit.al b/Apps/W1/LatePaymentPredictor/test/src/LPPredictionTest.Codeunit.al index 6b351f4a27..5d51656b07 100644 --- a/Apps/W1/LatePaymentPredictor/test/src/LPPredictionTest.Codeunit.al +++ b/Apps/W1/LatePaymentPredictor/test/src/LPPredictionTest.Codeunit.al @@ -25,7 +25,6 @@ codeunit 139575 "LP Prediction Test" LibrarySales: Codeunit "Library - Sales"; LibraryInventory: Codeunit "Library - Inventory"; LPPredictionTest: Codeunit "LP Prediction Test"; - LibraryUtility: Codeunit "Library - Utility"; EnvironmentInfoTestLibrary: Codeunit "Environment Info Test Library"; EnableNotificationMsg: Label 'Want to know if a sales document will be paid on time? The Late Payment Prediction extension can predict that.'; PredictionResultWillBeLateTxt: Label 'The payment is predicted to be late, with Low confidence in the prediction.'; @@ -368,17 +367,7 @@ codeunit 139575 "LP Prediction Test" // [WHEN] We invoke the background task Codeunit.Run(Codeunit::"LP Model Management", JobQueueEntry); - // [THEN] Nothing is changed - LPMachineLearningSetup.GetSingleInstance(); - - Assert.AreEqual(0, LPMachineLearningSetup."Standard Model Quality", 'Fetched incorrect standard model quality (it does not exist yet)'); - Assert.AreEqual(0, LPMachineLearningSetup."My Model Quality", 'Fetched incorrect MyModel quality'); - Assert.AreEqual(0, LPMachineLearningSetup."Standard Model Quality", 'Fetched incorrect standard model quality'); - Assert.AreEqual('', LPMachineLearningSetup.GetModelAsText(LPMachineLearningSetup."Selected Model"::My), 'Fetched incorrect model'); - Assert.AreEqual(LPMachineLearningSetup."Selected Model"::Standard, LPMachineLearningSetup."Selected Model", 'Selected model should not change'); - // [GIVEN] The standard model exists and we make it appear like there is more historical data - MakeSureStandardModelExists(); LPMachineLearningSetup.DeleteAll(); LPMachineLearningSetup.GetSingleInstance(); LPMachineLearningSetup."Selected Model" := LPMachineLearningSetup."Selected Model"::Standard; @@ -676,34 +665,6 @@ codeunit 139575 "LP Prediction Test" CreateSalesInvoiceHeader(true, SalesInvoiceHeader); end; - local procedure MakeSureStandardModelExists(); - var - MediaResources: Record "Media Resources"; - File: File; - ModelInStream: InStream; - ModelOutStream: OutStream; - FilePath: Text; - FileName: Text[50]; - begin - FileName := 'LatePaymentStandardModel.txt'; - if MediaResources.Get(FileName) then - exit; - - MediaResources.Init(); - MediaResources.Code := FileName; - MediaResources.Insert(true); - MediaResources.Get(FileName); - - FilePath := LibraryUtility.GetInetRoot() + '\App\Demotool\Pictures\MachineLearning\' + FileName; - File.Open(FilePath); - File.CreateInStream(ModelInStream); - MediaResources.Blob.CreateOutStream(ModelOutStream); - CopyStream(ModelOutStream, ModelInStream); - File.Close(); - - MediaResources.Modify(); - end; - local procedure DeleteStandardModel(); var MediaResources: Record "Media Resources"; diff --git a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletCharge.Table.al b/Apps/W1/MSWalletPayments/app/src/tables/MSWalletCharge.Table.al deleted file mode 100644 index 789d4ce7bc..0000000000 --- a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletCharge.Table.al +++ /dev/null @@ -1,56 +0,0 @@ -#if not CLEANSCHEMA23 -table 1086 "MS - Wallet Charge" -{ - ObsoleteState = Removed; - ObsoleteReason = 'MS Wallet have been deprecated'; - ObsoleteTag = '23.0'; - ReplicateData = false; - - fields - { - field(1; "Primary Key"; Integer) - { - AutoIncrement = true; - } - field(2; "Charge ID"; Text[250]) - { - } - field(3; "Merchant ID"; Text[250]) - { - } - field(4; "Create Time"; DateTime) - { - } - field(5; Status; Text[50]) - { - } - field(6; Description; Text[250]) - { - } - field(7; Currency; Code[10]) - { - } - field(8; Amount; Decimal) - { - } - field(9; "Reference ID"; Text[250]) - { - } - field(10; "Payment Method Description"; Text[250]) - { - } - } - - keys - { - key(Key1; "Primary Key") - { - Clustered = true; - } - } - - fieldgroups - { - } -} -#endif \ No newline at end of file diff --git a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantAccount.Table.al b/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantAccount.Table.al deleted file mode 100644 index dc4ff3b542..0000000000 --- a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantAccount.Table.al +++ /dev/null @@ -1,166 +0,0 @@ -#if not CLEANSCHEMA23 -table 1080 "MS - Wallet Merchant Account" -{ - ObsoleteState = Removed; - ObsoleteReason = 'MS Wallet have been deprecated'; - ObsoleteTag = '23.0'; - Caption = 'Microsoft Pay Payments Account'; - Permissions = TableData "Webhook Subscription" = rimd; - ReplicateData = false; - - fields - { - field(1; "Primary Key"; Integer) - { - AutoIncrement = true; - } - field(2; Name; Text[250]) - { - NotBlank = true; - } - field(3; Description; Text[250]) - { - NotBlank = true; - } - field(4; Enabled; Boolean) - { - - trigger OnValidate(); - begin - VerifyAccountID(); - end; - } - field(5; "Always Include on Documents"; Boolean) - { - - trigger OnValidate(); - var - SalesHeader: Record "Sales Header"; - begin - IF NOT "Always Include on Documents" THEN - EXIT; - IF NOT GUIALLOWED() THEN - EXIT; - - SalesHeader.SETFILTER("Document Type", STRSUBSTNO('%1|%2|%3', - SalesHeader."Document Type"::Invoice, - SalesHeader."Document Type"::Order, - SalesHeader."Document Type"::Quote)); - - IF not SalesHeader.IsEmpty() AND NOT HideDialogs THEN - MESSAGE(UpdateOpenInvoicesManuallyMsg); - end; - } - field(8; "Terms of Service"; Text[250]) - { - ExtendedDatatype = URL; - } - field(10; "Merchant ID"; Text[250]) - { - - trigger OnValidate(); - begin - VerifyAccountID(); - "Merchant ID" := LOWERCASE("Merchant ID"); - end; - } - field(12; "Payment Request URL"; BLOB) - { - Caption = 'Service URL'; - } - field(16; "Test Mode"; Boolean) - { - } - } - - keys - { - key(Key1; "Primary Key") - { - Clustered = true; - } - } - - fieldgroups - { - } - - - trigger OnInsert(); - var - CompanyInformationMgt: Codeunit "Company Information Mgt."; - begin - IF NOT ISTEMPORARY() THEN - IF FINDFIRST() THEN - ERROR(MSWalletSingeltonErr); - "Test Mode" := CompanyInformationMgt.IsDemoCompany(); - end; - - var - merchantIDCannotBeBlankErr: Label 'You must set up your merchant account before enabling this payment service.'; - UpdateOpenInvoicesManuallyMsg: Label 'A link for the Microsoft Pay Payments payment service will be included on new sales documents. To add it to existing sales documents, you must manually select it in the Payment Service field on the sales document.'; - HideDialogs: Boolean; - MSWalletSingeltonErr: Label 'You can only have one Microsoft Pay Payments setup. To add more payment accounts to your merchant profile, edit the existing Microsoft Pay Payments setup.'; - InvalidPaymentRequestURLErr: Label 'The payment request URL is not valid.'; - - procedure GetPaymentRequestURL(): Text; - var - InStream: InStream; - PaymentRequestURL: Text; - begin - PaymentRequestURL := ''; - CALCFIELDS("Payment Request URL"); - IF "Payment Request URL".HASVALUE() THEN BEGIN - "Payment Request URL".CREATEINSTREAM(InStream); - InStream.READ(PaymentRequestURL); - END; - EXIT(PaymentRequestURL); - end; - - procedure SetPaymentRequestURL(PaymentRequestURL: Text); - var - OutStream: OutStream; - begin - if not IsValidURL(PaymentRequestURL) then - Error(InvalidPaymentRequestURLErr); - - "Payment Request URL".CREATEOUTSTREAM(OutStream); - OutStream.WRITE(PaymentRequestURL); - MODIFY(); - end; - - local procedure IsValidURL(URL: Text): Boolean; - var - WebRequestHelper: Codeunit "Web Request Helper"; - begin - if WebRequestHelper.IsValidUri(URL) then - if WebRequestHelper.IsHttpUrl(URL) then - if WebRequestHelper.IsSecureHttpUrl(URL) then - exit(true); - exit(false); - end; - - local procedure VerifyAccountID(); - begin - IF Enabled THEN - IF "Merchant ID" = '' THEN - IF HideDialogs THEN - "Merchant ID" := '' - ELSE - ERROR(merchantIDCannotBeBlankErr); - end; - - procedure HideAllDialogs(); - begin - HideDialogs := TRUE; - end; - - - procedure GetBaseURL(): Text; - var - TypeHelper: Codeunit "Type Helper"; - begin - EXIT(TypeHelper.UriGetAuthority(GetPaymentRequestURL())); - end; -} -#endif \ No newline at end of file diff --git a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantTemplate.Table.al b/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantTemplate.Table.al deleted file mode 100644 index 9d92b9f238..0000000000 --- a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletMerchantTemplate.Table.al +++ /dev/null @@ -1,97 +0,0 @@ -#if not CLEANSCHEMA23 -table 1081 "MS - Wallet Merchant Template" -{ - ObsoleteState = Removed; - ObsoleteReason = 'MS Wallet have been deprecated'; - ObsoleteTag = '23.0'; - Caption = 'Microsoft Pay Payments Account Template'; - ReplicateData = false; - - fields - { - field(1; "Code"; Code[10]) - { - } - field(2; Name; Text[250]) - { - NotBlank = true; - } - field(3; Description; Text[250]) - { - NotBlank = true; - } - field(8; "Terms of Service"; Text[250]) - { - ExtendedDatatype = URL; - } - field(11; Logo; BLOB) - { - SubType = Bitmap; - } - field(12; "Payment Request URL"; BLOB) - { - Caption = 'Service URL'; - } - field(13; "Payment Request URL Modified"; DateTime) - { - Caption = 'Service URL Modified'; - } - field(17; "Accept Terms of Service"; Boolean) - { - } - field(18; "Accept Terms of Service date"; DateTime) - { - } - } - - keys - { - key(Key1; "Code") - { - Clustered = true; - } - } - - procedure GetPaymentRequestURL(): Text; - var - InStream: InStream; - PaymentRequestURL: Text; - begin - PaymentRequestURL := ''; - CALCFIELDS("Payment Request URL"); - IF "Payment Request URL".HASVALUE() THEN BEGIN - "Payment Request URL".CREATEINSTREAM(InStream); - InStream.READ(PaymentRequestURL); - END; - EXIT(PaymentRequestURL); - end; - - procedure SetPaymentRequestURL(PaymentRequestURL: Text); - var - OutStream: OutStream; - begin - "Payment Request URL Modified" := CurrentDateTime(); - "Payment Request URL".CREATEOUTSTREAM(OutStream); - OutStream.WRITE(PaymentRequestURL); - MODIFY(); - end; - - procedure RefreshLogoIfNeeded(); - begin - CALCFIELDS(Logo); - end; - - procedure UpdateLogo(): Boolean; - var - MediaResources: Record "Media Resources"; - DummyPaymentReportingArgument: Record "Payment Reporting Argument"; - begin - IF NOT MediaResources.GET(DummyPaymentReportingArgument.GetMSWalletLogoFile()) THEN - EXIT(FALSE); - MediaResources.CALCFIELDS(Blob); - VALIDATE(Logo, MediaResources.Blob); - MODIFY(TRUE); - EXIT(TRUE); - end; -} -#endif \ No newline at end of file diff --git a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletPayment.Table.al b/Apps/W1/MSWalletPayments/app/src/tables/MSWalletPayment.Table.al deleted file mode 100644 index 36ea69dc30..0000000000 --- a/Apps/W1/MSWalletPayments/app/src/tables/MSWalletPayment.Table.al +++ /dev/null @@ -1,61 +0,0 @@ -#if not CLEANSCHEMA23 -table 1085 "MS - Wallet Payment" -{ - ObsoleteState = Removed; - ObsoleteReason = 'MS Wallet have been deprecated'; - ObsoleteTag = '23.0'; - ReplicateData = false; - - fields - { - field(1; "Invoice No"; Code[20]) - { - } - field(2; "Merchant ID"; Text[250]) - { - } - field(3; "Payment URL"; BLOB) - { - } - field(4; "Payment URL Expiry"; DateTime) - { - } - } - - keys - { - key(Key1; "Invoice No") - { - Clustered = true; - } - } - - fieldgroups - { - } - - procedure GetPaymentURL(): Text; - var - InStream: InStream; - PaymentURL: Text; - begin - PaymentURL := ''; - CALCFIELDS("Payment URL"); - IF "Payment URL".HASVALUE() THEN BEGIN - "Payment URL".CREATEINSTREAM(InStream); - InStream.READ(PaymentURL); - END; - EXIT(PaymentURL); - end; - - procedure SetPaymentURL(PaymentURL: Text); - var - OutStream: OutStream; - begin - - "Payment URL".CREATEOUTSTREAM(OutStream); - OutStream.WRITE(PaymentURL); - MODIFY(); - end; -} -#endif \ No newline at end of file diff --git a/Apps/W1/MasterDataManagement/app/src/pages/MasterDataManagementSetup.Page.al b/Apps/W1/MasterDataManagement/app/src/pages/MasterDataManagementSetup.Page.al index ceaaa16177..b1920519da 100644 --- a/Apps/W1/MasterDataManagement/app/src/pages/MasterDataManagementSetup.Page.al +++ b/Apps/W1/MasterDataManagement/app/src/pages/MasterDataManagementSetup.Page.al @@ -117,7 +117,7 @@ page 7230 "Master Data Management Setup" Caption = 'Start Initial Synchronization'; Enabled = Rec."Is Enabled"; Image = RefreshLines; - ToolTip = 'Start all the default synchronization jobs for synchronizing data from the source company. \\Data is synchronized according to the mappings defined on the Synchronization Tables page.'; + ToolTip = 'Start all the default synchronization jobs for synchronizing data from the source company. Data is synchronized according to the mappings defined on the Synchronization Tables page.'; RunObject = page "Master Data Full Synch. Review"; } action(SynchronizeNow) diff --git a/Apps/W1/MicrosoftUniversalPrint/app/src/UniversalPrinterSettings.Table.al b/Apps/W1/MicrosoftUniversalPrint/app/src/UniversalPrinterSettings.Table.al index 0e2c7e9c9f..b63bfe826c 100644 --- a/Apps/W1/MicrosoftUniversalPrint/app/src/UniversalPrinterSettings.Table.al +++ b/Apps/W1/MicrosoftUniversalPrint/app/src/UniversalPrinterSettings.Table.al @@ -108,19 +108,6 @@ table 2751 "Universal Printer Settings" DataClassification = CustomerContent; } -#if not CLEANSCHEMA24 - /// - /// The output bin to use when printing the document. - /// - field(12; outputBin; Text[2048]) - { - Caption = 'Output Bin'; - ObsoleteState = Removed; - ObsoleteTag = '24.0'; - ObsoleteReason = 'Replaced with Paper Tray'; - DataClassification = CustomerContent; - } -#endif /// /// The output paper tray to use when printing the document. /// diff --git a/Apps/W1/PowerBIReports/app/app.json b/Apps/W1/PowerBIReports/app/app.json index c879cf1058..93b0b88b53 100644 --- a/Apps/W1/PowerBIReports/app/app.json +++ b/Apps/W1/PowerBIReports/app/app.json @@ -14,8 +14,8 @@ "dependencies": [], "internalsVisibleTo": [ { - "id": "7628c8de-f349-4806-a540-21b0044f7722", - "name": "PowerBI Reports Test", + "id": "b4e48c9c-0deb-49a4-ae70-662b33565b1b", + "name": "PowerBI Reports Test Library", "publisher": "Microsoft" } ], diff --git a/Apps/W1/PowerBIReports/app/assets/ExtensionLogo.png b/Apps/W1/PowerBIReports/app/assets/ExtensionLogo.png index 4d2c9a626cb9617350617c40cd73904129d4c108..abb570436497836a276c787085bd018c87ca4c1e 100644 GIT binary patch literal 6351 zcmcgx2UJsAmrf#RC`y1xFChT|DG8y6qJ&Y6m93wxsR@SQ>n)2X z`nr&0gS^RfGytG}Du|3Hc#`~JE+jV(9}W0gO9ve0LDYcTD4L>7$=W1$4}%a2$uh*u ziV)&SP$j}oX~NWlFmwWMk{=!x~w6Rgow(5{;IjBV?$-K7RNh86PU*Zw4I_ zl|bP!aAd&DJNA{<9 z{ZvjQAW2>%Z<3E6m5!DBjU~JL`uS4beg6~c-;e)E0X?>+roVOkOIy6Xf2*MS=?2i< z_!W?UiKbcwlSxP%iR$Z5A&_(f=w>1gydh(>DI~m~FU88&*X!?@GXL9T7+O(Q4h@sA z@$ez~22v&eL4u@%_akY*52j59r7D9~w31W8$SGn_ic%;v28H?yYU)e$a1H)fP_z<8 zLG_=Y^hHC&`{DmvFp+?9^`&^@=^lG{<6uNb-uxN;0mBC^;E9l!Ba$iYgH=LzGu_agkRfDdQE; zf6MFm68sOQ_HTLO|4{x6#e<$(c(4C8&q2l=tO<;P2bDfs!M{?%l63Lc$jbxva~WXp zgoEX+0Vf>HD~SmIb=%{A9f7}S1Kmk<(*I(*|AJ9{UHt;_6q1%3JzD?$dP35zM;>J2 zUydOEy^lYi{X^FN4X2lagW>NYM8Ei5#z;Q&+C`xksVt2JX8?dR+E7Q!Dkx_)_Y`H` zptieX()P2iK`7{=*$7W)qHBIZv$%VbwJX(ZWSNsy%_UK$LS!xYk*1b*cij=pLvv+V z+tyd!3sFx-X{71T3~W z39dpd=ESFG)g0i3NsD_j5siXv-w#C`kGT6|V;ZRz;!A-+$yk*oG($}iJ40yMlBtwu zlz{_CqHQ~)R6YuHRu{ga)7}m6Ikxja9AF%ErzyVukbZH8okx&Y^5T;6kyaC#WyUK7 znK7-(%>qzzkIIrB_)6{@|5WvYTb*ZZsFjR;U_JNJPkXZHWB@aOCBB(oV)j@pe3i9D z*AuSs+URr73z_Bf1B~Kb_l_`z>E=)gQ3iYX9?Lw)=y3FQ`^w{T7Q~f2cx>?Vu6O(q z%@ZARB#Bw6*_>>b!1^j(yJ9}l88JSgfe}sMHUmt*$+-$csd#Qq&rje$@nzm>Fe60?Yui?0Qc z{k*~uv(~$WOp`kO-emCpa4jKoKno~*T4CsW{T9S>k)?X6GbkChVBI5oD-smW$lG|_ zy|mwC>mDs{e``Fn!<;M`EHNu+Fg^$jn+jQG!HzrluZ%jU^gUelTH?QwVw0lS+9G=~-dX(R`9lSja*;S_~WWL`C z21Bc1l2qXACBG~SWuPb@azvUT_;hTy6k}#uB&eJE#J(W-3i+^tTn?40uq65n(5>B0 zJLX8krCT`PD7tt}6@Ok63E1(!lmEPcQCjg&r$4mMfIZHYyn(333QBIldb+N9OG&-6 zm7dlI@OEWuj;<0CPy^+=3pr8>-<}dv*ljhJo5I$nLr+b7x|XBe-xOs2q3bFq`FhZi zTOnIHX$;8XXa*WB~(=C+`3JWxom*(8jPs~CVZ`K9dCsGNz-dR18&@fF@Q~(guB|cnntqAltDL#j&8Yr z`*Z7w(V$2glp<>akwI?ZaTVN>^$DT-3CAvW->Qe_B0KbBrq6w>A!&m8n*!Md|11mY zlhvur|3jOlKjZvc#)Oge%8x?3v8ZPvMDf}^X(2Z53qv_^9zbIZ6v@WwDlDOz&7?Fx zw~bSCK2`@x`qSW9*vI~tLd}|^6Nuzv$GI#$>Ogv*W!ICZ($6Gyg`U!PKf@Ab6>{(G zKwK8IdH~bYIGy!A2pd9!W?Ox|%Gy8RjH9_bN_L?9Pn5ySH`Os#cT_0wx6dL;wR3E{ zHDhTiOF31SpLuMSn(gr9P>sE=5jzY+a@DyI>*}?^OHuvQiq!~?vEHF76Zcyj)l&hr z?M9l_&R6Z3CD&uc>s>Dl2|S#6AgBUuh7T2KH^(E8yQcvAU#9o(Hz3N;DTNP3On~3S zz6_|^^zx{llh&Q(RSFFg=D6$hT|8o6Woe+;p;(aJ^HO6Be=(EBW z_vi;hLGAgc+IfA5y{l6(lIKjoJcG-7GLg%BP9D&8WYnb|#X!Ih@=!+k<@Ms+DhXCm zM}o5puZL&6llPvD!dd&^wSAEuA9h)kyn=5q6Tk_ukR#a`Z6EfbhCKROEiIWg8YP_< zEW6bj9Jd`VM#|ysOnl&?39|iCm3n^0gO_D^JSUiurEa9IcPJw)==ko4I4<7CnfkOD zxNfbJlOGD?8%?O${vqDgm`@nf_KepVZYxGq$IdnPSYLSBcy#U3yEb9q&e3c>J3tW2 zYzuX0;a+B;$b|cr&Z5KJ8#fGDc+bf(Qt|f7#ru5ZIb^`n&3b z&ZP7n8mE`5KljTw8b{cdZMz>*y?)$Ni>m+1k9FAIh`!*TE8F2B z{bsK`6b)l^iD%No+{ILZ{X8hgy{gUDcgK_#jWg57mZ5Hi;;C)s8xN&3?~NPbCB@m9 zy>2#j15V25yQE#Gf%kK6wrB0vC2bOX--u~)b~cBkvtK$qgx&bBsaDy(Z zv!4zf<)o-5mluK3*QaeM)Xwcy?HHKuMWj>2g|&q)2HS|2fbHwX10qsvY@c2GV&caE zx>@S0n32XGCGZ4Y>zfewP&XP7u^E11*ZyW|u2#*8avV6}t=IHHq>hnzCmW44 z0S4lr8NDyKz8FU`HmWt~{=8Mdd%wq3Z?nrdBIAS*-bYw*x&fsNha&vw5uxMglJJsj zR?$psS-=P8elq;-elbTRlZg0fASZ>-Fx?VIi^|axo3ZYfl>FHw-8kFu#LlqjSCh1$ z@P74va%jFkiQXR#5lVL79yCpcX0)N^)CRUFTan|y%v25BMr6v>6rs0nJ!cgZc125O=G*OvUK95X3AAw-7iLcM*#1<#1on)0t%#v(u#~I zZIFyn-@^oW3vL5=8UwlqSF_wGl-FsZ_6`==%?=KZxk4wU#DoE&aObt}PgHI8Rd9YK zQk44Z+d{OdP$!2srbAOr`x;+O{`}^^l5k-jmp@T1D&jl`jPq+*i;%9(hZJ2*#Z_?C zW}38D%;<_{7)rwmeYOQ5GXf#++wv`2l~U%06TdZ$e-=%_F*xc49G)(m6CG-HN`1D* zhq%6C)EDE1i>Hx@Zbq7r4Ziu_d+A|8C&Yj@skxH7r+Yn#sSc96>n3Q>O*v-`$@PF? zOQxry6-QTj-C-g?7He--XZUpcBeX=+#QJkome2# zhmyM^uo9AJ(3;fJ6dyjCGIH?L+iO*(h9|v}FI!5s z8d}h<_vT5^xs-17I!f%WU!kx6!h{v3&a-M1*tM~-@mo6de0ju@##y}`{w^n!Vf`>I zmnv(FZ(EHQsHHAt=Iyhk>AlbY@G`0_UGqBB(j6cHKd2g-f3~l`4)_*c+$UN~uPyay zcO$q{H7qvp!u#_%c9b-4)BwE2e4{W!lyRla$%Wb<-=b4d`w=oavoYZKtOFRd{lv!q zX4wL9q3#mm)QJquLrh7Lh_`_Dcnxj7^379_uwAHND9bEzY053ihpz(RRJSpm$^9wG z{;CHNnI87SFpb^TR_DtC-(Y<%^%m9VeNMIjhi==p)Y_$Evu>@G(cc*gTmt*1{Fo!wKAqUHAxV8~kL^qw3xgul_c`Ota~NKFLOc}BUKiw!@lvD;*PLruRlePl48XX_$~ZW)+{) zeI98gxpGZLr?G_^o~NOeDiKrJECXM;UYHo1cHHB~Vgy*$+o(R_%h!$0=gyJTUSO*7 zgjOXjbkTQ0Rs&btkejWOrlTOP4Z$xK1{kO^^Ug|}aPXRV+Ogyj=xh%`mM87(nUTD+ zmow@yYJI^)T0)alF=0os#dGd}i0$^+qPdNP%qNIF$0FBnno?1HwH*9~XUN3K9O6*~ zy+2O5GEx534saQ>)GqKjWUspVb1$6Z(tP`Cs^A&N9xTJ*D=B)@d+&JfvzHBh))?+b zsHtrY7S(?Z|4^7*)_&q$!a3qhS?%XLi3saA zb!)pi`OD$fiu7jT2>pfcQ0t$aY24<@1fvcOLd;@=4u|N9zqoj_w@T;C_n$SKptRjs$j|?%q%_l-h|G(oj1qPEEG(< zY^d=S6mX&j+OEPeg#_8xdT(DmpAV_@CQ{_4(ODmY zsR9W!;z;jfYazkgcj=816vd07dfiNHKbO5&7SZRN`gLb}W1jD@S^DPN@P9xrdz9=4Io8D{AlPc2&-gqdY)|I#Y6+Sprc0>z!Lra8_|Dt7Qd4}SQl7usw zhgkL$j@j%A?Qp+T%N}CU`xIyJDWaOa<8%CN87Cn~gE&|D7N?Men9}^T{@Qnw;f(%~ z=iqN#9`(VOu2)CypWzK;7b9}pI(U;prufHffX~Oh9p%0C0b!U@3!!EK+(}+v&Kz5N z^o98{;Zt92x}_XoOYWt{=Xx}!;8RaE^y@f#Ix3S}q(zoGpD&NxFAvC4k9K6{0S7vq zcAs+mY*u07Q(@t_#C@X>ECzFj2Q)B3;6o6oKy}*1sq$C~%MKhf zuJ#F}!BuU3@Cwm>9sNi9D;GiD-VDg6o3Yo-QMOBA;7i;nULLi_Y7O?4HOcKPDnH9& z2=;@je?tRlkXf4(IYI#T$M7m!ApO;WBU4)&O&<&w{D`(Vm(y<;LvV2qOvf)bzqLTT z?=#H!V-lvh_Atq-|bU;5H)lSwi;p(`{Q7{`qgh;-8Ome;;6Y#cSnT2dt3hCRV(tnhq1w0UTc zuMM(Z^6E*Rwo&^g`z;&Wg5b;Ljv4ww+B25!qX?q@^FXi1EqW5EGWB7jrQGaUo7s1O z4(i$au|lgSF~^y+L=#t*WJgSHb!_70e~1-C7^WGF=Mu&mc~iu+WV^g)d9p-fDp$|C z$8Q5^v2VOP!6s>1u31a&vTRlCx9<%fw>J`E&bm{Fa5x;{i<1Go zf`#}@))>ECj*dufJGJK7#nn2q=0Ay;Qp9fAPuCc`zKf2CJNgC84Sw)Ob!>6IAfj&~ z^}!VH?PwmwZB&RG4T_SQC3q&CF};qocqP4OEg!W>4*vMz-07lKtM-o#LXL=WdCMj@ zm$S6)UUsuL$wSThQBR6=XUrVgR~fYGySuV`{-rLjr< zjM+2Q+r|PmZGy(oTRlPNqU*080Z1|6pU*^cG6*q2H@P|ZjmX9R(ttI zvV+bHtgTJ@?2sZ#H2ICIyI$r{W2NC&$IB!YlhgM<#lkk(zvvHZm%lomQJFsK<_;Qy z6m@xuZyf4${WOu`@bdbOTIY#G!8tTsJxV+(+_5C=J`aA3U=BK*H`XmMSh}WoBA`9C z+PB6qF!HssZ-so4;>(`Rk}#*fc`4?JWAxwA3B{GX3k!>J#+7pJ^t~v-fCbq9^B&ZH e*zC&MKVp!`e*@z^@b=&@2SZ&moqJg4EB^*_Zspbh literal 5446 zcma)=S5VVywD$iAMIcgC2u+$uktV%J6$Dhev_NQrfC^Fsq!|cJ=^|Z`P&U*^N-uuwi#_w5i!*aB*89x5SkKKnv*ua91anhEW+omc005Zp+`e`1 zOsW4C1O3^nWxbYuCX9Z!?E(M*a`E2+jm<_J0|5K}om)4pLZ&wJ&3t(K(|ffcq#?ky z#^aeQO#|lO9vyUeb0ezqQtpipl3Sj#-xy!eh7lu@5+BnW zNhL-~3Zpw&1u=bMN*Q(sgYksq4dM>Iw7p&Qk_Su~b*PgEs#LK~^K}aDaTG_6Q?_tM<8wOS}`Z+?~Et8GB>T%(k7$9`DL!d5)f!ZoXco-vj+s_QLEs2cf zKM&F>#c9w|TmM9MFtl8L*cYQgl9khf5CYMR)DJOUf;M~a9|+ys@RYR zCusNC(CSlUk|r`qdS&ZKh$O=@#&e0>;W~S#|KjHdfLx!-J9r1JtP4RGIhS|Rm0eZ6 z7eOE~Zfo4Li~K^|&)d^-r?8Rh2Q}#ZjL=?VJZ7~hlp4(!U!0K%679I`OR&x54*0&4 znho|hKu)WR)4PUVA1}N;jXHg}AG+gSKQ6O_fEP^Y51!LwBERH09|t!GNx2KH4co>r zA%cgSHxh2Sezx-w!S5DTG#0zVCbnLM6BP}2P-G{8 zh**wJHj<652FS05bSQNx-0fS7^(wREYvZwpt;$!!k4H0U*iyhS8(syBDMv>L<)~LI zPl!Y^-cM{_J@{hY1=XJ#T=Ef(FD!I^r1^lca3c0ftVuvo-(%!Zn)C1bK{}-i*Jc); zIIc+o&iMgvboj&4`@5sF23MV!*zIVmA0>{1;*H*faMAG6EZ7XydTfaGyABAGx>)yl z@Y+|)SVxCx@!GWqspay7GBetK*s2@CJ?s{8v!(b|ShLb|O;3T1rAMB?DJ?Z`@013q zoyIvV84eYiS+?kRJOz`3AFcR~ZQ1Uq7wCnbSJ%-HZwhAnJ^4zDp2W8I)~WI7ush5> z&f3O)rj~2ZGr!c@=p3!n>jG-O#9`$7&WyF7bB}(rq4ldokUp5TY?E62r+YJbJp8Jf znDW3fYZ^nBQ9O}3?zH_*mZ9+G#HHnwop1Vfm!Df~{Z%D?5KzMN&RA>&#q8iCzTfAt zV#TyMeyyh8=M$8tyA|KeUwo_Q6Si)P)%n(W-*QE~08BG|>J!sQPq?IF;;%1ypP?Z` zK_0Un>p;9=9d675ELHboC0+fNMY&(;k(|=0TS>ka)BKI3q#)zx!Jp@zv0QfeEAjU< z=vI5@-d^A^-*#|P+b2QFiGxk4z<8Tp4p6{aOp88x>SQEa0M`VxX%IUb$bya!5EgRf6$fFw zp}jNTKUXjNe0x(;)Nu)Ij5K?QD0u6~mRHQ-!;6m#VP>)}=irAqy;f$e{W-EWnR75~ zm2b0u@r7ASk4x0oTqs9{f&F|eAmD*Gf^A;te7f}J{dXqLaH_4%D_(mnp0VmWhq>^E z&7>5*-mh>FX{w5SJf^#th&GrpOQk58U-+4 zq3$q~C4ySH7@lr>W+|c0`UF*ieC+3vC1$4m}F(ic|G7}QDt(t z7`#>$c4U-4LU_;nWHhdN9Fcv~L8h6M_}nW&EGTjgW(=c}uD9>eU^rDOrkNg_effOV z^8z_y=vNIt{`wOfgG2o^3ey`R!aP1=t7Mz@&MKK3>_BH_QkgNO@4IoQ-2d8EqsDg) zTMb-5lqlubRot-7!RD@+udO?O9_Da3XV5bvjW zXTb2psHUdeiIaI(lknQE_<+YlY31}R!VfoM_BuILQ{>Q89=LB5j;V|-yAW2gY82+~ zYlu~#*R(cHw2NO1h5xaiAD2oiIEQ-aQyA-D^y^z2ZHNfM{o(3M#SbqOP3>k9FOdDO z(t%c9hk)NCPe_8>=Y^U-_-6IwS-D0cE=pwdyLp!;r-fWiXtbUS$<dl!~WV$TR8 zP$KU?K>m?*O)mSGccn&kn|nj7NXFeo<0D=ue8s^~BK#P?J~gB}v5<0nK9GPipjT#9 zkm6yXFyLlgoUIDEVxw*0Z-WDqp8swCs(bcjAqdDLl1oUqYf#a`NjT6IO3?=P`FvUZ zlWC&lWb9_dexSz%N~-oscM`oC%b#KS|KS7AptwRX5h&1VDCKWzP{&??TFdF3h53&c zU(v)WhOr)#!V6Y6d7CzOO-@KF%@67>kh34@Exj7Rh}p5_0?yUeyC7@c7DHf+mW=~wpLeLYDA9#W-Ri*S|M@g zjPHH@qHrPuzq(+5y$V*UoFEg(g$$mRNUEF!C{IN3Rig{tU54W|OD_`M0G3u)B{WhC z*D?hTF7J+YdF8-Z-Uuw{3jBx`_!aus`uDDBecwuu&tsVpj2~DZJb2-!a2l??m{}er}lR6Lqu)-2+Vm)jr(g{nfQPx9-<^1d;k-d zkU{E^g7qwp+D`b+QtU5@+swaVKp9<`>sT~U)O!EEMBo!*)~s_<`6Yl z7fX2;ki>kVDfdietW1k;TYvaY({>?5X)&(d&_y<-J7Qa@b z(zwGCI=`P#^b>1>2#Y!9T5|AdtaU|zXxw9^KpIu6CAmQf$GzaeOJmYVsc3eh5%6lb z)t~(Ak2J`;KW_L6psME-h?xF6ryr4d{q;>-b`Q$L43T{r`{N?U6cqP(Q3f%kA8`c@ z<82KXjte|7u_Lo~MV!d%y$tYi(hzU$6t+*ml~Z&Mg{eK?@}^XEBK+-&j`Uv95x)=_ zZLs=Mpg_IuZenjm(~}b8Aggaaje8NX$A_7^G%-)!xtu)C{N|S<3hVOmU;{|i+q6zn zfr(1Ua*jF!%-dU3L}O2fvWAe%-4kxtXo_vJHF(AxSx)4AI8-$^uBQO_86Z_y%RZX4 zJpu5`pOAztxv?jXv9yx|r>#9!0|`71C-fli@v${6r+V$hgvcr|W_I`{=7*0s(PKQH zzn8r2+tSeD15stz|DIJ3%X%8EkyN?bsHhuq4(5D0Oewn_)-o)Nx$eNs{0V*ZTSVt4 z3ifXGGw5fBv+9b6d~Nl+08L4VbbZqf3DL^e?l@!uZVdWkdOpJPaE?{zF!ZI?c(vF3 zvX~OK4vktvm&R$MgNpiKA~&zT!1#H7!q1h7AQiuSNG9<=$64)Zym(UQ``(j#^hDzt}{aur0pS?mmBi&z4I0Jfieqh%Pa_A%N?_1OZHm-S{ zQ*)4(N_J;y7tRh0o>xs25-s9!M-)i;@I68#SGXB2XgS}N zx_r3%V)z1jLA_M&?)E^DT$kzdHMJF%e2w6BH@iI5tKWM+zcuhCsz@N0a_1RBvrdZx zjzD>V%;c4*$RkEv{zHuVyaB+ANl(iT8w{pJdziC7YcO2&(ciqGLhs@q-dNh! zkV_V_(_~$*>ND}j1yozMedYnu-_GKMh?IpP<@D+edeB4M%3@xr3oj{@mdFKoBVpm^)1_}Y^}rOWBSB|Uv)*-pTdiU ztW9~{qq5@iB+$QpbeJVKH^n^9vV})i>Z@2CHoY2$PC888c;#Yz-pHRK@EVheWhE!> zZzjPmy?0Ni8#=o_k6_s3DY7nS^&Bm}BW&ZfAuF7bQbDgAGM$dE)RM6RvdobKb&MhsYD4exRm9*jcHPjbz#rI?vj$u zPLF5Gjv|8}?ta9`&^H}Va3H;llghU-BC7pxo6?-eTP`7CUZHJrw{5 zhkDYeIYlhL%brQJ1X#<#fz#E}Z87Kj=Hde*f{l|A`9E my8jz0{9hgZgN;Rh%;ug!HJ{lE_@04L;EulOt!iDD=>G@$cU!Ii diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedPayablesBackDating.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedPayablesBackDating.Page.al index 89514c751a..ca0a14789e 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedPayablesBackDating.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedPayablesBackDating.Page.al @@ -22,7 +22,7 @@ page 36994 "Aged Payables (Back Dating)" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36994 "Aged Payables (Back Dating)" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection904474b579cc92816425', Locked = true; + ReportPageLbl: Label 'ReportSection904474b579cc92816425', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedReceivablesBackDating.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedReceivablesBackDating.Page.al index 5906cb8973..0ec065f54c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedReceivablesBackDating.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/AgedReceivablesBackDating.Page.al @@ -22,7 +22,7 @@ page 36993 "Aged Receivables (Back Dating)" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36993 "Aged Receivables (Back Dating)" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionfef66fa3cf79c6d85930', Locked = true; + ReportPageLbl: Label 'ReportSectionfef66fa3cf79c6d85930', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/AllocatedHours.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/AllocatedHours.Page.al index 4ca193ec19..8c323fa153 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/AllocatedHours.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/AllocatedHours.Page.al @@ -22,7 +22,7 @@ page 37043 "Allocated Hours" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37043 "Allocated Hours" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionf3f7e4f23b609a9d9cb2', Locked = true; + ReportPageLbl: Label 'ReportSectionf3f7e4f23b609a9d9cb2', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageCollectionPeriod.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageCollectionPeriod.Page.al index 7c07063318..0e47b0d0c5 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageCollectionPeriod.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageCollectionPeriod.Page.al @@ -22,7 +22,7 @@ page 36992 "Average Collection Period" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36992 "Average Collection Period" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionb1d1e3d33a031ad3b0ed', Locked = true; + ReportPageLbl: Label 'ReportSectionb1d1e3d33a031ad3b0ed', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageProductionsTimes.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageProductionsTimes.Page.al index 3534fb9cae..2d7b4c2403 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageProductionsTimes.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/AverageProductionsTimes.Page.al @@ -22,7 +22,7 @@ page 37048 "Average Productions Times" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37048 "Average Productions Times" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection13a328ff231fccdc12f7', Locked = true; + ReportPageLbl: Label 'ReportSection13a328ff231fccdc12f7', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/BalanceSheetbyMonth.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/BalanceSheetbyMonth.Page.al index caa946a4ed..dab994a070 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/BalanceSheetbyMonth.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/BalanceSheetbyMonth.Page.al @@ -22,7 +22,7 @@ page 36986 "Balance Sheet by Month" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36986 "Balance Sheet by Month" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection6a30609896651f006f0f', Locked = true; + ReportPageLbl: Label 'ReportSection6a30609896651f006f0f', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContents.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContents.Page.al index c0bdbb1a68..c7a05c7731 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContents.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContents.Page.al @@ -22,7 +22,7 @@ page 37031 "Bin Contents" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37031 "Bin Contents" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection12b3ff23621e20c1398d', Locked = true; + ReportPageLbl: Label 'ReportSection12b3ff23621e20c1398d', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContentsbyItemTracking.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContentsbyItemTracking.Page.al index 9a2c597b93..7d5f072cdf 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContentsbyItemTracking.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/BinContentsbyItemTracking.Page.al @@ -22,7 +22,7 @@ page 37032 "Bin Contents by Item Tracking" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37032 "Bin Contents by Item Tracking" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection7359815290770dd2a490', Locked = true; + ReportPageLbl: Label 'ReportSection7359815290770dd2a490', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/BudgetComparison.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/BudgetComparison.Page.al index a440d5c990..a54241c955 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/BudgetComparison.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/BudgetComparison.Page.al @@ -22,7 +22,7 @@ page 36987 "Budget Comparison" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36987 "Budget Comparison" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection64d670dfa9da1a5b7033', Locked = true; + ReportPageLbl: Label 'ReportSection64d670dfa9da1a5b7033', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/CapacityVariance.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/CapacityVariance.Page.al index b072403815..e1c3af5f22 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/CapacityVariance.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/CapacityVariance.Page.al @@ -22,7 +22,7 @@ page 37047 "Capacity Variance" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37047 "Capacity Variance" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection6616bf98be16d1636d03', Locked = true; + ReportPageLbl: Label 'ReportSection6616bf98be16d1636d03', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ConsumptionVariance.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ConsumptionVariance.Page.al index 8468880c09..3cad7ef385 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ConsumptionVariance.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ConsumptionVariance.Page.al @@ -22,7 +22,7 @@ page 37046 "Consumption Variance" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37046 "Consumption Variance" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiona9060ee37f667a3d554d', Locked = true; + ReportPageLbl: Label 'ReportSectiona9060ee37f667a3d554d', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/CurrentUtilization.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/CurrentUtilization.Page.al index 93aa5d3075..8af35197fc 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/CurrentUtilization.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/CurrentUtilization.Page.al @@ -22,7 +22,7 @@ page 37040 "Current Utilization" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37040 "Current Utilization" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection1cb4eb25650060b6dbd0', Locked = true; + ReportPageLbl: Label 'ReportSection1cb4eb25650060b6dbd0', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/DailyPurchases.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/DailyPurchases.Page.al index 86ace3f135..0c5957d0c8 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/DailyPurchases.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/DailyPurchases.Page.al @@ -22,7 +22,7 @@ page 37011 "Daily Purchases" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37011 "Daily Purchases" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection02de1de9adad5ee196e0', Locked = true; + ReportPageLbl: Label 'ReportSection02de1de9adad5ee196e0', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/DailySales.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/DailySales.Page.al index 1f05d6e8ba..69dc3b1373 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/DailySales.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/DailySales.Page.al @@ -22,7 +22,7 @@ page 36999 "Daily Sales" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36999 "Daily Sales" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionb3680fa80c9685297c06', Locked = true; + ReportPageLbl: Label 'ReportSectionb3680fa80c9685297c06', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedCustLedgerEntries.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedCustLedgerEntries.Page.al index 9672096884..3e2d06be99 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedCustLedgerEntries.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedCustLedgerEntries.Page.al @@ -22,7 +22,7 @@ page 36997 "Detailed Cust. Ledger Entries" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36997 "Detailed Cust. Ledger Entries" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection15bface0e851125fb4ea', Locked = true; + ReportPageLbl: Label 'ReportSection15bface0e851125fb4ea', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedVendorLedgerEntries.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedVendorLedgerEntries.Page.al index 4d45947b5b..eac4e36e0c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedVendorLedgerEntries.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/DetailedVendorLedgerEntries.Page.al @@ -22,7 +22,7 @@ page 36996 "Detailed Vendor Ledger Entries" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36996 "Detailed Vendor Ledger Entries" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectione72966404f743d39d212', Locked = true; + ReportPageLbl: Label 'ReportSectione72966404f743d39d212', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/EBITDA.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/EBITDA.Page.al index cb59362883..d95c91bcf2 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/EBITDA.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/EBITDA.Page.al @@ -22,7 +22,7 @@ page 36991 "EBITDA" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36991 "EBITDA" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionab3743c6203831d31beb', Locked = true; + ReportPageLbl: Label 'ReportSectionab3743c6203831d31beb', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ExpectedCapacityNeed.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ExpectedCapacityNeed.Page.al index 09c8fa7b16..680e4f5f20 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ExpectedCapacityNeed.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ExpectedCapacityNeed.Page.al @@ -22,7 +22,7 @@ page 37044 "Expected Capacity Need" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37044 "Expected Capacity Need" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiona2c7d37ca03217072470', Locked = true; + ReportPageLbl: Label 'ReportSectiona2c7d37ca03217072470', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinanceReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinanceReport.Page.al index 76c9bd2d28..1ea18cb4fd 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinanceReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinanceReport.Page.al @@ -22,7 +22,7 @@ page 37059 "Finance Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37059 "Finance Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinancialOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinancialOverview.Page.al index f756830e1e..6de5e67835 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinancialOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinancialOverview.Page.al @@ -22,7 +22,7 @@ page 36984 "Financial Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36984 "Financial Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label '04fa320747962435bf38', Locked = true; + ReportPageLbl: Label '04fa320747962435bf38', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinishedProdOrderBreakdown.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinishedProdOrderBreakdown.Page.al index 1c7fc91188..b4c43a4b7a 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/FinishedProdOrderBreakdown.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/FinishedProdOrderBreakdown.Page.al @@ -22,7 +22,7 @@ page 37045 "Finished Prod. Order Breakdown" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37045 "Finished Prod. Order Breakdown" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionb4e9630e25c77fccda8a', Locked = true; + ReportPageLbl: Label 'ReportSectionb4e9630e25c77fccda8a', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/GeneralLedgerEntries.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/GeneralLedgerEntries.Page.al index 0b95528b2e..31e9a5200c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/GeneralLedgerEntries.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/GeneralLedgerEntries.Page.al @@ -22,7 +22,7 @@ page 36995 "General Ledger Entries" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36995 "General Ledger Entries" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionfdc853c4230265e530cc', Locked = true; + ReportPageLbl: Label 'ReportSectionfdc853c4230265e530cc', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/GrossRequirement.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/GrossRequirement.Page.al index b499be74a5..f3b054b2f6 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/GrossRequirement.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/GrossRequirement.Page.al @@ -22,7 +22,7 @@ page 37027 "Gross Requirement" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37027 "Gross Requirement" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection94c932a22e568b021aba', Locked = true; + ReportPageLbl: Label 'ReportSection94c932a22e568b021aba', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/HistoricalUtilization.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/HistoricalUtilization.Page.al index d0495bee50..8c970fc25b 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/HistoricalUtilization.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/HistoricalUtilization.Page.al @@ -22,7 +22,7 @@ page 37041 "Historical Utilization" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37041 "Historical Utilization" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionf9d212728e1d71a00044', Locked = true; + ReportPageLbl: Label 'ReportSectionf9d212728e1d71a00044', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/IncomeStatementbyMonth.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/IncomeStatementbyMonth.Page.al index 273a577486..1026ebca63 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/IncomeStatementbyMonth.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/IncomeStatementbyMonth.Page.al @@ -22,7 +22,7 @@ page 36985 "Income Statement by Month" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36985 "Income Statement by Month" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionf72eb4d7e5e35db3b283', Locked = true; + ReportPageLbl: Label 'ReportSectionf72eb4d7e5e35db3b283', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryOverview.Page.al index d1f22f98eb..4ad218998e 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryOverview.Page.al @@ -22,7 +22,7 @@ page 37022 "Inventory Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37022 "Inventory Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectione24db7517a44af92f122', Locked = true; + ReportPageLbl: Label 'ReportSectione24db7517a44af92f122', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryReport.Page.al index 7a3488dcb9..8846a5436b 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryReport.Page.al @@ -22,7 +22,7 @@ page 37064 "Inventory Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37064 "Inventory Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationOverview.Page.al index 0277417216..8679cf50d7 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationOverview.Page.al @@ -22,7 +22,7 @@ page 37056 "Inventory Valuation Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37056 "Inventory Valuation Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection41d23fcd2b0c70d16059', Locked = true; + ReportPageLbl: Label 'ReportSection41d23fcd2b0c70d16059', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationReport.Page.al index 6f0fc954fe..8d55d7ee69 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationReport.Page.al @@ -22,7 +22,7 @@ page 37065 "Inventory Valuation Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37065 "Inventory Valuation Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyItem.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyItem.Page.al index b018bd2529..bd9ffedf13 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyItem.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyItem.Page.al @@ -22,7 +22,7 @@ page 37057 "Inventory Valuation by Item" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37057 "Inventory Valuation by Item" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label '47469f126ce6603a9114', Locked = true; + ReportPageLbl: Label '47469f126ce6603a9114', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyLoc.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyLoc.Page.al index 76a20cb8b8..079d869704 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyLoc.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventoryValuationbyLoc.Page.al @@ -22,7 +22,7 @@ page 37058 "Inventory Valuation by Loc." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37058 "Inventory Valuation by Loc." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label '6a6852c0d882690a617b', Locked = true; + ReportPageLbl: Label '6a6852c0d882690a617b', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyItem.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyItem.Page.al index 54370c98e1..6f16caee55 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyItem.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyItem.Page.al @@ -22,7 +22,7 @@ page 37023 "Inventory by Item" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37023 "Inventory by Item" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection8c3ed3c2c96e298a0824', Locked = true; + ReportPageLbl: Label 'ReportSection8c3ed3c2c96e298a0824', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLocation.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLocation.Page.al index ad8cb32665..83aaa676cd 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLocation.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLocation.Page.al @@ -22,7 +22,7 @@ page 37024 "Inventory by Location" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37024 "Inventory by Location" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection2765ed5a1005d04217d1', Locked = true; + ReportPageLbl: Label 'ReportSection2765ed5a1005d04217d1', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLot.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLot.Page.al index 7e0d0d0737..5fc75bffd5 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLot.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybyLot.Page.al @@ -22,7 +22,7 @@ page 37029 "Inventory by Lot" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37029 "Inventory by Lot" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionec09da5413c3755982a4', Locked = true; + ReportPageLbl: Label 'ReportSectionec09da5413c3755982a4', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybySerialNo.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybySerialNo.Page.al index eea57450a7..5e6f1e08b6 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybySerialNo.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/InventorybySerialNo.Page.al @@ -22,7 +22,7 @@ page 37030 "Inventory by Serial No." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37030 "Inventory by Serial No." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiond99a75349d3388ca085c', Locked = true; + ReportPageLbl: Label 'ReportSectiond99a75349d3388ca085c', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ItemAvailability.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ItemAvailability.Page.al index 8960ddd5c1..4630aee60e 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ItemAvailability.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ItemAvailability.Page.al @@ -22,7 +22,7 @@ page 37026 "Item Availability" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37026 "Item Availability" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection61c190709a57015b0e48', Locked = true; + ReportPageLbl: Label 'ReportSection61c190709a57015b0e48', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/Liabilities.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/Liabilities.Page.al index 19daad94bd..8306d35585 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/Liabilities.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/Liabilities.Page.al @@ -22,7 +22,7 @@ page 36990 "Liabilities" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36990 "Liabilities" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectioncd819efac970874e83c3', Locked = true; + ReportPageLbl: Label 'ReportSectioncd819efac970874e83c3', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/LiquidityKPIs.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/LiquidityKPIs.Page.al index 4a5037afa3..de4cecdb88 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/LiquidityKPIs.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/LiquidityKPIs.Page.al @@ -22,7 +22,7 @@ page 36988 "Liquidity KPIs" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36988 "Liquidity KPIs" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection6838cf9cda361d088e0a', Locked = true; + ReportPageLbl: Label 'ReportSection6838cf9cda361d088e0a', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ManufacturingReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ManufacturingReport.Page.al index 4fe9081d35..474cb1870b 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ManufacturingReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ManufacturingReport.Page.al @@ -22,7 +22,7 @@ page 37063 "Manufacturing Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37063 "Manufacturing Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/OrderProcessorRoleCenter.PageExt.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/OrderProcessorRoleCenter.PageExt.al index f640e869ad..e3de0acd55 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/OrderProcessorRoleCenter.PageExt.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/OrderProcessorRoleCenter.PageExt.al @@ -109,6 +109,14 @@ pageextension 36954 "Order Processor Role Center" extends "Order Processor Role RunObject = page "Sales Actual vs. Budget Amt."; Tooltip = 'Open a Power BI Report that provides a comparative analysis of sales amounts to budget amount. Featuring variance and variance percentage metrics that provide a clear view of actual performance compared to budgeted targets.'; } + action("Sales by Location") + { + ApplicationArea = Basic, Suite; + Caption = 'Sales by Location'; + Image = "PowerBI"; + RunObject = page "Sales by Location"; + Tooltip = 'Open a Power BI Report that breaks down sales performance by location, highlighting metrics such as Sales Amount, Sales Quantity, Gross Profit and Gross Profit Margin.'; + } } } } diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PowerBIEmbeddedObjects.PermissionSet.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PowerBIEmbeddedObjects.PermissionSet.al index e96c0c5a5d..f0c5e9d1e0 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PowerBIEmbeddedObjects.PermissionSet.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PowerBIEmbeddedObjects.PermissionSet.al @@ -81,6 +81,7 @@ permissionset 36955 "Power BI Embedded - Objects" page "Projects Report" = X, page "Manufacturing Report" = X, page "Inventory Report" = X, - page "Inventory Valuation Report" = X; + page "Inventory Valuation Report" = X, + page "Sales by Location" = X; } diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProductionScrap.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProductionScrap.Page.al index 570d90c7b4..c2c923c606 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProductionScrap.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProductionScrap.Page.al @@ -22,7 +22,7 @@ page 37055 "Production Scrap" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37055 "Production Scrap" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionc790f50d90d7b6a6836a', Locked = true; + ReportPageLbl: Label 'ReportSectionc790f50d90d7b6a6836a', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/Profitability.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/Profitability.Page.al index 1be409f64d..3e8173e0e4 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/Profitability.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/Profitability.Page.al @@ -22,7 +22,7 @@ page 36989 "Profitability" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36989 "Profitability" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionbb4917d9edb6d427282c', Locked = true; + ReportPageLbl: Label 'ReportSectionbb4917d9edb6d427282c', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvdSalesbyCust.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvdSalesbyCust.Page.al index ebef433495..aeb9d23294 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvdSalesbyCust.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvdSalesbyCust.Page.al @@ -22,7 +22,7 @@ page 37039 "Project Invd. Sales by Cust." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37039 "Project Invd. Sales by Cust." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectioncd82c6e10e816900e80b', Locked = true; + ReportPageLbl: Label 'ReportSectioncd82c6e10e816900e80b', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvoicedSalesbyType.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvoicedSalesbyType.Page.al index f348fc6c02..44231afd85 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvoicedSalesbyType.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectInvoicedSalesbyType.Page.al @@ -22,7 +22,7 @@ page 37038 "Project Invoiced Sales by Type" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37038 "Project Invoiced Sales by Type" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection355bfd7d0ab99d6a0620', Locked = true; + ReportPageLbl: Label 'ReportSection355bfd7d0ab99d6a0620', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectPerformancetoBudget.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectPerformancetoBudget.Page.al index 03f5650b2f..fc302b3474 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectPerformancetoBudget.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectPerformancetoBudget.Page.al @@ -22,7 +22,7 @@ page 37037 "Project Performance to Budget" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37037 "Project Performance to Budget" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection4b100a3a42980b76957c', Locked = true; + ReportPageLbl: Label 'ReportSection4b100a3a42980b76957c', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectProfitability.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectProfitability.Page.al index b25a61c04b..5a63ef9ffa 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectProfitability.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectProfitability.Page.al @@ -22,7 +22,7 @@ page 37035 "Project Profitability" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37035 "Project Profitability" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection16f4a9483133b8db3e12', Locked = true; + ReportPageLbl: Label 'ReportSection16f4a9483133b8db3e12', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectRealization.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectRealization.Page.al index 9fb1641e04..20d34675db 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectRealization.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectRealization.Page.al @@ -22,7 +22,7 @@ page 37036 "Project Realization" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37036 "Project Realization" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection1356fdbebe72ad7283d3', Locked = true; + ReportPageLbl: Label 'ReportSection1356fdbebe72ad7283d3', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectTasks.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectTasks.Page.al index e984c5d635..d4ae17cf9f 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectTasks.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectTasks.Page.al @@ -22,7 +22,7 @@ page 37034 "Project Tasks" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37034 "Project Tasks" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label '89b75bcf2e511c341a05', Locked = true; + ReportPageLbl: Label '89b75bcf2e511c341a05', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsOverview.Page.al index 93742f3e07..d977f2b20c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsOverview.Page.al @@ -22,7 +22,7 @@ page 37033 "Projects Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37033 "Projects Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionf22cc27c0600033d5e26', Locked = true; + ReportPageLbl: Label 'ReportSectionf22cc27c0600033d5e26', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsReport.Page.al index 14c29e88c3..2c27091f3a 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ProjectsReport.Page.al @@ -22,7 +22,7 @@ page 37062 "Projects Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37062 "Projects Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetAmt.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetAmt.Page.al index fe32559678..33796b8d0f 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetAmt.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetAmt.Page.al @@ -22,7 +22,7 @@ page 37021 "Purch. Actual vs. Budget Amt." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37021 "Purch. Actual vs. Budget Amt." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection412f858e7e32e58ccc22', Locked = true; + ReportPageLbl: Label 'ReportSection412f858e7e32e58ccc22', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetQty.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetQty.Page.al index 58516aa82d..e2435b0a61 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetQty.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchActualvsBudgetQty.Page.al @@ -22,7 +22,7 @@ page 37020 "Purch. Actual vs. Budget Qty." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37020 "Purch. Actual vs. Budget Qty." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection0cb7f30495bc871b8948', Locked = true; + ReportPageLbl: Label 'ReportSection0cb7f30495bc871b8948', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchaseandSalesQuantity.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchaseandSalesQuantity.Page.al index 8b4a0e9780..d679929cdf 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchaseandSalesQuantity.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchaseandSalesQuantity.Page.al @@ -22,7 +22,7 @@ page 37025 "Purchase and Sales Quantity" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37025 "Purchase and Sales Quantity" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection956cd619a014201c65e3', Locked = true; + ReportPageLbl: Label 'ReportSection956cd619a014201c65e3', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesDecomposition.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesDecomposition.Page.al index 1c4c78a1ff..4c3464e7cd 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesDecomposition.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesDecomposition.Page.al @@ -22,7 +22,7 @@ page 37010 "Purchases Decomposition" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37010 "Purchases Decomposition" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiond7fdf374ab65b2861937', Locked = true; + ReportPageLbl: Label 'ReportSectiond7fdf374ab65b2861937', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAnnualTotal.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAnnualTotal.Page.al index d3bf44db43..a559e3af87 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAnnualTotal.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAnnualTotal.Page.al @@ -22,7 +22,7 @@ page 37013 "Purchases Moving Annual Total" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37013 "Purchases Moving Annual Total" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection26e891a305a24bb29884', Locked = true; + ReportPageLbl: Label 'ReportSection26e891a305a24bb29884', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAverages.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAverages.Page.al index fb244808a6..48d409203d 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAverages.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesMovingAverages.Page.al @@ -22,7 +22,7 @@ page 37012 "Purchases Moving Averages" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37012 "Purchases Moving Averages" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionc4bf0b0750800ca6b0c6', Locked = true; + ReportPageLbl: Label 'ReportSectionc4bf0b0750800ca6b0c6', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesOverview.Page.al index e272619b79..f464753466 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesOverview.Page.al @@ -22,7 +22,7 @@ page 37009 "Purchases Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37009 "Purchases Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection8aee09682245793948c4', Locked = true; + ReportPageLbl: Label 'ReportSection8aee09682245793948c4', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesPeriodOverPeriod.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesPeriodOverPeriod.Page.al index 68fc0992bb..bf1641968f 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesPeriodOverPeriod.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesPeriodOverPeriod.Page.al @@ -22,7 +22,7 @@ page 37014 "Purchases Period-Over-Period" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37014 "Purchases Period-Over-Period" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection2c5c763cbb0914a4201d', Locked = true; + ReportPageLbl: Label 'ReportSection2c5c763cbb0914a4201d', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesReport.Page.al index 4f4b740629..57e006332f 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesReport.Page.al @@ -22,7 +22,7 @@ page 37061 "Purchases Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37061 "Purchases Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesYearOverYear.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesYearOverYear.Page.al index f214ba88c3..ce9502f865 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesYearOverYear.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesYearOverYear.Page.al @@ -22,7 +22,7 @@ page 37015 "Purchases Year-Over-Year" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37015 "Purchases Year-Over-Year" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection884ee5483252d4c5e096', Locked = true; + ReportPageLbl: Label 'ReportSection884ee5483252d4c5e096', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyItem.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyItem.Page.al index c7449f21d3..c3aa9efaea 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyItem.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyItem.Page.al @@ -22,7 +22,7 @@ page 37016 "Purchases by Item" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37016 "Purchases by Item" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection510c03a74548b078dc31', Locked = true; + ReportPageLbl: Label 'ReportSection510c03a74548b078dc31', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyLocation.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyLocation.Page.al index da196df272..a2fa223360 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyLocation.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyLocation.Page.al @@ -22,7 +22,7 @@ page 37019 "Purchases by Location" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37019 "Purchases by Location" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection86b19910d517e658b780', Locked = true; + ReportPageLbl: Label 'ReportSection86b19910d517e658b780', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyPurchaser.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyPurchaser.Page.al index 4d2652de74..b72f01c076 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyPurchaser.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyPurchaser.Page.al @@ -22,7 +22,7 @@ page 37017 "Purchases by Purchaser" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37017 "Purchases by Purchaser" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection2530548032dd85837d8c', Locked = true; + ReportPageLbl: Label 'ReportSection2530548032dd85837d8c', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyVendor.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyVendor.Page.al index 8191ffb5be..46bf81d36c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyVendor.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/PurchasesbyVendor.Page.al @@ -22,7 +22,7 @@ page 37018 "Purchases by Vendor" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37018 "Purchases by Vendor" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiond03ece9eb5ac094617e2', Locked = true; + ReportPageLbl: Label 'ReportSectiond03ece9eb5ac094617e2', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ReleasedProductionOrders.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ReleasedProductionOrders.Page.al index 99d4855b1d..01022e7e1d 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ReleasedProductionOrders.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ReleasedProductionOrders.Page.al @@ -22,7 +22,7 @@ page 37049 "Released Production Orders" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37049 "Released Production Orders" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionc2dea8def8e17bcc1d69', Locked = true; + ReportPageLbl: Label 'ReportSectionc2dea8def8e17bcc1d69', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetAmt.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetAmt.Page.al index 5e0b701c7a..4b76085724 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetAmt.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetAmt.Page.al @@ -22,7 +22,7 @@ page 37008 "Sales Actual vs. Budget Amt." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37008 "Sales Actual vs. Budget Amt." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionce3be3bc80c816f2646b', Locked = true; + ReportPageLbl: Label 'ReportSectionce3be3bc80c816f2646b', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetQty.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetQty.Page.al index b6bc5b042f..b8eec30af2 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetQty.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesActualvsBudgetQty.Page.al @@ -22,7 +22,7 @@ page 37007 "Sales Actual vs. Budget Qty." trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37007 "Sales Actual vs. Budget Qty." SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection05f91a4884be2b5c94ed', Locked = true; + ReportPageLbl: Label 'ReportSection05f91a4884be2b5c94ed', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMonthToDate.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMonthToDate.Page.al index bcda6a9c4d..f670d34b27 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMonthToDate.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMonthToDate.Page.al @@ -22,7 +22,7 @@ page 37003 "Sales Month-To-Date" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37003 "Sales Month-To-Date" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection7d903e33b708c20e3be1', Locked = true; + ReportPageLbl: Label 'ReportSection7d903e33b708c20e3be1', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAnnualTotal.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAnnualTotal.Page.al index 7bd4cd3360..b7992beaa3 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAnnualTotal.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAnnualTotal.Page.al @@ -22,7 +22,7 @@ page 37001 "Sales Moving Annual Total" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37001 "Sales Moving Annual Total" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection713e48d18640066bc508', Locked = true; + ReportPageLbl: Label 'ReportSection713e48d18640066bc508', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAverage.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAverage.Page.al index f8cebd50a2..575bee2cc0 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAverage.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesMovingAverage.Page.al @@ -22,7 +22,7 @@ page 37000 "Sales Moving Average" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37000 "Sales Moving Average" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectionb41f5981e90364039035', Locked = true; + ReportPageLbl: Label 'ReportSectionb41f5981e90364039035', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesOverview.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesOverview.Page.al index 5e1b94372f..9760061e84 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesOverview.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesOverview.Page.al @@ -22,7 +22,7 @@ page 36998 "Sales Overview" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 36998 "Sales Overview" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection918285c1bd8f1b7ef96c', Locked = true; + ReportPageLbl: Label 'ReportSection918285c1bd8f1b7ef96c', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesPeriodOverPeriod.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesPeriodOverPeriod.Page.al index dd6ff506e3..7aa04fbefe 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesPeriodOverPeriod.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesPeriodOverPeriod.Page.al @@ -22,7 +22,7 @@ page 37002 "Sales Period-Over-Period" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37002 "Sales Period-Over-Period" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection2480499c371d97221c09', Locked = true; + ReportPageLbl: Label 'ReportSection2480499c371d97221c09', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesReport.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesReport.Page.al index 5cdafe75c4..c68cdd03d4 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesReport.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesReport.Page.al @@ -22,7 +22,7 @@ page 37060 "Sales Report" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -56,9 +56,7 @@ page 37060 "Sales Report" var SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; -#pragma warning disable AA0240 - ReportPageTok: Label '', Locked = true; -#pragma warning restore AA0240 + ReportPageLbl: Label '', Locked = true; trigger OnOpenPage() var diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyCustomer.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyCustomer.Page.al index d8b1d8446d..8c9c94c21b 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyCustomer.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyCustomer.Page.al @@ -22,7 +22,7 @@ page 37005 "Sales by Customer" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37005 "Sales by Customer" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection48bbd51044e094b7a9a2', Locked = true; + ReportPageLbl: Label 'ReportSection48bbd51044e094b7a9a2', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyItem.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyItem.Page.al index b03089a606..cc0c20f524 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyItem.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyItem.Page.al @@ -22,7 +22,7 @@ page 37004 "Sales by Item" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37004 "Sales by Item" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection913651e69467cecd580d', Locked = true; + ReportPageLbl: Label 'ReportSection913651e69467cecd580d', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyLocation.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyLocation.Page.al new file mode 100644 index 0000000000..5fe5568b3e --- /dev/null +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbyLocation.Page.al @@ -0,0 +1,71 @@ +namespace Microsoft.PowerBIReports; + +using System.Integration.PowerBI; + +page 37066 "Sales by Location" +{ + UsageCategory = ReportsAndAnalysis; + ApplicationArea = All; + PageType = Card; + Caption = 'Sales by Location'; + AboutTitle = 'About Sales by Location'; + AboutText = 'The Sales by Location report breaks down sales performance by location, highlighting metrics such as Sales Amount, Sales Quantity, Gross Profit and Gross Profit Margin.'; + Extensible = false; + + layout + { + area(Content) + { + usercontrol(PowerBIAddin; PowerBIManagement) + { + ApplicationArea = All; + + trigger ControlAddInReady() + begin + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); + end; + + trigger ErrorOccurred(Operation: Text; ErrorText: Text) + begin + SetupHelper.ShowPowerBIErrorNotification(Operation, ErrorText); + end; + } + } + } + + actions + { + area(processing) + { + action(FullScreen) + { + ApplicationArea = All; + Caption = 'Fullscreen'; + ToolTip = 'Shows the Power BI element as full screen.'; + Image = View; + Visible = false; + + trigger OnAction() + begin + CurrPage.PowerBIAddin.FullScreen(); + end; + } + } + } + + var + SetupHelper: Codeunit "Setup Helper"; + ReportId: Guid; +#pragma warning disable AA0240 + ReportPageLbl: Label 'da16feb02b930c2292e0', Locked = true; +#pragma warning restore AA0240 + + trigger OnOpenPage() + var + PowerBIReportsSetup: Record "PowerBI Reports Setup"; + begin + SetupHelper.EnsureUserAcceptedPowerBITerms(); + ReportId := SetupHelper.GetReportIdAndEnsureSetup(CurrPage.Caption(), PowerBIReportsSetup.FieldNo("Sales Report Id")); + end; +} + diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbySalesperson.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbySalesperson.Page.al index 7c46b2dac3..72b873c50c 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbySalesperson.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/SalesbySalesperson.Page.al @@ -22,7 +22,7 @@ page 37006 "Sales by Salesperson" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37006 "Sales by Salesperson" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSectiond95fc6aa44e9e612cbc4', Locked = true; + ReportPageLbl: Label 'ReportSectiond95fc6aa44e9e612cbc4', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/ScheduledReceipt.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/ScheduledReceipt.Page.al index eb726a9dec..f25d53018a 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/ScheduledReceipt.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/ScheduledReceipt.Page.al @@ -22,7 +22,7 @@ page 37028 "Scheduled Receipt" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37028 "Scheduled Receipt" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection5aaca347e8eb867da682', Locked = true; + ReportPageLbl: Label 'ReportSection5aaca347e8eb867da682', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Autogenerated/WorkCenterLoad.Page.al b/Apps/W1/PowerBIReports/app/src/Autogenerated/WorkCenterLoad.Page.al index 36428598a4..268ed1dc88 100644 --- a/Apps/W1/PowerBIReports/app/src/Autogenerated/WorkCenterLoad.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Autogenerated/WorkCenterLoad.Page.al @@ -22,7 +22,7 @@ page 37042 "Work Center Load" trigger ControlAddInReady() begin - SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageTok); + SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl); end; trigger ErrorOccurred(Operation: Text; ErrorText: Text) @@ -57,7 +57,7 @@ page 37042 "Work Center Load" SetupHelper: Codeunit "Setup Helper"; ReportId: Guid; #pragma warning disable AA0240 - ReportPageTok: Label 'ReportSection83a7395d207d5b47b1a4', Locked = true; + ReportPageLbl: Label 'ReportSection83a7395d207d5b47b1a4', Locked = true; #pragma warning restore AA0240 trigger OnOpenPage() diff --git a/Apps/W1/PowerBIReports/app/src/Core/Pages/AssistedSetup.Page.al b/Apps/W1/PowerBIReports/app/src/Core/Pages/AssistedSetup.Page.al index f056e292bc..75dd7f62cf 100644 --- a/Apps/W1/PowerBIReports/app/src/Core/Pages/AssistedSetup.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Core/Pages/AssistedSetup.Page.al @@ -526,19 +526,19 @@ page 36950 "Assisted Setup" Visible = ProjectTabVisible; group(JobLedgerFilters) { - Caption = 'Job Ledger Entry Filters'; - InstructionalText = 'Filters Job Ledger Entries'; + Caption = 'Project Ledger Entry Filters'; + InstructionalText = 'Filters Project Ledger Entries'; field(JobLedgerStartDate; Rec."Job Ledger Entry Start Date") { Caption = 'Start Date'; ApplicationArea = All; - ToolTip = 'Specifies the start date for Job Ledger Entries filter.'; + ToolTip = 'Specifies the start date for Project Ledger Entries filter.'; } field(JobLedgerEndDate; Rec."Job Ledger Entry End Date") { Caption = 'End Date'; ApplicationArea = All; - ToolTip = 'Specifies the end date for Job Ledger Entries Entries filter.'; + ToolTip = 'Specifies the end date for Project Ledger Entries Entries filter.'; } } field(ProjectsShowLess; ShowLessTxt) @@ -631,7 +631,7 @@ page 36950 "Assisted Setup" group(Complete) { Caption = 'All Done!'; - InstructionalText = 'You have finished the Assisted Setup for Power BI Connector. Copy your Power BI Connection string below for use in connecting your Power BI Reports. Choose Finish to complete the setup.'; + InstructionalText = 'You have finished the Assisted Setup for Power BI Connector. Copy your Power BI Connection Details below for use when setting up your Power BI Reports. Choose Finish to complete the setup.'; } group(ConnectionDetails) { diff --git a/Apps/W1/PowerBIReports/app/src/Core/PermissionSets/PowerBiReportBasic.PermissionSet.al b/Apps/W1/PowerBIReports/app/src/Core/PermissionSets/PowerBiReportBasic.PermissionSet.al index 0175fb165b..ed67d28847 100644 --- a/Apps/W1/PowerBIReports/app/src/Core/PermissionSets/PowerBiReportBasic.PermissionSet.al +++ b/Apps/W1/PowerBIReports/app/src/Core/PermissionSets/PowerBiReportBasic.PermissionSet.al @@ -36,7 +36,11 @@ permissionset 36951 "PowerBi Report Basic" page "General Ledger Setup" = X, page Locations = X, page "Power BI Selection Lookup" = X, +#if not CLEAN25 +#pragma warning disable AL0432 page "Purchasing Scorecard" = X, +#pragma warning restore AL0432 +#endif page "Salesperson/Purchasers" = X, page "PowerBI Reports Setup" = X, page Vendors = X, diff --git a/Apps/W1/PowerBIReports/app/src/Core/Tables/PowerBIReportsSetup.Table.al b/Apps/W1/PowerBIReports/app/src/Core/Tables/PowerBIReportsSetup.Table.al index c10ecfc87a..b7e00b9167 100644 --- a/Apps/W1/PowerBIReports/app/src/Core/Tables/PowerBIReportsSetup.Table.al +++ b/Apps/W1/PowerBIReports/app/src/Core/Tables/PowerBIReportsSetup.Table.al @@ -4,7 +4,6 @@ using System.DateTime; table 36951 "PowerBI Reports Setup" { - Access = Internal; Caption = 'Setup for Power BI Connector'; fields @@ -32,7 +31,7 @@ table 36951 "PowerBI Reports Setup" } field(4; "ISO Country Holidays"; Option) { - Caption = 'Iso Country Holidays'; + Caption = 'ISO Country Holidays'; OptionMembers = AT,AU,BE,CA,DE,ES,FR,GB,IT,NL,NO,PT,SE,US; OptionCaption = 'AT,AU,BE,CA,DE,ES,FR,GB,IT,NL,NO,PT,SE,US'; DataClassification = CustomerContent; diff --git a/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceFilterHelper.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceFilterHelper.Codeunit.al index 3b9855ab0b..28760a7605 100644 --- a/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceFilterHelper.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceFilterHelper.Codeunit.al @@ -13,7 +13,6 @@ codeunit 36954 "Finance Filter Helper" FilterRangeLbl: Label '%1..%2', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then begin if (PBISetup."Vend. Ledger Entry Start Date" = 0D) and (PBISetup."Vend. Ledger Entry End Date" = 0D) then exit(''); @@ -30,7 +29,6 @@ codeunit 36954 "Finance Filter Helper" FilterRangeLbl: Label '%1..%2', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then begin if (PBISetup."Cust. Ledger Entry Start Date" = 0D) and (PBISetup."Cust. Ledger Entry End Date" = 0D) then exit(''); @@ -47,7 +45,6 @@ codeunit 36954 "Finance Filter Helper" FilterRangeLbl: Label '%1..%2', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then begin if (PBISetup."Finance Start Date" = 0D) and (PBISetup."Finance End Date" = 0D) then exit(''); diff --git a/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceInstallationHandler.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceInstallationHandler.Codeunit.al index 93c775686b..fd890c785b 100644 --- a/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceInstallationHandler.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Finance/Codeunits/FinanceInstallationHandler.Codeunit.al @@ -24,16 +24,20 @@ codeunit 36953 "Finance Installation Handler" InitializePowerBIAccountCategories(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Account Category", 'r')] local procedure InitializePowerBIAccountCategories() var PowerBIAccountCategory: Record "Account Category"; begin - if PowerBIAccountCategory.IsEmpty() then begin - InsertL1AccountCategories(); - InsertL2AccountCategories(); - InsertL3AccountCategories(); - end; + if PowerBIAccountCategory.IsEmpty() then + RestorePowerBIAccountCategories(); + end; + + [InherentPermissions(PermissionObjectType::TableData, Database::"Account Category", 'r')] + procedure RestorePowerBIAccountCategories() + begin + InsertL1AccountCategories(); + InsertL2AccountCategories(); + InsertL3AccountCategories(); end; local procedure InsertL1AccountCategories() @@ -85,9 +89,11 @@ codeunit 36953 "Finance Installation Handler" NewPowerBIAccountCategory: Record "Account Category"; GLAccCatParentEntryNo: Integer; begin - NewPowerBIAccountCategory.Init(); - NewPowerBIAccountCategory."Account Category Type" := AccountCategoryType; - NewPowerBIAccountCategory.Insert(); + if not NewPowerBIAccountCategory.Get(AccountCategoryType) then begin + NewPowerBIAccountCategory.Init(); + NewPowerBIAccountCategory."Account Category Type" := AccountCategoryType; + NewPowerBIAccountCategory.Insert(); + end; if ValidateGLAccountCategory(GLAccCatEntryNo, GLAccCatIndentation, GLAccCatParentEntryNo) then begin NewPowerBIAccountCategory."G/L Acc. Category Entry No." := GLAccCatEntryNo; diff --git a/Apps/W1/PowerBIReports/app/src/Finance/Pages/AccountCategories.Page.al b/Apps/W1/PowerBIReports/app/src/Finance/Pages/AccountCategories.Page.al index b89825190b..823a517287 100644 --- a/Apps/W1/PowerBIReports/app/src/Finance/Pages/AccountCategories.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Finance/Pages/AccountCategories.Page.al @@ -1,6 +1,7 @@ namespace Microsoft.Finance.PowerBIReports; using Microsoft.Finance.GeneralLedger.Account; +using System.Utilities; page 36961 "Account Categories" { @@ -45,7 +46,8 @@ page 36961 "Account Categories" Rec."G/L Acc. Category Entry No." := GLAccountCategory."Entry No."; Rec."Parent Acc. Category Entry No." := GLAccountCategory."Parent Entry No."; - AccountCategoryDesc := GLAccountCategory.Description; + Text := GLAccountCategory.Description; + exit(true); end; end; @@ -70,9 +72,40 @@ page 36961 "Account Categories" } } + actions + { + area(Processing) + { + action(RestoreDefault) + { + ApplicationArea = All; + Caption = 'Restore Default G/L Account Categories'; + ToolTip = 'Restores the default G/L Account Category for each Power BI Account Category.'; + Image = Default; + + trigger OnAction() + var + FinanceInstallationHandler: Codeunit "Finance Installation Handler"; + ConfirmMgt: Codeunit "Confirm Management"; + begin + if ConfirmMgt.GetResponseOrDefault(ConfirmRestoreDefaultQst, false) then + FinanceInstallationHandler.RestorePowerBIAccountCategories(); + end; + } + } + area(Promoted) + { + group(Category_Process) + { + actionref(RestoreDefault_Promoted; RestoreDefault) { } + } + } + } + var AccountCategoryDesc: Text; AccountCategoryDescEditable: Boolean; + ConfirmRestoreDefaultQst: Label 'Are you sure you want to restore the default G/L Account Categories for each Power BI Account Category? This will overwrite any changes you have made.'; trigger OnNewRecord(BelowxRec: Boolean) begin diff --git a/Apps/W1/PowerBIReports/app/src/Inventory/Queries/JobPlanningLinesItem.Query.al b/Apps/W1/PowerBIReports/app/src/Inventory/Queries/JobPlanningLinesItem.Query.al index 0fdc62c972..207f15e37b 100644 --- a/Apps/W1/PowerBIReports/app/src/Inventory/Queries/JobPlanningLinesItem.Query.al +++ b/Apps/W1/PowerBIReports/app/src/Inventory/Queries/JobPlanningLinesItem.Query.al @@ -5,7 +5,7 @@ using Microsoft.Projects.Project.Planning; query 36969 "Job Planning Lines - Item" { Access = Internal; - Caption = 'Power BI Job Planning Lines'; + Caption = 'Power BI Project Planning Lines'; QueryType = API; APIPublisher = 'microsoft'; APIGroup = 'analytics'; diff --git a/Apps/W1/PowerBIReports/app/src/Manufacturing/Codeunits/ManufFilterHelper.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Manufacturing/Codeunits/ManufFilterHelper.Codeunit.al index 2e99cd8078..4bba6bd2e4 100644 --- a/Apps/W1/PowerBIReports/app/src/Manufacturing/Codeunits/ManufFilterHelper.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Manufacturing/Codeunits/ManufFilterHelper.Codeunit.al @@ -13,7 +13,6 @@ codeunit 36955 "Manuf. Filter Helper" RelativeFilterLbl: Label '%1..', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then case PBISetup."Manufacturing Load Date Type" of PBISetup."Manufacturing Load Date Type"::"Start/End Date": @@ -43,7 +42,6 @@ codeunit 36955 "Manuf. Filter Helper" RelativeFilterLbl: Label '%1..', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then case PBISetup."Manufacturing Load Date Type" of PBISetup."Manufacturing Load Date Type"::"Start/End Date": diff --git a/Apps/W1/PowerBIReports/app/src/Projects/Codeunits/ProjectFilterHelper.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Projects/Codeunits/ProjectFilterHelper.Codeunit.al index f94bbcd056..fe4fdfa632 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/Codeunits/ProjectFilterHelper.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/Codeunits/ProjectFilterHelper.Codeunit.al @@ -12,7 +12,6 @@ codeunit 36956 "Project Filter Helper" FilterRangeLbl: Label '%1..%2', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then begin if (PBISetup."Job Ledger Entry Start Date" = 0D) and (PBISetup."Job Ledger Entry End Date" = 0D) then exit(''); diff --git a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobLedgerEntries.Query.al b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobLedgerEntries.Query.al index 6cadf1df87..fbcc8286be 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobLedgerEntries.Query.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobLedgerEntries.Query.al @@ -6,7 +6,7 @@ query 36992 "Job Ledger Entries" { Access = Internal; QueryType = API; - Caption = 'Power BI Job Ledger Entry'; + Caption = 'Power BI Project Ledger Entry'; APIPublisher = 'microsoft'; APIGroup = 'analytics'; APIVersion = 'v0.5'; diff --git a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobPlanningLines.Query.al b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobPlanningLines.Query.al index 6b5d4e7942..3154d41438 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobPlanningLines.Query.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobPlanningLines.Query.al @@ -6,7 +6,7 @@ query 36993 "Job Planning Lines" { Access = Internal; QueryType = API; - Caption = 'Power BI Job Planning Line'; + Caption = 'Power BI Project Planning Line'; APIPublisher = 'microsoft'; APIGroup = 'analytics'; APIVersion = 'v0.5'; diff --git a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobTasks.Query.al b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobTasks.Query.al index 6ff62815f3..9b2e948de1 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobTasks.Query.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/Queries/JobTasks.Query.al @@ -6,7 +6,7 @@ query 36994 "Job Tasks" { Access = Internal; QueryType = API; - Caption = 'Power BI Job Tasks'; + Caption = 'Power BI Project Tasks'; APIPublisher = 'microsoft'; APIGroup = 'analytics'; APIVersion = 'v0.5'; diff --git a/Apps/W1/PowerBIReports/app/src/Projects/Queries/Jobs.Query.al b/Apps/W1/PowerBIReports/app/src/Projects/Queries/Jobs.Query.al index d5733bd41f..969dea6446 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/Queries/Jobs.Query.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/Queries/Jobs.Query.al @@ -6,7 +6,7 @@ query 36995 Jobs { Access = Internal; QueryType = API; - Caption = 'Power BI Job'; + Caption = 'Power BI Project'; APIPublisher = 'microsoft'; APIGroup = 'analytics'; APIVersion = 'v0.5'; diff --git a/Apps/W1/PowerBIReports/app/src/Projects/TableExtensions/SetupProjects.TableExt.al b/Apps/W1/PowerBIReports/app/src/Projects/TableExtensions/SetupProjects.TableExt.al index a9aabfaab9..fd2a9b63df 100644 --- a/Apps/W1/PowerBIReports/app/src/Projects/TableExtensions/SetupProjects.TableExt.al +++ b/Apps/W1/PowerBIReports/app/src/Projects/TableExtensions/SetupProjects.TableExt.al @@ -8,12 +8,12 @@ tableextension 36955 "Setup - Projects" extends "PowerBI Reports Setup" { field(36962; "Job Ledger Entry Start Date"; Date) { - Caption = 'Job Ledger Entry Start Date'; + Caption = 'Project Ledger Entry Start Date'; DataClassification = CustomerContent; } field(36963; "Job Ledger Entry End Date"; Date) { - Caption = 'Job Ledger Entry End Date'; + Caption = 'Project Ledger Entry End Date'; DataClassification = CustomerContent; } field(36976; "Projects Report Id"; Guid) diff --git a/Apps/W1/PowerBIReports/app/src/Purchasing/Codeunits/PurchasesFilterHelper.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Purchasing/Codeunits/PurchasesFilterHelper.Codeunit.al index 876d254e8e..8223b133ff 100644 --- a/Apps/W1/PowerBIReports/app/src/Purchasing/Codeunits/PurchasesFilterHelper.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Purchasing/Codeunits/PurchasesFilterHelper.Codeunit.al @@ -13,7 +13,6 @@ codeunit 36958 "Purchases Filter Helper" RelativeFilterLbl: Label '%1..', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then case PBISetup."Item Purch. Load Date Type" of PBISetup."Item Purch. Load Date Type"::"Start/End Date": diff --git a/Apps/W1/PowerBIReports/app/src/Purchasing/Pages/PurchasingScorecard.Page.al b/Apps/W1/PowerBIReports/app/src/Purchasing/Pages/PurchasingScorecard.Page.al index 546d74791b..d773e75e58 100644 --- a/Apps/W1/PowerBIReports/app/src/Purchasing/Pages/PurchasingScorecard.Page.al +++ b/Apps/W1/PowerBIReports/app/src/Purchasing/Pages/PurchasingScorecard.Page.al @@ -1,49 +1,15 @@ +#pragma warning disable AS0072 +#if not CLEAN25 namespace Microsoft.Purchases.PowerBIReports; -using System.Integration.PowerBI; - page 36962 "Purchasing Scorecard" { Caption = 'Purchasing Scorecard'; - AboutTitle = 'About purchasing scorecard.'; - AboutText = 'Here, you can embed your Power BI scorecard you have created for purchasing, allow you to track your key business objectives in a single view.'; PageType = Card; - UsageCategory = ReportsAndAnalysis; - ApplicationArea = All; - ContextSensitiveHelpPage = 'track-kpis-with-power-bi-metrics'; Extensible = false; - - layout - { - area(Content) - { - part(EmbeddedReport; "Power BI Embedded Report Part") - { - ApplicationArea = All; - Caption = 'Purchase Overview'; - SubPageView = where(Context = const('53023-purchasing-scorecard')); - } - } - } - - var - PowerBiNotSetupErr: Label 'Power BI is not set up. You need to set up Power BI in order to see this report.'; - ContextTxt: Label '53023-purchasing-scorecard', MaxLength = 30, Locked = true, Comment = 'IMPORTANT: keep it unique across pages. Also, make sure this value is the same used in the SubPageView above.'; - - trigger OnOpenPage() - var - PowerBIContextSettings: Record "Power BI Context Settings"; - PowerBIEmbedSetupWizard: Page "Power BI Embed Setup Wizard"; - begin - PowerBIContextSettings.SetRange(UserSID, UserSecurityId()); - if PowerBIContextSettings.IsEmpty() then begin - PowerBIEmbedSetupWizard.SetContext(ContextTxt); - if PowerBIEmbedSetupWizard.RunModal() <> Action::OK then; - - if PowerBIContextSettings.IsEmpty() then - Error(PowerBiNotSetupErr); - end; - - // CurrPage.EmbeddedReport.Page.SetFullPageMode(true); // FIXME: Full page mode feature not yet implemented in v24 - end; -} \ No newline at end of file + ObsoleteState = Pending; + ObsoleteReason = 'Scorecard pages will be added in future releases. Please don''t reference this page.'; + ObsoleteTag = '25.0'; +} +#endif +#pragma warning restore AS0072 \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/app/src/Sales/Codeunits/SalesFilterHelper.Codeunit.al b/Apps/W1/PowerBIReports/app/src/Sales/Codeunits/SalesFilterHelper.Codeunit.al index bd2bd4b1ba..2d36f2b45c 100644 --- a/Apps/W1/PowerBIReports/app/src/Sales/Codeunits/SalesFilterHelper.Codeunit.al +++ b/Apps/W1/PowerBIReports/app/src/Sales/Codeunits/SalesFilterHelper.Codeunit.al @@ -13,7 +13,6 @@ codeunit 36960 "Sales Filter Helper" RelativeFilterLbl: Label '%1..', Locked = true; FilterTxt: Text; begin - Clear(FilterTxt); if PBISetup.Get() then case PBISetup."Item Sales Load Date Type" of PBISetup."Item Sales Load Date Type"::"Start/End Date": diff --git a/Apps/W1/PowerBIReports/powerbi-reports.code-workspace b/Apps/W1/PowerBIReports/powerbi-reports.code-workspace new file mode 100644 index 0000000000..53e74042aa --- /dev/null +++ b/Apps/W1/PowerBIReports/powerbi-reports.code-workspace @@ -0,0 +1,16 @@ +{ + "folders": [ + { + "name": "app", + "path": "app" + }, + { + "name": "test", + "path": "test" + }, + { + "name": "test-library", + "path": "test-library" + } + ] +} \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/test-library/app.json b/Apps/W1/PowerBIReports/test-library/app.json new file mode 100644 index 0000000000..b15469c3a3 --- /dev/null +++ b/Apps/W1/PowerBIReports/test-library/app.json @@ -0,0 +1,46 @@ +{ + "id": "b4e48c9c-0deb-49a4-ae70-662b33565b1b", + "name": "PowerBI Reports Test Library", + "publisher": "Microsoft", + "version": "26.0.0.0", + "brief": "Test library for PowerBI Reports", + "description": "Test library for PowerBI Reports", + "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", + "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", + "help": "https://go.microsoft.com/fwlink/?linkid=2104024", + "url": "https://go.microsoft.com/fwlink/?LinkId=724011", + "contextSensitiveHelpUrl": "https://learn.microsoft.com/dynamics365/business-central/", + "logo": "assets/ExtensionLogo.png", + "dependencies": [ + { + "id": "e4e86220-cac0-4ec3-b853-7c2fa610399d", + "name": "PowerBI Reports", + "publisher": "Microsoft", + "version": "26.0.0.0" + }, + { + "id": "5d86850b-0d76-4eca-bd7b-951ad998e997", + "publisher": "Microsoft", + "name": "Tests-TestLibraries", + "version": "26.0.0.0" + } + ], + "screenshots": [], + "application": "26.0.0.0", + "platform": "26.0.0.0", + "target": "OnPrem", + "idRanges": [ + { + "from": 139792, + "to": 139796 + } + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "features": [ + "TranslationFile" + ] +} \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/test-library/assets/ExtensionLogo.png b/Apps/W1/PowerBIReports/test-library/assets/ExtensionLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..4d2c9a626cb9617350617c40cd73904129d4c108 GIT binary patch literal 5446 zcma)=S5VVywD$iAMIcgC2u+$uktV%J6$Dhev_NQrfC^Fsq!|cJ=^|Z`P&U*^N-uuwi#_w5i!*aB*89x5SkKKnv*ua91anhEW+omc005Zp+`e`1 zOsW4C1O3^nWxbYuCX9Z!?E(M*a`E2+jm<_J0|5K}om)4pLZ&wJ&3t(K(|ffcq#?ky z#^aeQO#|lO9vyUeb0ezqQtpipl3Sj#-xy!eh7lu@5+BnW zNhL-~3Zpw&1u=bMN*Q(sgYksq4dM>Iw7p&Qk_Su~b*PgEs#LK~^K}aDaTG_6Q?_tM<8wOS}`Z+?~Et8GB>T%(k7$9`DL!d5)f!ZoXco-vj+s_QLEs2cf zKM&F>#c9w|TmM9MFtl8L*cYQgl9khf5CYMR)DJOUf;M~a9|+ys@RYR zCusNC(CSlUk|r`qdS&ZKh$O=@#&e0>;W~S#|KjHdfLx!-J9r1JtP4RGIhS|Rm0eZ6 z7eOE~Zfo4Li~K^|&)d^-r?8Rh2Q}#ZjL=?VJZ7~hlp4(!U!0K%679I`OR&x54*0&4 znho|hKu)WR)4PUVA1}N;jXHg}AG+gSKQ6O_fEP^Y51!LwBERH09|t!GNx2KH4co>r zA%cgSHxh2Sezx-w!S5DTG#0zVCbnLM6BP}2P-G{8 zh**wJHj<652FS05bSQNx-0fS7^(wREYvZwpt;$!!k4H0U*iyhS8(syBDMv>L<)~LI zPl!Y^-cM{_J@{hY1=XJ#T=Ef(FD!I^r1^lca3c0ftVuvo-(%!Zn)C1bK{}-i*Jc); zIIc+o&iMgvboj&4`@5sF23MV!*zIVmA0>{1;*H*faMAG6EZ7XydTfaGyABAGx>)yl z@Y+|)SVxCx@!GWqspay7GBetK*s2@CJ?s{8v!(b|ShLb|O;3T1rAMB?DJ?Z`@013q zoyIvV84eYiS+?kRJOz`3AFcR~ZQ1Uq7wCnbSJ%-HZwhAnJ^4zDp2W8I)~WI7ush5> z&f3O)rj~2ZGr!c@=p3!n>jG-O#9`$7&WyF7bB}(rq4ldokUp5TY?E62r+YJbJp8Jf znDW3fYZ^nBQ9O}3?zH_*mZ9+G#HHnwop1Vfm!Df~{Z%D?5KzMN&RA>&#q8iCzTfAt zV#TyMeyyh8=M$8tyA|KeUwo_Q6Si)P)%n(W-*QE~08BG|>J!sQPq?IF;;%1ypP?Z` zK_0Un>p;9=9d675ELHboC0+fNMY&(;k(|=0TS>ka)BKI3q#)zx!Jp@zv0QfeEAjU< z=vI5@-d^A^-*#|P+b2QFiGxk4z<8Tp4p6{aOp88x>SQEa0M`VxX%IUb$bya!5EgRf6$fFw zp}jNTKUXjNe0x(;)Nu)Ij5K?QD0u6~mRHQ-!;6m#VP>)}=irAqy;f$e{W-EWnR75~ zm2b0u@r7ASk4x0oTqs9{f&F|eAmD*Gf^A;te7f}J{dXqLaH_4%D_(mnp0VmWhq>^E z&7>5*-mh>FX{w5SJf^#th&GrpOQk58U-+4 zq3$q~C4ySH7@lr>W+|c0`UF*ieC+3vC1$4m}F(ic|G7}QDt(t z7`#>$c4U-4LU_;nWHhdN9Fcv~L8h6M_}nW&EGTjgW(=c}uD9>eU^rDOrkNg_effOV z^8z_y=vNIt{`wOfgG2o^3ey`R!aP1=t7Mz@&MKK3>_BH_QkgNO@4IoQ-2d8EqsDg) zTMb-5lqlubRot-7!RD@+udO?O9_Da3XV5bvjW zXTb2psHUdeiIaI(lknQE_<+YlY31}R!VfoM_BuILQ{>Q89=LB5j;V|-yAW2gY82+~ zYlu~#*R(cHw2NO1h5xaiAD2oiIEQ-aQyA-D^y^z2ZHNfM{o(3M#SbqOP3>k9FOdDO z(t%c9hk)NCPe_8>=Y^U-_-6IwS-D0cE=pwdyLp!;r-fWiXtbUS$<dl!~WV$TR8 zP$KU?K>m?*O)mSGccn&kn|nj7NXFeo<0D=ue8s^~BK#P?J~gB}v5<0nK9GPipjT#9 zkm6yXFyLlgoUIDEVxw*0Z-WDqp8swCs(bcjAqdDLl1oUqYf#a`NjT6IO3?=P`FvUZ zlWC&lWb9_dexSz%N~-oscM`oC%b#KS|KS7AptwRX5h&1VDCKWzP{&??TFdF3h53&c zU(v)WhOr)#!V6Y6d7CzOO-@KF%@67>kh34@Exj7Rh}p5_0?yUeyC7@c7DHf+mW=~wpLeLYDA9#W-Ri*S|M@g zjPHH@qHrPuzq(+5y$V*UoFEg(g$$mRNUEF!C{IN3Rig{tU54W|OD_`M0G3u)B{WhC z*D?hTF7J+YdF8-Z-Uuw{3jBx`_!aus`uDDBecwuu&tsVpj2~DZJb2-!a2l??m{}er}lR6Lqu)-2+Vm)jr(g{nfQPx9-<^1d;k-d zkU{E^g7qwp+D`b+QtU5@+swaVKp9<`>sT~U)O!EEMBo!*)~s_<`6Yl z7fX2;ki>kVDfdietW1k;TYvaY({>?5X)&(d&_y<-J7Qa@b z(zwGCI=`P#^b>1>2#Y!9T5|AdtaU|zXxw9^KpIu6CAmQf$GzaeOJmYVsc3eh5%6lb z)t~(Ak2J`;KW_L6psME-h?xF6ryr4d{q;>-b`Q$L43T{r`{N?U6cqP(Q3f%kA8`c@ z<82KXjte|7u_Lo~MV!d%y$tYi(hzU$6t+*ml~Z&Mg{eK?@}^XEBK+-&j`Uv95x)=_ zZLs=Mpg_IuZenjm(~}b8Aggaaje8NX$A_7^G%-)!xtu)C{N|S<3hVOmU;{|i+q6zn zfr(1Ua*jF!%-dU3L}O2fvWAe%-4kxtXo_vJHF(AxSx)4AI8-$^uBQO_86Z_y%RZX4 zJpu5`pOAztxv?jXv9yx|r>#9!0|`71C-fli@v${6r+V$hgvcr|W_I`{=7*0s(PKQH zzn8r2+tSeD15stz|DIJ3%X%8EkyN?bsHhuq4(5D0Oewn_)-o)Nx$eNs{0V*ZTSVt4 z3ifXGGw5fBv+9b6d~Nl+08L4VbbZqf3DL^e?l@!uZVdWkdOpJPaE?{zF!ZI?c(vF3 zvX~OK4vktvm&R$MgNpiKA~&zT!1#H7!q1h7AQiuSNG9<=$64)Zym(UQ``(j#^hDzt}{aur0pS?mmBi&z4I0Jfieqh%Pa_A%N?_1OZHm-S{ zQ*)4(N_J;y7tRh0o>xs25-s9!M-)i;@I68#SGXB2XgS}N zx_r3%V)z1jLA_M&?)E^DT$kzdHMJF%e2w6BH@iI5tKWM+zcuhCsz@N0a_1RBvrdZx zjzD>V%;c4*$RkEv{zHuVyaB+ANl(iT8w{pJdziC7YcO2&(ciqGLhs@q-dNh! zkV_V_(_~$*>ND}j1yozMedYnu-_GKMh?IpP<@D+edeB4M%3@xr3oj{@mdFKoBVpm^)1_}Y^}rOWBSB|Uv)*-pTdiU ztW9~{qq5@iB+$QpbeJVKH^n^9vV})i>Z@2CHoY2$PC888c;#Yz-pHRK@EVheWhE!> zZzjPmy?0Ni8#=o_k6_s3DY7nS^&Bm}BW&ZfAuF7bQbDgAGM$dE)RM6RvdobKb&MhsYD4exRm9*jcHPjbz#rI?vj$u zPLF5Gjv|8}?ta9`&^H}Va3H;llghU-BC7pxo6?-eTP`7CUZHJrw{5 zhkDYeIYlhL%brQJ1X#<#fz#E}Z87Kj=Hde*f{l|A`9E my8jz0{9hgZgN;Rh%;ug!HJ{lE_@04L;EulOt!iDD=>G@$cU!Ii literal 0 HcmV?d00001 diff --git a/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIEndpoints.Enum.al b/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIEndpoints.Enum.al new file mode 100644 index 0000000000..52f24f2f7f --- /dev/null +++ b/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIEndpoints.Enum.al @@ -0,0 +1,161 @@ +namespace Microsoft.PowerBIReports.Test; + +enum 139793 "PowerBI API Endpoints" +{ + value(1; "Vendor Ledger Entries") + { + } + value(2; "Customer Ledger Entries") + { + } + value(3; "G/L Accounts") + { + } + value(4; "G/L Account Categories") + { + } + value(5; "G/L Budgets") + { + } + value(6; "G/L Budget Entries") + { + } + value(7; "G/L Entries - Income Statement") + { + } + value(8; "G/L Entries - Balance Sheet") + { + } + value(9; "G/L Entries - Closing") + { + } + value(10; "Sales Lines - Outstanding") + { + } + value(11; "Purchase Lines - Outstanding") + { + } + value(12; "Requisition Lines") + { + } + value(13; "Transfer Lines") + { + } + value(14; "Service Lines - Order") + { + } + value(15; "Item Ledger Entries") + { + } + value(16; "Warehouse Activity Lines") + { + } + value(17; "Warehouse Entries") + { + } + value(18; "Whse. Journal Lines - From Bin") + { + } + value(19; "Whse. Journal Lines - To Bin") + { + } + value(20; "Value Entries - Item") + { + } + value(21; "Assembly Headers - Order") + { + } + value(22; "Assembly Lines - Item") + { + } + value(23; "Job Planning Lines - Item") + { + } + value(24; "Prod. Order Lines - Invt.") + { + } + value(25; "Prod. Order Comp. - Invt.") + { + } + value(26; "Planning Components") + { + } + value(27; Zones) + { + } + value(28; Bins) + { + } + value(29; "Calendar Entries") + { + } + value(30; "Machine Centers") + { + } + value(31; "Work Centers") + { + } + value(32; "Prod. Order Lines - Manuf.") + { + } + value(33; "Prod. Order Routing Lines") + { + } + value(34; "Item Ledger Entries - Prod.") + { + } + value(35; "Capacity Ledger Entries") + { + } + value(36; "Prod. Order Capacity Needs") + { + } + value(37; "Prod. Order Comp. - Manuf.") + { + } + value(38; "Jobs") + { + } + value(39; "Job Tasks") + { + } + value(40; "Job Planning Lines") + { + } + value(41; "Job Ledger Entries") + { + } + value(42; "Purch. Lines - Job Outstanding") + { + } + value(43; "Purch. Lines - Job Received") + { + } + value(44; "Purch. Lines - Item Outstd.") + { + } + value(45; "Item Budget Entries - Purch.") + { + } + value(46; "Value Entries - Purch.") + { + } + value(47; "Purch. Lines - Item Received") + { + } + value(48; "Item Budget Names") + { + } + value(49; "Sales Line - Item Outstanding") + { + } + value(50; "Item Budget Entries - Sales") + { + } + value(51; "Value Entries - Sales") + { + } + value(52; "Sales Line - Item Shipped") + { + } +} \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIRequests.Codeunit.al b/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIRequests.Codeunit.al new file mode 100644 index 0000000000..9c78aa5dc9 --- /dev/null +++ b/Apps/W1/PowerBIReports/test-library/src/PowerBIAPIRequests.Codeunit.al @@ -0,0 +1,153 @@ +namespace Microsoft.PowerBIReports.Test; + +using Microsoft.Finance.PowerBIReports; +using Microsoft.Sales.PowerBIReports; +using Microsoft.Manufacturing.PowerBIReports; +using Microsoft.Projects.PowerBIReports; +using Microsoft.Purchases.PowerBIReports; +using Microsoft.Inventory.PowerBIReports; + +codeunit 139792 "PowerBI API Requests" +{ + procedure GetFilterForQueryScenario(Scenario: Enum "PowerBI Filter Scenarios"): Text + var + FinanceFilterHelper: Codeunit "Finance Filter Helper"; + SalesFilterHelper: Codeunit "Sales Filter Helper"; + ManufacturingFilterHelper: Codeunit "Manuf. Filter Helper"; + ProjectFilterHelper: Codeunit "Project Filter Helper"; + PurchasesFilterHelper: Codeunit "Purchases Filter Helper"; + begin + case Scenario of + Scenario::"Finance Date": + exit(FinanceFilterHelper.GenerateFinanceReportDateFilter()); + Scenario::"Sales Date": + exit(SalesFilterHelper.GenerateItemSalesReportDateFilter()); + Scenario::"Manufacturing Date": + exit(ManufacturingFilterHelper.GenerateManufacturingReportDateFilter()); + Scenario::"Manufacturing Date Time": + exit(ManufacturingFilterHelper.GenerateManufacturingReportDateTimeFilter()); + Scenario::"Project Date": + exit(ProjectFilterHelper.GenerateJobLedgerDateFilter()); + Scenario::"Purchases Date": + exit(PurchasesFilterHelper.GenerateItemPurchasesReportDateFilter()); + end; + end; + + procedure GetEndpointUrl(PowerBIEndpoint: Enum "PowerBI API Endpoints"): Text + begin + case PowerBIEndpoint of + PowerBIEndpoint::"Vendor Ledger Entries": + exit(GetQueryUrlFromObjectId(Query::"Vendor Ledger Entries")); + PowerBIEndpoint::"Customer Ledger Entries": + exit(GetQueryUrlFromObjectId(Query::"Customer Ledger Entries")); + PowerBIEndpoint::"G/L Accounts": + exit(GetQueryUrlFromObjectId(Query::"G/L Accounts")); + PowerBIEndpoint::"G/L Account Categories": + exit(GetQueryUrlFromObjectId(Query::"G/L Account Categories")); + PowerBIEndpoint::"G/L Budgets": + exit(GetQueryUrlFromObjectId(Query::"G/L Budgets")); + PowerBIEndpoint::"G/L Budget Entries": + exit(GetQueryUrlFromObjectId(Query::"G/L Budget Entries")); + PowerBIEndpoint::"G/L Entries - Income Statement": + exit(GetQueryUrlFromObjectId(Query::"G/L Entries - Income Statement")); + PowerBIEndpoint::"G/L Entries - Balance Sheet": + exit(GetQueryUrlFromObjectId(Query::"G\L Entries - Balance Sheet")); + PowerBIEndpoint::"G/L Entries - Closing": + exit(GetQueryUrlFromObjectId(Query::"G/L Entries - Closing")); + PowerBIEndpoint::"Sales Lines - Outstanding": + exit(GetQueryUrlFromObjectId(Query::"Sales Lines - Outstanding")); + PowerBIEndpoint::"Purchase Lines - Outstanding": + exit(GetQueryUrlFromObjectId(Query::"Purchase Lines - Outstanding")); + PowerBIEndpoint::"Requisition Lines": + exit(GetQueryUrlFromObjectId(Query::"Requisition Lines")); + PowerBIEndpoint::"Transfer Lines": + exit(GetQueryUrlFromObjectId(Query::"Transfer Lines")); + PowerBIEndpoint::"Service Lines - Order": + exit(GetQueryUrlFromObjectId(Query::"Service Lines - Order")); + PowerBIEndpoint::"Item Ledger Entries": + exit(GetQueryUrlFromObjectId(Query::"Item Ledger Entries")); + PowerBIEndpoint::"Warehouse Activity Lines": + exit(GetQueryUrlFromObjectId(Query::"Warehouse Activity Lines")); + PowerBIEndpoint::"Warehouse Entries": + exit(GetQueryUrlFromObjectId(Query::"Warehouse Entries")); + PowerBIEndpoint::"Whse. Journal Lines - From Bin": + exit(GetQueryUrlFromObjectId(Query::"Whse. Journal Lines - From Bin")); + PowerBIEndpoint::"Whse. Journal Lines - To Bin": + exit(GetQueryUrlFromObjectId(Query::"Whse. Journal Lines - To Bin")); + PowerBIEndpoint::"Value Entries - Item": + exit(GetQueryUrlFromObjectId(Query::"Value Entries - Item")); + PowerBIEndpoint::"Assembly Headers - Order": + exit(GetQueryUrlFromObjectId(Query::"Assembly Headers - Order")); + PowerBIEndpoint::"Assembly Lines - Item": + exit(GetQueryUrlFromObjectId(Query::"Assembly Lines - Item")); + PowerBIEndpoint::"Job Planning Lines - Item": + exit(GetQueryUrlFromObjectId(Query::"Job Planning Lines - Item")); + PowerBIEndpoint::"Prod. Order Lines - Invt.": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Lines - Invt.")); + PowerBIEndpoint::"Prod. Order Comp. - Invt.": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Comp. - Invt.")); + PowerBIEndpoint::"Planning Components": + exit(GetQueryUrlFromObjectId(Query::"Planning Components")); + PowerBIEndpoint::Zones: + exit(GetQueryUrlFromObjectId(Query::Zones)); + PowerBIEndpoint::Bins: + exit(GetQueryUrlFromObjectId(Query::Bins)); + PowerBIEndpoint::"Calendar Entries": + exit(GetQueryUrlFromObjectId(Query::"Calendar Entries")); + PowerBIEndpoint::"Machine Centers": + exit(GetQueryUrlFromObjectId(Query::"Machine Centers")); + PowerBIEndpoint::"Work Centers": + exit(GetQueryUrlFromObjectId(Query::"Work Centers")); + PowerBIEndpoint::"Prod. Order Lines - Manuf.": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Lines - Manuf.")); + PowerBIEndpoint::"Prod. Order Routing Lines": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Routing Lines")); + PowerBIEndpoint::"Item Ledger Entries - Prod.": + exit(GetQueryUrlFromObjectId(Query::"Item Ledger Entries - Prod.")); + PowerBIEndpoint::"Capacity Ledger Entries": + exit(GetQueryUrlFromObjectId(Query::"Capacity Ledger Entries")); + PowerBIEndpoint::"Prod. Order Capacity Needs": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Capacity Needs")); + PowerBIEndpoint::"Prod. Order Comp. - Manuf.": + exit(GetQueryUrlFromObjectId(Query::"Prod. Order Comp. - Manuf.")); + PowerBIEndpoint::Jobs: + exit(GetQueryUrlFromObjectId(Query::Jobs)); + PowerBIEndpoint::"Job Tasks": + exit(GetQueryUrlFromObjectId(Query::"Job Tasks")); + PowerBIEndpoint::"Job Planning Lines": + exit(GetQueryUrlFromObjectId(Query::"Job Planning Lines")); + PowerBIEndpoint::"Job Ledger Entries": + exit(GetQueryUrlFromObjectId(Query::"Job Ledger Entries")); + PowerBIEndpoint::"Purch. Lines - Job Outstanding": + exit(GetQueryUrlFromObjectId(Query::"Purch. Lines - Job Outstanding")); + PowerBIEndpoint::"Purch. Lines - Job Received": + exit(GetQueryUrlFromObjectId(Query::"Purch. Lines - Job Received")); + PowerBIEndpoint::"Purch. Lines - Item Outstd.": + exit(GetQueryUrlFromObjectId(Query::"Purch. Lines - Item Outstd.")); + PowerBIEndpoint::"Item Budget Names": + exit(GetQueryUrlFromObjectId(Query::"Item Budget Names")); + PowerBIEndpoint::"Item Budget Entries - Purch.": + exit(GetQueryUrlFromObjectId(Query::"Item Budget Entries - Purch.")); + PowerBIEndpoint::"Value Entries - Purch.": + exit(GetQueryUrlFromObjectId(Query::"Value Entries - Purch.")); + PowerBIEndpoint::"Purch. Lines - Item Received": + exit(GetQueryUrlFromObjectId(Query::"Purch. Lines - Item Received")); + PowerBIEndpoint::"Sales Line - Item Outstanding": + exit(GetQueryUrlFromObjectId(Query::"Sales Line - Item Outstanding")); + PowerBIEndpoint::"Item Budget Entries - Sales": + exit(GetQueryUrlFromObjectId(Query::"Item Budget Entries - Sales")); + PowerBIEndpoint::"Value Entries - Sales": + exit(GetQueryUrlFromObjectId(Query::"Value Entries - Sales")); + PowerBIEndpoint::"Sales Line - Item Shipped": + exit(GetQueryUrlFromObjectId(Query::"Sales Line - Item Shipped")); + end; + end; + + local procedure GetQueryUrlFromObjectId(ObjectId: Integer): Text + var + LibGraphMgt: Codeunit "Library - Graph Mgt"; + begin + exit(LibGraphMgt.CreateQueryTargetURL(ObjectId, '')); + end; + +} \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/test-library/src/PowerBIFilterScenarios.Enum.al b/Apps/W1/PowerBIReports/test-library/src/PowerBIFilterScenarios.Enum.al new file mode 100644 index 0000000000..ddd4620e65 --- /dev/null +++ b/Apps/W1/PowerBIReports/test-library/src/PowerBIFilterScenarios.Enum.al @@ -0,0 +1,29 @@ +namespace Microsoft.PowerBIReports.Test; + +enum 139792 "PowerBI Filter Scenarios" +{ + value(1; "Sales Date") + { + Caption = 'Sales Date'; + } + value(2; "Manufacturing Date") + { + Caption = 'Manufacturing Date'; + } + value(3; "Manufacturing Date Time") + { + Caption = 'Manufacturing Date Time'; + } + value(4; "Project Date") + { + Caption = 'Project Date'; + } + value(5; "Purchases Date") + { + Caption = 'Purchases Date'; + } + value(6; "Finance Date") + { + Caption = 'Finance Date'; + } +} \ No newline at end of file diff --git a/Apps/W1/PowerBIReports/test/app.json b/Apps/W1/PowerBIReports/test/app.json index 4f0a7b430a..3a7c876be9 100644 --- a/Apps/W1/PowerBIReports/test/app.json +++ b/Apps/W1/PowerBIReports/test/app.json @@ -41,6 +41,12 @@ "name": "PowerBI Reports", "publisher": "Microsoft", "version": "26.0.0.0" + }, + { + "id": "b4e48c9c-0deb-49a4-ae70-662b33565b1b", + "name": "PowerBI Reports Test Library", + "publisher": "Microsoft", + "version": "26.0.0.0" } ], "screenshots": [], diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBICoreTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBICoreTest.Codeunit.al index 7f5fadda74..48d53dd9df 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBICoreTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBICoreTest.Codeunit.al @@ -1,10 +1,7 @@ namespace Microsoft.Finance.PowerBIReports.Test; using Microsoft.PowerBIReports; -using Microsoft.Sales.PowerBIReports; -using Microsoft.Purchases.PowerBIReports; -using Microsoft.Manufacturing.PowerBIReports; -using Microsoft.Finance.PowerBIReports; +using Microsoft.PowerBIReports.Test; using System.TestLibraries.Security.AccessControl; codeunit 139875 "PowerBI Core Test" @@ -15,12 +12,13 @@ codeunit 139875 "PowerBI Core Test" var Assert: Codeunit Assert; PermissionsMock: Codeunit "Permissions Mock"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; + FilterScenario: Enum "PowerBI Filter Scenarios"; [Test] procedure TestGenerateItemSalesReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -39,7 +37,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Sales Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -49,7 +47,6 @@ codeunit 139875 "PowerBI Core Test" procedure TestGenerateItemSalesReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -67,7 +64,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(CalcDate(PBISetup."Item Sales Date Formula")) + '..'; // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Sales Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -77,7 +74,6 @@ codeunit 139875 "PowerBI Core Test" procedure TestGenerateItemSalesReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateItemSalesReportDateFilter @@ -89,7 +85,7 @@ codeunit 139875 "PowerBI Core Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Sales Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -99,7 +95,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateItemPurchasesReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -118,7 +113,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Purchases Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -128,7 +123,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateItemPurchasesReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -146,7 +140,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(CalcDate(PBISetup."Item Purch. Date Formula")) + '..'; // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Purchases Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -156,7 +150,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateItemPurchasesReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateItemPurchasesReportDateFilter @@ -168,7 +161,7 @@ codeunit 139875 "PowerBI Core Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Purchases Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -178,7 +171,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -197,7 +189,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -207,7 +199,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -225,7 +216,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(CalcDate(PBISetup."Manufacturing Date Formula")) + '..'; // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -235,7 +226,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateManufacturingReportDateFilter @@ -247,7 +237,7 @@ codeunit 139875 "PowerBI Core Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -257,7 +247,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateTimeFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -276,7 +265,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(CreateDateTime(Today(), 0T)) + '..' + Format(CreateDateTime(Today() + 10, 0T)); // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date Time"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -286,7 +275,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateTimeFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -304,7 +292,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(CreateDateTime(CalcDate(PBISetup."Manufacturing Date Formula"), 0T)) + '..'; // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date Time"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -314,7 +302,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateManufacturingReportDateTimeFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateManufacturingReportDateTimeFilter @@ -326,7 +313,7 @@ codeunit 139875 "PowerBI Core Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Manufacturing Date Time"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -336,7 +323,6 @@ codeunit 139875 "PowerBI Core Test" procedure GenerateFinanceReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Finance Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -354,7 +340,7 @@ codeunit 139875 "PowerBI Core Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateFinanceReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateFinanceReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Finance Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -363,7 +349,6 @@ codeunit 139875 "PowerBI Core Test" [Test] procedure GenerateFinanceReportDateFilter_Blank() var - PBIMgt: Codeunit "Finance Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateFinanceReportDateFilter @@ -373,7 +358,7 @@ codeunit 139875 "PowerBI Core Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateFinanceReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateFinanceReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Finance Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIFinanceTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIFinanceTest.Codeunit.al index fc92ebf506..d86ea8abfc 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIFinanceTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIFinanceTest.Codeunit.al @@ -1,7 +1,6 @@ namespace Microsoft.Finance.PowerBIReports.Test; using Microsoft.PowerBIReports; -using Microsoft.Finance.PowerBIReports; using Microsoft.Finance.GeneralLedger.Journal; using Microsoft.Finance.GeneralLedger.Account; using Microsoft.Finance.GeneralLedger.Ledger; @@ -14,6 +13,7 @@ using Microsoft.Sales.Document; using Microsoft.Purchases.History; using Microsoft.Purchases.Payables; using Microsoft.Purchases.Document; +using Microsoft.PowerBIReports.Test; using System.TestLibraries.Utilities; using Microsoft.Foundation.AuditCodes; using Microsoft.Finance.GeneralLedger.Setup; @@ -37,7 +37,9 @@ codeunit 139876 "PowerBI Finance Test" LibUtility: Codeunit "Library - Utility"; UriBuilder: Codeunit "Uri Builder"; PermissionsMock: Codeunit "Permissions Mock"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; PowerBICoreTest: Codeunit "PowerBI Core Test"; + PowerBIAPIEndpoints: Enum "PowerBI API Endpoints"; ResponseEmptyErr: Label 'Response should not be empty.'; [Test] @@ -79,7 +81,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for vendor ledger entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Microsoft.Finance.PowerBIReports."Vendor Ledger Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Vendor Ledger Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'vleEntryNo eq ' + Format(VendorLedgerEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -167,7 +169,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for customer ledger entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Customer Ledger Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Customer Ledger Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'cleEntryNo eq ' + Format(CustomerLedgerEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -229,7 +231,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for G/L account is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G/L Accounts", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Accounts"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'accountNo eq ''' + Format(GLAccount."No.") + ''''); UriBuilder.GetUri(Uri); @@ -267,7 +269,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for G/L account category is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G/L Account Categories", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Account Categories"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'entryNo eq ' + Format(GLAccountCategory."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -303,7 +305,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for G/L budget is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G/L Budgets", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Budgets"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'budgetName eq ''' + Format(GLBudgetName.Name) + ''''); UriBuilder.GetUri(Uri); @@ -344,7 +346,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for G/L budget entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Microsoft.Finance.PowerBIReports."G/L Budget Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Budget Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'budgetName eq ''' + Format(GLBudgetEntry."Budget Name") + ''''); UriBuilder.GetUri(Uri); @@ -406,7 +408,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for income statement G/L entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G/L Entries - Income Statement", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Entries - Income Statement"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'accountNo eq ''' + Format(GLAccount."No.") + ''''); UriBuilder.GetUri(Uri); @@ -444,7 +446,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for income statement G/L entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G\L Entries - Balance Sheet", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Entries - Balance Sheet"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'glAccountNo eq ''' + Format(GLAccount."No.") + ''''); UriBuilder.GetUri(Uri); @@ -484,7 +486,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for balance sheet G/L entry outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"G\L Entries - Balance Sheet", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Entries - Balance Sheet"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'glAccountNo eq ''' + Format(GLAccount."No.") + ''''); UriBuilder.GetUri(Uri); @@ -540,7 +542,7 @@ codeunit 139876 "PowerBI Finance Test" Commit(); // [WHEN] Get request for income statement G/L entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Microsoft.Finance.PowerBIReports."G/L Entries - Closing", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"G/L Entries - Closing"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', StrSubstNo('glAccountNo eq ''' + GLAccount."No." + ''' or glAccountNo eq ''' + BalGLAccount."No." + '''')); UriBuilder.GetUri(Uri); @@ -660,7 +662,7 @@ codeunit 139876 "PowerBI Finance Test" procedure TestGenerateFinanceReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Finance Filter Helper"; + FilterScenario: Enum "PowerBI Filter Scenarios"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -678,7 +680,7 @@ codeunit 139876 "PowerBI Finance Test" ExpectedFilterTxt := StrSubstNo(Format(Today()) + '..' + Format(Today() + 10)); // [WHEN] GenerateFinanceReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateFinanceReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Finance Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -687,7 +689,7 @@ codeunit 139876 "PowerBI Finance Test" [Test] procedure TestGenerateFinanceReportDateFilter_Blank() var - PBIMgt: Codeunit "Finance Filter Helper"; + FilterScenario: Enum "PowerBI Filter Scenarios"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateFinanceReportDateFilter @@ -697,7 +699,7 @@ codeunit 139876 "PowerBI Finance Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateFinanceReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateFinanceReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(FilterScenario::"Finance Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIInventoryTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIInventoryTest.Codeunit.al index 39e6081077..9b1723603f 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIInventoryTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIInventoryTest.Codeunit.al @@ -25,9 +25,9 @@ using Microsoft.Warehouse.Document; using Microsoft.Service.Item; using Microsoft.Finance.GeneralLedger.Setup; using Microsoft.Sales.Setup; -using Microsoft.Inventory.PowerBIReports; using Microsoft.Service.Test; using System.TestLibraries.Security.AccessControl; +using Microsoft.PowerBIReports.Test; codeunit 139877 "PowerBI Inventory Test" { @@ -50,6 +50,8 @@ codeunit 139877 "PowerBI Inventory Test" LibUtility: Codeunit "Library - Utility"; UriBuilder: Codeunit "Uri Builder"; PermissionsMock: Codeunit "Permissions Mock"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; + PowerBIAPIEndpoints: Enum "PowerBI API Endpoints"; ResponseEmptyErr: Label 'Response should not be empty.'; [Test] @@ -67,7 +69,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for zones is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Zones, ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::Zones); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'locationCode eq ''' + Format(Location.Code) + ''''); UriBuilder.GetUri(Uri); @@ -109,7 +111,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for bins is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Bins, ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::Bins); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'locationCode eq ''' + Format(Location.Code) + ''''); UriBuilder.GetUri(Uri); @@ -157,7 +159,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for sales lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Sales Lines - Outstanding", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Sales Lines - Outstanding")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(SalesHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -221,7 +223,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for sales lines outside the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Sales Lines - Outstanding", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Sales Lines - Outstanding")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(SalesLine."No.") + ''''); UriBuilder.GetUri(Uri); @@ -253,7 +255,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for purchase lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purchase Lines - Outstanding", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Purchase Lines - Outstanding")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(PurchHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -317,7 +319,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for purchase lines outside the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purchase Lines - Outstanding", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Purchase Lines - Outstanding")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(PurchLine."No.") + ''''); UriBuilder.GetUri(Uri); @@ -362,7 +364,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for requisition lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Requisition Lines", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Requisition Lines")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item1."No.") + ''' OR itemNo eq ''' + Format(Item2."No.") + ''' OR itemNo eq ''' + Format(Item3."No.") + ''''); UriBuilder.GetUri(Uri); @@ -459,7 +461,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for transfer lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Transfer Lines", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Transfer Lines")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(TransferHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -509,7 +511,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for transfer lines outside the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Transfer Lines", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Transfer Lines")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(TransferLine."Document No.") + ''''); UriBuilder.GetUri(Uri); @@ -544,7 +546,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for service lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Service Lines - Order", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Service Lines - Order")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(ServiceHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -599,7 +601,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for service lines outside the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Service Lines - Order", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Service Lines - Order")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(ServiceLine."Document No.") + ''''); UriBuilder.GetUri(Uri); @@ -639,7 +641,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for item ledger entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Microsoft.Inventory.PowerBIReports."Item Ledger Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Item Ledger Entries")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(SalesLine."No.") + ''' OR itemNo eq ''' + Format(PurchLine."No.") + ''''); UriBuilder.GetUri(Uri); @@ -707,7 +709,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for warehouse receipt lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Warehouse Activity Lines", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Warehouse Activity Lines")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item."No.") + ''''); UriBuilder.GetUri(Uri); @@ -764,7 +766,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for warehouse entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Warehouse Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Warehouse Entries")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item."No.") + ''''); UriBuilder.GetUri(Uri); @@ -847,7 +849,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for warehouse journal lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Whse. Journal Lines - From Bin", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Whse. Journal Lines - From Bin")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item1."No.") + ''' OR itemNo eq ''' + Format(Item2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -896,7 +898,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for warehouse journal lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Whse. Journal Lines - To Bin", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Whse. Journal Lines - To Bin")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item1."No.") + ''' OR itemNo eq ''' + Format(Item2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -981,7 +983,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for purchase value entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Value Entries - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Value Entries - Item")); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item."No.") + ''''); UriBuilder.GetUri(Uri); @@ -1037,7 +1039,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the value entry outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Value Entries - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Value Entries - Item")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'entryNo eq ' + Format(ValueEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -1064,7 +1066,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for assembly headers is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Assembly Headers - Order", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Assembly Headers - Order")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(AssemblyHeader."No.") + ''' OR documentNo eq ''' + Format(AssemblyHeader2."No.") + ''''); @@ -1113,7 +1115,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the assembly header outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Assembly Headers - Order", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Assembly Headers - Order")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'documentNo eq ''' + Format(AssemblyHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -1140,7 +1142,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for assembly lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Assembly Lines - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Assembly Lines - Item")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(AssemblyHeader."No.") + ''''); @@ -1192,7 +1194,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the assembly line outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Assembly Lines - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Assembly Lines - Item")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'documentNo eq ''' + Format(AssemblyHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -1230,7 +1232,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for job planning lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Job Planning Lines - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Job Planning Lines - Item")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item1."No.") + ''' OR itemNo eq ''' + Format(Item2."No.") + ''''); @@ -1290,7 +1292,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the job planning line outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Job Planning Lines - Item", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Job Planning Lines - Item")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'documentNo eq ''' + Format(JobPlanningLine."Document No.") + ''''); UriBuilder.GetUri(Uri); @@ -1334,7 +1336,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for production order lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Lines - Invt.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Prod. Order Lines - Invt.")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item."No.") + ''''); @@ -1383,7 +1385,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the production order line outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Lines - Invt.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Prod. Order Lines - Invt.")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'documentNo eq ''' + Format(ProdOrderLine."Prod. Order No.") + ''''); UriBuilder.GetUri(Uri); @@ -1434,7 +1436,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for production order component lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Comp. - Invt.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Prod. Order Comp. - Invt.")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(ItemComp."No.") + ''''); @@ -1481,7 +1483,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the production order component line outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Comp. - Invt.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Prod. Order Comp. - Invt.")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'documentNo eq ''' + Format(ProdOrderComp."Prod. Order No.") + ''''); UriBuilder.GetUri(Uri); @@ -1521,7 +1523,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for planning component lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Planning Components", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Planning Components")); UriBuilder.Init(TargetURL); UriBuilder.GetUri(Uri); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item1."No.") + ''' OR itemNo eq ''' + Format(Item2."No.") + ''''); @@ -1570,7 +1572,7 @@ codeunit 139877 "PowerBI Inventory Test" Commit(); // [WHEN] Get request for the planning component line outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Planning Components", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl((PowerBIAPIEndpoints::"Planning Components")); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'itemNo eq ''' + Format(PlanningComponent."Item No.") + ''''); UriBuilder.GetUri(Uri); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIManufacturingTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIManufacturingTest.Codeunit.al index 84b62c8748..2639a646c1 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIManufacturingTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIManufacturingTest.Codeunit.al @@ -9,18 +9,19 @@ using Microsoft.Inventory.Ledger; using Microsoft.Inventory.Item; using Microsoft.Manufacturing.Journal; using Microsoft.PowerBIReports; -using Microsoft.Manufacturing.PowerBIReports; using Microsoft.Inventory.Journal; using Microsoft.Manufacturing.ProductionBOM; using Microsoft.Manufacturing.Routing; using System.Text; using Microsoft.Inventory.Location; using System.TestLibraries.Security.AccessControl; +using Microsoft.PowerBIReports.Test; codeunit 139878 "PowerBI Manufacturing Test" { Subtype = Test; Access = Internal; + TestPermissions = Disabled; var Assert: Codeunit Assert; @@ -33,6 +34,9 @@ codeunit 139878 "PowerBI Manufacturing Test" UriBuilder: Codeunit "Uri Builder"; PermissionsMock: Codeunit "Permissions Mock"; PowerBICoreTest: Codeunit "PowerBI Core Test"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; + PowerBIAPIEndpoints: Enum "PowerBI API Endpoints"; + PowerBIFilterScenarios: Enum "PowerBI Filter Scenarios"; ResponseEmptyErr: Label 'Response should not be empty.'; [Test] @@ -51,7 +55,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for calendar entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Calendar Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Calendar Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'no eq ''' + Format(WorkCenter."No.") + ''''); UriBuilder.GetUri(Uri); @@ -98,7 +102,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for machine centers is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Machine Centers", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Machine Centers"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'workCenterNo eq ''' + Format(WorkCenter."No.") + ''''); UriBuilder.GetUri(Uri); @@ -140,7 +144,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for work centers is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Work Centers", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Work Centers"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'no eq ''' + Format(WorkCenter."No.") + ''' or no eq ''' + Format(WorkCenter2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -201,7 +205,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production order lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Lines - Manuf.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Prod. Order Lines - Manuf."); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(Item."No.") + ''''); UriBuilder.GetUri(Uri); @@ -273,7 +277,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production order component lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Comp. - Manuf.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Prod. Order Comp. - Manuf."); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(ItemComp."No.") + ''''); UriBuilder.GetUri(Uri); @@ -338,7 +342,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production order routing lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Routing Lines", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Prod. Order Routing Lines"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'no eq ''' + Format(WorkCenter."No.") + ''''); UriBuilder.GetUri(Uri); @@ -417,7 +421,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production item ledger entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Ledger Entries - Prod.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Item Ledger Entries - Prod."); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'orderNo eq ''' + Format(ProdOrder."No.") + ''''); UriBuilder.GetUri(Uri); @@ -480,7 +484,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for the item ledger entries outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Ledger Entries - Prod.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Item Ledger Entries - Prod."); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'itemNo eq ''' + Format(ItemLedgerEntry."Item No.") + ''''); UriBuilder.GetUri(Uri); @@ -529,7 +533,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production item ledger entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Capacity Ledger Entries", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Capacity Ledger Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'orderNo eq ''' + Format(ProdOrder."No.") + ''''); UriBuilder.GetUri(Uri); @@ -613,7 +617,7 @@ codeunit 139878 "PowerBI Manufacturing Test" Commit(); // [WHEN] Get request for production order capacity needed is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Prod. Order Capacity Needs", ''); + TargetURL := PowerBIAPIRequests.GetEndpointURL(PowerBIAPIEndpoints::"Prod. Order Capacity Needs"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'prodOrderNo eq ''' + Format(ProdOrder."No.") + ''' or prodOrderNo eq ''' + Format(ProdOrder2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -714,7 +718,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -733,7 +736,7 @@ codeunit 139878 "PowerBI Manufacturing Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -743,7 +746,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -761,7 +763,7 @@ codeunit 139878 "PowerBI Manufacturing Test" ExpectedFilterTxt := Format(CalcDate(PBISetup."Manufacturing Date Formula")) + '..'; // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -771,7 +773,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateManufacturingReportDateFilter @@ -783,7 +784,7 @@ codeunit 139878 "PowerBI Manufacturing Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateManufacturingReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -793,7 +794,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateTimeFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -812,7 +812,7 @@ codeunit 139878 "PowerBI Manufacturing Test" ExpectedFilterTxt := Format(CreateDateTime(Today(), 0T)) + '..' + Format(CreateDateTime(Today() + 10, 0T)); // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date Time"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -822,7 +822,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateTimeFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -840,7 +839,7 @@ codeunit 139878 "PowerBI Manufacturing Test" ExpectedFilterTxt := Format(CreateDateTime(CalcDate(PBISetup."Manufacturing Date Formula"), 0T)) + '..'; // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date Time"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -850,7 +849,6 @@ codeunit 139878 "PowerBI Manufacturing Test" procedure TestGenerateManufacturingReportDateTimeFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Manuf. Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateManufacturingReportDateTimeFilter @@ -862,7 +860,7 @@ codeunit 139878 "PowerBI Manufacturing Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateManufacturingReportDateTimeFilter executes - ActualFilterTxt := PBIMgt.GenerateManufacturingReportDateTimeFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Manufacturing Date Time"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIProjectTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIProjectTest.Codeunit.al index c4cddf145a..cde7ae1cc2 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIProjectTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIProjectTest.Codeunit.al @@ -9,7 +9,7 @@ using Microsoft.Projects.Project.Ledger; using Microsoft.Purchases.Document; using Microsoft.Inventory.Item; using Microsoft.Purchases.Vendor; -using Microsoft.Projects.PowerBIReports; +using Microsoft.PowerBIReports.Test; codeunit 139879 "PowerBI Project Test" { @@ -25,6 +25,8 @@ codeunit 139879 "PowerBI Project Test" LibRandom: Codeunit "Library - Random"; LibUtility: Codeunit "Library - Utility"; UriBuilder: Codeunit "Uri Builder"; + PowerBIRequests: Codeunit "PowerBI API Requests"; + PowerBIEndpoints: Enum "PowerBI API Endpoints"; ResponseEmptyErr: Label 'Response should not be empty.'; [Test] @@ -49,7 +51,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for jobs is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Jobs, ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::Jobs); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'no eq ''' + Format(Job."No.") + ''' or no eq ''' + Format(Job2."No.") + ''''); @@ -104,7 +106,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for job tasks is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Job Tasks", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Job Tasks"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'jobNo eq ''' + Format(Job."No.") + ''''); UriBuilder.GetUri(Uri); @@ -154,7 +156,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for job planning lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Job Planning Lines", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Job Planning Lines"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'jobNo eq ''' + Format(Job."No.") + ''''); UriBuilder.GetUri(Uri); @@ -221,7 +223,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for job ledger entries is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::Microsoft.Projects.PowerBIReports."Job Ledger Entries", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Job Ledger Entries"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'jobNo eq ''' + Format(Job."No.") + ''''); UriBuilder.GetUri(Uri); @@ -275,7 +277,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for outstanding PO lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Job Outstanding", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Purch. Lines - Job Outstanding"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'jobNo eq ''' + Format(Job."No.") + ''''); UriBuilder.GetUri(Uri); @@ -350,7 +352,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for the purchase lines outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Job Outstanding", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Purch. Lines - Job Outstanding"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'documentNo eq ''' + Format(PurchHeader."No.") + ''' OR documentNo eq ''' + Format(PurchHeader2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -390,7 +392,7 @@ codeunit 139879 "PowerBI Project Test" Commit(); // [WHEN] Get request for received not invoiced PO lines is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Job Received", ''); + TargetURL := PowerBIRequests.GetEndpointUrl(PowerBIEndpoints::"Purch. Lines - Job Received"); UriBuilder.Init(TargetURL); UriBuilder.AddODataQueryParameter('$filter', 'jobNo eq ''' + Format(Job."No.") + ''''); UriBuilder.GetUri(Uri); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIPurchasesTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIPurchasesTest.Codeunit.al index 29549046f7..46866f89e2 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIPurchasesTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBIPurchasesTest.Codeunit.al @@ -7,7 +7,7 @@ using System.Text; using Microsoft.Inventory.Analysis; using Microsoft.Inventory.Ledger; using Microsoft.PowerBIReports; -using Microsoft.Purchases.PowerBIReports; +using Microsoft.PowerBIReports.Test; using System.TestLibraries.Security.AccessControl; codeunit 139880 "PowerBI Purchases Test" @@ -25,7 +25,10 @@ codeunit 139880 "PowerBI Purchases Test" LibUtility: Codeunit "Library - Utility"; UriBuilder: Codeunit "Uri Builder"; PermissionsMock: Codeunit "Permissions Mock"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; PowerBICoreTest: Codeunit "PowerBI Core Test"; + PowerBIAPIEndpoints: Enum "PowerBI API Endpoints"; + PowerBIFilterScenarios: Enum "PowerBI Filter Scenarios"; ResponseEmptyErr: Label 'Response should not be empty.'; [Test] @@ -46,7 +49,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for outstanding purchase order line is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Item Outstd.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Purch. Lines - Item Outstd."); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'purchOrderNo eq ''' + Format(PurchHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -97,7 +100,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for the purchase lines outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Item Outstd.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Purch. Lines - Item Outstd."); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'purchOrderNo eq ''' + PurchHeader."No." + ''' OR purchOrderNo eq ''' + PurchHeader2."No." + ''''); UriBuilder.GetUri(Uri); @@ -147,7 +150,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for outstanding purchase order line is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Budget Entries - Purch.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Item Budget Entries - Purch."); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'entryNo eq ' + Format(ItemBudgetEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -193,7 +196,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for the item budget entries outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Budget Entries - Purch.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Item Budget Entries - Purch."); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'entryNo eq ' + Format(ItemBudgetEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -222,7 +225,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for purchase value entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Value Entries - Purch.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Value Entries - Purch."); LibGraphMgt.GetFromWebService(Response, TargetURL); // [THEN] The response contains the purchase value entry information @@ -278,7 +281,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for the value entries outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Value Entries - Purch.", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Value Entries - Purch."); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'itemLedgerEntryNo eq ' + Format(ItemLedgerEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -307,7 +310,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for received not invoiced purchase order is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Item Received", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Purch. Lines - Item Received"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'purchaseOrderNo eq ''' + Format(PurchaseHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -378,7 +381,7 @@ codeunit 139880 "PowerBI Purchases Test" Commit(); // [WHEN] Get request for the purchase lines outside of the query filter is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Purch. Lines - Item Received", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Purch. Lines - Item Received"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'purchaseOrderNo eq ''' + Format(PurchaseHeader."No.") + ''' OR purchaseOrderNo eq ''' + Format(PurchaseHeader2."No.") + ''''); UriBuilder.GetUri(Uri); @@ -403,7 +406,6 @@ codeunit 139880 "PowerBI Purchases Test" procedure TestGenerateItemPurchasesReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -422,7 +424,7 @@ codeunit 139880 "PowerBI Purchases Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Purchases Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -432,7 +434,6 @@ codeunit 139880 "PowerBI Purchases Test" procedure TestGenerateItemPurchasesReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -450,7 +451,7 @@ codeunit 139880 "PowerBI Purchases Test" ExpectedFilterTxt := Format(CalcDate(PBISetup."Item Purch. Date Formula")) + '..'; // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Purchases Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -460,7 +461,6 @@ codeunit 139880 "PowerBI Purchases Test" procedure TestGenerateItemPurchasesReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Purchases Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateItemPurchasesReportDateFilter @@ -472,7 +472,7 @@ codeunit 139880 "PowerBI Purchases Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateItemPurchasesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemPurchasesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Purchases Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); diff --git a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBISalesTest.Codeunit.al b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBISalesTest.Codeunit.al index 59266107a1..85ed23bc28 100644 --- a/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBISalesTest.Codeunit.al +++ b/Apps/W1/PowerBIReports/test/src/Codeunits/PowerBISalesTest.Codeunit.al @@ -7,8 +7,8 @@ using Microsoft.Inventory.Ledger; using System.Text; using Microsoft.Inventory.Item; using Microsoft.PowerBIReports; -using Microsoft.Sales.PowerBIReports; using System.TestLibraries.Security.AccessControl; +using Microsoft.PowerBIReports.Test; codeunit 139881 "PowerBI Sales Test" { @@ -25,6 +25,9 @@ codeunit 139881 "PowerBI Sales Test" UriBuilder: Codeunit "Uri Builder"; PermissionsMock: Codeunit "Permissions Mock"; PowerBICoreTest: Codeunit "PowerBI Core Test"; + PowerBIAPIRequests: Codeunit "PowerBI API Requests"; + PowerBIAPIEndpoints: Enum "PowerBI API Endpoints"; + PowerBIFilterScenarios: Enum "PowerBI Filter Scenarios"; IsInitialized: Boolean; ResponseEmptyErr: Label 'Response should not be empty.'; @@ -52,7 +55,7 @@ codeunit 139881 "PowerBI Sales Test" Commit(); // [WHEN] Get request for item budget name is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Budget Names", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Item Budget Names"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'budgetName eq ''' + Format(ItemBudgetName.Name) + ''''); UriBuilder.GetUri(Uri); @@ -93,7 +96,7 @@ codeunit 139881 "PowerBI Sales Test" Commit(); // [WHEN] Get request for outstanding sales order line is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Sales Line - Item Outstanding", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Sales Line - Item Outstanding"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'salesOrderNo eq ''' + Format(SalesHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -154,7 +157,7 @@ codeunit 139881 "PowerBI Sales Test" Commit(); // [WHEN] Get request for outstanding sales order line is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Item Budget Entries - Sales", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Item Budget Entries - Sales"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'entryNo eq ' + Format(ItemBudgetEntry."Entry No.") + ''); UriBuilder.GetUri(Uri); @@ -203,7 +206,7 @@ codeunit 139881 "PowerBI Sales Test" Commit(); // [WHEN] Get request for sales value entry is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Value Entries - Sales", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Value Entries - Sales"); LibGraphMgt.GetFromWebService(Response, TargetURL); // [THEN] The response contains the sales value entry information @@ -254,7 +257,7 @@ codeunit 139881 "PowerBI Sales Test" Commit(); // [WHEN] Get request for shipped not invoiced sales order is made - TargetURL := LibGraphMgt.CreateQueryTargetURL(Query::"Sales Line - Item Shipped", ''); + TargetURL := PowerBIAPIRequests.GetEndpointUrl(PowerBIAPIEndpoints::"Sales Line - Item Shipped"); UriBuilder.Init(TargetURL); UriBuilder.AddQueryParameter('$filter', 'salesOrderNo eq ''' + Format(SalesHeader."No.") + ''''); UriBuilder.GetUri(Uri); @@ -297,7 +300,6 @@ codeunit 139881 "PowerBI Sales Test" procedure TestGenerateItemSalesReportDateFilter_StartEndDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -316,7 +318,7 @@ codeunit 139881 "PowerBI Sales Test" ExpectedFilterTxt := Format(Today()) + '..' + Format(Today() + 10); // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Sales Date"); // [THEN] A filter text of format "%1..%2" should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -326,7 +328,6 @@ codeunit 139881 "PowerBI Sales Test" procedure TestGenerateItemSalesReportDateFilter_RelativeDate() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ExpectedFilterTxt: Text; ActualFilterTxt: Text; begin @@ -344,7 +345,7 @@ codeunit 139881 "PowerBI Sales Test" ExpectedFilterTxt := '' + Format(CalcDate(PBISetup."Item Sales Date Formula")) + '..'; // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Sales Date"); // [THEN] A filter text of format "%1.." should be created Assert.AreEqual(ExpectedFilterTxt, ActualFilterTxt, 'The expected & actual filter text did not match.'); @@ -354,7 +355,6 @@ codeunit 139881 "PowerBI Sales Test" procedure TestGenerateItemSalesReportDateFilter_Blank() var PBISetup: Record "PowerBI Reports Setup"; - PBIMgt: Codeunit "Sales Filter Helper"; ActualFilterTxt: Text; begin // [SCENARIO] Test GenerateItemSalesReportDateFilter @@ -366,7 +366,7 @@ codeunit 139881 "PowerBI Sales Test" PermissionsMock.ClearAssignments(); // [WHEN] GenerateItemSalesReportDateFilter executes - ActualFilterTxt := PBIMgt.GenerateItemSalesReportDateFilter(); + ActualFilterTxt := PowerBIAPIRequests.GetFilterForQueryScenario(PowerBIFilterScenarios::"Sales Date"); // [THEN] A blank filter text should be created Assert.AreEqual('', ActualFilterTxt, 'The expected & actual filter text did not match.'); diff --git a/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml b/Apps/W1/SalesLinesSuggestions/test/.resources/TestSuites/SLS-AccuracyTests.xml index 1d3a850e35cb792fe42582ef07ed0ddb355b44bc..231eda042f1a1feb8c3bba5c93672ae4b07c910f 100644 GIT binary patch delta 167 zcmZn?>JZw{!^mmOV9H>~V8);@*_K6qatN!?XRR^2~F-{ zUWFq1ksYGP0BX_%Rxp2ZAhYJ=6c&TYC9DNd6~;gnATyevd=nsFbMhp1guO;!Gr~C5 F0036ICA$Cs delta 153 zcmeAWY7*Me!^mpMV9sDM`8})R -/// Table Shpfy Registered Store (ID 30136). -/// -table 30136 "Shpfy Registered Store" -{ - ObsoleteState = Removed; - ObsoleteTag = '24.0'; - ObsoleteReason = 'Use table 30138 "Shpfy Registered Store New" instead'; - - Access = Internal; - Caption = 'Shopify Registered Store'; - DataClassification = SystemMetadata; - - fields - { - field(1; Store; Text[50]) - { - Caption = 'Store'; - DataClassification = SystemMetadata; - } - field(2; "Requested Scope"; Text[1024]) - { - Caption = 'Requested Scope'; - DataClassification = SystemMetadata; - } - field(3; "Actual Scope"; Text[1024]) - { - Caption = 'Actual Scope'; - DataClassification = SystemMetadata; - } - } - keys - { - key(PK; Store) - { - Clustered = true; - } - } - - [NonDebuggable] - [Scope('OnPrem')] - internal procedure SetAccessToken(AccessToken: Text) - begin - IsolatedStorage.Set('AccessToken(' + Rec.SystemId + ')', AccessToken, DataScope::Module); - end; - - [NonDebuggable] - [Scope('OnPrem')] - internal procedure GetAccessToken() Result: Text - begin - if not IsolatedStorage.Get('AccessToken(' + Rec.SystemId + ')', DataScope::Module, Result) then - exit(''); - end; -} -#endif \ No newline at end of file diff --git a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCompanyRef.Codeunit.al b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCompanyRef.Codeunit.al new file mode 100644 index 0000000000..95153f7c1e --- /dev/null +++ b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCompanyRef.Codeunit.al @@ -0,0 +1,29 @@ +namespace Microsoft.Integration.Shopify; + +using System.Utilities; + +codeunit 30383 "Shpfy Mtfld Type Company Ref" implements "Shpfy IMetafield Type" +{ + procedure HasAssistEdit(): Boolean + begin + exit(false); + end; + + procedure IsValidValue(Value: Text): Boolean + var + Regex: Codeunit Regex; + begin + exit(Regex.IsMatch(Value, '^gid:\/\/shopify\/Company\/\d+$')); + end; + + procedure AssistEdit(var Value: Text[2048]): Boolean + begin + Value := Value; + exit(false); + end; + + procedure GetExampleValue(): Text + begin + exit('gid://shopify/Company/1234567890'); + end; +} \ No newline at end of file diff --git a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCustomerRef.Codeunit.al b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCustomerRef.Codeunit.al new file mode 100644 index 0000000000..d99862a38d --- /dev/null +++ b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IMetafieldType/ShpfyMtfldTypeCustomerRef.Codeunit.al @@ -0,0 +1,29 @@ +namespace Microsoft.Integration.Shopify; + +using System.Utilities; + +codeunit 30382 "Shpfy Mtfld Type Customer Ref" implements "Shpfy IMetafield Type" +{ + procedure HasAssistEdit(): Boolean + begin + exit(false); + end; + + procedure IsValidValue(Value: Text): Boolean + var + Regex: Codeunit Regex; + begin + exit(Regex.IsMatch(Value, '^gid:\/\/shopify\/Customer\/\d+$')); + end; + + procedure AssistEdit(var Value: Text[2048]): Boolean + begin + Value := Value; + exit(false); + end; + + procedure GetExampleValue(): Text + begin + exit('gid://shopify/Customer/1234567890'); + end; +} \ No newline at end of file diff --git a/Apps/W1/Shopify/app/src/Metafields/Enums/ShpfyMetafieldType.Enum.al b/Apps/W1/Shopify/app/src/Metafields/Enums/ShpfyMetafieldType.Enum.al index 17f260684c..a13641fb04 100644 --- a/Apps/W1/Shopify/app/src/Metafields/Enums/ShpfyMetafieldType.Enum.al +++ b/Apps/W1/Shopify/app/src/Metafields/Enums/ShpfyMetafieldType.Enum.al @@ -163,4 +163,15 @@ enum 30159 "Shpfy Metafield Type" implements "Shpfy IMetafield Type" Caption = 'Variant'; Implementation = "Shpfy IMetafield Type" = "Shpfy Mtfld Type Variant Ref"; } + value(25; customer_reference) + { + Caption = 'Customer'; + Implementation = "Shpfy IMetafield Type" = "Shpfy Mtfld Type Customer Ref"; + } + + value(26; company_reference) + { + Caption = 'Company'; + Implementation = "Shpfy IMetafield Type" = "Shpfy Mtfld Type Company Ref"; + } } \ No newline at end of file diff --git a/Apps/W1/Shopify/app/src/PermissionSets/ShpfyObjects.PermissionSet.al b/Apps/W1/Shopify/app/src/PermissionSets/ShpfyObjects.PermissionSet.al index fd5f30fb1a..ce226d32a3 100644 --- a/Apps/W1/Shopify/app/src/PermissionSets/ShpfyObjects.PermissionSet.al +++ b/Apps/W1/Shopify/app/src/PermissionSets/ShpfyObjects.PermissionSet.al @@ -262,6 +262,8 @@ permissionset 30104 "Shpfy - Objects" codeunit "Shpfy Mtfld Type Boolean" = X, codeunit "Shpfy Mtfld Type Collect. Ref" = X, codeunit "Shpfy Mtfld Type Color" = X, + codeunit "Shpfy Mtfld Type Company Ref" = X, + codeunit "Shpfy Mtfld Type Customer Ref" = X, codeunit "Shpfy Mtfld Type Date" = X, codeunit "Shpfy Mtfld Type DateTime" = X, codeunit "Shpfy Mtfld Type Dimension" = X, diff --git a/Apps/W1/SubscriptionBilling/App/Base/Codeunits/SubBillingInstallation.Codeunit.al b/Apps/W1/SubscriptionBilling/App/Base/Codeunits/SubBillingInstallation.Codeunit.al index 98f263f655..5d7dd09c79 100644 --- a/Apps/W1/SubscriptionBilling/App/Base/Codeunits/SubBillingInstallation.Codeunit.al +++ b/Apps/W1/SubscriptionBilling/App/Base/Codeunits/SubBillingInstallation.Codeunit.al @@ -32,6 +32,15 @@ codeunit 8051 "Sub. Billing Installation" var ServiceContractSetup: Record "Service Contract Setup"; ServiceContractSetupModified: Boolean; + CustomerContractCodeLbl: Label 'CUSTCONTR', MaxLength = 20; + CustomerContractDescriptionLbl: Label 'Customer Contracts'; + CustomerContractNoSeriesLineLbl: Label 'CUC', MaxLength = 14; + VendorContractCodeLbl: Label 'VENDCONTR', MaxLength = 20; + VendorContractDescriptionLbl: Label 'Vendor Contracts'; + VendorContractNoSeriesLineLbl: Label 'VEC', MaxLength = 14; + ServiceObjectCodeLbl: Label 'SERVOBJECT', MaxLength = 20; + ServiceObjectDescriptionLbl: Label 'Service Objects'; + ServiceObjectNoSeriesLineLbl: Label 'SOBJ', MaxLength = 14; begin if not ServiceContractSetup.Get() then begin ServiceContractSetup.Init(); @@ -100,7 +109,7 @@ codeunit 8051 "Sub. Billing Installation" begin JobQueueEntry.SetRange("Object Type to Run", JobQueueEntry."Object Type to Run"::Codeunit); JobQueueEntry.SetRange("Object ID to Run", Codeunit::"Update Serv. Comm. Term. Dates"); - if not JobQueueEntry.IsEmpty then + if not JobQueueEntry.IsEmpty() then exit; JobQueueEntry.Init(); @@ -132,6 +141,8 @@ codeunit 8051 "Sub. Billing Installation" local procedure FindOrCreateSourceCode(): Code[10] var SourceCode: Record "Source Code"; + ContractDeferralReleaseCodeLbl: Label 'CONTDEFREL', MaxLength = 10; + ContractDeferralsReleaseDescriptionLbl: Label 'Contract Deferrals Release'; begin if not SourceCode.Get(ContractDeferralReleaseCodeLbl) then begin SourceCode.Init(); @@ -145,37 +156,29 @@ codeunit 8051 "Sub. Billing Installation" local procedure InitializeBillingTemplates() var BillingTemplate: Record "Billing Template"; + CustomerBillingTemplateDescriptionTxt: Label 'Sample template for customer billing'; + VendorBillingTemplateDescriptionTxt: Label 'Sample template for vendor billing'; + CustomerLbl: Label 'Customer'; + VendorLbl: Label 'Vendor'; begin - if not BillingTemplate.IsEmpty then + if not BillingTemplate.IsEmpty() then exit; - BillingTemplate.Init(); - BillingTemplate.Code := CustomerLbl; - BillingTemplate.Description := CustomerBillingTemplateDescriptionTxt; - BillingTemplate.Partner := "Service Partner"::Customer; - BillingTemplate.Insert(false); + if not BillingTemplate.Get(CustomerLbl) then + InsertBillingTemplate(CustomerLbl, CustomerBillingTemplateDescriptionTxt, "Service Partner"::Customer); - BillingTemplate.Init(); - BillingTemplate.Code := VendorLbl; - BillingTemplate.Description := VendorBillingTemplateDescriptionTxt; - BillingTemplate.Partner := "Service Partner"::Vendor; - BillingTemplate.Insert(false); + Clear(BillingTemplate); + if not BillingTemplate.Get(VendorLbl) then + InsertBillingTemplate(VendorLbl, VendorBillingTemplateDescriptionTxt, "Service Partner"::Vendor); end; + local procedure InsertBillingTemplate(BillingTemplateCode: Code[20]; BillingTemplateDescription: Text[80]; ServicePartner: Enum "Service Partner") var - CustomerLbl: Label 'Customer'; - CustomerBillingTemplateDescriptionTxt: Label 'Sample template for customer billing'; - CustomerContractCodeLbl: Label 'CUSTCONTR', MaxLength = 20; - CustomerContractDescriptionLbl: Label 'Customer Contracts'; - CustomerContractNoSeriesLineLbl: Label 'CUC', MaxLength = 14; - VendorLbl: Label 'Vendor'; - VendorBillingTemplateDescriptionTxt: Label 'Sample template for vendor billing'; - VendorContractCodeLbl: Label 'VENDCONTR', MaxLength = 20; - VendorContractDescriptionLbl: Label 'Vendor Contracts'; - VendorContractNoSeriesLineLbl: Label 'VEC', MaxLength = 14; - ServiceObjectCodeLbl: Label 'SERVOBJECT', MaxLength = 20; - ServiceObjectDescriptionLbl: Label 'Service Objects'; - ServiceObjectNoSeriesLineLbl: Label 'SOBJ', MaxLength = 14; - ContractDeferralReleaseCodeLbl: Label 'CONTDEFREL', MaxLength = 10; - ContractDeferralsReleaseDescriptionLbl: Label 'Contract Deferrals Release'; + BillingTemplate: Record "Billing Template"; + begin + BillingTemplate.Code := BillingTemplateCode; + BillingTemplate.Description := CopyStr(BillingTemplateDescription, 1, MaxStrLen(BillingTemplate.Description)); + BillingTemplate.Partner := ServicePartner; + BillingTemplate.Insert(false); + end; } \ No newline at end of file diff --git a/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLine.Table.al b/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLine.Table.al index d548a041b5..1c8bae3aa3 100644 --- a/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLine.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLine.Table.al @@ -1,6 +1,5 @@ namespace Microsoft.SubscriptionBilling; -using System.Security.AccessControl; using Microsoft.Utilities; using Microsoft.Sales.Customer; using Microsoft.Sales.Document; @@ -9,6 +8,7 @@ using Microsoft.Purchases.Vendor; using Microsoft.Purchases.Document; using Microsoft.Purchases.History; using Microsoft.Finance.Currency; +using System.Security.User; table 8061 "Billing Line" { @@ -30,7 +30,7 @@ table 8061 "Billing Line" Caption = 'User ID'; DataClassification = EndUserIdentifiableInformation; Editable = false; - TableRelation = User."User Name"; + TableRelation = "User Setup"; } field(10; "Partner No."; Code[20]) { diff --git a/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLineArchive.Table.al b/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLineArchive.Table.al index 822a15080b..72f65e96c7 100644 --- a/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLineArchive.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Billing/Tables/BillingLineArchive.Table.al @@ -1,12 +1,12 @@ namespace Microsoft.SubscriptionBilling; -using System.Security.AccessControl; using Microsoft.Sales.Customer; using Microsoft.Sales.Document; using Microsoft.Sales.History; using Microsoft.Purchases.Vendor; using Microsoft.Purchases.Document; using Microsoft.Purchases.History; +using System.Security.User; table 8064 "Billing Line Archive" { @@ -28,7 +28,7 @@ table 8064 "Billing Line Archive" Caption = 'User ID'; DataClassification = EndUserIdentifiableInformation; Editable = false; - TableRelation = User."User Name"; + TableRelation = "User Setup"; } field(10; "Partner No."; Code[20]) { diff --git a/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/CustomerContractDeferral.Table.al b/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/CustomerContractDeferral.Table.al index ee21f7d76e..1c4131db5d 100644 --- a/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/CustomerContractDeferral.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/CustomerContractDeferral.Table.al @@ -1,10 +1,10 @@ namespace Microsoft.SubscriptionBilling; -using System.Security.AccessControl; using Microsoft.Sales.Customer; using Microsoft.Sales.Document; using Microsoft.Finance.GeneralLedger.Ledger; using Microsoft.Finance.Dimension; +using System.Security.User; table 8066 "Customer Contract Deferral" { @@ -61,7 +61,7 @@ table 8066 "Customer Contract Deferral" { Caption = 'User ID'; DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; + TableRelation = "User Setup"; ValidateTableRelation = false; } field(13; "Discount Amount"; Decimal) diff --git a/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/VendorContractDeferral.Table.al b/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/VendorContractDeferral.Table.al index 89fa181011..a229910b05 100644 --- a/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/VendorContractDeferral.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Deferrals/Tables/VendorContractDeferral.Table.al @@ -1,10 +1,10 @@ namespace Microsoft.SubscriptionBilling; -using System.Security.AccessControl; using Microsoft.Purchases.Vendor; using Microsoft.Purchases.Document; using Microsoft.Finance.GeneralLedger.Ledger; using Microsoft.Finance.Dimension; +using System.Security.User; table 8072 "Vendor Contract Deferral" @@ -62,7 +62,7 @@ table 8072 "Vendor Contract Deferral" { Caption = 'User ID'; DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; + TableRelation = "User Setup"; ValidateTableRelation = false; } field(13; "Discount Amount"; Decimal) diff --git a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedCustomerContract.Table.al b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedCustomerContract.Table.al index f1acfab059..0a85582cdf 100644 --- a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedCustomerContract.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedCustomerContract.Table.al @@ -10,7 +10,6 @@ using Microsoft.Foundation.PaymentTerms; using Microsoft.Bank.BankAccount; using Microsoft.Finance.Dimension; using Microsoft.Finance.Currency; -using System.Security.AccessControl; table 8010 "Imported Customer Contract" { @@ -216,7 +215,7 @@ table 8010 "Imported Customer Contract" { Caption = 'Processed by'; DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; + TableRelation = "User Setup"; Editable = false; ValidateTableRelation = false; } diff --git a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceCommitment.Table.al b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceCommitment.Table.al index 53d98d3da3..3529722d95 100644 --- a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceCommitment.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceCommitment.Table.al @@ -2,7 +2,7 @@ namespace Microsoft.SubscriptionBilling; using Microsoft.Inventory.Item; using Microsoft.Finance.Currency; -using System.Security.AccessControl; +using System.Security.User; table 8009 "Imported Service Commitment" { @@ -213,7 +213,7 @@ table 8009 "Imported Service Commitment" { Caption = 'Processed by'; DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; + TableRelation = "User Setup"; Editable = false; ValidateTableRelation = false; } diff --git a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceObject.Table.al b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceObject.Table.al index e2b075f145..44a6ea6b59 100644 --- a/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceObject.Table.al +++ b/Apps/W1/SubscriptionBilling/App/Import/Tables/ImportedServiceObject.Table.al @@ -3,7 +3,7 @@ namespace Microsoft.SubscriptionBilling; using Microsoft.Sales.Customer; using Microsoft.CRM.Contact; using Microsoft.Inventory.Item; -using System.Security.AccessControl; +using System.Security.User; table 8008 "Imported Service Object" { @@ -126,7 +126,7 @@ table 8008 "Imported Service Object" { Caption = 'Processed by'; DataClassification = EndUserIdentifiableInformation; - TableRelation = User."User Name"; + TableRelation = "User Setup"; Editable = false; ValidateTableRelation = false; } diff --git a/Apps/W1/SubscriptionBilling/Test/Billing/RecurringBillingDocsTest.Codeunit.al b/Apps/W1/SubscriptionBilling/Test/Billing/RecurringBillingDocsTest.Codeunit.al index 3ae70dfc91..f2b9dca313 100644 --- a/Apps/W1/SubscriptionBilling/Test/Billing/RecurringBillingDocsTest.Codeunit.al +++ b/Apps/W1/SubscriptionBilling/Test/Billing/RecurringBillingDocsTest.Codeunit.al @@ -1588,13 +1588,13 @@ codeunit 139687 "Recurring Billing Docs Test" CustomerContract."No.", '', '', - CalcDate('<+CY>', WorkDate()), - CalcDate('<+CY>', WorkDate())); + CalcDate('<2M-CM>', WorkDate()), + CalcDate('<2M-CM>', WorkDate())); if not BillingProposal.CreateBillingDocument( Enum::"Service Partner"::Customer, CustomerContract."No.", - CalcDate('<+CY>', WorkDate()), - CalcDate('<+CY>', WorkDate()), + CalcDate('<2M-CM>', WorkDate()), + CalcDate('<2M-CM>', WorkDate()), false, false) then diff --git a/Apps/W1/Sustainability/app/src/Calculation/SustCostManagement.Codeunit.al b/Apps/W1/Sustainability/app/src/Calculation/SustCostManagement.Codeunit.al new file mode 100644 index 0000000000..7367b1aef9 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Calculation/SustCostManagement.Codeunit.al @@ -0,0 +1,113 @@ +codeunit 6257 "SustCostManagement" +{ + Permissions = TableData Item = rm, + TableData "Sustainability Value Entry" = r; + + procedure UpdateCO2ePerUnit(var Item: Record Item; CalledByFieldNo: Integer) + var + CheckItem: Record Item; + RunOnModifyTrigger: Boolean; + begin + CalcUnitCostFromAverageCost(Item); + + RunOnModifyTrigger := CalledByFieldNo <> 0; + if CheckItem.Get(Item."No.") then + if RunOnModifyTrigger then + Item.Modify(true) + else + Item.Modify(); + end; + + local procedure CalcUnitCostFromAverageCost(var Item: Record Item) + var + AverageCost: Decimal; + begin + if not CalculateAverageCost(Item, AverageCost) then + exit; + + Item."CO2e per Unit" := Round(AverageCost, SustSetup."Emission Rounding Precision"); + end; + + procedure CalculateAverageCost(var Item: Record Item; var AverageCost: Decimal): Boolean + var + AverageQty: Decimal; + CostAmt: Decimal; + begin + AverageCost := 0; + + ExcludeOpenOutbndCosts(Item, AverageCost, AverageQty); + AverageQty := AverageQty + CalculateQuantity(Item); + + if AverageQty <> 0 then begin + CostAmt := AverageCost + CalculateCostAmt(Item, true) + CalculateCostAmt(Item, false); + + AverageCost := CostAmt / AverageQty; + + if AverageCost < 0 then + AverageCost := 0; + end else + AverageCost := 0; + + if AverageQty <= 0 then + exit(false); + + exit(true); + end; + + local procedure ExcludeOpenOutbndCosts(var Item: Record Item; var CostAmt: Decimal; var Quantity: Decimal) + var + OpenItemLedgEntry: Record "Item Ledger Entry"; + OpenSustValueEntry: Record "Sustainability Value Entry"; + begin + OpenItemLedgEntry.SetCurrentKey("Item No.", Open, "Variant Code", Positive); + OpenItemLedgEntry.SetRange("Item No.", Item."No."); + OpenItemLedgEntry.SetRange(Open, true); + OpenItemLedgEntry.SetRange(Positive, false); + OpenItemLedgEntry.SetFilter("Location Code", Item.GetFilter("Location Filter")); + OpenItemLedgEntry.SetFilter("Variant Code", Item.GetFilter("Variant Filter")); + OpenSustValueEntry.SetCurrentKey("Item Ledger Entry No."); + if OpenItemLedgEntry.FindSet() then + repeat + OpenSustValueEntry.SetLoadFields("Item Ledger Entry No.", "CO2e Amount (Actual)", "CO2e Amount (Expected)", "Item Ledger Entry Quantity"); + OpenSustValueEntry.SetRange("Item Ledger Entry No.", OpenItemLedgEntry."Entry No."); + OpenSustValueEntry.CalcSums("CO2e Amount (Actual)", "CO2e Amount (Expected)", "Item Ledger Entry Quantity"); + + CostAmt := CostAmt - OpenSustValueEntry."CO2e Amount (Actual)" - OpenSustValueEntry."CO2e Amount (Expected)"; + Quantity := Quantity - OpenSustValueEntry."Item Ledger Entry Quantity"; + until OpenItemLedgEntry.Next() = 0; + end; + + procedure SetFilters(var SustValueEntry: Record "Sustainability Value Entry"; var Item: Record Item) + begin + SustValueEntry.Reset(); + SustValueEntry.SetCurrentKey("Item No.", "Posting Date"); + SustValueEntry.SetRange("Item No.", Item."No."); + SustValueEntry.SetFilter("Posting Date", Item.GetFilter("Date Filter")); + end; + + local procedure CalculateQuantity(var Item: Record Item) CalcQty: Decimal + var + SustValueEntry: Record "Sustainability Value Entry"; + begin + SetFilters(SustValueEntry, Item); + SustValueEntry.CalcSums("Item Ledger Entry Quantity"); + CalcQty := SustValueEntry."Item Ledger Entry Quantity"; + exit(CalcQty); + end; + + local procedure CalculateCostAmt(var Item: Record Item; Actual: Boolean): Decimal + var + SustValueEntry: Record "Sustainability Value Entry"; + begin + SetFilters(SustValueEntry, Item); + if Actual then begin + SustValueEntry.CalcSums("CO2e Amount (Actual)"); + exit(SustValueEntry."CO2e Amount (Actual)"); + end; + SustValueEntry.CalcSums("CO2e Amount (Expected)"); + exit(SustValueEntry."CO2e Amount (Expected)"); + end; + + var + SustSetup: Record "Sustainability Setup"; +} \ 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 c99f350df2..45519b3c0e 100644 --- a/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al +++ b/Apps/W1/Sustainability/app/src/Certificate/SustItem.TableExt.al @@ -111,6 +111,14 @@ tableextension 6220 "Sust. Item" extends Item Rec.TestField("Default Sust. Account"); end; } + field(6218; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + MinValue = 0; + 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 9d1c2f7dc4..965fa5d935 100644 --- a/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al +++ b/Apps/W1/Sustainability/app/src/Certificate/SustItemCard.PageExt.al @@ -59,6 +59,12 @@ pageextension 6222 "Sust. Item Card" extends "Item Card" Editable = Rec."Replenishment System" = Rec."Replenishment System"::Purchase; ToolTip = 'Specifies the value of the Default N2O Emission field.'; } + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } } } } diff --git a/Apps/W1/Sustainability/app/src/Journal/SustItemJournalLine.TableExt.al b/Apps/W1/Sustainability/app/src/Journal/SustItemJournalLine.TableExt.al index fa29e85e7d..584ff33c9c 100644 --- a/Apps/W1/Sustainability/app/src/Journal/SustItemJournalLine.TableExt.al +++ b/Apps/W1/Sustainability/app/src/Journal/SustItemJournalLine.TableExt.al @@ -1,8 +1,9 @@ namespace Microsoft.Sustainability.Journal; +using Microsoft.Inventory.Item; +using Microsoft.Inventory.Journal; using Microsoft.Sustainability.Account; using Microsoft.Sustainability.Setup; -using Microsoft.Inventory.Journal; tableextension 6233 "Sust. Item Journal Line" extends "Item Journal Line" { @@ -13,6 +14,22 @@ tableextension 6233 "Sust. Item Journal Line" extends "Item Journal Line" Caption = 'Sustainability Account No.'; TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account No." <> xRec."Sust. Account No." then + ClearEmissionInformation(Rec); + + if Rec."Sust. Account No." = '' then begin + Rec.Validate("Sust. Account Category", ''); + "Sust. Account Name" := ''; + end else begin + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account No.")); + CopyFromSustainabilityAccount(Rec); + end; + + Rec.CreateDimFromDefaultDim(FieldNo(Rec."Sust. Account No.")); + end; } field(6211; "Sust. Account Name"; Text[100]) { @@ -25,6 +42,14 @@ tableextension 6233 "Sust. Item Journal Line" extends "Item Journal Line" Editable = false; TableRelation = "Sustain. Account Category"; DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Category" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Category")) + else + Rec.Validate("Sust. Account Subcategory", ''); + end; } field(6213; "Sust. Account Subcategory"; Code[20]) { @@ -54,8 +79,119 @@ tableextension 6233 "Sust. Item Journal Line" extends "Item Journal Line" Caption = 'Emission N2O'; DataClassification = CustomerContent; } + field(6217; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("CO2e per Unit")); + + UpdateSustainabilityEmission(Rec); + end; + } + field(6218; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Total CO2e" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Total CO2e")); + + UpdateEmissionPerUnit(Rec); + end; + } } + procedure GetPostingSign(GHGCredit: Boolean): Integer + var + Sign: Integer; + begin + Sign := 1; + + case Rec."Entry Type" of + Rec."Entry Type"::Consumption: + if not GHGCredit then + Sign := -1; + else + if GHGCredit then + Sign := -1; + end; + + exit(Sign); + end; + + procedure IsGHGCreditLine(): Boolean + var + Item: Record Item; + begin + if Rec."Item No." = '' then + exit(false); + + Item.Get(Rec."Item No."); + + exit(Item."GHG Credit"); + end; + + procedure UpdateSustainabilityEmission(var ItemJournalLine: Record "Item Journal Line") + begin + ItemJournalLine."Total CO2e" := ItemJournalLine."CO2e per Unit" * ItemJournalLine."Qty. per Unit of Measure" * ItemJournalLine.Quantity; + end; + + local procedure ClearEmissionInformation(var ItemJournalLine: Record "Item Journal Line") + begin + ItemJournalLine.Validate("CO2e per Unit", 0); + end; + + local procedure UpdateEmissionPerUnit(var ItemJournalLine: Record "Item Journal Line") + var + Denominator: Decimal; + begin + ItemJournalLine."CO2e Per Unit" := 0; + + if (ItemJournalLine."Qty. per Unit of Measure" = 0) or (ItemJournalLine.Quantity = 0) then + exit; + + Denominator := ItemJournalLine."Qty. per Unit of Measure" * ItemJournalLine.Quantity; + if ItemJournalLine."Total CO2e" <> 0 then + ItemJournalLine."CO2e per Unit" := ItemJournalLine."Total CO2e" / Denominator; + end; + + local procedure ValidateEmissionPrerequisite(ItemJournalLine: Record "Item Journal Line"; CurrentFieldNo: Integer) + begin + case CurrentFieldNo of + ItemJournalLine.FieldNo("CO2e per Unit"), + ItemJournalLine.FieldNo("Total CO2e"): + ItemJournalLine.TestField("Sust. Account No."); + ItemJournalLine.FieldNo("Sust. Account No."), + ItemJournalLine.FieldNo("Sust. Account Category"), + ItemJournalLine.FieldNo("Sust. Account Subcategory"), + ItemJournalLine.FieldNo("Sust. Account Name"): + ItemJournalLine.TestField("Item No."); + end; + end; + + local procedure CopyFromSustainabilityAccount(var ItemJournalLine: Record "Item Journal Line") + var + SustainabilityAccount: Record "Sustainability Account"; + begin + SustainabilityAccount.Get(ItemJournalLine."Sust. Account No."); + SustainabilityAccount.CheckAccountReadyForPosting(); + SustainabilityAccount.TestField("Direct Posting", true); + + ItemJournalLine.Validate("Sust. Account Name", SustainabilityAccount.Name); + ItemJournalLine.Validate("Sust. Account Category", SustainabilityAccount.Category); + ItemJournalLine.Validate("Sust. Account Subcategory", SustainabilityAccount.Subcategory); + end; + var SustainabilitySetup: Record "Sustainability Setup"; } \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Journal/SustainabilityJnlLine.Table.al b/Apps/W1/Sustainability/app/src/Journal/SustainabilityJnlLine.Table.al index 482990c653..a2df204a55 100644 --- a/Apps/W1/Sustainability/app/src/Journal/SustainabilityJnlLine.Table.al +++ b/Apps/W1/Sustainability/app/src/Journal/SustainabilityJnlLine.Table.al @@ -361,6 +361,12 @@ table 6214 "Sustainability Jnl. Line" Caption = 'Reason Code'; TableRelation = "Reason Code"; } + field(32; "CO2e Emission"; Decimal) + { + DataClassification = CustomerContent; + Caption = 'CO2e Emission'; + DecimalPlaces = 2 : 5; + } } keys diff --git a/Apps/W1/Sustainability/app/src/Journal/SustainabilityJournal.Page.al b/Apps/W1/Sustainability/app/src/Journal/SustainabilityJournal.Page.al index 24b87e002d..92b422810e 100644 --- a/Apps/W1/Sustainability/app/src/Journal/SustainabilityJournal.Page.al +++ b/Apps/W1/Sustainability/app/src/Journal/SustainabilityJournal.Page.al @@ -93,13 +93,6 @@ page 6219 "Sustainability Journal" field("Document Type"; Rec."Document Type") { ToolTip = 'Specifies the type of the document.'; - ValuesAllowed = " ", Invoice, "Credit Memo"; - - trigger OnValidate() - begin - if Rec."Document Type" = Rec."Document Type"::"GHG Credit" then - Error(InvalidDocumentTypeErr, Rec."Document Type"); - end; } field("Document No."; Rec."Document No.") { @@ -505,7 +498,6 @@ page 6219 "Sustainability Journal" ShortcutDimCode: array[8] of Code[20]; DimVisible1, DimVisible2, DimVisible3, DimVisible4, DimVisible5, DimVisible6, DimVisible7, DimVisible8 : Boolean; IsRecurringView, EnableWater, EnableWaste : Boolean; - InvalidDocumentTypeErr: Label 'You cannot use Document type %1 on Sustainability Journal Line.', Comment = ' %1 = Document Type'; trigger OnNewRecord(BelowxRec: Boolean) begin diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustCalculateCO2e.Report.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustCalculateCO2e.Report.al new file mode 100644 index 0000000000..d4ae850190 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustCalculateCO2e.Report.al @@ -0,0 +1,211 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.MachineCenter; +using Microsoft.Manufacturing.WorkCenter; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Posting; + +report 6214 "Sust. Calculate CO2e" +{ + Caption = 'Calculate CO2e'; + UsageCategory = Tasks; + ApplicationArea = Basic, Suite; + ProcessingOnly = true; + Permissions = tabledata "Work Center" = rm, tabledata "Machine Center" = rm; + + dataset + { + dataitem("Work Center"; "Work Center") + { + RequestFilterFields = "No."; + + trigger OnPreDataItem() + begin + if Type = Type::"Machine Center" then + CurrReport.Break(); + end; + + trigger OnAfterGetRecord() + var + WorkCenter: Record "Work Center"; + Counter: Integer; + CommitCounter: Integer; + begin + WorkCenter.CopyFilters("Work Center"); + if WorkCenter.FindSet() then begin + OpenDialog(WorkCenter, RecordCount); + + repeat + UpdateCO2ePerUnit(WorkCenter); + UpdateDialog(CommitCounter, Counter); + + CommitRecord(CommitCounter); + until WorkCenter.Next() = 0; + + CloseDialog(); + end; + + ShowCompletionMsg(RecordCount, Counter, "Work Center".TableCaption); + CurrReport.Break(); + end; + } + dataitem("Machine Center"; "Machine Center") + { + RequestFilterFields = "No."; + + trigger OnPreDataItem() + begin + if Type = Type::"Work Center" then + CurrReport.Break(); + end; + + trigger OnAfterGetRecord() + var + MachineCenter: Record "Machine Center"; + Counter: Integer; + CommitCounter: Integer; + begin + MachineCenter.CopyFilters("Machine Center"); + if MachineCenter.FindSet() then begin + OpenDialog(MachineCenter, RecordCount); + + repeat + UpdateCO2ePerUnit(MachineCenter); + UpdateDialog(CommitCounter, Counter); + + CommitRecord(CommitCounter); + until MachineCenter.Next() = 0; + + CloseDialog(); + end; + + ShowCompletionMsg(RecordCount, Counter, "Machine Center".TableCaption()); + CurrReport.Break(); + end; + } + } + + requestpage + { + layout + { + area(content) + { + field(CapacityType; Type) + { + ApplicationArea = Manufacturing; + Caption = 'Type'; + OptionCaption = 'Work Center,Machine Center,Both'; + ToolTip = 'Specifies the value of the Type field.'; + } + } + } + } + + procedure Initialize(CapacityType: Integer) + begin + Type := CapacityType; + end; + + local procedure CommitRecord(var CommitCounter: Integer) + begin + if CommitCounter <> 1000 then + exit; + + Commit(); + CommitCounter := 0; + end; + + local procedure UpdateDialog(var CommitCounter: Integer; var Counter: Integer) + begin + CommitCounter += 1; + + if not GuiAllowed then + exit; + + Counter += 1; + Window.Update(1, Round(Counter / RecordCount * 10000, 1)); + end; + + local procedure OpenDialog(var WorkCenter: Record "Work Center"; var RecordCount: Integer) + begin + if not GuiAllowed() then + exit; + + RecordCount := WorkCenter.Count(); + Window.Open(ProcessBarMsg); + end; + + local procedure OpenDialog(var MachineCenter: Record "Machine Center"; var RecordCount: Integer) + begin + if not GuiAllowed() then + exit; + + RecordCount := MachineCenter.Count(); + Window.Open(ProcessBarMsg); + end; + + local procedure CloseDialog() + begin + if not GuiAllowed() then + exit; + + Window.Close(); + end; + + local procedure ShowCompletionMsg(RecordCount: Integer; Counter: Integer; TableCaption: Text) + begin + if not GuiAllowed() then + exit; + + Message(StrSubstNo(UpdateCompleteMsg, Counter, RecordCount, TableCaption)); + end; + + local procedure UpdateCO2ePerUnit(var NewWorkCenter: Record "Work Center") + var + CO2eEmission: Decimal; + CarbonFee: Decimal; + begin + SustainabilityPostMgt.UpdateCarbonFeeEmissionValues( + "Emission Scope"::" ", + WorkDate(), + '', + NewWorkCenter."Default CO2 Emission", + NewWorkCenter."Default N2O Emission", + NewWorkCenter."Default CH4 Emission", + CO2eEmission, + CarbonFee); + + NewWorkCenter.Validate("CO2e per Unit", CO2eEmission); + NewWorkCenter.Validate("CO2e Last Date Modified", Today()); + NewWorkCenter.Modify(true); + end; + + local procedure UpdateCO2ePerUnit(var NewMachineCenter: Record "Machine Center") + var + CO2eEmission: Decimal; + CarbonFee: Decimal; + begin + SustainabilityPostMgt.UpdateCarbonFeeEmissionValues( + "Emission Scope"::" ", + WorkDate(), + '', + NewMachineCenter."Default CO2 Emission", + NewMachineCenter."Default N2O Emission", + NewMachineCenter."Default CH4 Emission", + CO2eEmission, + CarbonFee); + + NewMachineCenter.Validate("CO2e per Unit", CO2eEmission); + NewMachineCenter.Validate("CO2e Last Date Modified", Today()); + NewMachineCenter.Modify(true); + end; + + var + SustainabilityPostMgt: Codeunit "Sustainability Post Mgt"; + Window: Dialog; + Type: Option "Work Center","Machine Center",Both; + ProcessBarMsg: Label 'Processing: @1@@@@@@@', Comment = '1 - overall progress'; + UpdateCompleteMsg: Label 'CO2e per unit is updated on %1 out of %2 entries in %3.', Comment = '%1 - Records Updated, %2 - Total Record Count , %3 = Table Caption'; + RecordCount: Integer; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntries.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntries.PageExt.al new file mode 100644 index 0000000000..4725b0af1a --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntries.PageExt.al @@ -0,0 +1,32 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Capacity; + +pageextension 6265 "Sust. Capacity Ledger Entries" extends "Capacity Ledger Entries" +{ + layout + { + addafter("No.") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Overhead Cost") + { + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntry.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntry.TableExt.al new file mode 100644 index 0000000000..eff2a7e8dc --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustCapacityLedgerEntry.TableExt.al @@ -0,0 +1,54 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Capacity; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Setup; + +tableextension 6259 "Sust. Capacity Ledger Entry" extends "Capacity Ledger Entry" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustConsumptionJournal.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustConsumptionJournal.PageExt.al new file mode 100644 index 0000000000..69c6754840 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustConsumptionJournal.PageExt.al @@ -0,0 +1,27 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Journal; + +pageextension 6251 "Sust. Consumption Journal" extends "Consumption Journal" +{ + layout + { + addafter(Description) + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Unit Amount") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrder.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrder.PageExt.al new file mode 100644 index 0000000000..76e6e4f708 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrder.PageExt.al @@ -0,0 +1,33 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Ledger; + +pageextension 6270 "Sust. Finished Prod. Order" extends "Finished Production Order" +{ + + actions + { + addafter("&Warehouse Entries") + { + action("Sustainability Ledger Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Ledger Entries'; + Image = Ledger; + RunObject = Page "Sustainability Ledger Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability ledger entries on the document or journal line.'; + } + action("Sustainability Value Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Value Entries'; + Image = Ledger; + RunObject = Page "Sustainability Value Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability Value entries on the document or journal line.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrders.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrders.PageExt.al new file mode 100644 index 0000000000..8c6770f1d1 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustFinishedProdOrders.PageExt.al @@ -0,0 +1,33 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Ledger; + +pageextension 6269 "Sust. Finished Prod. Orders" extends "Finished Production Orders" +{ + + actions + { + addafter("&Warehouse Entries") + { + action("Sustainability Ledger Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Ledger Entries'; + Image = Ledger; + RunObject = Page "Sustainability Ledger Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability ledger entries on the document or journal line.'; + } + action("Sustainability Value Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Value Entries'; + Image = Ledger; + RunObject = Page "Sustainability Value Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability Value entries on the document or journal line.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenter.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenter.TableExt.al index 768c06b99a..f4d49f63f9 100644 --- a/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenter.TableExt.al +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenter.TableExt.al @@ -67,6 +67,21 @@ tableextension 6232 "Sust. Machine Center" extends "Machine Center" Rec.TestField("Default Sust. Account"); end; } + field(6214; "CO2e per Unit"; Decimal) + { + Editable = false; + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + MinValue = 0; + DataClassification = CustomerContent; + } + field(6215; "CO2e Last Date Modified"; Date) + { + Caption = 'CO2e Last Date Modified'; + Editable = false; + DataClassification = CustomerContent; + } } var diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterCard.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterCard.PageExt.al index 90df969246..2655e890dd 100644 --- a/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterCard.PageExt.al +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterCard.PageExt.al @@ -34,6 +34,32 @@ pageextension 6232 "Sust. Machine Center Card" extends "Machine Center Card" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the value of the Default N2O Emission field.'; } + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } + } + + actions + { + addafter("Capacity Ledger E&ntries") + { + action("Calculate CO2e") + { + Caption = 'Calculate CO2e'; + ApplicationArea = Basic, Suite; + Image = Calculate; + Promoted = true; + PromotedCategory = Process; + ToolTip = 'Executes the Calculate CO2e action.'; + + trigger OnAction() + begin + RunCalculateCO2e(); + end; } } } @@ -52,6 +78,17 @@ pageextension 6232 "Sust. Machine Center Card" extends "Machine Center Card" SustainabilityVisible := SustainabilitySetup."Work/Machine Center Emissions"; end; + local procedure RunCalculateCO2e() + var + MachineCenter: Record "Machine Center"; + CalculateCO2e: Report "Sust. Calculate CO2e"; + begin + MachineCenter.SetFilter("No.", Rec."No."); + CalculateCO2e.Initialize(1); + CalculateCO2e.SetTableView(MachineCenter); + CalculateCO2e.Run(); + end; + var SustainabilityVisible: Boolean; } \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterList.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterList.PageExt.al new file mode 100644 index 0000000000..5102d6ea15 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustMachineCenterList.PageExt.al @@ -0,0 +1,30 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.MachineCenter; + +pageextension 6257 "Sust. Machine Center List" extends "Machine Center List" +{ + actions + { + addafter("Capacity Ledger E&ntries") + { + action("Calculate CO2e") + { + Caption = 'Calculate CO2e'; + ApplicationArea = Basic, Suite; + Image = Calculate; + Promoted = true; + PromotedCategory = Process; + ToolTip = 'Executes the Calculate CO2e action.'; + + trigger OnAction() + var + CalculateCO2e: Report "Sust. Calculate CO2e"; + begin + CalculateCO2e.Initialize(1); + CalculateCO2e.Run(); + end; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustManufacturingSubscriber.Codeunit.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustManufacturingSubscriber.Codeunit.al new file mode 100644 index 0000000000..d1c61800d3 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustManufacturingSubscriber.Codeunit.al @@ -0,0 +1,354 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Inventory.Item; +using Microsoft.Inventory.Journal; +using Microsoft.Inventory.Ledger; +using Microsoft.Inventory.Posting; +using Microsoft.Manufacturing.Capacity; +using Microsoft.Manufacturing.Document; +using Microsoft.Manufacturing.Journal; +using Microsoft.Manufacturing.MachineCenter; +using Microsoft.Manufacturing.ProductionBOM; +using Microsoft.Manufacturing.Routing; +using Microsoft.Manufacturing.WorkCenter; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Posting; +using Microsoft.Sustainability.Journal; + +codeunit 6254 "Sust. Manufacturing Subscriber" +{ + + [EventSubscriber(ObjectType::Table, Database::"Routing Line", 'OnAfterWorkCenterTransferFields', '', false, false)] + local procedure OnAfterWorkCenterTransferFields(var RoutingLine: Record "Routing Line"; WorkCenter: Record "Work Center") + begin + RoutingLine.Validate("CO2e per Unit", WorkCenter."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Routing Line", 'OnAfterMachineCtrTransferFields', '', false, false)] + local procedure OnAfterMachineCtrTransferFields(var RoutingLine: Record "Routing Line"; MachineCenter: Record "Machine Center") + begin + RoutingLine.Validate("CO2e per Unit", MachineCenter."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Production BOM Line", 'OnValidateNoOnAfterAssignItemFields', '', false, false)] + local procedure OnValidateNoOnAfterAssignItemFields(var ProductionBOMLine: Record "Production BOM Line"; Item: Record Item) + begin + ProductionBOMLine.Validate("CO2e per Unit", Item."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Line", 'OnValidateItemNoOnAfterAssignItemValues', '', false, false)] + local procedure OnValidateItemNoOnAfterAssignItemValues(Item: Record Item; var ProdOrderLine: Record "Prod. Order Line") + begin + ProdOrderLine.Validate("Sust. Account No.", Item."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Component", 'OnValidateItemNoOnAfterUpdateUOMFromItem', '', false, false)] + local procedure OnValidateItemNoOnAfterUpdateUOMFromItem(var ProdOrderComponent: Record "Prod. Order Component"; Item: Record Item) + begin + ProdOrderComponent.Validate("Sust. Account No.", Item."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Routing Line", 'OnAfterWorkCenterTransferFields', '', false, false)] + local procedure OnAfterWorkCenterTransferProdOrderRoutingLineFields(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; WorkCenter: Record "Work Center") + begin + ProdOrderRoutingLine.Validate("Sust. Account No.", WorkCenter."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Routing Line", 'OnAfterMachineCtrTransferFields', '', false, false)] + local procedure OnAfterMachineCtrTransferProdOrderRoutingLineFields(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; MachineCenter: Record "Machine Center") + begin + ProdOrderRoutingLine.Validate("Sust. Account No.", MachineCenter."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Routing Line", 'OnAfterValidateEvent', "No.", false, false)] + local procedure OnAfterSetRecalcStatus(var Rec: Record "Prod. Order Routing Line") + begin + if Rec."No." = '' then + Rec.Validate("Sust. Account No.", ''); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Component", 'OnAfterValidateEvent', "Item No.", false, false)] + local procedure OnAfterValidateNoEventOnProdOrderComponent(var Rec: Record "Prod. Order Component") + begin + if (Rec."Item No." = '') and (Rec."Sust. Account No." <> '') then + Rec.Validate("Sust. Account No.", ''); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Line", 'OnValidateQuantityOnAfterCalcBaseQty', '', false, false)] + local procedure OnValidateQuantityOnAfterCalcBaseQty(var ProdOrderLine: Record "Prod. Order Line") + begin + ProdOrderLine.UpdateSustainabilityEmission(ProdOrderLine); + end; + + [EventSubscriber(ObjectType::Table, Database::"Prod. Order Component", 'OnValidateExpectedQuantityOnAfterCalcActConsumptionQty', '', false, false)] + local procedure OnValidateExpectedQuantityOnAfterCalcActConsumptionQty(var ProdOrderComp: Record "Prod. Order Component") + begin + ProdOrderComp.UpdateSustainabilityEmission(ProdOrderComp); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Calculate Routing Line", 'OnBeforeCalcExpectedCost', '', false, false)] + local procedure OnBeforeCalcExpectedCost(var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + begin + ProdOrderRoutingLine.UpdateSustainabilityEmission(ProdOrderRoutingLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Calculate Prod. Order", 'OnAfterTransferBOMComponent', '', false, false)] + local procedure OnAfterTransferBOMComponent(var ProdOrderLine: Record "Prod. Order Line"; var ProductionBOMLine: Record "Production BOM Line"; var ProdOrderComponent: Record "Prod. Order Component") + begin + if ProdOrderComponent."Sust. Account No." <> '' then + ProdOrderComponent.Validate("CO2e per Unit", ProductionBOMLine."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Calculate Prod. Order", 'OnBeforeProdOrderCompModify', '', false, false)] + local procedure OnBeforeProdOrderCompModify(var ProdBOMLine: Record "Production BOM Line"; var ProdOrderComp: Record "Prod. Order Component") + begin + if ProdOrderComp."Sust. Account No." <> '' then + ProdOrderComp.Validate("CO2e per Unit", ProdBOMLine."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Calculate Prod. Order", 'OnAfterCalculate', '', false, false)] + local procedure OnAfterCalculate(ProdOrderLine: Record "Prod. Order Line") + begin + if ProdOrderLine."Sust. Account No." <> '' then begin + ProdOrderLine.CalcFields("Expected Operation Total CO2e", "Expected Component Total CO2e"); + ProdOrderLine.Validate( + "CO2e per Unit", + (ProdOrderLine."Expected Operation Total CO2e" + ProdOrderLine."Expected Component Total CO2e") / ProdOrderLine.Quantity); + ProdOrderLine.Modify(); + end; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Production Journal Mgt", 'OnBeforeInsertOutputJnlLine', '', false, false)] + local procedure OnBeforeInsertOutputJnlLine(var ItemJournalLine: Record "Item Journal Line"; ProdOrderRtngLine: Record "Prod. Order Routing Line") + begin + ItemJournalLine.Validate("Sust. Account No.", ProdOrderRtngLine."Sust. Account No."); + ItemJournalLine.Validate("Sust. Account Name", ProdOrderRtngLine."Sust. Account Name"); + ItemJournalLine.Validate("Sust. Account Category", ProdOrderRtngLine."Sust. Account Category"); + ItemJournalLine.Validate("Sust. Account Subcategory", ProdOrderRtngLine."Sust. Account Subcategory"); + ItemJournalLine.Validate("CO2e per Unit", ProdOrderRtngLine."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Calculate Prod. Order", 'OnAfterTransferRoutingLine', '', false, false)] + local procedure OnAfterTransferRoutingLine(var ProdOrderLine: Record "Prod. Order Line"; var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var RoutingLine: Record "Routing Line") + begin + UpdateEmissionOnProdOrderRoutingLineFromRoutingLine(ProdOrderRoutingLine, RoutingLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Production Journal Mgt", 'OnBeforeInsertConsumptionJnlLine', '', false, false)] + local procedure OnBeforeInsertConsumptionJnlLine(var ItemJournalLine: Record "Item Journal Line"; ProdOrderComp: Record "Prod. Order Component") + begin + ItemJournalLine.Validate("Sust. Account No.", ProdOrderComp."Sust. Account No."); + ItemJournalLine.Validate("Sust. Account Name", ProdOrderComp."Sust. Account Name"); + ItemJournalLine.Validate("Sust. Account Category", ProdOrderComp."Sust. Account Category"); + ItemJournalLine.Validate("Sust. Account Subcategory", ProdOrderComp."Sust. Account Subcategory"); + ItemJournalLine.Validate("CO2e per Unit", ProdOrderComp."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Item Journal Line", 'OnValidateQuantityOnBeforeGetUnitAmount', '', false, false)] + local procedure OnValidateQuantityOnBeforeGetUnitAmount(var ItemJournalLine: Record "Item Journal Line") + begin + if ItemJournalLine."Entry Type" in [ItemJournalLine."Entry Type"::Output, ItemJournalLine."Entry Type"::Consumption] then + ItemJournalLine.UpdateSustainabilityEmission(ItemJournalLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnPostOutputOnBeforePostItem', '', false, false)] + local procedure OnPostOutputOnBeforePostItem(var ItemJournalLine: Record "Item Journal Line"; var ProdOrderLine: Record "Prod. Order Line"; var IsHandled: Boolean) + begin + if IsHandled then + exit; + + UpdateEmissionOnItemJournalLineFromProdOrderLine(ItemJournalLine, ProdOrderLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnInsertValueEntryOnAfterTempValueEntryRelationInsert', '', false, false)] + local procedure OnInsertValueEntryOnAfterTempValueEntryRelationInsert(ItemJnlLine: Record "Item Journal Line"; var ValueEntry: Record "Value Entry") + begin + if (ValueEntry."Entry Type" = ValueEntry."Entry Type"::"Direct Cost") then + PostSustainabilityLedgerEntry(ItemJnlLine, ItemJnlLine."Source Code", ItemJnlLine."Document No."); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnBeforeInsertCapLedgEntry', '', false, false)] + local procedure OnBeforeInsertCapLedgEntry(ItemJournalLine: Record "Item Journal Line"; var CapLedgEntry: Record "Capacity Ledger Entry") + begin + CapLedgEntry."Sust. Account No." := ItemJournalLine."Sust. Account No."; + CapLedgEntry."Sust. Account Name" := ItemJournalLine."Sust. Account Name"; + CapLedgEntry."Sust. Account Category" := ItemJournalLine."Sust. Account Category"; + CapLedgEntry."Sust. Account Subcategory" := ItemJournalLine."Sust. Account Subcategory"; + CapLedgEntry."CO2e per Unit" := ItemJournalLine."CO2e per Unit"; + CapLedgEntry."Total CO2e" := ItemJournalLine."Total CO2e"; + end; + + [EventSubscriber(ObjectType::Table, Database::"Item Journal Line", 'OnAfterOnValidateItemNoAssignByEntryType', '', false, false)] + local procedure OnAfterOnValidateItemNoAssignByEntryType(var ItemJournalLine: Record "Item Journal Line") + begin + UpdateEmissionOnItemJournalLineForConsumption(ItemJournalLine); + end; + + [EventSubscriber(ObjectType::Table, Database::"Item Journal Line", 'OnValidateCapUnitofMeasureCodeOnBeforeRoutingCostPerUnit', '', false, false)] + local procedure OnValidateCapUnitofMeasureCodeOnBeforeRoutingCostPerUnit(var ItemJournalLine: Record "Item Journal Line"; var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + begin + ItemJournalLine.Validate("Sust. Account No.", ProdOrderRoutingLine."Sust. Account No."); + ItemJournalLine.Validate("Sust. Account Name", ProdOrderRoutingLine."Sust. Account Name"); + ItemJournalLine.Validate("Sust. Account Category", ProdOrderRoutingLine."Sust. Account Category"); + ItemJournalLine.Validate("Sust. Account Subcategory", ProdOrderRoutingLine."Sust. Account Subcategory"); + ItemJournalLine.Validate("CO2e per Unit", ProdOrderRoutingLine."CO2e per Unit"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Item Journal Line", 'OnValidateItemNoOnAfterCreateDimInitial', '', false, false)] + local procedure OnValidateItemNoOnAfterCreateDimInitial(var ItemJournalLine: Record "Item Journal Line") + begin + if ItemJournalLine."Sust. Account No." <> '' then + ItemJournalLine.Validate("Sust. Account No.", ''); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnPostConsumptionOnBeforeCalcRemainingQuantity', '', false, false)] + local procedure OnPostConsumptionOnBeforeCalcRemainingQuantity(var ProdOrderComp: Record "Prod. Order Component"; var ItemJnlLine: Record "Item Journal Line"; var QtyToPost: Decimal) + begin + if (ItemJnlLine."Sust. Account No." <> '') and (QtyToPost <> 0) then + ProdOrderComp."Posted Total CO2e" += ItemJnlLine.GetPostingSign(ItemJnlLine.IsGHGCreditLine()) * ItemJnlLine."Total CO2e"; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnPostOutputOnBeforeProdOrderRtngLineModify', '', false, false)] + local procedure OnPostOutputOnBeforeProdOrderRtngLineModify(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ItemJournalLine: Record "Item Journal Line") + begin + if (ItemJournalLine."Sust. Account No." <> '') then + ProdOrderRoutingLine."Posted Total CO2e" += ItemJournalLine.GetPostingSign(ItemJournalLine.IsGHGCreditLine()) * ItemJournalLine."Total CO2e"; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Jnl.-Post Line", 'OnBeforeProdOrderLineModify', '', false, false)] + local procedure OnBeforeProdOrderLineModify(var ProdOrderLine: Record "Prod. Order Line"; ItemJournalLine: Record "Item Journal Line") + begin + if (ItemJournalLine."Sust. Account No." <> '') then + ProdOrderLine."Posted Total CO2e" += ItemJournalLine.GetPostingSign(ItemJournalLine.IsGHGCreditLine()) * ItemJournalLine."Total CO2e"; + end; + + local procedure UpdateEmissionOnItemJournalLineFromProdOrderLine(var ItemJournalLine: Record "Item Journal Line"; ProdOrderLine: Record "Prod. Order Line") + begin + if not (ItemJournalLine."Entry Type" in [ItemJournalLine."Entry Type"::Output]) then + exit; + + if (ItemJournalLine."Item No." = '') then + exit; + + if (ItemJournalLine."Order Type" <> ItemJournalLine."Order Type"::Production) then + exit; + + ItemJournalLine.Validate("Sust. Account No.", ''); + if ProdOrderLine."Sust. Account No." <> '' then begin + ItemJournalLine.Validate("Sust. Account No.", ProdOrderLine."Sust. Account No."); + ItemJournalLine.Validate("Sust. Account Name", ProdOrderLine."Sust. Account Name"); + ItemJournalLine.Validate("Sust. Account Category", ProdOrderLine."Sust. Account Category"); + ItemJournalLine.Validate("Sust. Account Subcategory", ProdOrderLine."Sust. Account Subcategory"); + ItemJournalLine.Validate("CO2e per Unit", ProdOrderLine."CO2e per Unit"); + end; + end; + + local procedure UpdateEmissionOnItemJournalLineForConsumption(var ItemJournalLine: Record "Item Journal Line") + var + ProdOrderComponent: Record "Prod. Order Component"; + begin + if (ItemJournalLine."Order Type" <> ItemJournalLine."Order Type"::Production) then + exit; + + if not (ItemJournalLine."Entry Type" in [ItemJournalLine."Entry Type"::Consumption]) then + exit; + + if ProdOrderComponent.Get(ProdOrderComponent.Status::Released, ItemJournalLine."Order No.", ItemJournalLine."Order Line No.", ItemJournalLine."Prod. Order Comp. Line No.") then + if ProdOrderComponent."Sust. Account No." <> '' then begin + ItemJournalLine.Validate("Sust. Account No.", ProdOrderComponent."Sust. Account No."); + ItemJournalLine.Validate("Sust. Account Name", ProdOrderComponent."Sust. Account Name"); + ItemJournalLine.Validate("Sust. Account Category", ProdOrderComponent."Sust. Account Category"); + ItemJournalLine.Validate("Sust. Account Subcategory", ProdOrderComponent."Sust. Account Subcategory"); + ItemJournalLine.Validate("CO2e per Unit", ProdOrderComponent."CO2e per Unit"); + end + end; + + local procedure UpdateEmissionOnProdOrderRoutingLineFromRoutingLine(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; RoutingLine: Record "Routing Line") + var + MachineCenter: Record "Machine Center"; + WorkCenter: Record "Work Center"; + begin + case ProdOrderRoutingLine.Type of + ProdOrderRoutingLine.Type::"Machine Center": + begin + MachineCenter.Get(ProdOrderRoutingLine."No."); + if MachineCenter."Default Sust. Account" = '' then + exit; + + ProdOrderRoutingLine.Validate("Sust. Account No.", MachineCenter."Default Sust. Account"); + ProdOrderRoutingLine.Validate("CO2e per Unit", RoutingLine."CO2e per Unit"); + end; + ProdOrderRoutingLine.Type::"Work Center": + begin + WorkCenter.Get(ProdOrderRoutingLine."No."); + if WorkCenter."Default Sust. Account" = '' then + exit; + + ProdOrderRoutingLine.Validate("Sust. Account No.", WorkCenter."Default Sust. Account"); + ProdOrderRoutingLine.Validate("CO2e per Unit", RoutingLine."CO2e per Unit"); + end; + end; + end; + + local procedure PostSustainabilityLedgerEntry(var ItemJournalLine: Record "Item Journal Line"; SrcCode: Code[10]; GenJnlLineDocNo: Code[20]) + var + SustainabilityJnlLine: Record "Sustainability Jnl. Line"; + SustainabilityPostMgt: Codeunit "Sustainability Post Mgt"; + GHGCredit: Boolean; + TotalCO2eToPost: Decimal; + begin + if (ItemJournalLine."Order Type" <> ItemJournalLine."Order Type"::Production) then + exit; + + if not (ItemJournalLine."Entry Type" in [ItemJournalLine."Entry Type"::Output, ItemJournalLine."Entry Type"::Consumption]) then + exit; + + GHGCredit := ItemJournalLine.IsGHGCreditLine(); + TotalCO2eToPost := ItemJournalLine.GetPostingSign(GHGCredit) * ItemJournalLine."Total CO2e"; + + if not CanPostSustainabilityJnlLine(ItemJournalLine."Sust. Account No.", ItemJournalLine."Sust. Account Category", ItemJournalLine."Sust. Account Subcategory", TotalCO2eToPost) then + exit; + + SustainabilityJnlLine.Init(); + SustainabilityJnlLine."Journal Template Name" := ItemJournalLine."Journal Template Name"; + SustainabilityJnlLine."Journal Batch Name" := ItemJournalLine."Journal Batch Name"; + SustainabilityJnlLine."Source Code" := SrcCode; + SustainabilityJnlLine.Validate("Posting Date", ItemJournalLine."Posting Date"); + SustainabilityJnlLine.Validate("Document No.", GenJnlLineDocNo); + SustainabilityJnlLine.Validate("Account No.", ItemJournalLine."Sust. Account No."); + SustainabilityJnlLine.Validate("Reason Code", ItemJournalLine."Reason Code"); + SustainabilityJnlLine.Validate("Account Category", ItemJournalLine."Sust. Account Category"); + SustainabilityJnlLine.Validate("Account Subcategory", ItemJournalLine."Sust. Account Subcategory"); + SustainabilityJnlLine.Validate("Unit of Measure", ItemJournalLine."Unit of Measure Code"); + 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"; + SustainabilityJnlLine.Validate("CO2e Emission", TotalCO2eToPost); + SustainabilityPostMgt.InsertLedgerEntry(SustainabilityJnlLine, ItemJournalLine); + end; + + local procedure CanPostSustainabilityJnlLine(AccountNo: Code[20]; AccountCategory: Code[20]; AccountSubCategory: Code[20]; CO2eToPost: Decimal): Boolean + var + SustAccountCategory: Record "Sustain. Account Category"; + SustainAccountSubcategory: Record "Sustain. Account Subcategory"; + begin + if AccountNo = '' then + exit(false); + + if SustAccountCategory.Get(AccountCategory) then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToPostSustLedEntryForWaterOrWasteErr, AccountNo); + + if SustainAccountSubcategory.Get(AccountCategory, AccountSubCategory) then + if not SustainAccountSubcategory."Renewable Energy" then + if (CO2eToPost = 0) then + Error(EmissionMustNotBeZeroErr); + + if (CO2eToPost <> 0) then + exit(true); + end; + + var + EmissionMustNotBeZeroErr: Label 'The Emission fields must have a value that is not 0.'; + NotAllowedToPostSustLedEntryForWaterOrWasteErr: Label 'It is not allowed to post Sustainability Ledger Entry for water or waste in Production document for Account No. %1', Comment = '%1 = Sustainability Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustOutputJournal.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustOutputJournal.PageExt.al new file mode 100644 index 0000000000..57891a07b5 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustOutputJournal.PageExt.al @@ -0,0 +1,28 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Journal; + +pageextension 6266 "Sust. Output Journal" extends "Output Journal" +{ + layout + { + addafter(Description) + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Scrap Quantity") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdBOMVersionLines.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdBOMVersionLines.PageExt.al new file mode 100644 index 0000000000..644885247e --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdBOMVersionLines.PageExt.al @@ -0,0 +1,18 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.ProductionBOM; + +pageextension 6244 "Sust. Prod. BOM Version Lines" extends "Production BOM Version Lines" +{ + layout + { + addafter("Routing Link Code") + { + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponent.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponent.TableExt.al new file mode 100644 index 0000000000..7dd1c136f7 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponent.TableExt.al @@ -0,0 +1,183 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Inventory.Item; +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Setup; + +tableextension 6246 "Sust. Prod. Order Component" extends "Prod. Order Component" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account No." <> xRec."Sust. Account No." then + ClearEmissionInformation(Rec); + + if Rec."Sust. Account No." = '' then begin + Rec.Validate("Sust. Account Category", ''); + "Sust. Account Name" := ''; + end else begin + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account No.")); + CopyFromSustainabilityAccount(Rec); + UpdateCO2eInformation(); + end; + + CreateDimFromDefaultDim(); + end; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Category" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Category")) + else + Rec.Validate("Sust. Account Subcategory", ''); + + if "Sust. Account Category" <> xRec."Sust. Account Category" then + Rec.Validate("Shortcut Dimension 1 Code", ''); + end; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Subcategory" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Subcategory")); + end; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("CO2e per Unit")); + + UpdateSustainabilityEmission(Rec); + end; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Total CO2e" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Total CO2e")); + + UpdateEmissionPerUnit(Rec); + end; + } + field(6216; "Posted Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Posted Total CO2e'; + Editable = false; + DataClassification = CustomerContent; + } + } + + procedure UpdateSustainabilityEmission(var ProdOrderComponent: Record "Prod. Order Component") + begin + ProdOrderComponent."Total CO2e" := ProdOrderComponent."CO2e per Unit" * ProdOrderComponent."Qty. per Unit of Measure" * ProdOrderComponent."Expected Quantity"; + end; + + procedure UpdateEmissionPerUnit(var ProdOrderComponent: Record "Prod. Order Component") + var + Denominator: Decimal; + begin + ProdOrderComponent."CO2e Per Unit" := 0; + + if (ProdOrderComponent."Qty. per Unit of Measure" = 0) or (ProdOrderComponent."Expected Quantity" = 0) then + exit; + + Denominator := ProdOrderComponent."Qty. per Unit of Measure" * ProdOrderComponent."Expected Quantity"; + if ProdOrderComponent."Total CO2e" <> 0 then + ProdOrderComponent."CO2e per Unit" := ProdOrderComponent."Total CO2e" / Denominator; + end; + + local procedure ClearEmissionInformation(var ProdOrderComponent: Record "Prod. Order Component") + begin + ProdOrderComponent.Validate("CO2e per Unit", 0); + end; + + local procedure ValidateEmissionPrerequisite(ProdOrderComponent: Record "Prod. Order Component"; CurrentFieldNo: Integer) + var + SustAccountCategory: Record "Sustain. Account Category"; + begin + case CurrentFieldNo of + ProdOrderComponent.FieldNo("CO2e per Unit"), + ProdOrderComponent.FieldNo("Total CO2e"): + ProdOrderComponent.TestField("Sust. Account No."); + ProdOrderComponent.FieldNo("Sust. Account No."), + ProdOrderComponent.FieldNo("Sust. Account Category"), + ProdOrderComponent.FieldNo("Sust. Account Subcategory"), + ProdOrderComponent.FieldNo("Sust. Account Name"): + begin + ProdOrderComponent.TestField("Item No."); + + if SustAccountCategory.Get(ProdOrderComponent."Sust. Account Category") then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToUseSustAccountForWaterOrWasteErr, ProdOrderComponent."Sust. Account No."); + end; + end; + end; + + local procedure UpdateCO2eInformation() + var + Item: Record Item; + begin + if not Item.Get(Rec."Item No.") then + exit; + + Rec.Validate("CO2e per Unit", Item."CO2e per Unit"); + end; + + local procedure CopyFromSustainabilityAccount(var ProdOrderComponent: Record "Prod. Order Component") + var + SustainabilityAccount: Record "Sustainability Account"; + begin + SustainabilityAccount.Get(ProdOrderComponent."Sust. Account No."); + SustainabilityAccount.CheckAccountReadyForPosting(); + SustainabilityAccount.TestField("Direct Posting", true); + + ProdOrderComponent.Validate("Sust. Account Name", SustainabilityAccount.Name); + ProdOrderComponent.Validate("Sust. Account Category", SustainabilityAccount.Category); + ProdOrderComponent.Validate("Sust. Account Subcategory", SustainabilityAccount.Subcategory); + end; + + var + SustainabilitySetup: Record "Sustainability Setup"; + NotAllowedToUseSustAccountForWaterOrWasteErr: Label 'It is not allowed to use Sustainability Account %1 for water or waste in Production document.', Comment = '%1 = Sust. Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponents.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponents.PageExt.al new file mode 100644 index 0000000000..1d14f9844b --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderComponents.PageExt.al @@ -0,0 +1,23 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; + +pageextension 6247 "Sust. Prod. Order Components" extends "Prod. Order Components" +{ + layout + { + addafter("Routing Link Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderLine.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderLine.TableExt.al new file mode 100644 index 0000000000..250dfe9d1d --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderLine.TableExt.al @@ -0,0 +1,205 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Inventory.Item; +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Setup; + +tableextension 6248 "Sust. Prod. Order Line" extends "Prod. Order Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account No." <> xRec."Sust. Account No." then + ClearEmissionInformation(Rec); + + if Rec."Sust. Account No." = '' then begin + Rec.Validate("Sust. Account Category", ''); + "Sust. Account Name" := ''; + end else begin + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account No.")); + CopyFromSustainabilityAccount(Rec); + UpdateCO2eInformation(); + end; + + CreateDimFromDefaultDim(); + end; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Category" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Category")) + else + Rec.Validate("Sust. Account Subcategory", ''); + + if "Sust. Account Category" <> xRec."Sust. Account Category" then + Rec.Validate("Shortcut Dimension 1 Code", ''); + end; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Subcategory" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Subcategory")); + end; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("CO2e per Unit")); + + UpdateSustainabilityEmission(Rec); + end; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Total CO2e" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Total CO2e")); + + UpdateEmissionPerUnit(Rec); + end; + } + field(6216; "Posted Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Posted Total CO2e'; + Editable = false; + DataClassification = CustomerContent; + } + field(6217; "Expected Operation Total CO2e"; Decimal) + { + AutoFormatType = 11; + CalcFormula = sum("Prod. Order Routing Line"."Total CO2e" where(Status = field(Status), + "Prod. Order No." = field("Prod. Order No."), + "Routing No." = field("Routing No."), + "Routing Reference No." = field("Routing Reference No."))); + Caption = 'Expected Operation Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + field(6218; "Expected Component Total CO2e"; Decimal) + { + AutoFormatType = 11; + CalcFormula = sum("Prod. Order Component"."Total CO2e" where(Status = field(Status), + "Prod. Order No." = field("Prod. Order No."), + "Prod. Order Line No." = field("Line No."), + "Due Date" = field("Date Filter"))); + Caption = 'Expected Component Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + } + + procedure UpdateSustainabilityEmission(var ProdOrderLine: Record "Prod. Order Line") + begin + ProdOrderLine."Total CO2e" := ProdOrderLine."CO2e per Unit" * ProdOrderLine."Qty. per Unit of Measure" * ProdOrderLine.Quantity; + end; + + procedure UpdateEmissionPerUnit(var ProdOrderLine: Record "Prod. Order Line") + var + Denominator: Decimal; + begin + ProdOrderLine."CO2e Per Unit" := 0; + + if (ProdOrderLine."Qty. per Unit of Measure" = 0) or (ProdOrderLine.Quantity = 0) then + exit; + + Denominator := ProdOrderLine."Qty. per Unit of Measure" * ProdOrderLine.Quantity; + if ProdOrderLine."Total CO2e" <> 0 then + ProdOrderLine."CO2e per Unit" := ProdOrderLine."Total CO2e" / Denominator; + end; + + local procedure ClearEmissionInformation(var ProdOrderLine: Record "Prod. Order Line") + begin + ProdOrderLine.Validate("CO2e per Unit", 0); + end; + + local procedure ValidateEmissionPrerequisite(ProdOrderLine: Record "Prod. Order Line"; CurrentFieldNo: Integer) + var + SustAccountCategory: Record "Sustain. Account Category"; + begin + case CurrentFieldNo of + ProdOrderLine.FieldNo("CO2e per Unit"), + ProdOrderLine.FieldNo("Total CO2e"): + ProdOrderLine.TestField("Sust. Account No."); + ProdOrderLine.FieldNo("Sust. Account No."), + ProdOrderLine.FieldNo("Sust. Account Category"), + ProdOrderLine.FieldNo("Sust. Account Subcategory"), + ProdOrderLine.FieldNo("Sust. Account Name"): + begin + ProdOrderLine.TestField("Item No."); + + if SustAccountCategory.Get(ProdOrderLine."Sust. Account Category") then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToUseSustAccountForWaterOrWasteErr, ProdOrderLine."Sust. Account No."); + end; + end; + end; + + local procedure UpdateCO2eInformation() + var + Item: Record Item; + begin + if not Item.Get(Rec."Item No.") then + exit; + + Rec.Validate("CO2e per Unit", Item."CO2e per Unit"); + end; + + local procedure CopyFromSustainabilityAccount(var ProdOrderLine: Record "Prod. Order Line") + var + SustainabilityAccount: Record "Sustainability Account"; + begin + SustainabilityAccount.Get(ProdOrderLine."Sust. Account No."); + SustainabilityAccount.CheckAccountReadyForPosting(); + SustainabilityAccount.TestField("Direct Posting", true); + + ProdOrderLine.Validate("Sust. Account Name", SustainabilityAccount.Name); + ProdOrderLine.Validate("Sust. Account Category", SustainabilityAccount.Category); + ProdOrderLine.Validate("Sust. Account Subcategory", SustainabilityAccount.Subcategory); + end; + + var + SustainabilitySetup: Record "Sustainability Setup"; + NotAllowedToUseSustAccountForWaterOrWasteErr: Label 'It is not allowed to use Sustainability Account %1 for water or waste in Production document.', Comment = '%1 = Sust. Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRouting.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRouting.PageExt.al new file mode 100644 index 0000000000..921f4090ce --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRouting.PageExt.al @@ -0,0 +1,23 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; + +pageextension 6248 "Sust. Prod. Order Routing" extends "Prod. Order Routing" +{ + layout + { + addafter("Routing Link Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRoutingLine.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRoutingLine.TableExt.al new file mode 100644 index 0000000000..571d6f062a --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProdOrderRoutingLine.TableExt.al @@ -0,0 +1,188 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; +using Microsoft.Manufacturing.MachineCenter; +using Microsoft.Manufacturing.WorkCenter; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Setup; + +tableextension 6247 "Sust. Prod. Order Routing Line" extends "Prod. Order Routing Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account No." <> xRec."Sust. Account No." then + ClearEmissionInformation(Rec); + + if Rec."Sust. Account No." = '' then begin + Rec.Validate("Sust. Account Category", ''); + "Sust. Account Name" := ''; + end else begin + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account No.")); + CopyFromSustainabilityAccount(Rec); + UpdateCO2eInformation(); + end; + end; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Category" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Category")) + else + Rec.Validate("Sust. Account Subcategory", ''); + end; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Subcategory" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Subcategory")); + end; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("CO2e per Unit")); + + UpdateSustainabilityEmission(Rec); + end; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Total CO2e" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Total CO2e")); + + UpdateEmissionPerUnit(Rec); + end; + } + field(6216; "Posted Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Posted Total CO2e'; + Editable = false; + DataClassification = CustomerContent; + } + } + + procedure UpdateSustainabilityEmission(var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + begin + ProdOrderRoutingLine."Total CO2e" := ProdOrderRoutingLine."CO2e per Unit" * ProdOrderRoutingLine."Input Quantity"; + end; + + procedure UpdateEmissionPerUnit(var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + var + Denominator: Decimal; + begin + ProdOrderRoutingLine."CO2e Per Unit" := 0; + + if (ProdOrderRoutingLine."Input Quantity" = 0) then + exit; + + Denominator := ProdOrderRoutingLine."Input Quantity"; + if ProdOrderRoutingLine."Total CO2e" <> 0 then + ProdOrderRoutingLine."CO2e per Unit" := ProdOrderRoutingLine."Total CO2e" / Denominator; + end; + + local procedure ClearEmissionInformation(var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + begin + ProdOrderRoutingLine.Validate("CO2e per Unit", 0); + end; + + local procedure ValidateEmissionPrerequisite(ProdOrderRoutingLine: Record "Prod. Order Routing Line"; CurrentFieldNo: Integer) + var + SustAccountCategory: Record "Sustain. Account Category"; + begin + case CurrentFieldNo of + ProdOrderRoutingLine.FieldNo("CO2e per Unit"), + ProdOrderRoutingLine.FieldNo("Total CO2e"): + ProdOrderRoutingLine.TestField("Sust. Account No."); + ProdOrderRoutingLine.FieldNo("Sust. Account No."), + ProdOrderRoutingLine.FieldNo("Sust. Account Category"), + ProdOrderRoutingLine.FieldNo("Sust. Account Subcategory"), + ProdOrderRoutingLine.FieldNo("Sust. Account Name"): + begin + ProdOrderRoutingLine.TestField("No."); + + if SustAccountCategory.Get(ProdOrderRoutingLine."Sust. Account Category") then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToUseSustAccountForWaterOrWasteErr, ProdOrderRoutingLine."Sust. Account No."); + end; + end; + end; + + local procedure UpdateCO2eInformation() + var + MachineCenter: Record "Machine Center"; + WorkCenter: Record "Work Center"; + begin + case Rec.Type of + Rec.Type::"Machine Center": + begin + MachineCenter.Get(Rec."No."); + Rec.Validate("CO2e per Unit", MachineCenter."CO2e per Unit"); + end; + Rec.Type::"Work Center": + begin + WorkCenter.Get(Rec."No."); + Rec.Validate("CO2e per Unit", WorkCenter."CO2e per Unit"); + end; + end; + end; + + local procedure CopyFromSustainabilityAccount(var ProdOrderRoutingLine: Record "Prod. Order Routing Line") + var + SustainabilityAccount: Record "Sustainability Account"; + begin + SustainabilityAccount.Get(ProdOrderRoutingLine."Sust. Account No."); + SustainabilityAccount.CheckAccountReadyForPosting(); + SustainabilityAccount.TestField("Direct Posting", true); + + ProdOrderRoutingLine.Validate("Sust. Account Name", SustainabilityAccount.Name); + ProdOrderRoutingLine.Validate("Sust. Account Category", SustainabilityAccount.Category); + ProdOrderRoutingLine.Validate("Sust. Account Subcategory", SustainabilityAccount.Subcategory); + end; + + var + SustainabilitySetup: Record "Sustainability Setup"; + NotAllowedToUseSustAccountForWaterOrWasteErr: Label 'It is not allowed to use Sustainability Account %1 for water or waste in Production document.', Comment = '%1 = Sust. Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLine.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLine.TableExt.al new file mode 100644 index 0000000000..2cefb986fb --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLine.TableExt.al @@ -0,0 +1,27 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.ProductionBOM; +using Microsoft.Sustainability.Setup; + +tableextension 6243 "Sust. Production BOM Line" extends "Production BOM Line" +{ + fields + { + field(6210; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + Rec.TestField(Type, Rec.Type::Item); + end; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLines.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLines.PageExt.al new file mode 100644 index 0000000000..68ac6f0ca5 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionBOMLines.PageExt.al @@ -0,0 +1,18 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.ProductionBOM; + +pageextension 6243 "Sust. Production BOM Lines" extends "Production BOM Lines" +{ + layout + { + addafter("Routing Link Code") + { + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionJournal.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionJournal.PageExt.al new file mode 100644 index 0000000000..5513165006 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustProductionJournal.PageExt.al @@ -0,0 +1,29 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Journal; + +pageextension 6250 "Sust. Production Journal" extends "Production Journal" +{ + layout + { + addafter("Scrap Quantity") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + Editable = false; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustRelProdOrderLines.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustRelProdOrderLines.PageExt.al new file mode 100644 index 0000000000..6287f8421a --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustRelProdOrderLines.PageExt.al @@ -0,0 +1,23 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; + +pageextension 6249 "Sust. Rel. Prod. Order Lines" extends "Released Prod. Order Lines" +{ + layout + { + addafter("Cost Amount") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrder.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrder.PageExt.al new file mode 100644 index 0000000000..b42d97393d --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrder.PageExt.al @@ -0,0 +1,33 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Ledger; + +pageextension 6268 "Sust. Released Prod. Order" extends "Released Production Order" +{ + + actions + { + addafter("&Warehouse Entries") + { + action("Sustainability Ledger Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Ledger Entries'; + Image = Ledger; + RunObject = Page "Sustainability Ledger Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability ledger entries on the document or journal line.'; + } + action("Sustainability Value Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Value Entries'; + Image = Ledger; + RunObject = Page "Sustainability Value Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability Value entries on the document or journal line.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrders.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrders.PageExt.al new file mode 100644 index 0000000000..c39a6a9934 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustReleasedProdOrders.PageExt.al @@ -0,0 +1,33 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Document; +using Microsoft.Sustainability.Ledger; + +pageextension 6267 "Sust. Released Prod. Orders" extends "Released Production Orders" +{ + + actions + { + addafter("&Warehouse Entries") + { + action("Sustainability Ledger Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Ledger Entries'; + Image = Ledger; + RunObject = Page "Sustainability Ledger Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability ledger entries on the document or journal line.'; + } + action("Sustainability Value Entries") + { + ApplicationArea = Manufacturing; + Caption = 'Sustainability Value Entries'; + Image = Ledger; + RunObject = Page "Sustainability Value Entries"; + RunPageLink = "Document No." = field("No."); + ToolTip = 'View the sustainability Value entries on the document or journal line.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLine.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLine.TableExt.al new file mode 100644 index 0000000000..2d1c78a9a9 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLine.TableExt.al @@ -0,0 +1,21 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Routing; +using Microsoft.Sustainability.Setup; + +tableextension 6245 "Sust. Routing Line" extends "Routing Line" +{ + fields + { + field(6210; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLines.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLines.PageExt.al new file mode 100644 index 0000000000..25c6288bf9 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingLines.PageExt.al @@ -0,0 +1,18 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Routing; + +pageextension 6245 "Sust. Routing Lines" extends "Routing Lines" +{ + layout + { + addafter("Unit Cost per") + { + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingVersionLines.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingVersionLines.PageExt.al new file mode 100644 index 0000000000..cb8086233d --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustRoutingVersionLines.PageExt.al @@ -0,0 +1,18 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.Routing; + +pageextension 6246 "Sust. Routing Version Lines" extends "Routing Version Lines" +{ + layout + { + addafter("Unit Cost per") + { + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenter.TableExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenter.TableExt.al index 790c480362..c33cc68037 100644 --- a/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenter.TableExt.al +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenter.TableExt.al @@ -67,6 +67,21 @@ tableextension 6231 "Sust. Work Center" extends "Work Center" Rec.TestField("Default Sust. Account"); end; } + field(6214; "CO2e per Unit"; Decimal) + { + Editable = false; + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + MinValue = 0; + DataClassification = CustomerContent; + } + field(6215; "CO2e Last Date Modified"; Date) + { + Caption = 'CO2e Last Date Modified'; + Editable = false; + DataClassification = CustomerContent; + } } var diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterCard.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterCard.PageExt.al index 513edb1c18..1bff9ce94f 100644 --- a/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterCard.PageExt.al +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterCard.PageExt.al @@ -34,6 +34,32 @@ pageextension 6231 "Sust. Work Center Card" extends "Work Center Card" ApplicationArea = Basic, Suite; ToolTip = 'Specifies the value of the Default N2O Emission field.'; } + field("CO2e per Unit"; Rec."CO2e per Unit") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the CO2e per Unit field.'; + } + } + } + } + + actions + { + addafter("Capacity Ledger E&ntries") + { + action("Calculate CO2e") + { + Caption = 'Calculate CO2e'; + ApplicationArea = Basic, Suite; + Image = Calculate; + Promoted = true; + PromotedCategory = Process; + ToolTip = 'Executes the Calculate CO2e action.'; + + trigger OnAction() + begin + RunCalculateCO2e(); + end; } } } @@ -52,6 +78,16 @@ pageextension 6231 "Sust. Work Center Card" extends "Work Center Card" SustainabilityVisible := SustainabilitySetup."Work/Machine Center Emissions"; end; + local procedure RunCalculateCO2e() + var + WorkCenter: Record "Work Center"; + CalculateCO2e: Report "Sust. Calculate CO2e"; + begin + WorkCenter.SetFilter("No.", Rec."No."); + CalculateCO2e.SetTableView(WorkCenter); + CalculateCO2e.Run(); + end; + var SustainabilityVisible: Boolean; } \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterList.PageExt.al b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterList.PageExt.al new file mode 100644 index 0000000000..05744dcbe3 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Manufacturing/SustWorkCenterList.PageExt.al @@ -0,0 +1,29 @@ +namespace Microsoft.Sustainability.Manufacturing; + +using Microsoft.Manufacturing.WorkCenter; + +pageextension 6256 "Sust. Work Center List" extends "Work Center List" +{ + actions + { + addafter("Capacity Ledger E&ntries") + { + action("Calculate CO2e") + { + Caption = 'Calculate CO2e'; + ApplicationArea = Basic, Suite; + Image = Calculate; + Promoted = true; + PromotedCategory = Process; + ToolTip = 'Executes the Calculate CO2e action.'; + + trigger OnAction() + var + CalculateCO2e: Report "Sust. Calculate CO2e"; + begin + CalculateCO2e.Run(); + 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 01bd7d2cde..159b9e2fc6 100644 --- a/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al +++ b/Apps/W1/Sustainability/app/src/Posting/SustItemPostSubscriber.Codeunit.al @@ -23,7 +23,14 @@ codeunit 6256 "Sust. Item Post Subscriber" var SustainabilityJnlLine: Record "Sustainability Jnl. Line"; SustainabilityPostMgt: Codeunit "Sustainability Post Mgt"; + GHGCredit: Boolean; + Sign: Integer; begin + if ItemJournalLine."Order Type" = ItemJournalLine."Order Type"::Production then begin + GHGCredit := ItemJournalLine.IsGHGCreditLine(); + Sign := ItemJournalLine.GetPostingSign(GHGCredit); + end; + SustainabilityJnlLine.Init(); SustainabilityJnlLine.Validate("Posting Date", ItemJournalLine."Posting Date"); SustainabilityJnlLine.Validate("Document No.", ValueEntry."Document No."); @@ -33,6 +40,12 @@ 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 ItemJournalLine."Order Type" = ItemJournalLine."Order Type"::Production then + SustainabilityJnlLine.Validate("CO2e Emission", Sign * ItemJournalLine."Total CO2e") + else + SustainabilityJnlLine.Validate("CO2e Emission", ItemJournalLine."Total CO2e"); + SustainabilityJnlLine.Validate("Emission CO2", ItemJournalLine."Emission CO2"); SustainabilityJnlLine.Validate("Emission CH4", ItemJournalLine."Emission CH4"); SustainabilityJnlLine.Validate("Emission N2O", ItemJournalLine."Emission N2O"); diff --git a/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al b/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al index 71ee93dc9c..7f31b47fb2 100644 --- a/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al +++ b/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al @@ -1,15 +1,30 @@ namespace Microsoft.Sustainability.Posting; +using Microsoft.Inventory.Item; using Microsoft.Inventory.Ledger; +using Microsoft.Sales.Document; using Microsoft.Sustainability.Account; using Microsoft.Sustainability.Emission; using Microsoft.Sustainability.Journal; +using Microsoft.Inventory.Journal; using Microsoft.Sustainability.Ledger; codeunit 6212 "Sustainability Post Mgt" { Access = Internal; + procedure InsertLedgerEntry(SustainabilityJnlLine: Record "Sustainability Jnl. Line"; ItemJnlLine: Record "Item Journal Line") + begin + SkipUpdateCarbonEmissionValue := ItemJnlLine."Entry Type" <> ItemJnlLine."Entry Type"::Purchase; + InsertLedgerEntry(SustainabilityJnlLine); + end; + + procedure InsertLedgerEntry(SustainabilityJnlLine: Record "Sustainability Jnl. Line"; SalesLie: Record "Sales Line") + begin + SkipUpdateCarbonEmissionValue := true; + InsertLedgerEntry(SustainabilityJnlLine); + end; + procedure InsertLedgerEntry(SustainabilityJnlLine: Record "Sustainability Jnl. Line") var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; @@ -36,11 +51,17 @@ codeunit 6212 "Sustainability Post Mgt" SustainabilityValueEntry: Record "Sustainability Value Entry"; ShouldCalcExpectedCO2e: Boolean; begin + SkipUpdateCarbonEmissionValue := ItemLedgerEntry."Entry Type" <> ItemLedgerEntry."Entry Type"::Purchase; SustainabilityValueEntry.Init(); SustainabilityValueEntry."Entry No." := SustainabilityValueEntry.GetLastEntryNo() + 1; SustainabilityValueEntry.CopyFromValueEntry(ValueEntry); + if (ValueEntry."Order Type" = ValueEntry."Order Type"::Production) and + (ValueEntry."Item Ledger Entry Type" = ValueEntry."Item Ledger Entry Type"::Output) + then + SustainabilityValueEntry."Expected Emission" := false; + SustainabilityValueEntry.Validate("User ID", CopyStr(UserId(), 1, 50)); UpdateCarbonFeeEmissionForValueEntry(SustainabilityValueEntry, SustainabilityJnlLine); @@ -57,6 +78,21 @@ codeunit 6212 "Sustainability Post Mgt" ItemLedgerEntry.Quantity = ItemLedgerEntry."Invoiced Quantity"); SustainabilityValueEntry.Insert(true); + + UpdateCO2ePerUnit(SustainabilityValueEntry); + end; + + procedure UpdateCO2ePerUnit(SustValueEntry: Record "Sustainability Value Entry") + var + Item: Record Item; + ItemCostMgt: Codeunit SustCostManagement; + begin + if (SustValueEntry."Valued Quantity" > 0) and not (SustValueEntry."Expected Emission") then begin + if not Item.Get(SustValueEntry."Item No.") then + exit; + + ItemCostMgt.UpdateCO2ePerUnit(Item, 0); + end; end; procedure ResetFilters(var SustainabilityJnlLine: Record "Sustainability Jnl. Line") @@ -73,6 +109,9 @@ codeunit 6212 "Sustainability Post Mgt" AccountCategory: Record "Sustain. Account Category"; ScopeType: Enum "Emission Scope"; begin + if SkipUpdateCarbonEmissionValue then + exit; + if AccountCategory.Get(SustainabilityLedgerEntry."Account Category") then ScopeType := AccountCategory."Emission Scope"; @@ -91,9 +130,12 @@ codeunit 6212 "Sustainability Post Mgt" if AccountCategory.Get(SustainabilityJnlLine."Account Category") then ScopeType := AccountCategory."Emission Scope"; - UpdateCarbonFeeEmissionValues( - ScopeType, SustainabilityJnlLine."Posting Date", SustainabilityJnlLine."Country/Region Code", SustainabilityJnlLine."Emission CO2", - SustainabilityJnlLine."Emission N2O", SustainabilityJnlLine."Emission CH4", CO2eEmission, CarbonFee); + if not SkipUpdateCarbonEmissionValue then + UpdateCarbonFeeEmissionValues( + ScopeType, SustainabilityJnlLine."Posting Date", SustainabilityJnlLine."Country/Region Code", SustainabilityJnlLine."Emission CO2", + SustainabilityJnlLine."Emission N2O", SustainabilityJnlLine."Emission CH4", CO2eEmission, CarbonFee) + else + CO2eEmission := SustainabilityJnlLine."CO2e Emission"; if SustainabilityValueEntry."Expected Emission" then SustainabilityValueEntry."CO2e Amount (Expected)" := CO2eEmission @@ -103,15 +145,15 @@ codeunit 6212 "Sustainability Post Mgt" SustainabilityValueEntry."CO2e per Unit" := CalcCO2ePerUnit(CO2eEmission, SustainabilityValueEntry."Valued Quantity"); end; - local procedure UpdateCarbonFeeEmissionValues( - ScopeType: Enum "Emission Scope"; - PostingDate: Date; - CountryRegionCode: Code[10]; - EmissionCO2: Decimal; - EmissionN2O: Decimal; - EmissionCH4: Decimal; - var CO2eEmission: Decimal; - var CarbonFee: Decimal): Decimal + procedure UpdateCarbonFeeEmissionValues( + ScopeType: Enum "Emission Scope"; + PostingDate: Date; + CountryRegionCode: Code[10]; + EmissionCO2: Decimal; + EmissionN2O: Decimal; + EmissionCH4: Decimal; + var CO2eEmission: Decimal; + var CarbonFee: Decimal): Decimal var EmissionFee: Record "Emission Fee"; CO2Factor: Decimal; @@ -245,6 +287,7 @@ codeunit 6212 "Sustainability Post Mgt" end; var + SkipUpdateCarbonEmissionValue: Boolean; PostingSustainabilityJournalLbl: Label 'Posting Sustainability Journal Lines: \ #1', Comment = '#1 = sub-process progress message'; CheckSustainabilityJournalLineLbl: Label 'Checking Sustainability Journal Line: %1', Comment = '%1 = Line No.'; ProcessingLineLbl: Label 'Processing Line: %1', Comment = '%1 = Line No.'; diff --git a/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesCrMemoSub.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesCrMemoSub.PageExt.al new file mode 100644 index 0000000000..10ba1bb1bf --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesCrMemoSub.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; + +pageextension 6237 "Sust. Pstd Sales Cr. Memo. Sub" extends "Posted Sales Cr. Memo Subform" +{ + layout + { + addafter(Description) + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Line Amount") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesInvSubform.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesInvSubform.PageExt.al new file mode 100644 index 0000000000..453b6422b6 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustPstdSalesInvSubform.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; + +pageextension 6238 "Sust. Pstd Sales Inv. Subform" extends "Posted Sales Invoice Subform" +{ + layout + { + addafter(Description) + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Line Amount") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al new file mode 100644 index 0000000000..90fbf4b7ad --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCopyDocument.Codeunit.al @@ -0,0 +1,52 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; +using Microsoft.Sales.History; +using Microsoft.Utilities; + +codeunit 6252 "Sust. Sales Copy Document" +{ + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Document Mgt.", 'OnCopySalesDocLineOnAfterCalcShouldValidateQuantityMoveNegLines', '', false, false)] + local procedure OnCopyPurchLineOnBeforeValidateQuantity(var ToSalesLine: Record "Sales Line"; FromSalesLine: Record "Sales Line") + begin + CopyFromSalesLine(ToSalesLine, FromSalesLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Copy Document Mgt.", 'OnCopySalesShptLinesToDocOnAfterCopySalesShptLineToSalesLine', '', false, false)] + local procedure OnAfterCopyPurchRcptLine(ToSalesLine: Record "Sales Line"; FromSalesShptLine: Record "Sales Shipment Line") + begin + CopyFromSalesShipmentLine(ToSalesLine, FromSalesShptLine); + end; + + local procedure CopyFromSalesLine(var ToSalesLine: Record "Sales Line"; FromSalesLine: Record "Sales Line") + begin + ToSalesLine."Posted Total CO2e" := 0; + + if ToSalesLine."Sust. Account No." <> FromSalesLine."Sust. Account No." then + ToSalesLine.Validate("Sust. Account No.", FromSalesLine."Sust. Account No."); + + if ToSalesLine."Sust. Account Category" <> FromSalesLine."Sust. Account Category" then + ToSalesLine.Validate("Sust. Account Category", FromSalesLine."Sust. Account Category"); + + if ToSalesLine."Sust. Account Subcategory" <> FromSalesLine."Sust. Account Subcategory" then + ToSalesLine.Validate("Sust. Account Subcategory", FromSalesLine."Sust. Account Subcategory"); + + ToSalesLine.Validate("CO2e per Unit", FromSalesLine."CO2e per Unit"); + end; + + local procedure CopyFromSalesShipmentLine(var ToSalesLine: Record "Sales Line"; FromSalesShptLine: Record "Sales Shipment Line") + begin + ToSalesLine."Posted Total CO2e" := 0; + + if ToSalesLine."Sust. Account No." <> FromSalesShptLine."Sust. Account No." then + ToSalesLine.Validate("Sust. Account No.", FromSalesShptLine."Sust. Account No."); + + if ToSalesLine."Sust. Account Category" <> FromSalesShptLine."Sust. Account Category" then + ToSalesLine.Validate("Sust. Account Category", FromSalesShptLine."Sust. Account Category"); + + if ToSalesLine."Sust. Account Subcategory" <> FromSalesShptLine."Sust. Account Subcategory" then + ToSalesLine.Validate("Sust. Account Subcategory", FromSalesShptLine."Sust. Account Subcategory"); + + ToSalesLine.Validate("CO2e per Unit", FromSalesShptLine."CO2e per Unit"); + end; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoHeader.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoHeader.TableExt.al new file mode 100644 index 0000000000..07c77a7818 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoHeader.TableExt.al @@ -0,0 +1,31 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; +using Microsoft.Sustainability.Ledger; +using Microsoft.Sustainability.Setup; + +tableextension 6236 "Sust. Sales Cr. Memo Header" extends "Sales Cr.Memo Header" +{ + fields + { + field(6210; "Sustainability Lines Exist"; Boolean) + { + Caption = 'Sustainability Lines Exist'; + Editable = false; + FieldClass = FlowField; + CalcFormula = exist("Sales Cr.Memo Line" where("Sust. Account No." = filter('<>'''''), "Document No." = field("No."))); + } + field(6211; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + CalcFormula = sum("Sustainability Ledger Entry"."CO2e Emission" where("Document No." = field("No."), "Document Type" = filter("Credit Memo" | "GHG Credit"))); + Caption = 'Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoLine.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoLine.TableExt.al new file mode 100644 index 0000000000..c4a9ed7589 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoLine.TableExt.al @@ -0,0 +1,54 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sustainability.Account; +using Microsoft.Sales.History; +using Microsoft.Sustainability.Setup; + +tableextension 6237 "Sust. Sales Cr. Memo Line" extends "Sales Cr.Memo Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoStats.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoStats.PageExt.al new file mode 100644 index 0000000000..e2aff7e510 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoStats.PageExt.al @@ -0,0 +1,47 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; + +pageextension 6241 "Sust. Sales Cr. Memo. Stats." extends "Sales Credit Memo Statistics" +{ + layout + { + addafter(Customer) + { + group(Sustainability) + { + Visible = EnableSustainability; + Caption = 'Sustainability'; + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Total CO2e'; + } + } + } + } + + trigger OnOpenPage() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetCurrRecord() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetRecord() + begin + EnableSustainabilityControl(); + end; + + local procedure EnableSustainabilityControl() + begin + Rec.CalcFields("Sustainability Lines Exist"); + EnableSustainability := Rec."Sustainability Lines Exist"; + end; + + var + EnableSustainability: Boolean; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoSubform.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoSubform.PageExt.al new file mode 100644 index 0000000000..b51366b56c --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesCrMemoSubform.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6234 "Sust. Sales Cr. Memo Subform" extends "Sales Cr. Memo Subform" +{ + layout + { + addafter("Bin Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Qty. Assigned") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceHeader.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceHeader.TableExt.al new file mode 100644 index 0000000000..9604293020 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceHeader.TableExt.al @@ -0,0 +1,31 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; +using Microsoft.Sustainability.Setup; +using Microsoft.Sustainability.Ledger; + +tableextension 6238 "Sust. Sales Invoice Header" extends "Sales Invoice Header" +{ + fields + { + field(6210; "Sustainability Lines Exist"; Boolean) + { + Caption = 'Sustainability Lines Exist'; + Editable = false; + FieldClass = FlowField; + CalcFormula = exist("Sales Invoice Line" where("Sust. Account No." = filter('<>'''''), "Document No." = field("No."))); + } + field(6211; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + CalcFormula = sum("Sustainability Ledger Entry"."CO2e Emission" where("Document No." = field("No."), "Document Type" = filter(Invoice | "GHG Credit"))); + Caption = 'Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceLine.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceLine.TableExt.al new file mode 100644 index 0000000000..fa886d5f56 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceLine.TableExt.al @@ -0,0 +1,54 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sustainability.Account; +using Microsoft.Sales.History; +using Microsoft.Sustainability.Setup; + +tableextension 6239 "Sust. Sales Invoice Line" extends "Sales Invoice Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceStats.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceStats.PageExt.al new file mode 100644 index 0000000000..96ea70c1e6 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceStats.PageExt.al @@ -0,0 +1,47 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.History; + +pageextension 6240 "Sust. Sales Invoice Stats." extends "Sales Invoice Statistics" +{ + layout + { + addafter(Customer) + { + group(Sustainability) + { + Visible = EnableSustainability; + Caption = 'Sustainability'; + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Total CO2e'; + } + } + } + } + + trigger OnOpenPage() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetCurrRecord() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetRecord() + begin + EnableSustainabilityControl(); + end; + + local procedure EnableSustainabilityControl() + begin + Rec.CalcFields("Sustainability Lines Exist"); + EnableSustainability := Rec."Sustainability Lines Exist"; + end; + + var + EnableSustainability: Boolean; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceSubform.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceSubform.PageExt.al new file mode 100644 index 0000000000..329f3001cf --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesInvoiceSubform.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6236 "Sust. Sales Invoice Subform" extends "Sales Invoice Subform" +{ + layout + { + addafter("Bin Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Qty. Assigned") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderStats.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderStats.PageExt.al new file mode 100644 index 0000000000..8ce3d68541 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderStats.PageExt.al @@ -0,0 +1,55 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6239 "Sust. Sales Order Stats." extends "Sales Order Statistics" +{ + layout + { + addafter(Customer) + { + group(Sustainability) + { + Visible = EnableSustainability; + Caption = 'Sustainability'; + + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Total CO2e'; + ToolTip = 'Specifies the Total CO2e for Purchase Order'; + } + field("Posted Total CO2e"; Rec."Posted Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Total CO2e'; + ToolTip = 'Specifies the Posted Total CO2e for Purchase Order'; + } + } + } + } + + trigger OnOpenPage() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetCurrRecord() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetRecord() + begin + EnableSustainabilityControl(); + end; + + local procedure EnableSustainabilityControl() + begin + Rec.CalcFields("Sustainability Lines Exist"); + EnableSustainability := Rec."Sustainability Lines Exist"; + end; + + var + EnableSustainability: Boolean; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderSubform.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderSubform.PageExt.al new file mode 100644 index 0000000000..17b9e0d4ac --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesOrderSubform.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6233 "Sust. Sales Order Subform" extends "Sales Order Subform" +{ + layout + { + addafter("Bin Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Quantity Invoiced") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesRetOrdSubform.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesRetOrdSubform.PageExt.al new file mode 100644 index 0000000000..f6a563e497 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesRetOrdSubform.PageExt.al @@ -0,0 +1,26 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6235 "Sust. Sales Ret. Ord. Subform" extends "Sales Return Order Subform" +{ + layout + { + addafter("Bin Code") + { + field("Sust. Account No."; Rec."Sust. Account No.") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Sustainability Account No. field.'; + } + } + addafter("Qty. Assigned") + { + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + ToolTip = 'Specifies the value of the Total CO2e field.'; + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesRetRcptLine.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesRetRcptLine.TableExt.al new file mode 100644 index 0000000000..b87a846ed2 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesRetRcptLine.TableExt.al @@ -0,0 +1,54 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sustainability.Account; +using Microsoft.Sales.History; +using Microsoft.Sustainability.Setup; + +tableextension 6240 "Sust. Sales Ret. Rcpt. Line" extends "Return Receipt Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesShipmentLine.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesShipmentLine.TableExt.al new file mode 100644 index 0000000000..66041cabdc --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesShipmentLine.TableExt.al @@ -0,0 +1,54 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sustainability.Account; +using Microsoft.Sales.History; +using Microsoft.Sustainability.Setup; + +tableextension 6241 "Sust. Sales Shipment Line" extends "Sales Shipment Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesStatistics.PageExt.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesStatistics.PageExt.al new file mode 100644 index 0000000000..83de520d0b --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesStatistics.PageExt.al @@ -0,0 +1,52 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; + +pageextension 6242 "Sust. Sales Statistics" extends "Sales Statistics" +{ + layout + { + addafter(Customer) + { + group(Sustainability) + { + Visible = EnableSustainability; + Caption = 'Sustainability'; + field("Total CO2e"; Rec."Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Total CO2e'; + } + field("Posted Total CO2e"; Rec."Posted Total CO2e") + { + ApplicationArea = Basic, Suite; + Caption = 'Posted Total CO2e'; + } + } + } + } + + trigger OnOpenPage() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetCurrRecord() + begin + EnableSustainabilityControl(); + end; + + trigger OnAfterGetRecord() + begin + EnableSustainabilityControl(); + end; + + local procedure EnableSustainabilityControl() + begin + Rec.CalcFields("Sustainability Lines Exist"); + EnableSustainability := Rec."Sustainability Lines Exist"; + end; + + var + EnableSustainability: Boolean; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustSalesSubscriber.Codeunit.al b/Apps/W1/Sustainability/app/src/Sales/SustSalesSubscriber.Codeunit.al new file mode 100644 index 0000000000..a6bed2dffd --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustSalesSubscriber.Codeunit.al @@ -0,0 +1,249 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Finance.GeneralLedger.Account; +using Microsoft.Inventory.Item; +using Microsoft.Inventory.Journal; +using Microsoft.Projects.Resources.Resource; +using Microsoft.Sales.Document; +using Microsoft.Sales.History; +using Microsoft.Sales.Posting; +using Microsoft.Sustainability.Account; +using Microsoft.Sustainability.Journal; +using Microsoft.Sustainability.Posting; + +codeunit 6253 "Sust. Sales Subscriber" +{ + [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterAssignGLAccountValues', '', false, false)] + local procedure OnAfterAssignGLAccountValues(var SalesLine: Record "Sales Line"; GLAccount: Record "G/L Account") + begin + SalesLine.Validate("Sust. Account No.", GLAccount."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterAssignItemValues', '', false, false)] + local procedure OnAfterAssignItemValues(var SalesLine: Record "Sales Line"; Item: Record Item) + begin + SalesLine.Validate("Sust. Account No.", Item."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterAssignResourceValues', '', false, false)] + local procedure OnAfterAssignResourceValues(var SalesLine: Record "Sales Line"; Resource: Record Resource) + begin + SalesLine.Validate("Sust. Account No.", Resource."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterAssignItemChargeValues', '', false, false)] + local procedure OnAfterAssignItemChargeValues(var SalesLine: Record "Sales Line"; ItemCharge: Record "Item Charge") + begin + SalesLine.Validate("Sust. Account No.", ItemCharge."Default Sust. Account"); + end; + + [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnValidateQuantityOnBeforeResetAmounts', '', false, false)] + local procedure OnValidateQuantityOnBeforeResetAmounts(var SalesLine: Record "Sales Line") + begin + SalesLine.UpdateSustainabilityEmission(SalesLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnPostSalesLineOnBeforePostItemTrackingLine', '', false, false)] + local procedure OnAfterPostSalesLine(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SrcCode: Code[10]; GenJnlLineDocNo: Code[20]) + begin + if (SalesLine."Qty. to Invoice" <> 0) then + PostSustainabilityLine(SalesHeader, SalesLine, SrcCode, GenJnlLineDocNo); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnPostItemTrackingForShipmentConditionOnBeforeUpdateBlanketOrderLine', '', false, false)] + local procedure OnPostUpdateOrderLineOnBeforeUpdateBlanketOrderLine(var SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) + begin + if SalesHeader.Invoice then + UpdatePostedSustainabilityEmissionOrderLine(SalesHeader, TempSalesLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeSalesShptLineInsert', '', false, false)] + local procedure OnBeforeSalesShptLineInsert(SalesLine: Record "Sales Line"; var SalesShptLine: Record "Sales Shipment Line") + begin + UpdatePostedSustainabilityEmission(SalesLine, SalesShptLine.Quantity, 1, SalesShptLine."Total CO2e"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeReturnRcptLineInsert', '', false, false)] + local procedure OnBeforeReturnRcptLineInsert(SalesLine: Record "Sales Line"; var ReturnRcptLine: Record "Return Receipt Line") + begin + UpdatePostedSustainabilityEmission(SalesLine, ReturnRcptLine.Quantity, 1, ReturnRcptLine."Total CO2e"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeSalesInvLineInsert', '', false, false)] + local procedure OnBeforeSalesInvLineInsert(SalesLine: Record "Sales Line"; var SalesInvLine: Record "Sales Invoice Line") + begin + UpdatePostedSustainabilityEmission(SalesLine, SalesInvLine.Quantity, 1, SalesInvLine."Total CO2e"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeSalesCrMemoLineInsert', '', false, false)] + local procedure OnBeforeSalesCrMemoLineInsert(SalesLine: Record "Sales Line"; var SalesCrMemoLine: Record "Sales Cr.Memo Line") + begin + UpdatePostedSustainabilityEmission(SalesLine, SalesCrMemoLine.Quantity, 1, SalesCrMemoLine."Total CO2e"); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostUpdateOrderLineModifyTempLine', '', false, false)] + local procedure OnBeforePostUpdateOrderLineModifyTempLine(var TempSalesLine: Record "Sales Line" temporary) + begin + TempSalesLine.UpdateSustainabilityEmission(TempSalesLine); + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnPostItemJnlLineOnAfterPrepareItemJnlLine', '', false, false)] + local procedure OnPostItemJnlLineOnAfterPrepareItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") + begin + if (ItemJournalLine.Quantity <> 0) or (ItemJournalLine."Invoiced Quantity" <> 0) then + UpdateSustainabilityItemJournalLine(ItemJournalLine, SalesHeader, SalesLine); + end; + + local procedure UpdateSustainabilityItemJournalLine(var ItemJournalLine: Record "Item Journal Line"; SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") + var + GHGCredit: Boolean; + Sign: Integer; + CO2eToPost: Decimal; + begin + GHGCredit := IsGHGCreditLine(SalesLine); + + Sign := GetPostingSign(SalesHeader, GHGCredit); + + if ItemJournalLine."Invoiced Quantity" <> 0 then + CO2eToPost := SalesLine."CO2e per Unit" * Abs(ItemJournalLine."Invoiced Quantity") * SalesLine."Qty. per Unit of Measure" + else + CO2eToPost := SalesLine."CO2e per Unit" * Abs(ItemJournalLine.Quantity) * SalesLine."Qty. per Unit of Measure"; + + CO2eToPost := CO2eToPost * Sign; + + if not CanPostSustainabilityJnlLine(SalesLine."Sust. Account No.", SalesLine."Sust. Account Category", SalesLine."Sust. Account Subcategory", CO2eToPost) then + exit; + + ItemJournalLine."Sust. Account No." := SalesLine."Sust. Account No."; + ItemJournalLine."Sust. Account Name" := SalesLine."Sust. Account Name"; + ItemJournalLine."Sust. Account Category" := SalesLine."Sust. Account Category"; + ItemJournalLine."Sust. Account Subcategory" := SalesLine."Sust. Account Subcategory"; + ItemJournalLine."CO2e per Unit" := SalesLine."CO2e per Unit"; + ItemJournalLine."Total CO2e" := CO2eToPost; + end; + + local procedure UpdatePostedSustainabilityEmissionOrderLine(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary) + var + PostedEmissionCO2e: Decimal; + GHGCredit: Boolean; + Sign: Integer; + begin + GHGCredit := IsGHGCreditLine(TempSalesLine); + Sign := GetPostingSign(SalesHeader, GHGCredit); + + UpdatePostedSustainabilityEmission(TempSalesLine, TempSalesLine."Qty. to Invoice", Sign, PostedEmissionCO2e); + TempSalesLine."Posted Total CO2e" += PostedEmissionCO2e; + end; + + local procedure UpdatePostedSustainabilityEmission(SalesLine: Record "Sales Line"; Quantity: Decimal; Sign: Integer; var PostedEmissionCO2e: Decimal) + begin + PostedEmissionCO2e := (SalesLine."CO2e per Unit" * Abs(Quantity) * SalesLine."Qty. per Unit of Measure") * Sign; + end; + + local procedure PostSustainabilityLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; SrcCode: Code[10]; GenJnlLineDocNo: Code[20]) + var + SustainabilityJnlLine: Record "Sustainability Jnl. Line"; + SustainabilityPostMgt: Codeunit "Sustainability Post Mgt"; + GHGCredit: Boolean; + Sign: Integer; + CO2eToPost: Decimal; + begin + GHGCredit := IsGHGCreditLine(SalesLine); + + Sign := GetPostingSign(SalesHeader, GHGCredit); + + CO2eToPost := SalesLine."CO2e per Unit" * Abs(SalesLine."Qty. to Invoice") * SalesLine."Qty. per Unit of Measure" * Sign; + + if not (SalesHeader.Invoice) then + exit; + + if not CanPostSustainabilityJnlLine(SalesLine."Sust. Account No.", SalesLine."Sust. Account Category", SalesLine."Sust. Account Subcategory", CO2eToPost) then + exit; + + SustainabilityJnlLine.Init(); + SustainabilityJnlLine."Journal Template Name" := SalesHeader."Journal Templ. Name"; + SustainabilityJnlLine."Journal Batch Name" := ''; + SustainabilityJnlLine."Source Code" := SrcCode; + SustainabilityJnlLine.Validate("Posting Date", SalesHeader."Posting Date"); + + if GHGCredit then + SustainabilityJnlLine.Validate("Document Type", SustainabilityJnlLine."Document Type"::"GHG Credit") + else + if SalesHeader."Document Type" in [SalesHeader."Document Type"::"Credit Memo", SalesHeader."Document Type"::"Return Order"] then + SustainabilityJnlLine.Validate("Document Type", SustainabilityJnlLine."Document Type"::"Credit Memo") + else + SustainabilityJnlLine.Validate("Document Type", SustainabilityJnlLine."Document Type"::Invoice); + + SustainabilityJnlLine.Validate("Document No.", GenJnlLineDocNo); + SustainabilityJnlLine.Validate("Account No.", SalesLine."Sust. Account No."); + SustainabilityJnlLine.Validate("Responsibility Center", SalesHeader."Responsibility Center"); + SustainabilityJnlLine.Validate("Reason Code", SalesHeader."Reason Code"); + SustainabilityJnlLine.Validate("Account Category", SalesLine."Sust. Account Category"); + SustainabilityJnlLine.Validate("Account Subcategory", SalesLine."Sust. Account Subcategory"); + SustainabilityJnlLine.Validate("Unit of Measure", SalesLine."Unit of Measure Code"); + SustainabilityJnlLine."Dimension Set ID" := SalesLine."Dimension Set ID"; + SustainabilityJnlLine."Shortcut Dimension 1 Code" := SalesLine."Shortcut Dimension 1 Code"; + SustainabilityJnlLine."Shortcut Dimension 2 Code" := SalesLine."Shortcut Dimension 2 Code"; + SustainabilityJnlLine.Validate("CO2e Emission", CO2eToPost); + SustainabilityJnlLine.Validate("Country/Region Code", SalesHeader."Sell-to Country/Region Code"); + SustainabilityPostMgt.InsertLedgerEntry(SustainabilityJnlLine, SalesLine); + end; + + local procedure GetPostingSign(SalesHeader: Record "Sales Header"; GHGCredit: Boolean): Integer + var + Sign: Integer; + begin + Sign := 1; + + case SalesHeader."Document Type" of + SalesHeader."Document Type"::Invoice, SalesHeader."Document Type"::Order: + if not GHGCredit then + Sign := -1; + else + if GHGCredit then + Sign := -1; + end; + + exit(Sign); + end; + + local procedure IsGHGCreditLine(SalesLine: Record "Sales Line"): Boolean + var + Item: Record Item; + begin + if SalesLine.Type <> SalesLine.Type::Item then + exit(false); + + if SalesLine."No." = '' then + exit(false); + + Item.Get(SalesLine."No."); + + exit(Item."GHG Credit"); + end; + + local procedure CanPostSustainabilityJnlLine(AccountNo: Code[20]; AccountCategory: Code[20]; AccountSubCategory: Code[20]; CO2eToPost: Decimal): Boolean + var + SustAccountCategory: Record "Sustain. Account Category"; + SustainAccountSubcategory: Record "Sustain. Account Subcategory"; + begin + if AccountNo = '' then + exit(false); + + if SustAccountCategory.Get(AccountCategory) then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToPostSustLedEntryForWaterOrWasteErr, AccountNo); + + if SustainAccountSubcategory.Get(AccountCategory, AccountSubCategory) then + if not SustainAccountSubcategory."Renewable Energy" then + if (CO2eToPost = 0) then + Error(EmissionMustNotBeZeroErr); + + if (CO2eToPost <> 0) then + exit(true); + end; + + var + EmissionMustNotBeZeroErr: Label 'The Emission fields must have a value that is not 0.'; + NotAllowedToPostSustLedEntryForWaterOrWasteErr: Label 'It is not allowed to post Sustainability Ledger Entry for water or waste in sales document for Account No. %1', Comment = '%1 = Sustainability Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesHeader.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesHeader.TableExt.al new file mode 100644 index 0000000000..0f4ff15f10 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesHeader.TableExt.al @@ -0,0 +1,43 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Sales.Document; +using Microsoft.Sustainability.Setup; + +tableextension 6234 "Sustainability Sales Header" extends "Sales Header" +{ + fields + { + field(6210; "Sustainability Lines Exist"; Boolean) + { + Caption = 'Sustainability Lines Exist'; + Editable = false; + FieldClass = FlowField; + CalcFormula = exist("Sales Line" where("Document Type" = field("Document Type"), + "Document No." = field("No."), + "Sust. Account No." = filter('<>'''''))); + } + field(6211; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + CalcFormula = sum("Sales Line"."Total CO2e" where("Document Type" = field("Document Type"), + "Document No." = field("No."))); + Caption = 'Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + field(6212; "Posted Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + CalcFormula = sum("Sales Line"."Posted Total CO2e" where("Document Type" = field("Document Type"), + "Document No." = field("No."))); + Caption = 'Posted Total CO2e'; + Editable = false; + FieldClass = FlowField; + } + } + + var + SustainabilitySetup: Record "Sustainability Setup"; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesLine.TableExt.al b/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesLine.TableExt.al new file mode 100644 index 0000000000..ca2264a033 --- /dev/null +++ b/Apps/W1/Sustainability/app/src/Sales/SustainabilitySalesLine.TableExt.al @@ -0,0 +1,188 @@ +namespace Microsoft.Sustainability.Sales; + +using Microsoft.Inventory.Item; +using Microsoft.Sustainability.Account; +using Microsoft.Sales.Document; +using Microsoft.Sustainability.Setup; + +tableextension 6235 "Sustainability Sales Line" extends "Sales Line" +{ + fields + { + field(6210; "Sust. Account No."; Code[20]) + { + Caption = 'Sustainability Account No.'; + TableRelation = "Sustainability Account" where("Account Type" = const(Posting), Blocked = const(false)); + DataClassification = CustomerContent; + + trigger OnValidate() + var + SustainabilityAccount: Record "Sustainability Account"; + begin + Rec.TestStatusOpen(); + if Rec."Sust. Account No." <> xRec."Sust. Account No." then + ClearEmissionInformation(Rec); + + if Rec."Sust. Account No." = '' then begin + Rec.Validate("Sust. Account Category", ''); + "Sust. Account Name" := ''; + end else begin + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account No.")); + + SustainabilityAccount.Get(Rec."Sust. Account No."); + SustainabilityAccount.CheckAccountReadyForPosting(); + SustainabilityAccount.TestField("Direct Posting", true); + + Rec.Validate("Sust. Account Name", SustainabilityAccount.Name); + Rec.Validate("Sust. Account Category", SustainabilityAccount.Category); + Rec.Validate("Sust. Account Subcategory", SustainabilityAccount.Subcategory); + + if Rec.Type = Rec.Type::Item then + UpdateCO2eInformation(); + end; + + CreateDimFromDefaultDim(FieldNo(Rec."Sust. Account No.")); + end; + } + field(6211; "Sust. Account Name"; Text[100]) + { + Caption = 'Sustainability Account Name'; + DataClassification = CustomerContent; + } + field(6212; "Sust. Account Category"; Code[20]) + { + Caption = 'Sustainability Account Category'; + Editable = false; + TableRelation = "Sustain. Account Category"; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Category" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Category")) + else + Rec.Validate("Sust. Account Subcategory", ''); + + if "Sust. Account Category" <> xRec."Sust. Account Category" then + Rec.Validate("Shortcut Dimension 1 Code", ''); + end; + } + field(6213; "Sust. Account Subcategory"; Code[20]) + { + Caption = 'Sustainability Account Subcategory'; + Editable = false; + TableRelation = "Sustain. Account Subcategory".Code where("Category Code" = field("Sust. Account Category")); + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Sust. Account Subcategory" <> '' then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Sust. Account Subcategory")); + end; + } + field(6214; "CO2e per Unit"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'CO2e per Unit'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."CO2e per Unit" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("CO2e per Unit")); + + UpdateSustainabilityEmission(Rec); + end; + } + field(6215; "Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Total CO2e'; + DataClassification = CustomerContent; + + trigger OnValidate() + begin + if Rec."Total CO2e" <> 0 then + ValidateEmissionPrerequisite(Rec, Rec.FieldNo("Total CO2e")); + + UpdateEmissionPerUnit(Rec); + end; + } + field(6216; "Posted Total CO2e"; Decimal) + { + AutoFormatType = 11; + AutoFormatExpression = SustainabilitySetup.GetFormat(SustainabilitySetup.FieldNo("Emission Decimal Places")); + Caption = 'Posted Total CO2e'; + Editable = false; + DataClassification = CustomerContent; + } + } + + procedure UpdateSustainabilityEmission(var SalesLine: Record "Sales Line") + begin + SalesLine."Total CO2e" := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * SalesLine.Quantity; + end; + + procedure UpdateEmissionPerUnit(var SalesLine: Record "Sales Line") + var + Denominator: Decimal; + begin + SalesLine."CO2e Per Unit" := 0; + + if (SalesLine."Qty. per Unit of Measure" = 0) or (SalesLine.Quantity = 0) then + exit; + + Denominator := SalesLine."Qty. per Unit of Measure" * SalesLine.Quantity; + if SalesLine."Total CO2e" <> 0 then + SalesLine."CO2e per Unit" := SalesLine."Total CO2e" / Denominator; + end; + + local procedure ClearEmissionInformation(var SalesLine: Record "Sales Line") + begin + SalesLine.Validate("CO2e per Unit", 0); + end; + + local procedure ValidateEmissionPrerequisite(SalesLine: Record "Sales Line"; CurrentFieldNo: Integer) + var + SustAccountCategory: Record "Sustain. Account Category"; + begin + case CurrentFieldNo of + SalesLine.FieldNo("CO2e per Unit"), + SalesLine.FieldNo("Total CO2e"): + begin + SalesLine.TestStatusOpen(); + SalesLine.TestField("Sust. Account No."); + end; + SalesLine.FieldNo("Sust. Account No."), + SalesLine.FieldNo("Sust. Account Category"), + SalesLine.FieldNo("Sust. Account Subcategory"), + SalesLine.FieldNo("Sust. Account Name"): + begin + SalesLine.TestField("No."); + if not (SalesLine.Type in [SalesLine.Type::Item, SalesLine.Type::"G/L Account", SalesLine.Type::Resource]) then + Error(InvalidTypeForSustErr, SalesLine.Type::Item, SalesLine.Type::"G/L Account", SalesLine.Type::Resource); + + if SustAccountCategory.Get(SalesLine."Sust. Account Category") then + if SustAccountCategory."Water Intensity" or SustAccountCategory."Waste Intensity" or SustAccountCategory."Discharged Into Water" then + Error(NotAllowedToUseSustAccountForWaterOrWasteErr, SalesLine."Sust. Account No."); + end; + end; + end; + + local procedure UpdateCO2eInformation() + var + Item: Record Item; + begin + if not Item.Get(Rec."No.") then + exit; + + Rec.Validate("CO2e per Unit", Item."CO2e per Unit"); + end; + + var + SustainabilitySetup: Record "Sustainability Setup"; + InvalidTypeForSustErr: Label 'Sustainability is only applicable for Type: %1 , %2 and %3.', Comment = '%1 - Sales Line Type Item, %2 - Sales Line Type G/L Account, %3 - Sales Line Type Resource'; + NotAllowedToUseSustAccountForWaterOrWasteErr: Label 'It is not allowed to use Sustainability Account %1 for water or waste in Sales document.', Comment = '%1 = Sust. Account No.'; +} \ No newline at end of file diff --git a/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al b/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al index c24617bb8e..6bc1942e46 100644 --- a/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al +++ b/Apps/W1/Sustainability/test/src/SustValueEntryTest.Codeunit.al @@ -11,6 +11,8 @@ codeunit 148190 "Sust. Value Entry Test" LibraryPurchase: Codeunit "Library - Purchase"; LibraryInventory: Codeunit "Library - Inventory"; LibraryERM: Codeunit "Library - ERM"; + LibrarySales: Codeunit "Library - Sales"; + LibraryManufacturing: Codeunit "Library - Manufacturing"; LibraryVariableStorage: Codeunit "Library - Variable Storage"; 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'; @@ -1003,6 +1005,1549 @@ codeunit 148190 "Sust. Value Entry Test" PurchaseRcptHeader.Navigate(); end; + [Test] + procedure VerifySustainabilityValueEntryShouldBeCreatedWhenSalesDocumentIsPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + SustainabilityAccount: Record "Sustainability Account"; + EmissionFee: array[3] of Record "Emission Fee"; + SalesHeader: Record "Sales Header"; + CountryRegion: Record "Country/Region"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value entry should be created when the Sales document is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee With Emission Scope and Country/Region. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + SalesHeader."Bill-to Country/Region Code" := CountryRegion.Code; + SalesHeader.Modify(); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Value entry and Sustainability Ledger Entry should be created when the Sales document is posted. + SustainabilityValueEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityValueEntry.FindFirst(); + Assert.RecordCount(SustainabilityValueEntry, 1); + Assert.AreEqual( + -TotalCO2e, + SustainabilityValueEntry."CO2e Amount (Actual)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), -TotalCO2e, SustainabilityValueEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityValueEntry."CO2e Amount (Expected)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption())); + + SustainabilityLedgerEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityLedgerEntry.FindFirst(); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + -TotalCO2e, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), -TotalCO2e, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Carbon Fee", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Carbon Fee"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityValueEntryShouldBeCreatedWhenSalesDocumentIsPartiallyPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + SustainabilityAccount: Record "Sustainability Account"; + EmissionFee: array[3] of Record "Emission Fee"; + SalesHeader: Record "Sales Header"; + CountryRegion: Record "Country/Region"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + Quantity: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value entry should be created when the Sales document is partially posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee With Emission Scope and Country/Region. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + SalesHeader."Sell-to Country/Region Code" := CountryRegion.Code; + SalesHeader.Modify(); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Save Quanity. + Quantity := SalesLine.Quantity / 2; + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", Quantity); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * Quantity; + + // [WHEN] Post a Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Value entry and Sustainability Ledger Entry should be created when the Sales document is partially posted. + SustainabilityValueEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityValueEntry.FindFirst(); + Assert.RecordCount(SustainabilityValueEntry, 1); + Assert.AreEqual( + -TotalCO2e, + SustainabilityValueEntry."CO2e Amount (Actual)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), -TotalCO2e, SustainabilityValueEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityValueEntry."CO2e Amount (Expected)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption())); + + SustainabilityLedgerEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityLedgerEntry.FindFirst(); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + -TotalCO2e, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), -TotalCO2e, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Carbon Fee", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Carbon Fee"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityValueEntryShouldBeKnockedOffWhenCancelSalesCreditMemoIsPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + SustainabilityAccount: Record "Sustainability Account"; + EmissionFee: array[3] of Record "Emission Fee"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value entry should be Kocked Off when the Cancel Sales Credit Memo is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create Emission Fee With Emission Scope. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", ''); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Update Reason Code in Sales Header. + UpdateReasonCodeinSalesHeader(SalesHeader); + + // [WHEN] Post a Sales Document. + PostAndVerifyCancelSalesCreditMemo(SalesHeader); + + // [VERIFY] Verify Sustainability Value Entry and Sustainability ledger Entry should be Kocked Off when the Cancel Sales Credit Memo is posted. + SustainabilityValueEntry.SetRange("Item No.", SalesLine."No."); + SustainabilityValueEntry.CalcSums("CO2e Amount (Actual)", "CO2e Amount (Expected)"); + Assert.RecordCount(SustainabilityValueEntry, 2); + Assert.AreEqual( + 0, + SustainabilityValueEntry."CO2e Amount (Actual)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), 0, SustainabilityValueEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityValueEntry."CO2e Amount (Expected)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), 0, SustainabilityValueEntry.TableCaption())); + + SustainabilityLedgerEntry.SetRange("Account No.", AccountCode); + SustainabilityLedgerEntry.CalcSums("Emission CO2", "Emission CH4", "Emission N2O", "CO2e Emission", "Carbon Fee"); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Carbon Fee", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Carbon Fee"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityRelatedEntriesWhenSalesDocumentIsPartiallyPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + SustainabilityAccount: Record "Sustainability Account"; + EmissionFee: array[3] of Record "Emission Fee"; + SalesHeader: Record "Sales Header"; + CountryRegion: Record "Country/Region"; + SalesLine: Record "Sales Line"; + SalesShipmentLine: Record "Sales Shipment Line"; + PostedSalesInvoiceSubform: TestPage "Posted Sales Invoice Subform"; + TotalCO2e: Decimal; + Quantity: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability related entries When Purchase Document is partially posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee With Emission Scope and Country/Region. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + SalesHeader."Bill-to Country/Region Code" := CountryRegion.Code; + SalesHeader.Modify(); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Save Quanity. + Quantity := SalesLine.Quantity / 2; + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", Quantity); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * Quantity; + + // [WHEN] Post a Sales Document With Shipping. + PostedNo := LibrarySales.PostSalesDocument(SalesHeader, true, false); + + // [VERIFY] Verify Sustainability Fields In Sales Shipment Line and Sustainability Value Entry should be created when Sales Document is shipped. + SalesShipmentLine.SetRange("Bill-to Customer No.", SalesLine."Bill-to Customer No."); + SalesShipmentLine.FindFirst(); + Assert.AreEqual( + AccountCode, + SalesShipmentLine."Sust. Account No.", + StrSubstNo(ValueMustBeEqualErr, SalesShipmentLine.FieldCaption("Sust. Account No."), AccountCode, SalesShipmentLine.TableCaption())); + Assert.AreEqual( + TotalCO2e, + SalesShipmentLine."Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesShipmentLine.FieldCaption("Total CO2e"), TotalCO2e, SalesShipmentLine.TableCaption())); + + SustainabilityValueEntry.SetRange("Document No.", PostedNo); + SustainabilityValueEntry.FindFirst(); + Assert.RecordCount(SustainabilityValueEntry, 1); + Assert.AreEqual( + -TotalCO2e, + SustainabilityValueEntry."CO2e Amount (Expected)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), -TotalCO2e, SustainabilityValueEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityValueEntry."CO2e Amount (Actual)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), 0, SustainabilityValueEntry.TableCaption())); + Assert.RecordCount(SustainabilityLedgerEntry, 0); + + // [WHEN] Post a Sales Document With Invoicing. + PostedNo := LibrarySales.PostSalesDocument(SalesHeader, false, true); + + // [VERIFY] Verify Sustainability Fields In Sales Invoice Line, Sustainability Value Entry and Sustainability Ledger Entry should be created when Sales Document is invoiced. + PostedSalesInvoiceSubform.OpenEdit(); + PostedSalesInvoiceSubform.FILTER.SetFilter("Document No.", PostedNo); + PostedSalesInvoiceSubform."Sust. Account No.".AssertEquals(AccountCode); + PostedSalesInvoiceSubform."Total CO2e".AssertEquals(TotalCO2e); + + SustainabilityValueEntry.SetRange("Document No.", PostedNo); + SustainabilityValueEntry.FindFirst(); + Assert.RecordCount(SustainabilityValueEntry, 1); + Assert.AreEqual( + -TotalCO2e, + SustainabilityValueEntry."CO2e Amount (Actual)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Actual)"), -TotalCO2e, SustainabilityValueEntry.TableCaption())); + Assert.AreEqual( + TotalCO2e, + SustainabilityValueEntry."CO2e Amount (Expected)", + StrSubstNo(ValueMustBeEqualErr, SustainabilityValueEntry.FieldCaption("CO2e Amount (Expected)"), TotalCO2e, SustainabilityValueEntry.TableCaption())); + + SustainabilityLedgerEntry.SetRange("Document No.", PostedNo); + SustainabilityLedgerEntry.FindFirst(); + Assert.RecordCount(SustainabilityLedgerEntry, 1); + Assert.AreEqual( + -TotalCO2e, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), -TotalCO2e, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Carbon Fee", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Carbon Fee"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifyPostedEmissionFieldsInSalesLine() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Posted Emission fields in Sales Line. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", LibraryRandom.RandInt(20)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5); + + // [WHEN] Post a Sales Document With Shipping. + LibrarySales.PostSalesDocument(SalesHeader, true, false); + + // [VERIFY] Verify Posted Emission fields in Sales Line When Sales Document is Shipped. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + Assert.AreEqual( + 0, + SalesLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesLine.FieldCaption("Posted Total CO2e"), 0, SalesLine.TableCaption())); + + // [WHEN] Post a Sales Document With Invoicing. + LibrarySales.PostSalesDocument(SalesHeader, false, true); + + // [VERIFY] Verify Posted Emission fields in Sales Line When Sales Document is invoiced. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + Assert.AreEqual( + -TotalCO2e, + SalesLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesLine.FieldCaption("Posted Total CO2e"), -TotalCO2e, SalesLine.TableCaption())); + + // [GIVEN] Update "External Document No." in Sales line. + SalesHeader.Validate("External Document No.", LibraryUtility.GenerateGUID()); + SalesHeader.Modify(); + + // [GIVEN] Update "Qty. to Ship" in Sales line. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(2, 2)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e. + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(7, 7); + + // [WHEN] Post a Sales Document With Shipping and Invoicing. + LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Posted Emission fields in Sales Line When Sales Document is shipped and invoiced. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + Assert.AreEqual( + -TotalCO2e, + SalesLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesLine.FieldCaption("Posted Total CO2e"), -TotalCO2e, SalesLine.TableCaption())); + end; + + [Test] + [HandlerFunctions('SalesOrderStatisticsPageHandler')] + procedure VerifySustainabilityFieldsInSalesOrderStatistics() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Sales Order Statistics. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" before posting of Sales order. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + + // [GIVEN] Post a Sales Document with Shipping. + LibrarySales.PostSalesDocument(SalesHeader, true, false); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" after partially posting of Sales order with only Shipping. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + + // [GIVEN] Post a Sales Document with Invoicing. + LibrarySales.PostSalesDocument(SalesHeader, false, true); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5) * -1); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" after partially posting of Sales order with only Invoicing. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + + // [GIVEN] Update "External Document No." in Sales line. + SalesHeader.Validate("External Document No.", LibraryUtility.GenerateGUID()); + SalesHeader.Modify(); + + // [GIVEN] Update "Qty. to Ship" in Sales line. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(2, 2)); + SalesLine.Modify(); + + // [GIVEN] Post a Sales Document with Shipping and Invoicing. + LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(7, 7) * -1); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" after partially posting of Sales order with Shipping and Invoicing. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + end; + + [Test] + procedure VerifySustainabilityFieldsInPostedSalesInvoiceStatisticsWhenSalesDocumentIsPartiallyPosted() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Posted Sales Invoice Statistics When Sales Document is partially posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5) * -1); + + // [WHEN] Post Sales Document with Shipping and Invoicing. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability fields in Page "Posted Sales Invoice Statistics" When Sales document is partially posted. + VerifyPostedSalesInvoiceStatistics(PostedInvoiceNo); + LibraryVariableStorage.Clear(); + + // [GIVEN] Update "External Document No." in Sales line. + SalesHeader.Validate("External Document No.", LibraryUtility.GenerateGUID()); + SalesHeader.Modify(); + + // [GIVEN] Update "Qty. to Ship" in Sales line. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(2, 2)); + SalesLine.Modify(); + + // [GIVEN] Post a Sales Document with Shipping and Invoicing. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(2, 2) * -1); + + // [VERIFY] Verify Sustainability fields in Page "Posted Sales Invoice Statistics" When Sales document is partially posted. + VerifyPostedSalesInvoiceStatistics(PostedInvoiceNo); + LibraryVariableStorage.Clear(); + end; + + [Test] + [HandlerFunctions('GLPostingPreviewHandler')] + procedure VerifySustainabilityValueEntryShouldBeCreatedDuringPreviewPostingOfSalesOrder() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value Entry and Sustainability Ledger Entry should be created during Preview Posting of Sales order. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save a transaction. + Commit(); + + // [WHEN] Post a Sales Document. + asserterror LibrarySales.PreviewPostSalesDocument(SalesHeader); + + // [VERIFY] No errors occured - preview mode error only. + Assert.ExpectedError(''); + end; + + [Test] + [HandlerFunctions('GLPostingPreviewHandlerForOnlyReceived')] + procedure VerifySustainabilityValueEntryShouldBeCreatedDuringPreviewPostingOfSalesOrderWhenDocumentIsShipped() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value Entry should be created during Preview Posting of Sales order When Document is shipped. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Qty. to Invoice", 0); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save a transaction. + Commit(); + + // [WHEN] Post a Sales Document. + asserterror LibrarySales.PreviewPostSalesDocument(SalesHeader); + + // [VERIFY] No errors occured - preview mode error only. + Assert.ExpectedError(''); + end; + + [Test] + [HandlerFunctions('NavigateFindEntriesHandler')] + procedure VerifySustainabilityValueEntryShouldBeShownWhenNavigatingPostedSalesInvoice() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesInvoiceHeader: Record "Sales Invoice Header"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedPurchInvNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value Entry and Sustainability Ledger Entry should be shown when navigating Posted Sales Invoice through NavigateFindEntriesHandler handler. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedPurchInvNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Value Entry and Sustainability Ledger Entry should be shown when navigating Posted Sales Invoice through NavigateFindEntriesHandler handler. + SalesInvoiceHeader.Get(PostedPurchInvNo); + SalesInvoiceHeader.Navigate(); + end; + + [Test] + [HandlerFunctions('NavigateFindEntriesHandlerForOnlyReceived')] + procedure VerifySustainabilityValueEntryShouldBeShownWhenNavigatingPostedSalesShipment() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesShipmentHeader: Record "Sales Shipment Header"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedPurchNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Value Entry should be shown when navigating Posted Sales Shipment through NavigateFindEntriesHandler handler. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedPurchNo := LibrarySales.PostSalesDocument(SalesHeader, true, false); + + // [VERIFY] Verify Sustainability Value Entry should be shown when navigating Posted Sales Shipment through NavigateFindEntriesHandler handler. + SalesShipmentHeader.Get(PostedPurchNo); + SalesShipmentHeader.Navigate(); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedInItemWhenPurchaseDocumentIsPosted() + var + Item: Record Item; + SustainabilityAccount: Record "Sustainability Account"; + PurchaseHeader: Record "Purchase Header"; + CountryRegion: Record "Country/Region"; + EmissionFee: array[3] of Record "Emission Fee"; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + ExpectedCO2eEmission: Decimal; + EmissionCO2: Decimal; + EmissionCH4: Decimal; + EmissionN2O: Decimal; + Quantity: Decimal; + begin + // [SCENARIO 537481] Verify "CO2e per Unit" must be updated in Item When Purchase Document is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create Item No. + LibraryInventory.CreateItem(Item); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Generate Emission and Quantity. + EmissionCO2 := LibraryRandom.RandInt(100); + EmissionCH4 := LibraryRandom.RandInt(100); + EmissionN2O := LibraryRandom.RandInt(100); + Quantity := LibraryRandom.RandIntInRange(10, 10); + + // [GIVEN] Save Expected CO2e Emission. + ExpectedCO2eEmission := + (EmissionCH4 * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2 * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O * EmissionFee[3]."Carbon Equivalent Factor") / Quantity; + + // [WHEN] Post Purchase Document. + CreateAndPostPurchaseDocument(PurchaseHeader, Item."No.", Quantity, EmissionFee[1]."Country/Region Code", AccountCode, EmissionCO2, EmissionCH4, EmissionN2O); + + // [THEN] Verify "CO2e per Unit" must be updated When Purchase Document is posted. + Item.Get(Item."No."); + Assert.AreEqual( + ExpectedCO2eEmission, + Item."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, Item.FieldCaption("CO2e per Unit"), ExpectedCO2eEmission, Item.TableCaption())); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedInSalesLine() + var + Item: Record Item; + SustainabilityAccount: Record "Sustainability Account"; + PurchaseHeader: Record "Purchase Header"; + CountryRegion: Record "Country/Region"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + EmissionFee: array[3] of Record "Emission Fee"; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + ExpectedCO2eEmission: Decimal; + EmissionCO2: Decimal; + EmissionCH4: Decimal; + EmissionN2O: Decimal; + Quantity: Decimal; + begin + // [SCENARIO 537481] Verify "CO2e per Unit" must be updated from Item in Sales line. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create Item No. + LibraryInventory.CreateItem(Item); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Generate Emission and Quantity. + EmissionCO2 := LibraryRandom.RandInt(100); + EmissionCH4 := LibraryRandom.RandInt(100); + EmissionN2O := LibraryRandom.RandInt(100); + Quantity := LibraryRandom.RandIntInRange(10, 10); + + // [GIVEN] Save Expected CO2e Emission. + ExpectedCO2eEmission := + (EmissionCH4 * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2 * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O * EmissionFee[3]."Carbon Equivalent Factor") / Quantity; + + // [GIVEN] Post Purchase Document. + CreateAndPostPurchaseDocument(PurchaseHeader, Item."No.", Quantity, EmissionFee[1]."Country/Region Code", AccountCode, EmissionCO2, EmissionCH4, EmissionN2O); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + Item."No.", + LibraryRandom.RandInt(10)); + + // [WHEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 100)); + SalesLine.Validate("Sust. Account No.", AccountCode); + + // [THEN] Verify "CO2e per Unit" must be updated from Item in Sales Line.. + Item.Get(Item."No."); + Assert.AreEqual( + ExpectedCO2eEmission, + SalesLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, SalesLine.FieldCaption("CO2e per Unit"), ExpectedCO2eEmission, SalesLine.TableCaption())); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedBasedOnAverageMethod() + var + Item: Record Item; + SustainabilityAccount: Record "Sustainability Account"; + SustainabilitySetup: Record "Sustainability Setup"; + PurchaseHeader: Record "Purchase Header"; + CountryRegion: Record "Country/Region"; + EmissionFee: array[3] of Record "Emission Fee"; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + ExpectedCO2eEmission: Decimal; + EmissionCO2: array[2] of Decimal; + EmissionCH4: array[2] of Decimal; + EmissionN2O: array[2] of Decimal; + Quantity: array[2] of Decimal; + begin + // [SCENARIO 537481] Verify "CO2e per Unit" must be updated based on Average Costing Method in Item. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Get Sustainability Setup. + SustainabilitySetup.Get(); + + // [GIVEN] Create Item No. + LibraryInventory.CreateItem(Item); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create Country/Region. + LibraryERM.CreateCountryRegion(CountryRegion); + + // [GIVEN] Create Emission Fee. + CreateEmissionFeeWithEmissionScope(EmissionFee, SustainabilityAccount."Emission Scope", CountryRegion.Code); + + // [GIVEN] Generate Emission and Quantity. + EmissionCO2[1] := LibraryRandom.RandInt(100); + EmissionCH4[1] := LibraryRandom.RandInt(100); + EmissionN2O[1] := LibraryRandom.RandInt(100); + EmissionCO2[2] := LibraryRandom.RandInt(1000); + EmissionCH4[2] := LibraryRandom.RandInt(1000); + EmissionN2O[2] := LibraryRandom.RandInt(1000); + Quantity[1] := LibraryRandom.RandIntInRange(10, 10); + Quantity[2] := LibraryRandom.RandIntInRange(10, 10); + + // [GIVEN] Save Expected CO2e Emission . + ExpectedCO2eEmission := + (EmissionCH4[1] * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2[1] * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O[1] * EmissionFee[3]."Carbon Equivalent Factor"); + ExpectedCO2eEmission += + (EmissionCH4[2] * EmissionFee[1]."Carbon Equivalent Factor" + EmissionCO2[2] * EmissionFee[2]."Carbon Equivalent Factor" + EmissionN2O[2] * EmissionFee[3]."Carbon Equivalent Factor"); + ExpectedCO2eEmission := Round((ExpectedCO2eEmission / (Quantity[1] + Quantity[2])), SustainabilitySetup."Emission Rounding Precision"); + + // [WHEN] Post Purchase Document With Emission A and B. + CreateAndPostPurchaseDocument(PurchaseHeader, Item."No.", Quantity[1], EmissionFee[1]."Country/Region Code", AccountCode, EmissionCO2[1], EmissionCH4[1], EmissionN2O[1]); + CreateAndPostPurchaseDocument(PurchaseHeader, Item."No.", Quantity[2], EmissionFee[1]."Country/Region Code", AccountCode, EmissionCO2[2], EmissionCH4[2], EmissionN2O[2]); + + // [THEN] Verify "CO2e per Unit" must be updated using Average Costing Method in Item. + Item.Get(Item."No."); + Assert.AreEqual( + ExpectedCO2eEmission, + Item."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, Item.FieldCaption("CO2e per Unit"), ExpectedCO2eEmission, Item.TableCaption())); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedInRoutingLineFromWorkCenter() + var + RoutingHeader: Record "Routing Header"; + RoutingLine: Record "Routing Line"; + WorkCenter: Record "Work Center"; + begin + // [SCENARIO 537479] Verify "CO2e per Unit" should be updated in Routing Line from Work Center. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Work Center. + LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter); + WorkCenter.Validate("CO2e per Unit", LibraryRandom.RandInt(10)); + WorkCenter.Modify(); + + // [GIVEN] Create Routing Header. + LibraryManufacturing.CreateRoutingHeader(RoutingHeader, RoutingHeader.Type::Serial); + + // [WHEN] Create Routing Line with Work Center. + LibraryManufacturing.CreateRoutingLine(RoutingHeader, RoutingLine, '', Format(LibraryRandom.RandInt(100)), RoutingLine.Type::"Work Center", WorkCenter."No."); + RoutingHeader.Validate(Status, RoutingHeader.Status::Certified); + RoutingHeader.Modify(true); + + // [THEN] Verify "CO2e per Unit" should be updated in Routing Line. + Assert.AreEqual( + WorkCenter."CO2e per Unit", + RoutingLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, RoutingLine.FieldCaption("CO2e per Unit"), WorkCenter."CO2e per Unit", RoutingLine.TableCaption())); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedInRoutingLineFromMachineCenter() + var + WorkCenter: Record "Work Center"; + RoutingHeader: Record "Routing Header"; + RoutingLine: Record "Routing Line"; + MachineCenter: Record "Machine Center"; + begin + // [SCENARIO 537479] Verify "CO2e per Unit" should be updated in Routing Line from Machine Center. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Work Center. + LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter); + + // [GIVEN] Create a Machine Center. + LibraryManufacturing.CreateMachineCenterWithCalendar(MachineCenter, WorkCenter."No.", LibraryRandom.RandInt(10)); + MachineCenter.Validate("CO2e per Unit", LibraryRandom.RandInt(10)); + MachineCenter.Modify(); + + // [GIVEN] Create Routing Header. + LibraryManufacturing.CreateRoutingHeader(RoutingHeader, RoutingHeader.Type::Serial); + + // [WHEN] Create Routing Line with Machine Center. + LibraryManufacturing.CreateRoutingLine(RoutingHeader, RoutingLine, '', Format(LibraryRandom.RandInt(100)), RoutingLine.Type::"Machine Center", MachineCenter."No."); + RoutingHeader.Validate(Status, RoutingHeader.Status::Certified); + RoutingHeader.Modify(true); + + // [THEN] Verify "CO2e per Unit" should be updated in Routing Line. + Assert.AreEqual( + MachineCenter."CO2e per Unit", + RoutingLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, RoutingLine.FieldCaption("CO2e per Unit"), MachineCenter."CO2e per Unit", RoutingLine.TableCaption())); + end; + + [Test] + procedure VerifyCO2ePerUnitShouldBeUpdatedInProdBOMLineFromItem() + var + ProdItem: Record Item; + CompItem: Record Item; + ProductionBOMHeader: Record "Production BOM Header"; + ProductionBOMLine: Record "Production BOM Line"; + begin + // [SCENARIO 537479] Verify "CO2e per Unit" should be updated in Production BOM Line from Item. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create Items. + CreateItems(ProdItem, CompItem); + + // [GIVEN] Update "CO2e per Unit" in Component Item. + CompItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100)); + CompItem.Modify(); + + // [GIVEN] Create Production BOM with Component Item. + LibraryManufacturing.CreateProductionBOMHeader(ProductionBOMHeader, CompItem."Base Unit of Measure"); + LibraryManufacturing.CreateProductionBOMLine(ProductionBOMHeader, ProductionBOMLine, '', ProductionBOMLine.Type::Item, CompItem."No.", 1); + LibraryManufacturing.UpdateProductionBOMStatus(ProductionBOMHeader, ProductionBOMHeader.Status::Certified); + + // [THEN] Verify "CO2e per Unit" should be updated in Production BOM Line. + Assert.AreEqual( + CompItem."CO2e per Unit", + ProductionBOMLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, ProductionBOMLine.FieldCaption("CO2e per Unit"), CompItem."CO2e per Unit", ProductionBOMLine.TableCaption())); + end; + + [Test] + procedure VerifySustFieldsShouldBeUpdatedAfterRefreshProductionOrder() + var + ProdItem: Record Item; + CompItem: Record Item; + RoutingHeader: Record "Routing Header"; + WorkCenter: Record "Work Center"; + ProductionOrder: Record "Production Order"; + ProductionBOMHeader: Record "Production BOM Header"; + SustainabilityAccount: Record "Sustainability Account"; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + Quanity: Decimal; + ExpectedCO2ePerUnit: Decimal; + begin + // [SCENARIO 537479] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated after refresh Production Order. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Work Center. + LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter); + WorkCenter.Validate("Default Sust. Account", AccountCode); + WorkCenter.Validate("CO2e per Unit", LibraryRandom.RandInt(10)); + WorkCenter.Modify(); + + // [GIVEN] Create Routing Header. + RoutingHeader.Get(CreateRoutingWithWorkCenter(WorkCenter, 0)); + + // [GIVEN] Create Production and Component Item. + CreateItems(ProdItem, CompItem); + + // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Component Item. + CompItem.Validate("Default Sust. Account", AccountCode); + CompItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100)); + CompItem.Modify(); + + // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Production Item. + ProdItem.Validate("Default Sust. Account", AccountCode); + ProdItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100)); + ProdItem.Modify(); + + // [GIVEN] Create Production BOM. + CreateProductionBOM(ProductionBOMHeader, CompItem, 0); + + // [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] Generate Quantity and Expected CO2e per unit for Prod Order Line. + Quanity := LibraryRandom.RandIntInRange(10, 10); + ExpectedCO2ePerUnit := (WorkCenter."CO2e per Unit" * Quanity + CompItem."CO2e per Unit" * Quanity) / Quanity; + + // [WHEN] Create and Refresh Production Order. + CreateAndRefreshProductionOrder(ProductionOrder, ProductionOrder.Status::Released, ProdItem."No.", Quanity); + + // [THEN] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated after refresh Production Order. + VerifyProductionOrderLine(ProductionOrder, ProdItem."Default Sust. Account", ExpectedCO2ePerUnit, ExpectedCO2ePerUnit * Quanity, 0); + VerifyProductionOrderComponent(ProductionOrder, CompItem."Default Sust. Account", CompItem."CO2e per Unit", CompItem."CO2e per Unit" * Quanity, 0); + VerifyProductionOrderRoutingLine(ProductionOrder, WorkCenter."Default Sust. Account", WorkCenter."CO2e per Unit", WorkCenter."CO2e per Unit" * Quanity, 0); + end; + + [Test] + procedure VerifySustainabilityFieldsShouldBeUpdatedAfterRefreshProductionOrderFromRoutingLineAndProductionBOM() + var + ProdItem: Record Item; + CompItem: Record Item; + RoutingHeader: Record "Routing Header"; + WorkCenter: Record "Work Center"; + ProductionOrder: Record "Production Order"; + ProductionBOMHeader: Record "Production BOM Header"; + SustainabilityAccount: Record "Sustainability Account"; + ExpectedCO2ePerUnit: array[2] of Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + Quanity: Decimal; + ExpectedCO2ePerUnitForProdOrderLine: Decimal; + begin + // [SCENARIO 537479] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated after refresh Production Order from Routing Line and Production BOM. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Work Center. + LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter); + WorkCenter.Validate("Default Sust. Account", AccountCode); + WorkCenter.Validate("CO2e per Unit", LibraryRandom.RandInt(10)); + WorkCenter.Modify(); + + // [GIVEN] Save Quantity and Expected "CO2e per Unit" for Routing. + ExpectedCO2ePerUnit[1] := LibraryRandom.RandInt(100); + Quanity := LibraryRandom.RandIntInRange(10, 10); + + // [GIVEN] Create Routing Header. + RoutingHeader.Get(CreateRoutingWithWorkCenter(WorkCenter, ExpectedCO2ePerUnit[1])); + + // [GIVEN] Create Production and Component Item. + CreateItems(ProdItem, CompItem); + + // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Component Item. + CompItem.Validate("Default Sust. Account", AccountCode); + CompItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100)); + CompItem.Modify(); + + // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Production Item. + ProdItem.Validate("Default Sust. Account", AccountCode); + 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] Save Expected "CO2e per Unit" for Prod Order Line. + ExpectedCO2ePerUnitForProdOrderLine := (ExpectedCO2ePerUnit[1] * Quanity + ExpectedCO2ePerUnit[2] * Quanity) / Quanity; + + // [WHEN] Create and Refresh Production Order. + CreateAndRefreshProductionOrder(ProductionOrder, ProductionOrder.Status::Released, ProdItem."No.", Quanity); + + // [THEN] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated after refresh Production Order. + VerifyProductionOrderLine(ProductionOrder, ProdItem."Default Sust. Account", ExpectedCO2ePerUnitForProdOrderLine, ExpectedCO2ePerUnitForProdOrderLine * Quanity, 0); + VerifyProductionOrderRoutingLine(ProductionOrder, WorkCenter."Default Sust. Account", ExpectedCO2ePerUnit[1], ExpectedCO2ePerUnit[1] * Quanity, 0); + VerifyProductionOrderComponent(ProductionOrder, CompItem."Default Sust. Account", ExpectedCO2ePerUnit[2], ExpectedCO2ePerUnit[2] * Quanity, 0); + end; + + [Test] + procedure VerifySustainabilityFieldsShouldBeUpdatedFromItemAndWorkCenter() + var + ProdItem: Record Item; + CompItem: Record Item; + RoutingHeader: Record "Routing Header"; + WorkCenter: Record "Work Center"; + ProductionOrder: Record "Production Order"; + ProductionOrderComponent: Record "Prod. Order Component"; + ProductionOrderRoutingLine: Record "Prod. Order Routing Line"; + ProductionBOMHeader: Record "Production BOM Header"; + SustainabilityAccount: Record "Sustainability Account"; + ExpectedCO2ePerUnit: array[2] of Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537479] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated from Item and Work Center. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Work Center. + LibraryManufacturing.CreateWorkCenterWithCalendar(WorkCenter); + WorkCenter.Validate("Default Sust. Account", AccountCode); + 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. + CreateItems(ProdItem, CompItem); + + // [GIVEN] Update "Default Sust. Account","CO2e per Unit" in Component Item. + CompItem.Validate("Default Sust. Account", AccountCode); + CompItem.Validate("CO2e per Unit", LibraryRandom.RandInt(100)); + CompItem.Modify(); + + // [GIVEN] Update "Production BOM No.","Routing No.","Default Sust. Account","CO2e per Unit" in Production Item. + ProdItem.Validate("Production BOM No.", ProductionBOMHeader."No."); + ProdItem.Validate("Routing No.", RoutingHeader."No."); + ProdItem.Validate("Default Sust. Account", AccountCode); + 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] Create and Refresh Production Order. + CreateAndRefreshProductionOrder(ProductionOrder, ProductionOrder.Status::Released, ProdItem."No.", LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Delete Prod. Order Component. + ProductionOrderComponent.SetRange(Status, ProductionOrder.Status); + ProductionOrderComponent.SetRange("Prod. Order No.", ProductionOrder."No."); + ProductionOrderComponent.DeleteAll(); + + // [WHEN] Create Prod. Order Component. + LibraryManufacturing.CreateProductionOrderComponent(ProductionOrderComponent, ProductionOrder.Status, ProductionOrder."No.", 10000); + ProductionOrderComponent.Validate("Item No.", CompItem."No."); + ProductionOrderComponent.Validate("Quantity per", LibraryRandom.RandIntInRange(1, 1)); + ProductionOrderComponent.Modify(); + + // [THEN] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated from Component Item. + VerifyProductionOrderComponent(ProductionOrder, CompItem."Default Sust. Account", CompItem."CO2e per Unit", CompItem."CO2e per Unit" * 10, 0); + + // [GIVEN] Find Prod. Order Routing Line. + ProductionOrderRoutingLine.SetRange(Status, ProductionOrder.Status); + ProductionOrderRoutingLine.SetRange("Prod. Order No.", ProductionOrder."No."); + ProductionOrderRoutingLine.FindFirst(); + + // [GIVEN] Update "No." in Prod. Order Routing Line. + ProductionOrderRoutingLine.Validate("No.", ''); + ProductionOrderRoutingLine.Validate("No.", WorkCenter."No."); + ProductionOrderRoutingLine.Modify(); + + // [THEN] Verify "Default Sust. Account","CO2e per Unit","Total CO2e" should be updated from Work Center. + VerifyProductionOrderRoutingLine(ProductionOrder, WorkCenter."Default Sust. Account", WorkCenter."CO2e per Unit", WorkCenter."CO2e per Unit" * 10, 0); + end; + + [Test] + [HandlerFunctions('ProductionJournalModalPageHandler,ConfirmHandler,MessageHandler')] + procedure VerifyLedgerEntryShouldBeUpdatedWhenProductionjournalIsPosted() + 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"; + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + ExpectedCO2ePerUnit: array[2] of Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: array[3] of Code[20]; + begin + // [SCENARIO 537479] Verify Sustainability Ledger Entry should be created When Production Journal is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [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. + CreateItems(ProdItem, CompItem); + + // [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. + PostInventoryForItem(CompItem."No."); + + // [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. + 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)); + + // [WHEN] Post Production Journal. + FindProdOrderLine(ProdOrderLine, ProductionOrder, ProdItem."No."); + LibraryManufacturing.OpenProductionJournal(ProductionOrder, ProdOrderLine."Line No."); + + // [THEN] Verify Sustainability Ledger Entry should be created When Production Journal is posted. + SustainabilityLedgerEntry.SetRange("Document No.", ProductionOrder."No."); + Assert.RecordCount(SustainabilityLedgerEntry, 2); + + SustainabilityValueEntry.SetRange("Document No.", ProductionOrder."No."); + Assert.RecordCount(SustainabilityValueEntry, 2); + + // [THEN] Verify Sustainability Value Entry and Sustainability Ledger Entry should be created for Production Order Line. + VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderLine."Sust. Account No.", ProdOrderLine."Total CO2e"); + VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderLine."Item No.", ProdOrderLine."Total CO2e"); + + // [THEN] Verify Sustainability Value Entry and Sustainability Ledger Entry should be created for Production Order Component. + FindProdOrderComponent(ProdOrderComponent, ProductionOrder, CompItem."No."); + VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Sust. Account No.", -ProdOrderComponent."Total CO2e"); + VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Item No.", -ProdOrderComponent."Total CO2e"); + end; + + [Test] + [HandlerFunctions('PartiallyPostProductionJournalModalPageHandler,ConfirmHandler,MessageHandler')] + procedure VerifyLedgerEntryShouldBeUpdatedWhenProductionjournalIsPartiallyPosted() + 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"; + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityValueEntry: Record "Sustainability Value Entry"; + ExpectedCO2ePerUnit: array[2] of Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: array[3] of Code[20]; + begin + // [SCENARIO 537479] Verify Sustainability Ledger Entry should be created When Production Journal is partially posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [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. + CreateItems(ProdItem, CompItem); + + // [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. + PostInventoryForItem(CompItem."No."); + + // [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. + 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)); + + // [WHEN] Post Production Journal. + FindProdOrderLine(ProdOrderLine, ProductionOrder, ProdItem."No."); + LibraryManufacturing.OpenProductionJournal(ProductionOrder, ProdOrderLine."Line No."); + + // [THEN] Verify Sustainability Ledger Entry should be created When Production Journal is posted. + SustainabilityLedgerEntry.SetRange("Document No.", ProductionOrder."No."); + Assert.RecordCount(SustainabilityLedgerEntry, 2); + + SustainabilityValueEntry.SetRange("Document No.", ProductionOrder."No."); + Assert.RecordCount(SustainabilityValueEntry, 2); + + // [THEN] Verify Sustainability Value Entry and Sustainability Ledger Entry should be created for Production Order Line. + FindProdOrderLine(ProdOrderLine, ProductionOrder, ProdItem."No."); + VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderLine."Sust. Account No.", 5 * ProdOrderLine."CO2e per Unit"); + VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderLine."Item No.", 5 * ProdOrderLine."CO2e per Unit"); + + // [THEN] Verify Sustainability Value Entry and Sustainability Ledger Entry should be created for Production Order Component. + FindProdOrderComponent(ProdOrderComponent, ProductionOrder, CompItem."No."); + VerifySustLedgerEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Sust. Account No.", -5 * ProdOrderComponent."CO2e per Unit"); + VerifySustValueEntryForProductionOrder(ProductionOrder, ProdOrderComponent."Item No.", -5 * ProdOrderComponent."CO2e per Unit"); + 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); @@ -1117,6 +2662,268 @@ codeunit 148190 "Sust. Value Entry Test" LibraryRandom.RandDecInDecimalRange(0.5, 1, 1)); end; + local procedure UpdateReasonCodeinSalesHeader(var SalesHeader: Record "Sales Header") + var + ReasonCode: Record "Reason Code"; + begin + LibraryERM.CreateReasonCode(ReasonCode); + + SalesHeader.Validate("Reason Code", ReasonCode.Code); + SalesHeader.Modify(); + end; + + local procedure PostAndVerifyCancelSalesCreditMemo(SalesHeader: Record "Sales Header") + var + SalesInvoiceHeader: Record "Sales Invoice Header"; + CorrectPostedSalesInvoice: Codeunit "Correct Posted Sales Invoice"; + PostedDocNumber: Code[20]; + begin + PostedDocNumber := LibrarySales.PostSalesDocument(SalesHeader, true, true); + SalesInvoiceHeader.Get(PostedDocNumber); + CorrectPostedSalesInvoice.CancelPostedInvoice(SalesInvoiceHeader); + end; + + local procedure OpenSalesOrderStatistics(No: Code[20]) + var + SalesOrder: TestPage "Sales Order"; + begin + SalesOrder.OpenEdit(); + SalesOrder.FILTER.SetFilter("No.", No); + SalesOrder.Statistics.Invoke(); + end; + + local procedure VerifyPostedSalesInvoiceStatistics(No: Code[20]) + var + PostedSalesInvoiceStatisticsPage: TestPage "Sales Invoice Statistics"; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + PostedSalesInvoiceStatisticsPage.OpenEdit(); + PostedSalesInvoiceStatisticsPage.FILTER.SetFilter("No.", No); + PostedSalesInvoiceStatisticsPage."Total CO2e".AssertEquals(PostedTotalCO2e); + end; + + local procedure CreateAndPostPurchaseDocument(var PurchaseHeader: Record "Purchase Header"; ItemNo: Code[20]; Quantity: Decimal; CountryRegionCode: Code[10]; AccountCode: Code[20]; EmissionCO2: Decimal; EmissionCH4: Decimal; EmissionN2O: Decimal): Code[20] + var + PurchaseLine: Record "Purchase Line"; + begin + LibraryPurchase.CreatePurchHeader(PurchaseHeader, "Purchase Document Type"::Order, LibraryPurchase.CreateVendorNo()); + PurchaseHeader."Buy-from Country/Region Code" := CountryRegionCode; + PurchaseHeader.Modify(); + + LibraryPurchase.CreatePurchaseLine(PurchaseLine, PurchaseHeader, "Purchase Line Type"::Item, ItemNo, Quantity); + PurchaseLine.Validate("Direct Unit Cost", LibraryRandom.RandIntInRange(10, 200)); + PurchaseLine.Validate("Sust. Account No.", AccountCode); + PurchaseLine.Validate("Emission CO2", EmissionCO2); + PurchaseLine.Validate("Emission CH4", EmissionCH4); + PurchaseLine.Validate("Emission N2O", EmissionN2O); + PurchaseLine.Modify(); + + exit(LibraryPurchase.PostPurchaseDocument(PurchaseHeader, true, true)); + end; + + local procedure PostInventoryForItem(ItemNo: Code[20]) + var + ItemJournalBatch: Record "Item Journal Batch"; + ItemJournalLine: Record "Item Journal Line"; + begin + SelectItemJournalBatch(ItemJournalBatch); + LibraryInventory.CreateItemJournalLine(ItemJournalLine, ItemJournalBatch."Journal Template Name", ItemJournalBatch.Name, ItemJournalLine."Entry Type"::Purchase, ItemNo, LibraryRandom.RandIntInRange(100, 100)); + LibraryInventory.PostItemJournalBatch(ItemJournalBatch); + end; + + local procedure SelectItemJournalBatch(var ItemJournalBatch: Record "Item Journal Batch") + var + ItemJournalTemplate: Record "Item Journal Template"; + begin + SelectItemJournalBatchByTemplateType(ItemJournalBatch, ItemJournalTemplate.Type::Item); + end; + + local procedure SelectItemJournalBatchByTemplateType(var ItemJournalBatch: Record "Item Journal Batch"; TemplateType: Enum "Item Journal Template Type") + var + ItemJournalTemplate: Record "Item Journal Template"; + begin + LibraryInventory.SelectItemJournalTemplateName(ItemJournalTemplate, TemplateType); + LibraryInventory.SelectItemJournalBatchName(ItemJournalBatch, ItemJournalTemplate.Type, ItemJournalTemplate.Name); + end; + + local procedure FindProdOrderLine(var ProdOrderLine: Record "Prod. Order Line"; ProductionOrder: Record "Production Order"; ItemNo: Code[20]) + begin + ProdOrderLine.SetRange(Status, ProductionOrder.Status); + ProdOrderLine.SetRange("Prod. Order No.", ProductionOrder."No."); + ProdOrderLine.SetRange("Item No.", ItemNo); + ProdOrderLine.FindFirst(); + end; + + local procedure FindProdOrderComponent(var ProdOrderComponent: Record "Prod. Order Component"; ProductionOrder: Record "Production Order"; ItemNo: Code[20]) + begin + ProdOrderComponent.SetRange(Status, ProductionOrder.Status); + ProdOrderComponent.SetRange("Prod. Order No.", ProductionOrder."No."); + ProdOrderComponent.SetRange("Item No.", ItemNo); + ProdOrderComponent.FindFirst(); + end; + + local procedure CreateRoutingWithWorkCenter(var WorkCenter: Record "Work Center"; CO2ePerUnit: Decimal): Code[20] + var + RoutingHeader: Record "Routing Header"; + RoutingLine: Record "Routing Line"; + begin + LibraryManufacturing.CreateRoutingHeader(RoutingHeader, RoutingHeader.Type::Serial); + LibraryManufacturing.CreateRoutingLine(RoutingHeader, RoutingLine, '', Format(LibraryRandom.RandInt(100)), RoutingLine.Type::"Work Center", WorkCenter."No."); + if CO2ePerUnit <> 0 then begin + RoutingLine.Validate("CO2e per Unit", CO2ePerUnit); + RoutingLine.Modify(); + end; + + RoutingHeader.Validate(Status, RoutingHeader.Status::Certified); + RoutingHeader.Modify(true); + + exit(RoutingHeader."No."); + end; + + local procedure CreateItems(var ProdItem: Record Item; var CompItem: Record Item) + begin + LibraryInventory.CreateItem(CompItem); + LibraryInventory.CreateItem(ProdItem); + ProdItem.Validate("Costing Method", ProdItem."Costing Method"::Standard); + ProdItem.Validate("Replenishment System", ProdItem."Replenishment System"::"Prod. Order"); + ProdItem.Modify(true); + end; + + local procedure CreateProductionBOM(var ProductionBOMHeader: Record "Production BOM Header"; CompItem: Record Item; CO2ePerUnit: Decimal) + var + ProductionBOMLine: Record "Production BOM Line"; + begin + LibraryManufacturing.CreateProductionBOMHeader(ProductionBOMHeader, CompItem."Base Unit of Measure"); + LibraryManufacturing.CreateProductionBOMLine(ProductionBOMHeader, ProductionBOMLine, '', ProductionBOMLine.Type::Item, CompItem."No.", 1); + if CO2ePerUnit <> 0 then begin + ProductionBOMLine.Validate("CO2e per Unit", CO2ePerUnit); + ProductionBOMLine.Modify(); + end; + LibraryManufacturing.UpdateProductionBOMStatus(ProductionBOMHeader, ProductionBOMHeader.Status::Certified); + end; + + local procedure CreateAndRefreshProductionOrder(var ProductionOrder: Record "Production Order"; Status: Enum "Production Order Status"; SourceNo: Code[20]; Quantity: Decimal) + begin + LibraryManufacturing.CreateProductionOrder(ProductionOrder, Status, ProductionOrder."Source Type"::Item, SourceNo, Quantity); + + LibraryManufacturing.RefreshProdOrder(ProductionOrder, false, true, true, true, false); + end; + + local procedure VerifyProductionOrderLine(ProductionOrder: Record "Production Order"; AccountCode: Code[20]; CO2ePerUnit: Decimal; TotalCO2e: Decimal; PostedTotalCO2e: Decimal) + var + ProductionOrderLine: Record "Prod. Order Line"; + begin + ProductionOrderLine.SetRange(Status, ProductionOrder.Status); + ProductionOrderLine.SetRange("Prod. Order No.", ProductionOrder."No."); + ProductionOrderLine.FindFirst(); + + Assert.AreEqual( + AccountCode, + ProductionOrderLine."Sust. Account No.", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderLine.FieldCaption("Sust. Account No."), AccountCode, ProductionOrderLine.TableCaption())); + Assert.AreEqual( + CO2ePerUnit, + ProductionOrderLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderLine.FieldCaption("CO2e per Unit"), CO2ePerUnit, ProductionOrderLine.TableCaption())); + Assert.AreEqual( + TotalCO2e, + ProductionOrderLine."Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderLine.FieldCaption("Total CO2e"), TotalCO2e, ProductionOrderLine.TableCaption())); + Assert.AreEqual( + PostedTotalCO2e, + ProductionOrderLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderLine.FieldCaption("Posted Total CO2e"), PostedTotalCO2e, ProductionOrderLine.TableCaption())); + end; + + local procedure VerifyProductionOrderComponent(ProductionOrder: Record "Production Order"; AccountCode: Code[20]; CO2ePerUnit: Decimal; TotalCO2e: Decimal; PostedTotalCO2e: Decimal) + var + ProductionOrderComponent: Record "Prod. Order Component"; + begin + ProductionOrderComponent.SetRange(Status, ProductionOrder.Status); + ProductionOrderComponent.SetRange("Prod. Order No.", ProductionOrder."No."); + ProductionOrderComponent.FindFirst(); + + Assert.AreEqual( + AccountCode, + ProductionOrderComponent."Sust. Account No.", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderComponent.FieldCaption("Sust. Account No."), AccountCode, ProductionOrderComponent.TableCaption())); + Assert.AreEqual( + CO2ePerUnit, + ProductionOrderComponent."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderComponent.FieldCaption("CO2e per Unit"), CO2ePerUnit, ProductionOrderComponent.TableCaption())); + Assert.AreEqual( + TotalCO2e, + ProductionOrderComponent."Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderComponent.FieldCaption("Total CO2e"), TotalCO2e, ProductionOrderComponent.TableCaption())); + Assert.AreEqual( + PostedTotalCO2e, + ProductionOrderComponent."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderComponent.FieldCaption("Posted Total CO2e"), PostedTotalCO2e, ProductionOrderComponent.TableCaption())); + end; + + local procedure VerifyProductionOrderRoutingLine(ProductionOrder: Record "Production Order"; AccountCode: Code[20]; CO2ePerUnit: Decimal; TotalCO2e: Decimal; PostedTotalCO2e: Decimal) + var + ProductionOrderRoutingLine: Record "Prod. Order Routing Line"; + begin + ProductionOrderRoutingLine.SetRange(Status, ProductionOrder.Status); + ProductionOrderRoutingLine.SetRange("Prod. Order No.", ProductionOrder."No."); + ProductionOrderRoutingLine.FindFirst(); + + Assert.AreEqual( + AccountCode, + ProductionOrderRoutingLine."Sust. Account No.", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderRoutingLine.FieldCaption("Sust. Account No."), AccountCode, ProductionOrderRoutingLine.TableCaption())); + Assert.AreEqual( + CO2ePerUnit, + ProductionOrderRoutingLine."CO2e per Unit", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderRoutingLine.FieldCaption("CO2e per Unit"), CO2ePerUnit, ProductionOrderRoutingLine.TableCaption())); + Assert.AreEqual( + TotalCO2e, + ProductionOrderRoutingLine."Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderRoutingLine.FieldCaption("Total CO2e"), TotalCO2e, ProductionOrderRoutingLine.TableCaption())); + Assert.AreEqual( + PostedTotalCO2e, + ProductionOrderRoutingLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, ProductionOrderRoutingLine.FieldCaption("Posted Total CO2e"), PostedTotalCO2e, ProductionOrderRoutingLine.TableCaption())); + end; + + local procedure VerifySustLedgerEntryForProductionOrder(ProductionOrder: Record "Production Order"; AccountCode: Code[20]; ExpectedCO2eEmission: Decimal) + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + begin + SustainabilityLedgerEntry.SetRange("Document No.", ProductionOrder."No."); + SustainabilityLedgerEntry.SetRange("Account No.", AccountCode); + SustainabilityLedgerEntry.FindFirst(); + + Assert.AreEqual( + ExpectedCO2eEmission, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), ExpectedCO2eEmission, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Carbon Fee", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Carbon Fee"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + local procedure VerifySustValueEntryForProductionOrder(ProductionOrder: Record "Production Order"; ItemNo: Code[20]; ExpectedCO2eEmission: Decimal) + var + SustainabilityValueEntry: Record "Sustainability Value Entry"; + begin + SustainabilityValueEntry.SetRange("Document No.", ProductionOrder."No."); + 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; + [ModalPageHandler] [Scope('OnPrem')] procedure PurchaseOrderStatisticsPageHandler(var PurchaseOrderStatisticsPage: TestPage "Purchase Order Statistics") @@ -1190,4 +2997,52 @@ codeunit 148190 "Sust. Value Entry Test" Navigate."Table Name".AssertEquals(''); Navigate."No. of Records".AssertEquals(''); end; + + [ModalPageHandler] + [Scope('OnPrem')] + procedure SalesOrderStatisticsPageHandler(var SalesOrderStatisticsPage: TestPage "Sales Order Statistics") + var + TotalCO2e: Variant; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(TotalCO2e); + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + SalesOrderStatisticsPage."Total CO2e".AssertEquals(TotalCO2e); + SalesOrderStatisticsPage."Posted Total CO2e".AssertEquals(PostedTotalCO2e); + end; + + [ModalPageHandler] + [Scope('OnPrem')] + procedure ProductionJournalModalPageHandler(var ProductionJournal: TestPage "Production Journal") + begin + ProductionJournal.Post.Invoke(); + end; + + [ModalPageHandler] + [Scope('OnPrem')] + procedure PartiallyPostProductionJournalModalPageHandler(var ProductionJournal: TestPage "Production Journal") + begin + ProductionJournal.First(); + repeat + ProductionJournal.Quantity.SetValue(LibraryRandom.RandIntInRange(5, 5)); + if ProductionJournal."No.".Value <> '' then + ProductionJournal."Output Quantity".SetValue(LibraryRandom.RandIntInRange(5, 5)); + until not ProductionJournal.Next(); + + ProductionJournal.Post.Invoke(); + end; + + [ConfirmHandler] + [Scope('OnPrem')] + procedure ConfirmHandler(Question: Text[1024]; var Reply: Boolean) + begin + Reply := true; + end; + + [MessageHandler] + [Scope('OnPrem')] + procedure MessageHandler(Message: Text[1024]) + begin + end; } \ No newline at end of file diff --git a/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al b/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al index 90ffb62d89..808a7c769b 100644 --- a/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al +++ b/Apps/W1/Sustainability/test/src/SustainabilityPostingTest.Codeunit.al @@ -11,6 +11,7 @@ codeunit 148184 "Sustainability Posting Test" LibraryPurchase: Codeunit "Library - Purchase"; LibraryInventory: Codeunit "Library - Inventory"; LibraryERM: Codeunit "Library - ERM"; + LibrarySales: Codeunit "Library - Sales"; LibraryVariableStorage: Codeunit "Library - Variable Storage"; 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'; @@ -2043,6 +2044,780 @@ codeunit 148184 "Sustainability Posting Test" StrSubstNo(InformationTakenToLedgerEntryLbl, SustainabilityLedgerEntry.FieldCaption("Emission Factor N2O"), SustainAccountSubcategory.TableCaption())); end; + [Test] + procedure VerifySustainabilityLedgerEntryShouldBeCreatedWhenSalesDocumentIsPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger entry should be created when the sales document is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate CO2e. + TotalCO2e := LibraryRandom.RandIntInRange(100, 100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Ledger entry should be created when the sales document is posted. + SustainabilityLedgerEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityLedgerEntry.FindFirst(); + Assert.AreEqual( + -TotalCO2e, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), -TotalCO2e, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityLedgerEntryShouldBeCreatedWhenSalesDocumentIsPartiallyPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger entry should be created when the sales document is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", LibraryRandom.RandIntInRange(100, 100)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5) * -1; + + // [WHEN] Post a Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Ledger entry should be created when the sales document is posted. + SustainabilityLedgerEntry.SetRange("Document No.", PostedInvoiceNo); + SustainabilityLedgerEntry.FindFirst(); + Assert.AreEqual( + TotalCO2e, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), TotalCO2e, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityLedgerEntryShouldBeKnockedOffWhenCancelSalesCreditMemoIsPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger entry should be Kocked Off when the Cancel Sales Credit Memo is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(100); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Update Reason Code in Sales Header. + UpdateReasonCodeinSalesHeader(SalesHeader); + + // [WHEN] Post a Sales Document. + PostAndVerifyCancelSalesCreditMemo(SalesHeader); + + // [VERIFY] Verify Sustainability Ledger entry should be Kocked Off when the Cancel Sales Credit Memo is posted. + SustainabilityLedgerEntry.SetRange("Account No.", AccountCode); + SustainabilityLedgerEntry.CalcSums("CO2e Emission", "Emission CO2", "Emission CH4", "Emission N2O"); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityLedgerEntryShouldBeKnockedOffWhenCorrectiveSalesCreditMemoIsPosted() + var + SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger entry should be Kocked Off when the Corrective Sales Credit Memo is posted. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Update Reason Code in Sales Header. + UpdateReasonCodeinSalesHeader(SalesHeader); + + // [WHEN] Post a Sales Document. + PostAndVerifyCorrectiveSalesCreditMemo(SalesHeader); + + // [VERIFY] Verify Sustainability Ledger entry should be Kocked Off when the Corrective Sales Credit Memo is posted. + SustainabilityLedgerEntry.SetRange("Account No.", AccountCode); + SustainabilityLedgerEntry.CalcSums("CO2e Emission", "Emission CO2", "Emission CH4", "Emission N2O"); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."CO2e Emission", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("CO2e Emission"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CO2", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CO2"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission CH4", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission CH4"), 0, SustainabilityLedgerEntry.TableCaption())); + Assert.AreEqual( + 0, + SustainabilityLedgerEntry."Emission N2O", + StrSubstNo(ValueMustBeEqualErr, SustainabilityLedgerEntry.FieldCaption("Emission N2O"), 0, SustainabilityLedgerEntry.TableCaption())); + end; + + [Test] + procedure VerifySustainabilityFieldsInSalesShipmentLineAndSalesInvoiceLine() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesShipmentLine: Record "Sales Shipment Line"; + PostedSalesInvoiceSubform: TestPage "Posted Sales Invoice Subform"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Sales Shipment Line and Sales Invoice Line. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Fields In Sales Receipt Line and Sales Invoice Line. + PostedSalesInvoiceSubform.OpenEdit(); + PostedSalesInvoiceSubform.FILTER.SetFilter("Document No.", PostedInvoiceNo); + PostedSalesInvoiceSubform."Total CO2e".AssertEquals(TotalCO2e); + PostedSalesInvoiceSubform."Sust. Account No.".AssertEquals(AccountCode); + + SalesShipmentLine.SetRange("Sell-to Customer No.", SalesLine."Sell-to Customer No."); + SalesShipmentLine.FindFirst(); + Assert.AreEqual( + AccountCode, + SalesShipmentLine."Sust. Account No.", + StrSubstNo(ValueMustBeEqualErr, SalesShipmentLine.FieldCaption("Sust. Account No."), AccountCode, SalesShipmentLine.TableCaption())); + Assert.AreEqual( + TotalCO2e, + SalesShipmentLine."Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesShipmentLine.FieldCaption("Total CO2e"), TotalCO2e, SalesShipmentLine.TableCaption())); + end; + + [Test] + procedure VerifyPostedTotalCO2eInSalesLine() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify "Posted Total CO2e" field in the Sales line. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", LibraryRandom.RandInt(20)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5) * -1; + + // [WHEN] Post a Sales Document. + LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify "Posted Total CO2e" in the Sales line. + SalesLine.Get(SalesLine."Document Type", SalesLine."Document No.", SalesLine."Line No."); + Assert.AreEqual( + TotalCO2e, + SalesLine."Posted Total CO2e", + StrSubstNo(ValueMustBeEqualErr, SalesLine.FieldCaption("Posted Total CO2e"), TotalCO2e, SalesLine.TableCaption())); + end; + + [Test] + [HandlerFunctions('SalesOrderStatisticsPageHandler')] + procedure VerifySustainabilityFieldsInSalesOrderStatistics() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Sales Order Statistics. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" before posting of Sales order. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + + // [GIVEN] Post a Sales Document. + LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5) * -1); + + // [VERIFY] Verify Sustainability fields in Page "Sales Order Statistics" after partially posting of Sales order. + OpenSalesOrderStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + end; + + [Test] + [HandlerFunctions('SalesInvoiceStatisticsPageHandler')] + procedure VerifySustainabilityFieldsInSalesInvoiceStatistics() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Sales Invoice Statistics. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Invoice, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [VERIFY] Verify Sustainability fields in Page "Sales Invoice Statistics" before posting of Sales Invoice. + OpenSalesInvoiceStatistics(SalesHeader."No."); + LibraryVariableStorage.Clear(); + end; + + [Test] + procedure VerifySustainabilityFieldsInPostedSalesInvoiceStatistics() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedInvoiceNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Fields in Posted Sales Invoice Statistics. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(-TotalCO2e); + + // [WHEN] Post Sales Document. + PostedInvoiceNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability fields in Page "Posted Sales Invoice Statistics". + VerifyPostedSalesInvoiceStatistics(PostedInvoiceNo); + LibraryVariableStorage.Clear(); + end; + + [Test] + [HandlerFunctions('SalesInvoiceStatisticsPageHandler')] + procedure VerifySustainabilityFieldsInSalesCrMemoStatistics() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + CrMemoNo: Code[20]; + PostedCrMemoNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability fields in Posted Sales Cr Memo Statistics. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", LibraryRandom.RandInt(20)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [GIVEN] Update Reason Code in Sales Header. + UpdateReasonCodeinSalesHeader(SalesHeader); + + // [VERIFY] Verify Sustainability fields in Page "Sales Cr Memo Statistics" before posting of Sales Cr Memo. + CrMemoNo := CreateCorrectiveCreditMemoAndOpenSalesCrMemoStatistics(SalesHeader); + + // [GIVEN] Post Corrective Credit Memo. + SalesHeader.Get(SalesHeader."Document Type"::"Credit Memo", CrMemoNo); + PostedCrMemoNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [GIVEN] Clear Variable Storage. + LibraryVariableStorage.Clear(); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + + // [VERIFY] Verify Sustainability fields in Page "Posted Sales Cr Memo Statistics" after posting of Sales Cr Memo. + VerifyPostedSalesCrMemoStatistics(PostedCrMemoNo); + LibraryVariableStorage.Clear(); + end; + + [Test] + [HandlerFunctions('GLPostingPreviewHandler')] + procedure VerifySustainabilityLedgerEntryShouldBeCreatedDuringPreviewPostingOfSalesOrder() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger Entry should be created during Preview Posting of Sales order. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [GIVEN] Save a transaction. + Commit(); + + // [WHEN] Post a Sales Document. + asserterror LibrarySales.PreviewPostSalesDocument(SalesHeader); + + // [VERIFY] No errors occured - preview mode error only. + Assert.ExpectedError(''); + end; + + [Test] + [HandlerFunctions('NavigateFindEntriesHandler')] + procedure VerifySustainabilityLedgerEntryShouldBeShownWhenNavigatingPostedSalesInvoice() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesInvoiceHeader: Record "Sales Invoice Header"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + PostedPurchInvNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability Ledger Entry should be shown when navigating Posted Sales Invoice through NavigateFindEntriesHandler handler. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Generate "Total CO2e". + TotalCO2e := LibraryRandom.RandInt(20); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandInt(10)); + + // [GIVEN] Update "Unit Price", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", TotalCO2e); + SalesLine.Modify(); + + // [WHEN] Post a Sales Document. + PostedPurchInvNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [VERIFY] Verify Sustainability Ledger Entry should be shown when navigating Posted Sales Invoice through NavigateFindEntriesHandler handler. + SalesInvoiceHeader.Get(PostedPurchInvNo); + SalesInvoiceHeader.Navigate(); + end; + + [Test] + [HandlerFunctions('SalesInvoiceStatisticsPageHandler')] + procedure VerifySustainabilityFieldsInSalesCrMemoSubFormPage() + var + SustainabilityAccount: Record "Sustainability Account"; + SalesHeader: Record "Sales Header"; + SalesLine: Record "Sales Line"; + SalesCrMemoSubformPage: TestPage "Sales Cr. Memo Subform"; + PostedSalesCrMemoSubformPage: TestPage "Posted Sales Cr. Memo Subform"; + TotalCO2e: Decimal; + CategoryCode: Code[20]; + SubcategoryCode: Code[20]; + AccountCode: Code[20]; + CrMemoNo: Code[20]; + PostedCrMemoNo: Code[20]; + begin + // [SCENARIO 537481] Verify Sustainability fields in Sales Cr Memo SubForm Page. + LibrarySustainability.CleanUpBeforeTesting(); + + // [GIVEN] Create a Sustainability Account. + CreateSustainabilityAccount(AccountCode, CategoryCode, SubcategoryCode, LibraryRandom.RandInt(10)); + SustainabilityAccount.Get(AccountCode); + + // [GIVEN] Create a Sales Header. + LibrarySales.CreateSalesHeader(SalesHeader, "Sales Document Type"::Order, LibrarySales.CreateCustomerNo()); + + // [GIVEN] Create a Sales Line. + LibrarySales.CreateSalesLine( + SalesLine, + SalesHeader, + "Sales Line Type"::Item, + LibraryInventory.CreateItemNo(), + LibraryRandom.RandIntInRange(10, 10)); + + // [GIVEN] Update "Unit Price", "Qty. to Ship", "Sustainability Account No.", "Total CO2e" in the Sales line. + SalesLine.Validate("Unit Price", LibraryRandom.RandIntInRange(10, 200)); + SalesLine.Validate("Qty. to Ship", LibraryRandom.RandIntInRange(5, 5)); + SalesLine.Validate("Sust. Account No.", AccountCode); + SalesLine.Validate("Total CO2e", LibraryRandom.RandInt(20)); + SalesLine.Modify(); + + // [GIVEN] Save Expected "Total CO2e". + TotalCO2e := SalesLine."CO2e per Unit" * SalesLine."Qty. per Unit of Measure" * LibraryRandom.RandIntInRange(5, 5); + + // [WHEN] Save Sustainability fields. + LibraryVariableStorage.Enqueue(TotalCO2e); + LibraryVariableStorage.Enqueue(0); + + // [GIVEN] Update Reason Code in Sales Header. + UpdateReasonCodeinSalesHeader(SalesHeader); + + // [WHEN] Create Corrective Credit Memo. + CrMemoNo := CreateCorrectiveCreditMemoAndOpenSalesCrMemoStatistics(SalesHeader); + + // [VERIFY] Verify Sustainability fields before posting of Corrective Credit Memo. + SalesCrMemoSubformPage.OpenEdit(); + SalesCrMemoSubformPage.Filter.SetFilter("Document No.", CrMemoNo); + SalesCrMemoSubformPage.Filter.SetFilter("No.", SalesLine."No."); + SalesCrMemoSubformPage."Sust. Account No.".AssertEquals(AccountCode); + SalesCrMemoSubformPage."Total CO2e".AssertEquals(TotalCO2e); + + // [GIVEN] Post Corrective Credit Memo. + SalesHeader.Get(SalesHeader."Document Type"::"Credit Memo", CrMemoNo); + PostedCrMemoNo := LibrarySales.PostSalesDocument(SalesHeader, true, true); + + // [GIVEN] Clear Variable Storage. + LibraryVariableStorage.Clear(); + + // [VERIFY] Verify Sustainability fields After posting of Corrective Credit Memo. + PostedSalesCrMemoSubformPage.OpenEdit(); + PostedSalesCrMemoSubformPage.Filter.SetFilter("Document No.", PostedCrMemoNo); + PostedSalesCrMemoSubformPage.Filter.SetFilter("No.", SalesLine."No."); + PostedSalesCrMemoSubformPage."Sust. Account No.".AssertEquals(AccountCode); + PostedSalesCrMemoSubformPage."Total CO2e".AssertEquals(TotalCO2e); + end; + local procedure CreateUserSetup(var UserSetup: Record "User Setup"; UserID: Code[50]) begin UserSetup.Init(); @@ -2265,6 +3040,112 @@ codeunit 148184 "Sustainability Posting Test" AccountTok, LibraryRandom.RandText(20), CategoryTok, SubcategoryTok, Enum::"Sustainability Account Type"::Posting, '', true); end; + local procedure UpdateReasonCodeinSalesHeader(var SalesHeader: Record "Sales Header") + var + ReasonCode: Record "Reason Code"; + begin + LibraryERM.CreateReasonCode(ReasonCode); + + SalesHeader.Validate("Reason Code", ReasonCode.Code); + SalesHeader.Modify(); + end; + + local procedure PostAndVerifyCancelSalesCreditMemo(SalesHeader: Record "Sales Header") + var + SalesInvoiceHeader: Record "Sales Invoice Header"; + CorrectPostedSalesInvoice: Codeunit "Correct Posted Sales Invoice"; + PostedDocNumber: Code[20]; + begin + PostedDocNumber := LibrarySales.PostSalesDocument(SalesHeader, true, true); + SalesInvoiceHeader.Get(PostedDocNumber); + CorrectPostedSalesInvoice.CancelPostedInvoice(SalesInvoiceHeader); + end; + + local procedure PostAndVerifyCorrectiveSalesCreditMemo(SalesHeader: Record "Sales Header") + var + SalesInvoiceHeader: Record "Sales Invoice Header"; + CorrectPostedSalesInvoice: Codeunit "Correct Posted Sales Invoice"; + PostedDocNumber: Code[20]; + begin + PostedDocNumber := LibrarySales.PostSalesDocument(SalesHeader, true, true); + SalesInvoiceHeader.Get(PostedDocNumber); + + // Create Corrective Credit Memo. + CorrectPostedSalesInvoice.CreateCreditMemoCopyDocument(SalesInvoiceHeader, SalesHeader); + + // Post Corrective Credit Memo. + LibrarySales.PostSalesDocument(SalesHeader, true, true); + end; + + local procedure OpenSalesOrderStatistics(No: Code[20]) + var + SalesOrder: TestPage "Sales Order"; + begin + SalesOrder.OpenEdit(); + SalesOrder.FILTER.SetFilter("No.", No); + SalesOrder.Statistics.Invoke(); + end; + + local procedure OpenSalesInvoiceStatistics(No: Code[20]) + var + SalesInvoice: TestPage "Sales Invoice"; + begin + SalesInvoice.OpenEdit(); + SalesInvoice.FILTER.SetFilter("No.", No); + SalesInvoice.Statistics.Invoke(); + end; + + local procedure OpenSalesCrMemoStatistics(No: Code[20]) + var + SalesCreditMemo: TestPage "Sales Credit Memo"; + begin + SalesCreditMemo.OpenEdit(); + SalesCreditMemo.FILTER.SetFilter("No.", No); + SalesCreditMemo.Statistics.Invoke(); + end; + + local procedure VerifyPostedSalesCrMemoStatistics(No: Code[20]) + var + PostedSalesCreditMemoStatisticsPage: TestPage "Sales Credit Memo Statistics"; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + PostedSalesCreditMemoStatisticsPage.OpenEdit(); + PostedSalesCreditMemoStatisticsPage.FILTER.SetFilter("No.", No); + PostedSalesCreditMemoStatisticsPage."Total CO2e".AssertEquals(PostedTotalCO2e); + end; + + local procedure VerifyPostedSalesInvoiceStatistics(No: Code[20]) + var + PostedSalesInvoiceStatisticsPage: TestPage "Sales Invoice Statistics"; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + PostedSalesInvoiceStatisticsPage.OpenEdit(); + PostedSalesInvoiceStatisticsPage.FILTER.SetFilter("No.", No); + PostedSalesInvoiceStatisticsPage."Total CO2e".AssertEquals(PostedTotalCO2e); + end; + + local procedure CreateCorrectiveCreditMemoAndOpenSalesCrMemoStatistics(SalesHeader: Record "Sales Header"): Code[20] + var + SalesInvoiceHeader: Record "Sales Invoice Header"; + CorrectPostedSalesInvoice: Codeunit "Correct Posted Sales Invoice"; + PostedDocNumber: Code[20]; + begin + PostedDocNumber := LibrarySales.PostSalesDocument(SalesHeader, true, true); + SalesInvoiceHeader.Get(PostedDocNumber); + + // Create Corrective Credit Memo. + CorrectPostedSalesInvoice.CreateCreditMemoCopyDocument(SalesInvoiceHeader, SalesHeader); + + // Open Sales Cr Memo Statistics. + OpenSalesCrMemoStatistics(SalesHeader."No."); + + exit(SalesHeader."No."); + end; + [ModalPageHandler] [Scope('OnPrem')] procedure PurchaseOrderStatisticsPageHandler(var PurchaseOrderStatisticsPage: TestPage "Purchase Order Statistics") @@ -2291,6 +3172,20 @@ codeunit 148184 "Sustainability Posting Test" PurchaseOrderStatisticsPage."Posted Emission N2O".AssertEquals(PostedEmissionN2O); end; + [ModalPageHandler] + [Scope('OnPrem')] + procedure SalesOrderStatisticsPageHandler(var SalesOrderStatisticsPage: TestPage "Sales Order Statistics") + var + TotalCO2e: Variant; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(TotalCO2e); + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + SalesOrderStatisticsPage."Total CO2e".AssertEquals(TotalCO2e); + SalesOrderStatisticsPage."Posted Total CO2e".AssertEquals(PostedTotalCO2e); + end; + [ModalPageHandler] [Scope('OnPrem')] procedure PurchaseInvoiceStatisticsPageHandler(var PurchaseStatisticsPage: TestPage "Purchase Statistics") @@ -2317,6 +3212,20 @@ codeunit 148184 "Sustainability Posting Test" PurchaseStatisticsPage."Posted Emission N2O".AssertEquals(PostedEmissionN2O); end; + [ModalPageHandler] + [Scope('OnPrem')] + procedure SalesInvoiceStatisticsPageHandler(var SalesStatisticsPage: TestPage "Sales Statistics") + var + TotalCO2e: Variant; + PostedTotalCO2e: Variant; + begin + LibraryVariableStorage.Dequeue(TotalCO2e); + LibraryVariableStorage.Dequeue(PostedTotalCO2e); + + SalesStatisticsPage."Total CO2e".AssertEquals(TotalCO2e); + SalesStatisticsPage."Posted Total CO2e".AssertEquals(PostedTotalCO2e); + end; + [PageHandler] [Scope('OnPrem')] procedure GLPostingPreviewHandler(var GLPostingPreview: TestPage "G/L Posting Preview")